@lovrabet/rabetbase-cli 2.0.2-beta.9 → 2.0.4-beta.4
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 +4 -0
- 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/app/add.js +1 -0
- package/lib/commands/app/index.js +1 -0
- package/lib/commands/app/list.js +1 -0
- package/lib/commands/app/remote.js +1 -0
- package/lib/commands/app/remove.js +1 -0
- package/lib/commands/app/shared.js +1 -0
- package/lib/commands/app/use.js +1 -0
- package/lib/commands/auth.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/build.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 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -0
- package/lib/commands/config/get.js +1 -0
- package/lib/commands/config/index.js +1 -0
- package/lib/commands/config/list.js +1 -0
- package/lib/commands/config/set.js +1 -0
- package/lib/commands/config/shared.js +1 -0
- package/lib/commands/create.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/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.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/preview.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run.js +1 -1
- package/lib/commands/skill.js +1 -1
- package/lib/commands/smart-init.js +1 -0
- 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/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/start.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/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/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/errors.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/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -0
- package/lib/utils/ai_config.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 -0
- 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 -0
- package/lib/utils/with-active-cookie.js +1 -0
- package/package.json +7 -11
- package/lib/commands/app.js +0 -1
- package/lib/commands/config.js +0 -1
- package/lib/config/config-help.js +0 -1
- package/lib/config/main.js +0 -1
- package/lib/create-app/task-finished.js +0 -1
- package/lib/create-app/task-loading.js +0 -1
- package/lib/create-app/task-running.js +0 -1
- package/lib/create-app/task-time.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a38_0x5bc37a=a38_0xa31c;(function(_0x2e6663,_0x42ecc4){const _0x434fa0=a38_0xa31c,_0x2f1ab0=_0x2e6663();while(!![]){try{const _0x834dae=-parseInt(_0x434fa0(0xd1))/0x1+parseInt(_0x434fa0(0xc7))/0x2*(parseInt(_0x434fa0(0xcc))/0x3)+parseInt(_0x434fa0(0xc0))/0x4*(parseInt(_0x434fa0(0xd2))/0x5)+parseInt(_0x434fa0(0xcf))/0x6+parseInt(_0x434fa0(0xc2))/0x7+-parseInt(_0x434fa0(0xd0))/0x8*(parseInt(_0x434fa0(0xc5))/0x9)+parseInt(_0x434fa0(0xc8))/0xa*(-parseInt(_0x434fa0(0xca))/0xb);if(_0x834dae===_0x42ecc4)break;else _0x2f1ab0['push'](_0x2f1ab0['shift']());}catch(_0x24d9d1){_0x2f1ab0['push'](_0x2f1ab0['shift']());}}}(a38_0x278e,0x809cb));function a38_0xa31c(_0x2d3b34,_0x4ef929){_0x2d3b34=_0x2d3b34-0xc0;const _0x278e0e=a38_0x278e();let _0xa31c7c=_0x278e0e[_0x2d3b34];return _0xa31c7c;}export const CODE_FLAG={'name':a38_0x5bc37a(0xc1),'type':a38_0x5bc37a(0xc4),'required':!![],'description':a38_0x5bc37a(0xc6),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a38_0x5bc37a(0xce)}};export const CODE_FLAG_OPTIONAL={'name':a38_0x5bc37a(0xc1),'type':'string','required':![],'description':a38_0x5bc37a(0xc6),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a38_0x5bc37a(0xce)}};function a38_0x278e(){const _0xbeefd9=['code','1086610GsauCf','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','string','36gNJwVQ','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1506wHcVYV','370UCoeGJ','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','292611jMsZJz','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','3459Aralyj','sqlcode','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','5613906SQRXDS','1588624HzPtvf','176334LIhyyr','55nAzkKi','appcode','190032ImLFyr'];a38_0x278e=function(){return _0xbeefd9;};return a38_0x278e();}export const SQLCODE_FLAG={'name':a38_0x5bc37a(0xcd),'type':a38_0x5bc37a(0xc4),'required':!![],'description':a38_0x5bc37a(0xcb),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a38_0x5bc37a(0xc9)}};export const APPCODE_FLAG_OPTIONAL={'name':a38_0x5bc37a(0xd3),'type':'string','required':![],'description':a38_0x5bc37a(0xc3)};export const SQLCODE_FLAG_OPTIONAL={'name':a38_0x5bc37a(0xcd),'type':'string','required':![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a38_0x5bc37a(0xc9)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a39_0x304d(_0x1ce8b7,_0x434ee4){_0x1ce8b7=_0x1ce8b7-0x1cf;const _0x1967be=a39_0x1967();let _0x304db8=_0x1967be[_0x1ce8b7];return _0x304db8;}function a39_0x1967(){const _0x3ffe5c=['4476672LSewss','18CWUPEV','3447684oPzVti','trim','116936iVMCRr','3252016YYxmVA','App\x20Code\x20cannot\x20exceed\x20100\x20characters','4GCakCI','1675950deWDEj','2045407yLYMyq','2326865BaIpyI','test','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'];a39_0x1967=function(){return _0x3ffe5c;};return a39_0x1967();}(function(_0x1c61ad,_0x1551fa){const _0xc5f43f=a39_0x304d,_0x49b0ce=_0x1c61ad();while(!![]){try{const _0x599774=parseInt(_0xc5f43f(0x1d3))/0x1+parseInt(_0xc5f43f(0x1d7))/0x2+-parseInt(_0xc5f43f(0x1d1))/0x3+parseInt(_0xc5f43f(0x1d6))/0x4*(-parseInt(_0xc5f43f(0x1d9))/0x5)+parseInt(_0xc5f43f(0x1cf))/0x6+-parseInt(_0xc5f43f(0x1d8))/0x7+-parseInt(_0xc5f43f(0x1d4))/0x8*(-parseInt(_0xc5f43f(0x1d0))/0x9);if(_0x599774===_0x1551fa)break;else _0x49b0ce['push'](_0x49b0ce['shift']());}catch(_0x5a309e){_0x49b0ce['push'](_0x49b0ce['shift']());}}}(a39_0x1967,0x943f9));export function validateAppcode(_0x25f537){const _0x410f7c=a39_0x304d,_0x42d2a9=_0x25f537[_0x410f7c(0x1d2)]();if(!_0x42d2a9)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x42d2a9['length']>0x64)return{'valid':![],'message':_0x410f7c(0x1d5)};if(!/^[A-Za-z0-9_-]+$/[_0x410f7c(0x1da)](_0x42d2a9))return{'valid':![],'message':_0x410f7c(0x1db)};return{'valid':!![]};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a40_0x574b(_0x5b7c82,_0x5be1d0){_0x5b7c82=_0x5b7c82-0xdc;const _0x16621f=a40_0x1662();let _0x574bd2=_0x16621f[_0x5b7c82];return _0x574bd2;}const a40_0x189bc1=a40_0x574b;(function(_0x5b4034,_0x24749f){const _0x26e319=a40_0x574b,_0x229cb9=_0x5b4034();while(!![]){try{const _0x33f11e=-parseInt(_0x26e319(0xe3))/0x1+-parseInt(_0x26e319(0xe0))/0x2+parseInt(_0x26e319(0xec))/0x3*(parseInt(_0x26e319(0xeb))/0x4)+-parseInt(_0x26e319(0xe6))/0x5*(parseInt(_0x26e319(0xe5))/0x6)+-parseInt(_0x26e319(0xed))/0x7+parseInt(_0x26e319(0xee))/0x8+-parseInt(_0x26e319(0xef))/0x9*(-parseInt(_0x26e319(0xf1))/0xa);if(_0x33f11e===_0x24749f)break;else _0x229cb9['push'](_0x229cb9['shift']());}catch(_0x276897){_0x229cb9['push'](_0x229cb9['shift']());}}}(a40_0x1662,0xbb5fb));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a40_0x1662(){const _0x1406cd=['read','string','1225921VpXENn','Key\x20not\x20found:\x20','2898uTyYjn','3525koAIQX','validation','key','object','Get\x20a\x20config\x20value\x20by\x20key','1176432uqblld','15bJUGyn','1754081iaMxuV','12024952KaxeBm','9OwhwcT','app','30020uoftOZ','Usage:\x20','Config\x20key\x20to\x20read','Missing\x20key.','\x20config\x20get\x20--key\x20<key>','784318QWsYGs'];a40_0x1662=function(){return _0x1406cd;};return a40_0x1662();}async function execute(_0x402fa4){const _0x112a6b=a40_0x574b,_0x4a480a=_0x402fa4['str'](_0x112a6b(0xe8));if(!_0x4a480a)throw CliErrors[_0x112a6b(0xe7)](_0x112a6b(0xde),_0x112a6b(0xdc)+CLI_BIN_NAME+_0x112a6b(0xdf));const _0x138eb0=readConfig(),_0x29f0c0=_0x4a480a===_0x112a6b(0xf0)?'appcode':_0x4a480a,_0x27fc90=_0x138eb0[_0x29f0c0];if(_0x27fc90===undefined)throw CliErrors['validation'](_0x112a6b(0xe4)+_0x4a480a);return{'ok':!![],'data':typeof _0x27fc90===_0x112a6b(0xe9)?_0x27fc90:{[_0x29f0c0]:_0x27fc90},'message':typeof _0x27fc90===_0x112a6b(0xe9)?undefined:String(_0x27fc90)};}export const configGetDefinition={'service':'config','command':'get','description':a40_0x189bc1(0xea),'risk':a40_0x189bc1(0xe1),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a40_0x189bc1(0xe8),'type':a40_0x189bc1(0xe2),'description':a40_0x189bc1(0xdd),'required':!![]}],'execute':execute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x184b19,_0x1fa213){const _0x3fafe3=a41_0x1cdb,_0x2c6bc9=_0x184b19();while(!![]){try{const _0x7a1bb7=-parseInt(_0x3fafe3(0x1b9))/0x1*(-parseInt(_0x3fafe3(0x1b7))/0x2)+-parseInt(_0x3fafe3(0x1bc))/0x3+parseInt(_0x3fafe3(0x1ba))/0x4+parseInt(_0x3fafe3(0x1b8))/0x5+-parseInt(_0x3fafe3(0x1be))/0x6*(parseInt(_0x3fafe3(0x1bd))/0x7)+parseInt(_0x3fafe3(0x1bb))/0x8*(parseInt(_0x3fafe3(0x1bf))/0x9)+parseInt(_0x3fafe3(0x1c0))/0xa;if(_0x7a1bb7===_0x1fa213)break;else _0x2c6bc9['push'](_0x2c6bc9['shift']());}catch(_0x3c14c9){_0x2c6bc9['push'](_0x2c6bc9['shift']());}}}(a41_0x5a47,0x8fd8d));import{configListDefinition}from'./list.js';function a41_0x1cdb(_0x164e83,_0x2cfbf2){_0x164e83=_0x164e83-0x1b7;const _0x5a4732=a41_0x5a47();let _0x1cdb7c=_0x5a4732[_0x164e83];return _0x1cdb7c;}import{configGetDefinition}from'./get.js';import{configSetDefinition}from'./set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a41_0x5a47(){const _0x3fd018=['7624xlIcJp','2860857YlIkvU','126zMvGlm','214386igCUII','990SPOefL','3636020SVqQQx','4WscuRl','4395865FZeEMT','333001EkdIFw','689468HauXKQ'];a41_0x5a47=function(){return _0x3fd018;};return a41_0x5a47();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a42_0x20bb(_0x42541f,_0x53c8d4){_0x42541f=_0x42541f-0xee;const _0x858d19=a42_0x858d();let _0x20bb81=_0x858d19[_0x42541f];return _0x20bb81;}const a42_0x101639=a42_0x20bb;function a42_0x858d(){const _0x425268=['4221476YOVupl','63jwbtQI','boolean','622466LOQyan','7656624AWHpQl','config','3VVOCjJ','global','10026764vsOJZQ','524280OaGmaW','list','5tjmEDQ','501090spQmto','7picVOj','List\x20all\x20config\x20values','1203949oaQRZH','bool'];a42_0x858d=function(){return _0x425268;};return a42_0x858d();}(function(_0x464228,_0x18f14c){const _0x30ea69=a42_0x20bb,_0x16f2be=_0x464228();while(!![]){try{const _0x2da3c8=-parseInt(_0x30ea69(0xef))/0x1+-parseInt(_0x30ea69(0xf4))/0x2*(-parseInt(_0x30ea69(0xf7))/0x3)+parseInt(_0x30ea69(0xf1))/0x4*(parseInt(_0x30ea69(0xfc))/0x5)+parseInt(_0x30ea69(0xfd))/0x6+-parseInt(_0x30ea69(0xfe))/0x7*(-parseInt(_0x30ea69(0xf5))/0x8)+-parseInt(_0x30ea69(0xf2))/0x9*(-parseInt(_0x30ea69(0xfa))/0xa)+-parseInt(_0x30ea69(0xf9))/0xb;if(_0x2da3c8===_0x18f14c)break;else _0x16f2be['push'](_0x16f2be['shift']());}catch(_0xcf3d5f){_0x16f2be['push'](_0x16f2be['shift']());}}}(a42_0x858d,0xa0d1e));import{readScopedConfig}from'./shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2f6b62){const _0x40008f=a42_0x20bb,_0x46f45e=_0x2f6b62[_0x40008f(0xf0)](_0x40008f(0xf8))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x46f45e};}export const configListDefinition={'service':a42_0x101639(0xf6),'command':a42_0x101639(0xfb),'description':a42_0x101639(0xee),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a42_0x101639(0xf8),'type':a42_0x101639(0xf3),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a43_0x5723(_0xda0ec1,_0x26327e){_0xda0ec1=_0xda0ec1-0x16c;const _0x1b518e=a43_0x1b51();let _0x5723b2=_0x1b518e[_0xda0ec1];return _0x5723b2;}const a43_0x2066e5=a43_0x5723;function a43_0x1b51(){const _0x4dc305=['string','production','11777513wfNDMJ','Missing\x20value.','613404JqOcoA','25edIwLH','Project','30szdmjZ','includes','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','boolean','env','Config\x20value','bool','Global','value','3941eJZoer','appcode','Usage:\x20','7064ytcqSm','key','52FBwbuJ','Missing\x20key.','app','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','106521oMIgBn','\x20set\x20to:\x20','length','Set\x20a\x20config\x20value','daily','1376480KKGwKC','5891328OssFpE','global','Invalid\x20locale\x20value.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','set','validation','write','str','16598vBxkOz','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US'];a43_0x1b51=function(){return _0x4dc305;};return a43_0x1b51();}(function(_0x6a5ddf,_0x42cf18){const _0x8481c7=a43_0x5723,_0x29e30a=_0x6a5ddf();while(!![]){try{const _0x1843b3=-parseInt(_0x8481c7(0x176))/0x1*(-parseInt(_0x8481c7(0x17f))/0x2)+-parseInt(_0x8481c7(0x191))/0x3*(-parseInt(_0x8481c7(0x18d))/0x4)+-parseInt(_0x8481c7(0x17d))/0x5*(-parseInt(_0x8481c7(0x17c))/0x6)+-parseInt(_0x8481c7(0x188))/0x7*(parseInt(_0x8481c7(0x18b))/0x8)+parseInt(_0x8481c7(0x16e))/0x9+parseInt(_0x8481c7(0x16d))/0xa+-parseInt(_0x8481c7(0x17a))/0xb;if(_0x1843b3===_0x42cf18)break;else _0x29e30a['push'](_0x29e30a['shift']());}catch(_0x4cd8d6){_0x29e30a['push'](_0x29e30a['shift']());}}}(a43_0x1b51,0x6cecf));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'./shared.js';async function execute(_0x3b8663){const _0x2a9542=a43_0x5723,_0x4c10a7=_0x3b8663[_0x2a9542(0x175)]('key'),_0x112a7b=_0x3b8663['str'](_0x2a9542(0x187));if(!_0x4c10a7)throw CliErrors[_0x2a9542(0x173)](_0x2a9542(0x18e),'Usage:\x20'+CLI_BIN_NAME+_0x2a9542(0x181));if(_0x112a7b===undefined||_0x112a7b==='')throw CliErrors[_0x2a9542(0x173)](_0x2a9542(0x17b),_0x2a9542(0x18a)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x112a7b[_0x2a9542(0x193)]>0x1f4)throw CliErrors[_0x2a9542(0x173)](_0x2a9542(0x171));if(_0x4c10a7===_0x2a9542(0x183)&&!['online',_0x2a9542(0x179),_0x2a9542(0x16c)][_0x2a9542(0x180)](_0x112a7b))throw CliErrors[_0x2a9542(0x173)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily,\x20online');if(_0x4c10a7==='locale'&&!normalizeLocale(_0x112a7b))throw CliErrors[_0x2a9542(0x173)](_0x2a9542(0x170),_0x2a9542(0x177));const _0x417435={'global':_0x3b8663[_0x2a9542(0x185)](_0x2a9542(0x16f))},_0x42be32=resolveWriteScope(_0x417435),_0x27d899=readScopedConfig(_0x42be32);let _0x248488=_0x4c10a7,_0x16275a=_0x112a7b;_0x4c10a7==='app'&&(_0x248488=_0x2a9542(0x189),delete _0x27d899[_0x2a9542(0x18f)]);_0x4c10a7===_0x2a9542(0x189)&&delete _0x27d899[_0x2a9542(0x18f)];_0x4c10a7==='locale'&&(_0x16275a=normalizeLocale(_0x112a7b));_0x27d899[_0x248488]=_0x16275a,writeScopedConfig(_0x27d899,_0x42be32);const _0x3c0be7=_0x42be32===_0x2a9542(0x16f)?_0x2a9542(0x186):_0x2a9542(0x17e);return{'ok':!![],'message':'✓\x20'+_0x3c0be7+'\x20'+_0x248488+_0x2a9542(0x192)+_0x16275a};}export const configSetDefinition={'service':'config','command':a43_0x2066e5(0x172),'description':a43_0x2066e5(0x194),'risk':a43_0x2066e5(0x174),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x2066e5(0x18c),'type':'string','description':'Config\x20key','required':!![]},{'name':a43_0x2066e5(0x187),'type':a43_0x2066e5(0x178),'description':a43_0x2066e5(0x184),'required':!![]},{'name':a43_0x2066e5(0x16f),'type':a43_0x2066e5(0x182),'description':a43_0x2066e5(0x190),'default':![]}],'execute':execute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a44_0x1ce9(_0x106b62,_0xa9f956){_0x106b62=_0x106b62-0x1a3;const _0x224ada=a44_0x224a();let _0x1ce969=_0x224ada[_0x106b62];return _0x1ce969;}const a44_0x58e28e=a44_0x1ce9;(function(_0x53f6af,_0x27a7de){const _0x5b6af7=a44_0x1ce9,_0x31182d=_0x53f6af();while(!![]){try{const _0x50c8b9=-parseInt(_0x5b6af7(0x1a6))/0x1+parseInt(_0x5b6af7(0x1a3))/0x2*(parseInt(_0x5b6af7(0x1ad))/0x3)+parseInt(_0x5b6af7(0x1b1))/0x4+-parseInt(_0x5b6af7(0x1ab))/0x5+-parseInt(_0x5b6af7(0x1a5))/0x6*(parseInt(_0x5b6af7(0x1a8))/0x7)+-parseInt(_0x5b6af7(0x1a4))/0x8*(parseInt(_0x5b6af7(0x1b0))/0x9)+-parseInt(_0x5b6af7(0x1a7))/0xa*(-parseInt(_0x5b6af7(0x1aa))/0xb);if(_0x50c8b9===_0x27a7de)break;else _0x31182d['push'](_0x31182d['shift']());}catch(_0x5284ab){_0x31182d['push'](_0x31182d['shift']());}}}(a44_0x224a,0x6023d));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export{CLI_BIN_NAME};const LOCALE_MAP={'zh':a44_0x58e28e(0x1ac),'zh-cn':a44_0x58e28e(0x1ac),'zh_cn':a44_0x58e28e(0x1ac),'en':a44_0x58e28e(0x1ae),'en-us':a44_0x58e28e(0x1ae),'en_us':a44_0x58e28e(0x1ae)};export function normalizeLocale(_0x5d0efd){if(!_0x5d0efd)return null;return LOCALE_MAP[_0x5d0efd['toLowerCase']()]??null;}export function resolveWriteScope(_0x1861f8){const _0x34d222=a44_0x58e28e;if(_0x1861f8['global'])return _0x34d222(0x1af);return isInProject()?_0x34d222(0x1a9):_0x34d222(0x1af);}function a44_0x224a(){const _0x2e31fb=['11155iyzzrI','600LPPCpv','4236463VrcaFY','project','255409DkYBfB','1930885aPQTGV','zh-CN','630903mbZVEL','en-US','global','9YgRdGP','477704wUViea','2dhshRi','2612296neNfon','6mMctqc'];a44_0x224a=function(){return _0x2e31fb;};return a44_0x224a();}export function readScopedConfig(_0x2621a3){return readConfigFile(resolveWriteConfigPath(_0x2621a3));}export function writeScopedConfig(_0x4255ee,_0x11de69){writeConfigFile(resolveWriteConfigPath(_0x11de69),_0x4255ee);}
|
package/lib/commands/create.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0xab7906=a45_0x3fe5;function a45_0x239e(){const _0x26de14=['auth','trim','logger','649280fasVvx','nonInteractive','6835293prXdRk','cookie','1266GXvnbz','rabetbase\x20project\x20create\x20[<project-name>]\x20[flags]','Project\x20name','name','../create-app/non-interactive.js','279860rnKAsN','validation','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','35394DkiwiP','901296QXQPdm','28042HitvpL','非交互模式创建项目:\x20','880360BwiroQ','create','appcode','Target\x20environment','12fEuheh','5tAVlqQ','env','string','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','info'];a45_0x239e=function(){return _0x26de14;};return a45_0x239e();}(function(_0x28d542,_0x419b11){const _0x5e1bd9=a45_0x3fe5,_0x2f0da0=_0x28d542();while(!![]){try{const _0x4823df=parseInt(_0x5e1bd9(0x81))/0x1+parseInt(_0x5e1bd9(0x78))/0x2*(-parseInt(_0x5e1bd9(0x70))/0x3)+-parseInt(_0x5e1bd9(0x6d))/0x4*(-parseInt(_0x5e1bd9(0x79))/0x5)+-parseInt(_0x5e1bd9(0x68))/0x6*(-parseInt(_0x5e1bd9(0x72))/0x7)+-parseInt(_0x5e1bd9(0x71))/0x8+-parseInt(_0x5e1bd9(0x66))/0x9+-parseInt(_0x5e1bd9(0x74))/0xa;if(_0x4823df===_0x419b11)break;else _0x2f0da0['push'](_0x2f0da0['shift']());}catch(_0x222c69){_0x2f0da0['push'](_0x2f0da0['shift']());}}}(a45_0x239e,0x8242c));import{createApp}from'../create-app/main.js';import{CliErrors}from'../errors.js';function a45_0x3fe5(_0x3b5e58,_0x5e3f3d){_0x3b5e58=_0x3b5e58-0x65;const _0x239e92=a45_0x239e();let _0x3fe5e1=_0x239e92[_0x3b5e58];return _0x3fe5e1;}const flagDefs=[{'name':a45_0xab7906(0x6b),'type':a45_0xab7906(0x7b),'description':a45_0xab7906(0x6a)},{'name':a45_0xab7906(0x7a),'type':a45_0xab7906(0x7b),'description':a45_0xab7906(0x77)},{'name':a45_0xab7906(0x76),'type':'string','description':a45_0xab7906(0x6f)}];export const createCommand={'name':'create','description':'Create\x20a\x20new\x20project','usage':a45_0xab7906(0x69),'flags':flagDefs,async 'run'(_0xc8c59e,_0x14b99e,_0x13e040){const _0xa111a0=a45_0xab7906,_0xb35946=_0x13e040[_0xa111a0(0x6b)]?.[_0xa111a0(0x7f)]()||_0x14b99e[0x0]?.[_0xa111a0(0x7f)](),_0x3a436e=_0x13e040[_0xa111a0(0x7a)],_0x254e86=_0x13e040[_0xa111a0(0x76)];if(_0xc8c59e[_0xa111a0(0x65)]){if(!_0xb35946)throw CliErrors[_0xa111a0(0x6e)](_0xa111a0(0x7c),'Usage:\x20rabetbase\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20[--ci]');_0xc8c59e[_0xa111a0(0x80)][_0xa111a0(0x7d)](_0xa111a0(0x75),_0xa111a0(0x73)+_0xb35946);const {createProjectNonInteractive:_0x30c985}=await import(_0xa111a0(0x6c));await _0x30c985(_0xb35946,_0x3a436e,_0x254e86,_0xc8c59e[_0xa111a0(0x7e)][_0xa111a0(0x67)]);}else await createApp({'projectCode':_0xb35946,'appCode':_0x254e86,'env':_0x3a436e,'cookie':_0xc8c59e[_0xa111a0(0x7e)]['cookie']});}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x3412(_0xdcdcb9,_0xe4b9b3){_0xdcdcb9=_0xdcdcb9-0x1b8;const _0x5a7735=a46_0x5a77();let _0x34122f=_0x5a7735[_0xdcdcb9];return _0x34122f;}const a46_0x5525cf=a46_0x3412;(function(_0x1a9aa6,_0xdff3df){const _0x2140bf=a46_0x3412,_0x214e62=_0x1a9aa6();while(!![]){try{const _0x42e434=parseInt(_0x2140bf(0x1bf))/0x1+-parseInt(_0x2140bf(0x1cc))/0x2+parseInt(_0x2140bf(0x1d7))/0x3+parseInt(_0x2140bf(0x1d3))/0x4*(-parseInt(_0x2140bf(0x1d8))/0x5)+-parseInt(_0x2140bf(0x1ce))/0x6+parseInt(_0x2140bf(0x1db))/0x7*(parseInt(_0x2140bf(0x1ec))/0x8)+-parseInt(_0x2140bf(0x1d0))/0x9*(-parseInt(_0x2140bf(0x1bd))/0xa);if(_0x42e434===_0xdff3df)break;else _0x214e62['push'](_0x214e62['shift']());}catch(_0x46ebfe){_0x214e62['push'](_0x214e62['shift']());}}}(a46_0x5a77,0x3c494));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../common/flags.js';function normalizeField(_0x2ee327){const _0x1df60e=a46_0x3412;if(_0x2ee327['deleted'])return null;const _0x4169e9=Boolean(_0x2ee327['displayName']!==undefined||_0x2ee327[_0x1df60e(0x1e5)]!==undefined);let _0x2a365a={};if(!_0x4169e9&&typeof _0x2ee327['extend']===_0x1df60e(0x1e0))try{_0x2a365a=JSON[_0x1df60e(0x1ed)](_0x2ee327[_0x1df60e(0x1e2)]);}catch{}const _0x5b5d53=_0x4169e9?_0x2ee327[_0x1df60e(0x1ef)]:_0x2ee327[_0x1df60e(0x1d2)],_0x8b67f8=_0x4169e9?_0x2ee327[_0x1df60e(0x1e9)]:_0x2ee327['name'],_0x22b661=_0x4169e9?_0x2ee327['doType']:_0x2ee327[_0x1df60e(0x1cb)]||_0x2ee327[_0x1df60e(0x1d6)],_0x3b2853=_0x4169e9?_0x2ee327['pkField']===!![]:_0x2a365a['pkField']===!![],_0x374323=_0x4169e9?_0x2ee327[_0x1df60e(0x1e3)]===!![]:_0x2a365a[_0x1df60e(0x1e3)]===!![],_0x1898df=_0x4169e9?_0x2ee327[_0x1df60e(0x1bc)]??null:_0x2a365a[_0x1df60e(0x1bc)]??null,_0x49ed05={'name':_0x5b5d53,'displayName':_0x8b67f8||_0x5b5d53,'type':_0x22b661,'dbType':_0x2ee327[_0x1df60e(0x1c9)],'pk':_0x3b2853,'required':_0x374323,'description':_0x2ee327[_0x1df60e(0x1e1)]||undefined};return Array[_0x1df60e(0x1c0)](_0x1898df)&&_0x1898df[_0x1df60e(0x1b8)]>0x0&&(_0x49ed05[_0x1df60e(0x1bc)]=_0x1898df),_0x49ed05;}function a46_0x5a77(){const _0x271613=['datasetKey','toFieldLabel','read','path','dbType','modelId','type','370196jGcVSY','toField','2602668ufCJiS','detail','117AYwxIS','method','code','1065028DzvEkr','toDatasetName','tableName','dataType','292587QartTI','5xQXiLt','push','bool','108619ukHNsu','Return\x20full\x20raw\x20detail\x20object','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','properties','modelCode','string','description','extend','required','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','doType','toTableName','dataset','verbose','displayName','object','operations','88YJwbLF','parse','indexes','name','length','relations','str','dbtableConfig','options','544590RQIyos','sourceType','155882QsRlAs','isArray','map','toDatasetCode','filter','fields'];a46_0x5a77=function(){return _0x271613;};return a46_0x5a77();}export const datasetDetail={'service':'dataset','command':a46_0x5525cf(0x1cf),'description':a46_0x5525cf(0x1dd),'risk':a46_0x5525cf(0x1c7),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':a46_0x5525cf(0x1e0),'description':a46_0x5525cf(0x1e4)},{'name':a46_0x5525cf(0x1e8),'type':'boolean','description':a46_0x5525cf(0x1dc)}],async 'execute'(_0x35e739){const _0x345b5f=a46_0x5525cf,_0x533857=await getDatasetDetail(_0x35e739[_0x345b5f(0x1ba)](_0x345b5f(0x1d2))),_0x1aa2ae=_0x35e739[_0x345b5f(0x1da)](_0x345b5f(0x1e8));if(_0x1aa2ae)return{'ok':!![],'data':_0x533857};const _0x4276cc=Array[_0x345b5f(0x1c0)](_0x533857['fields'])?_0x533857[_0x345b5f(0x1c4)]:Array[_0x345b5f(0x1c0)](_0x533857[_0x345b5f(0x1de)])?_0x533857['properties']:[],_0x4a5f07=_0x4276cc['map'](_0x3343b3=>normalizeField(_0x3343b3))[_0x345b5f(0x1c3)](_0x31cbab=>_0x31cbab!==null),_0x1ba184=_0x533857[_0x345b5f(0x1eb)]??{},_0x19a70c=[];for(const [_0x2ef813,_0x2c413a]of Object['entries'](_0x1ba184)){if(_0x2c413a&&typeof _0x2c413a===_0x345b5f(0x1ea)){const _0x1d0306=_0x2c413a;_0x1d0306[_0x345b5f(0x1d1)]&&_0x1d0306[_0x345b5f(0x1c8)]&&_0x19a70c[_0x345b5f(0x1d9)]({'name':_0x2ef813,'method':_0x1d0306[_0x345b5f(0x1d1)],'path':_0x1d0306[_0x345b5f(0x1c8)]});}}const _0x198ecf=_0x533857[_0x345b5f(0x1bb)]??{},_0x5d3482=_0x533857[_0x345b5f(0x1e7)]??{};return{'ok':!![],'data':{'id':_0x533857[_0x345b5f(0x1ca)]??_0x533857['id'],'name':_0x533857[_0x345b5f(0x1ef)],'code':_0x533857[_0x345b5f(0x1df)]||_0x533857[_0x345b5f(0x1d2)],'description':_0x533857[_0x345b5f(0x1e1)]||_0x5d3482['tableComment']||undefined,'source':_0x533857['source']||_0x5d3482[_0x345b5f(0x1be)],'table':_0x198ecf['tableName']||_0x5d3482[_0x345b5f(0x1d5)],'datasetKey':_0x198ecf[_0x345b5f(0x1c5)],'pk':_0x198ecf['pkField'],'fields':_0x4a5f07,'operations':_0x19a70c,'indexes':Array[_0x345b5f(0x1c0)](_0x5d3482['indexes'])?_0x5d3482[_0x345b5f(0x1ee)]:[],'relations':Array[_0x345b5f(0x1c0)](_0x533857['relations'])?_0x533857[_0x345b5f(0x1b9)][_0x345b5f(0x1c1)](_0x212567=>({'fromField':_0x212567['fromField'],'toDataset':_0x212567[_0x345b5f(0x1d4)],'toCode':_0x212567[_0x345b5f(0x1c2)],'toTable':_0x212567[_0x345b5f(0x1e6)],'toField':_0x212567[_0x345b5f(0x1cd)],'labelField':_0x212567[_0x345b5f(0x1c6)]||undefined})):[],'stats':{'fieldCount':_0x4a5f07[_0x345b5f(0x1b8)],'operationCount':_0x19a70c['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x213174,_0x391349){const _0x2ab5d0=a47_0x3042,_0x15ccf5=_0x213174();while(!![]){try{const _0x2723a4=parseInt(_0x2ab5d0(0xf6))/0x1*(-parseInt(_0x2ab5d0(0xf3))/0x2)+parseInt(_0x2ab5d0(0xf4))/0x3+-parseInt(_0x2ab5d0(0xf7))/0x4+-parseInt(_0x2ab5d0(0xfa))/0x5+-parseInt(_0x2ab5d0(0xf9))/0x6+-parseInt(_0x2ab5d0(0xf8))/0x7+parseInt(_0x2ab5d0(0xf5))/0x8;if(_0x2723a4===_0x391349)break;else _0x15ccf5['push'](_0x15ccf5['shift']());}catch(_0x182325){_0x15ccf5['push'](_0x15ccf5['shift']());}}}(a47_0x538d,0x2ec0f));function a47_0x538d(){const _0x405a0c=['306789jrDIUw','5313736NNoEhh','258xuytsd','116384iPiMBN','1397270wWxpWY','1900788YgDFWC','72545BQEGJF','116nBWweG'];a47_0x538d=function(){return _0x405a0c;};return a47_0x538d();}import{datasetList}from'./list.js';function a47_0x3042(_0x5dff86,_0x52b8ef){_0x5dff86=_0x5dff86-0xf3;const _0x538dc0=a47_0x538d();let _0x30428b=_0x538dc0[_0x5dff86];return _0x30428b;}import{datasetDetail}from'./detail.js';import{datasetOperations}from'./operations.js';import{datasetLinks}from'./links.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetOperations,datasetLinks];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a48_0x2973(){const _0x28ffdd=['tableName','relations','4tbhUnL','Get\x20the\x20link\x20graph\x20(entity-relationship)\x20for\x20the\x20app\x27s\x20datasets.\x20','filter','42218680HkbgLW','Returns\x20all\x20datasets\x20with\x20their\x20fields\x20(PK/FK\x20flags)\x20and\x20cross-dataset\x20JOIN\x20relationships.\x20','\x20dataset(s),\x20','tableComment','joinType','Fetched\x20link\x20graph\x20for\x20','dbId','fields','788rKqqdm','7300734Dgndde','6AmcOxQ','string','fromField','532116foDkRx','length','toDatasetName','572285bwefJP','Ideal\x20for\x20AI\x20to\x20understand\x20the\x20full\x20data\x20model\x20in\x20a\x20single\x20call\x20before\x20writing\x20queries\x20or\x20BFF\x20scripts.','toDataset','3243OcDGLF','isPrimaryKey','LEFT','displayName','dbName','isForeignKey','\x20database(s),\x20','1588384nFKXMI','datasetCount','reduce','map','datasets','meta','relationCount','all','\x20relation(s)','stats','\x20database(s)','name','str','appCode','verbose','Defaults\x20to\x20auto-detect\x20all\x20linked\x20databases.','datasetId','dbType','4296340AFLKOT'];a48_0x2973=function(){return _0x28ffdd;};return a48_0x2973();}function a48_0x15f6(_0x155eed,_0x495c70){_0x155eed=_0x155eed-0x1c1;const _0x2973dc=a48_0x2973();let _0x15f6c5=_0x2973dc[_0x155eed];return _0x15f6c5;}const a48_0x442692=a48_0x15f6;(function(_0x1b297b,_0xd985a2){const _0xdff589=a48_0x15f6,_0xc69e64=_0x1b297b();while(!![]){try{const _0x53056c=parseInt(_0xdff589(0x1cf))/0x1*(-parseInt(_0xdff589(0x1ee))/0x2)+parseInt(_0xdff589(0x1d2))/0x3*(-parseInt(_0xdff589(0x1c7))/0x4)+parseInt(_0xdff589(0x1eb))/0x5*(-parseInt(_0xdff589(0x1c9))/0x6)+-parseInt(_0xdff589(0x1c8))/0x7+-parseInt(_0xdff589(0x1d9))/0x8+-parseInt(_0xdff589(0x1cc))/0x9+parseInt(_0xdff589(0x1f1))/0xa;if(_0x53056c===_0xd985a2)break;else _0xc69e64['push'](_0xc69e64['shift']());}catch(_0x3ea80d){_0xc69e64['push'](_0xc69e64['shift']());}}}(a48_0x2973,0xabfb7));import{getErConfig}from'../../core/api-client.js';import{resolveDb}from'../../core/db-resolver.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const datasetLinks={'service':'dataset','command':'links','description':a48_0x442692(0x1ef)+a48_0x442692(0x1f2)+a48_0x442692(0x1d0),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'db','type':a48_0x442692(0x1ca),'description':'Filter\x20by\x20database\x20—\x20accepts\x20a\x20numeric\x20dblink\x20ID\x20or\x20a\x20database\x20name\x20(e.g.\x20ecommerce_db).\x20'+a48_0x442692(0x1e8)},{'name':a48_0x442692(0x1e7),'type':'boolean','description':'Return\x20full\x20raw\x20ER\x20response\x20from\x20API'}],async 'execute'(_0x3545ce){const _0x25b1a5=a48_0x442692,_0x10ad07=_0x3545ce['bool']('verbose'),{resolved:_0x3abb22,error:_0x69708b}=await resolveDb(_0x3545ce[_0x25b1a5(0x1e6)],_0x3545ce[_0x25b1a5(0x1e5)]('db')||undefined);if(_0x69708b)return{'ok':![],'message':_0x69708b};const _0x329d63=_0x3abb22[_0x25b1a5(0x1dc)](_0x1d7119=>_0x1d7119['dbId']),_0x4eca6b=await Promise[_0x25b1a5(0x1e0)](_0x329d63['map'](_0x359546=>getErConfig(_0x3545ce[_0x25b1a5(0x1e6)],_0x359546)));if(_0x10ad07)return{'ok':!![],'data':_0x4eca6b[_0x25b1a5(0x1cd)]===0x1?_0x4eca6b[0x0]:_0x4eca6b,'message':_0x25b1a5(0x1c4)+_0x329d63[_0x25b1a5(0x1cd)]+_0x25b1a5(0x1e3)};const _0x5681d7=_0x4eca6b[_0x25b1a5(0x1dc)](_0x326b68=>{const _0x144ecf=_0x25b1a5,_0x58531b=(_0x326b68['datasets']??[])[_0x144ecf(0x1dc)](_0x4a410f=>{const _0x46ca34=_0x144ecf,_0x29beab=_0x4a410f[_0x46ca34(0x1c6)]?.[_0x46ca34(0x1f0)](_0x112f54=>_0x112f54[_0x46ca34(0x1d3)])[_0x46ca34(0x1dc)](_0xf6a81d=>_0xf6a81d[_0x46ca34(0x1e4)])??[],_0x5d585a=_0x4a410f[_0x46ca34(0x1c6)]?.['filter'](_0x35e7fe=>_0x35e7fe[_0x46ca34(0x1d7)])[_0x46ca34(0x1dc)](_0x302e4c=>_0x302e4c[_0x46ca34(0x1e4)])??[];return{'id':_0x4a410f[_0x46ca34(0x1e9)],'name':_0x4a410f['datasetName'],'code':_0x4a410f['datasetCode'],'table':_0x4a410f[_0x46ca34(0x1ec)],'comment':_0x4a410f[_0x46ca34(0x1c2)]||undefined,'fields':(_0x4a410f[_0x46ca34(0x1c6)]??[])['map'](_0x1f03cb=>({'name':_0x1f03cb[_0x46ca34(0x1e4)],'displayName':_0x1f03cb[_0x46ca34(0x1d5)],'type':_0x1f03cb[_0x46ca34(0x1ea)],'pk':_0x1f03cb[_0x46ca34(0x1d3)],'fk':_0x1f03cb[_0x46ca34(0x1d7)]})),'relations':(_0x4a410f[_0x46ca34(0x1ed)]??[])['filter'](_0x5e5e8c=>_0x5e5e8c[_0x46ca34(0x1cb)]&&_0x5e5e8c[_0x46ca34(0x1d1)])['map'](_0x1e1c03=>({'from':_0x1e1c03[_0x46ca34(0x1cb)],'toDataset':_0x1e1c03[_0x46ca34(0x1ce)],'toCode':_0x1e1c03[_0x46ca34(0x1d1)],'toField':_0x1e1c03['toField'],'joinType':_0x1e1c03[_0x46ca34(0x1c3)]||_0x46ca34(0x1d4)})),'stats':{'fieldCount':_0x4a410f['fields']?.['length']??0x0,'pkCount':_0x29beab[_0x46ca34(0x1cd)],'fkCount':_0x5d585a[_0x46ca34(0x1cd)],'relationCount':_0x4a410f[_0x46ca34(0x1ed)]?.[_0x46ca34(0x1cd)]??0x0}};}),_0x350d28=_0x58531b[_0x144ecf(0x1f0)](_0x20a075=>_0x20a075[_0x144ecf(0x1e2)]['relationCount']>0x0)[_0x144ecf(0x1dc)](_0x9013ce=>_0x9013ce[_0x144ecf(0x1e4)]);return{'db':_0x326b68[_0x144ecf(0x1de)]?.[_0x144ecf(0x1d6)],'dbId':_0x326b68[_0x144ecf(0x1de)]?.[_0x144ecf(0x1c5)],'appCode':_0x326b68[_0x144ecf(0x1de)]?.[_0x144ecf(0x1e6)],'datasetCount':_0x58531b[_0x144ecf(0x1cd)],'connectedDatasets':_0x350d28,'datasets':_0x58531b};}),_0x296224=_0x5681d7[_0x25b1a5(0x1db)]((_0x451517,_0x238b80)=>_0x451517+_0x238b80[_0x25b1a5(0x1da)],0x0),_0x31d655=_0x5681d7[_0x25b1a5(0x1db)]((_0x17a931,_0x209edf)=>_0x17a931+_0x209edf[_0x25b1a5(0x1dd)][_0x25b1a5(0x1db)]((_0x35e39b,_0x3cc49d)=>_0x35e39b+_0x3cc49d[_0x25b1a5(0x1e2)][_0x25b1a5(0x1df)],0x0),0x0);return{'ok':!![],'data':_0x5681d7['length']===0x1?_0x5681d7[0x0]:{'databases':_0x5681d7},'message':'Link\x20graph:\x20'+_0x5681d7[_0x25b1a5(0x1cd)]+_0x25b1a5(0x1d8)+_0x296224+_0x25b1a5(0x1c1)+_0x31d655+_0x25b1a5(0x1e1)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x314906=a49_0x4c0a;(function(_0xd35072,_0x241161){const _0x4b43b2=a49_0x4c0a,_0x26ece0=_0xd35072();while(!![]){try{const _0x45faa7=parseInt(_0x4b43b2(0x195))/0x1*(-parseInt(_0x4b43b2(0x18b))/0x2)+parseInt(_0x4b43b2(0x191))/0x3+-parseInt(_0x4b43b2(0x18a))/0x4*(-parseInt(_0x4b43b2(0x18f))/0x5)+parseInt(_0x4b43b2(0x17d))/0x6+-parseInt(_0x4b43b2(0x188))/0x7*(-parseInt(_0x4b43b2(0x17c))/0x8)+parseInt(_0x4b43b2(0x189))/0x9*(parseInt(_0x4b43b2(0x194))/0xa)+-parseInt(_0x4b43b2(0x193))/0xb*(parseInt(_0x4b43b2(0x182))/0xc);if(_0x45faa7===_0x241161)break;else _0x26ece0['push'](_0x26ece0['shift']());}catch(_0x42a8ce){_0x26ece0['push'](_0x26ece0['shift']());}}}(a49_0x5433,0x20fdd));function a49_0x5433(){const _0x6b7e7e=['bool','name','description','map','698896VhCaGv','268200zDeGDW','pkField','tableName','read','string','82212xfEewq','dbName','split','verbose','code','source','7LDhNVx','225KNlsCD','1408kaYijy','75906wOBuQm','trim','allFields','boolean','2395YeLhaK','Filter\x20datasets\x20by\x20name\x20(server-side\x20fuzzy\x20match)','641256ZNgVBg','list','671rxWvpI','30630QUqHIk','1ykIGwI','Found\x20','appCode','str','Return\x20full\x20dataset\x20objects\x20including\x20columns,\x20operations\x20and\x20relations','List\x20all\x20datasets\x20with\x20metadata','length','\x20dataset(s)'];a49_0x5433=function(){return _0x6b7e7e;};return a49_0x5433();}import{listDatasets}from'../../core/api-client.js';function a49_0x4c0a(_0x19612f,_0x51de55){_0x19612f=_0x19612f-0x177;const _0x543362=a49_0x5433();let _0x4c0a3b=_0x543362[_0x19612f];return _0x4c0a3b;}import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const datasetList={'service':'dataset','command':a49_0x314906(0x192),'description':a49_0x314906(0x19a),'risk':a49_0x314906(0x180),'flags':[{'name':'name','type':a49_0x314906(0x181),'description':a49_0x314906(0x190)},CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a49_0x314906(0x185),'type':a49_0x314906(0x18e),'description':a49_0x314906(0x199)}],async 'execute'(_0x4ec002){const _0x38adea=a49_0x314906,_0x5f1fb5=_0x4ec002[_0x38adea(0x198)](_0x38adea(0x179)),_0x430462=_0x4ec002[_0x38adea(0x198)](_0x38adea(0x186)),_0x457949=_0x4ec002[_0x38adea(0x178)](_0x38adea(0x185)),_0x8c64bf=await listDatasets(_0x4ec002[_0x38adea(0x197)],{..._0x5f1fb5&&{'name':_0x5f1fb5},..._0x430462&&{'code':_0x430462}}),_0x883cfb=_0x457949?_0x8c64bf:_0x8c64bf[_0x38adea(0x17b)](_0x2d3b2d=>{const _0x1d68ce=_0x38adea,_0x2a8b73=_0x2d3b2d['dbtableConfig']??{};return{'id':_0x2d3b2d['id'],'name':_0x2d3b2d[_0x1d68ce(0x179)],'code':_0x2d3b2d['code'],'description':_0x2d3b2d[_0x1d68ce(0x17a)],'source':_0x2d3b2d[_0x1d68ce(0x187)],'db':_0x2a8b73[_0x1d68ce(0x183)],'table':_0x2a8b73[_0x1d68ce(0x17f)],'datasetKey':_0x2a8b73['datasetKey'],'pk':_0x2a8b73[_0x1d68ce(0x17e)],'fields':_0x2a8b73['allFields']?_0x2a8b73[_0x1d68ce(0x18d)][_0x1d68ce(0x184)](',')['map'](_0x949365=>_0x949365[_0x1d68ce(0x18c)]()):[]};});return{'ok':!![],'data':{'total':_0x883cfb[_0x38adea(0x19b)],'datasets':_0x883cfb},'message':_0x38adea(0x196)+_0x883cfb[_0x38adea(0x19b)]+_0x38adea(0x177)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x1ce2(){const _0x29db61=['dataset','operation','131888eOWvBP','boolean','bool','verbose','appCode','map','35kbNyLw','1237660lsKogm','length','10foRwHq','string','Return\x20full\x20operation\x20objects\x20including\x20requestFields\x20and\x20responseFields','1215981aDWlDA','operations','enabled','462792ZOmFZT','28530330jBZshR','9860121DKIodF','2ksLaKW','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','str','Get\x20operations\x20for\x20a\x20dataset,\x20optionally\x20with\x20full\x20detail\x20for\x20one\x20operation','1263737YZJVYE','name','alias'];a50_0x1ce2=function(){return _0x29db61;};return a50_0x1ce2();}const a50_0x2d554d=a50_0x5705;(function(_0x4ea11,_0x1ec413){const _0xe436c2=a50_0x5705,_0x427c49=_0x4ea11();while(!![]){try{const _0x57a2e1=parseInt(_0xe436c2(0x1e2))/0x1*(-parseInt(_0xe436c2(0x1f9))/0x2)+-parseInt(_0xe436c2(0x1f3))/0x3+parseInt(_0xe436c2(0x1ee))/0x4+-parseInt(_0xe436c2(0x1f0))/0x5*(-parseInt(_0xe436c2(0x1f6))/0x6)+parseInt(_0xe436c2(0x1ed))/0x7*(parseInt(_0xe436c2(0x1e7))/0x8)+-parseInt(_0xe436c2(0x1f8))/0x9+parseInt(_0xe436c2(0x1f7))/0xa;if(_0x57a2e1===_0x1ec413)break;else _0x427c49['push'](_0x427c49['shift']());}catch(_0x3bdc69){_0x427c49['push'](_0x427c49['shift']());}}}(a50_0x1ce2,0x9ae8d));function a50_0x5705(_0x5dd55f,_0x5a14a4){_0x5dd55f=_0x5dd55f-0x1e2;const _0x1ce248=a50_0x1ce2();let _0x570546=_0x1ce248[_0x5dd55f];return _0x570546;}import{getDatasetOperations,getOperationDetail}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const datasetOperations={'service':a50_0x2d554d(0x1e5),'command':a50_0x2d554d(0x1f4),'description':a50_0x2d554d(0x1fc),'risk':'read','flags':[CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a50_0x2d554d(0x1e4),'type':a50_0x2d554d(0x1f1),'description':a50_0x2d554d(0x1fa)},{'name':a50_0x2d554d(0x1e6),'type':a50_0x2d554d(0x1f1),'description':'Operation\x20name\x20to\x20get\x20full\x20detail\x20(e.g.\x20filter,\x20getOne,\x20create)'},{'name':'verbose','type':a50_0x2d554d(0x1e8),'description':a50_0x2d554d(0x1f2)}],async 'execute'(_0x38b79d){const _0x3cc355=a50_0x2d554d,_0x462ec1=_0x38b79d['str']('code'),_0x565140=_0x38b79d[_0x3cc355(0x1fb)](_0x3cc355(0x1e6)),_0x508700=_0x38b79d[_0x3cc355(0x1e9)](_0x3cc355(0x1ea));if(_0x565140){const {dataset:_0x3f470c,operation:_0x471514}=await getOperationDetail(_0x38b79d[_0x3cc355(0x1eb)],_0x462ec1,_0x565140);return{'ok':!![],'data':{'dataset':_0x3f470c,'operation':_0x471514}};}const {dataset:_0x16047e,operations:_0x48c5c9}=await getDatasetOperations(_0x462ec1);return{'ok':!![],'data':{'dataset':_0x16047e,'total':_0x48c5c9[_0x3cc355(0x1ef)],'operations':_0x508700?_0x48c5c9:_0x48c5c9[_0x3cc355(0x1ec)](_0x224912=>({'name':_0x224912[_0x3cc355(0x1e3)],'displayName':_0x224912['displayName'],'type':_0x224912['type'],'method':_0x224912['method'],'enabled':_0x224912[_0x3cc355(0x1f5)]}))}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a51_0x5bd9(){const _0x3d7b4a=['\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','(default:\x20pretty)','\x20doctor','appCode','\x20\x20Merged\x20Config','pageSize','(set)','(default)','11194048JMYfyy','defaultApp','explicitAppName','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','bold','cookie','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','5210364ZqQfEq','arch','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','gray','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','red','version','\x20\x20\x20\x20appcode:\x20\x20','\x20\x20Auth','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','slice','length','\x20\x20explicitAppName:\x20','\x20\x20Config\x20Files','24jOiHlE','5513410bgzgyG','currentApp','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','apiDir','repeat','\x20(default)','43198aknikB','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appcode','(not\x20set)','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','\x20\x20─','2521720sOofFP','\x20\x20\x20\x20cookie:\x20\x20\x20','keys','1046498EsTRhe','✗\x20Expired','(not\x20found)','(set,\x20length=','env','(none)','(inherit)','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','apps','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1254384WnYlkN','\x20←\x20current','log','green'];a51_0x5bd9=function(){return _0x3d7b4a;};return a51_0x5bd9();}const a51_0x2ceeb1=a51_0xcebb;function a51_0xcebb(_0x2a930b,_0x977222){_0x2a930b=_0x2a930b-0xfa;const _0x5bd976=a51_0x5bd9();let _0xcebbdc=_0x5bd976[_0x2a930b];return _0xcebbdc;}(function(_0x23ecc1,_0x10fe93){const _0x14b5cf=a51_0xcebb,_0x2e74bb=_0x23ecc1();while(!![]){try{const _0x1c4527=parseInt(_0x14b5cf(0x100))/0x1+parseInt(_0x14b5cf(0x137))/0x2*(parseInt(_0x14b5cf(0x130))/0x3)+parseInt(_0x14b5cf(0x10b))/0x4+parseInt(_0x14b5cf(0xfd))/0x5+-parseInt(_0x14b5cf(0x11f))/0x6+parseInt(_0x14b5cf(0x131))/0x7+-parseInt(_0x14b5cf(0x117))/0x8;if(_0x1c4527===_0x10fe93)break;else _0x2e74bb['push'](_0x2e74bb['shift']());}catch(_0x38bdba){_0x2e74bb['push'](_0x2e74bb['shift']());}}}(a51_0x5bd9,0x8809a));import a51_0x5229f7 from'chalk';import{getCliVersion}from'../utils/version.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';async function execute(_0x47b07f){const _0x138711=a51_0xcebb,_0x57b5bf=getCliVersion(),_0x851eb7=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x138711(0x12c)](0x0,0xa)+')':VERSION,_0x118ef8=buildConfigFromFlags({});console[_0x138711(0x10d)](),console['log'](a51_0x5229f7[_0x138711(0x11b)](CLI_BIN_NAME+_0x138711(0x111))),console['log'](a51_0x5229f7[_0x138711(0x125)]('─'[_0x138711(0x135)](0x32))),console[_0x138711(0x10d)](_0x138711(0x11a)+_0x851eb7),console[_0x138711(0x10d)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x138711(0x128)]),console[_0x138711(0x10d)](_0x138711(0x126)+process['platform']+'\x20'+process[_0x138711(0x120)]),console[_0x138711(0x10d)](),console[_0x138711(0x10d)](a51_0x5229f7[_0x138711(0x11b)](_0x138711(0x12f))),console[_0x138711(0x10d)](a51_0x5229f7['gray']('\x20\x20─'[_0x138711(0x135)](0x1e)));const _0x45e014=getGlobalConfigPath(),_0x4ed641=getProjectConfigPath();console[_0x138711(0x10d)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x45e014||a51_0x5229f7[_0x138711(0x125)]('(not\x20found)'))),console[_0x138711(0x10d)](_0x138711(0x13b)+(_0x4ed641||a51_0x5229f7[_0x138711(0x125)](_0x138711(0x102)))),console[_0x138711(0x10d)](),console['log'](a51_0x5229f7[_0x138711(0x11b)](_0x138711(0x113))),console[_0x138711(0x10d)](a51_0x5229f7[_0x138711(0x125)](_0x138711(0xfc)['repeat'](0x1e))),console[_0x138711(0x10d)](_0x138711(0x11d)+(_0x118ef8[_0x138711(0x112)]||a51_0x5229f7['red'](_0x138711(0x13a)))),console[_0x138711(0x10d)](_0x138711(0x121)+_0x118ef8[_0x138711(0x104)]),console[_0x138711(0x10d)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x118ef8['locale']),console['log'](_0x138711(0x138)+_0x118ef8[_0x138711(0x134)]),console[_0x138711(0x10d)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x118ef8[_0x138711(0x118)]||a51_0x5229f7[_0x138711(0x125)]('(none)'))),console[_0x138711(0x10d)](_0x138711(0x133)+(_0x118ef8[_0x138711(0x132)]||a51_0x5229f7[_0x138711(0x125)]('(none)'))),console['log'](_0x138711(0x12e)+(_0x118ef8[_0x138711(0x119)]||a51_0x5229f7[_0x138711(0x125)](_0x138711(0x105)))),console[_0x138711(0x10d)](_0x138711(0x10a)+(_0x118ef8[_0x138711(0x13d)]||a51_0x5229f7[_0x138711(0x125)](_0x138711(0x110)))),console[_0x138711(0x10d)](_0x138711(0x12b)+(_0x118ef8[_0x138711(0x114)]??a51_0x5229f7['gray'](_0x138711(0x116)))),console[_0x138711(0x10d)](_0x138711(0x13c)+_0x118ef8['riskLevel']),console['log'](_0x138711(0xfa)+_0x118ef8[_0x138711(0x122)]),console[_0x138711(0x10d)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x118ef8[_0x138711(0x11c)]?a51_0x5229f7[_0x138711(0x10e)](_0x138711(0x103)+_0x118ef8[_0x138711(0x11c)][_0x138711(0x12d)]+')'):a51_0x5229f7[_0x138711(0x125)](_0x138711(0x105))));const _0x5c21bc=Object[_0x138711(0xff)](_0x118ef8['apps']);if(_0x5c21bc[_0x138711(0x12d)]>0x0){console[_0x138711(0x10d)](),console[_0x138711(0x10d)](a51_0x5229f7[_0x138711(0x11b)](_0x138711(0xfb))),console[_0x138711(0x10d)](a51_0x5229f7['gray'](_0x138711(0xfc)['repeat'](0x1e)));for(const _0x7d74e3 of _0x5c21bc){const _0x58f275=_0x118ef8[_0x138711(0x108)][_0x7d74e3],_0x452634=_0x7d74e3===_0x118ef8[_0x138711(0x118)],_0x2762bc=_0x7d74e3===_0x118ef8[_0x138711(0x132)],_0x455ad9=_0x2762bc?a51_0x5229f7['green'](_0x138711(0x10c)):'',_0x278e51=_0x452634?_0x138711(0x136):'';console[_0x138711(0x10d)]('\x20\x20'+_0x7d74e3+_0x278e51+_0x455ad9),console[_0x138711(0x10d)](_0x138711(0x129)+_0x58f275[_0x138711(0x139)]),console[_0x138711(0x10d)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20'+(_0x58f275[_0x138711(0x104)]||a51_0x5229f7['gray'](_0x138711(0x106)))),console[_0x138711(0x10d)]('\x20\x20\x20\x20apiDir:\x20\x20\x20'+(_0x58f275['apiDir']||a51_0x5229f7[_0x138711(0x125)](_0x138711(0x106)))),console[_0x138711(0x10d)](_0x138711(0xfe)+(_0x58f275[_0x138711(0x11c)]?a51_0x5229f7[_0x138711(0x10e)](_0x138711(0x115)):a51_0x5229f7[_0x138711(0x125)](_0x138711(0x106))));}}console[_0x138711(0x10d)](),console[_0x138711(0x10d)](a51_0x5229f7['bold'](_0x138711(0x124))),console['log'](a51_0x5229f7[_0x138711(0x125)](_0x138711(0xfc)[_0x138711(0x135)](0x1e))),console[_0x138711(0x10d)](_0x138711(0x10f)+getApiDomain()),console[_0x138711(0x10d)](_0x138711(0x123)+getUserDomain()),console[_0x138711(0x10d)](_0x138711(0x109)+getRuntimeDomain()),console[_0x138711(0x10d)](),console[_0x138711(0x10d)](a51_0x5229f7[_0x138711(0x11b)](_0x138711(0x12a))),console['log'](a51_0x5229f7['gray'](_0x138711(0xfc)[_0x138711(0x135)](0x1e)));const _0x37feca=_0x118ef8[_0x138711(0x11c)];if(_0x37feca){const _0x3a6af3=await getIsSessionValid();console[_0x138711(0x10d)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3a6af3?a51_0x5229f7[_0x138711(0x10e)](_0x138711(0x11e)):a51_0x5229f7[_0x138711(0x127)](_0x138711(0x101))));}else console[_0x138711(0x10d)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a51_0x5229f7[_0x138711(0x127)]('✗\x20Not\x20logged\x20in'));return console[_0x138711(0x10d)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':'check','description':a51_0x2ceeb1(0x107),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a52_0x2eca8a=a52_0x51bf;(function(_0x310fb4,_0x66c3fc){const _0x25cb89=a52_0x51bf,_0x370265=_0x310fb4();while(!![]){try{const _0x4fdbe7=-parseInt(_0x25cb89(0x82))/0x1+-parseInt(_0x25cb89(0x8c))/0x2+-parseInt(_0x25cb89(0x83))/0x3+parseInt(_0x25cb89(0x76))/0x4*(-parseInt(_0x25cb89(0x84))/0x5)+parseInt(_0x25cb89(0x7e))/0x6*(-parseInt(_0x25cb89(0x81))/0x7)+parseInt(_0x25cb89(0x77))/0x8*(parseInt(_0x25cb89(0x86))/0x9)+parseInt(_0x25cb89(0x78))/0xa*(parseInt(_0x25cb89(0x85))/0xb);if(_0x4fdbe7===_0x66c3fc)break;else _0x370265['push'](_0x370265['shift']());}catch(_0x3d2908){_0x370265['push'](_0x370265['shift']());}}}(a52_0x2b8d,0xba4a0));import{initConfig}from'../init/main.js';function a52_0x2b8d(){const _0x3d9225=['Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','22752fKUdfW','Auto-confirm\x20prompts','info','2261OHDkPq','694902dTgkmP','1349160GSImCe','40140mdaSLG','1075547gffHTk','9ODKZIj','boolean','appcode','string','env','App\x20code\x20to\x20initialize','781038onxPbR','logger','92dgiomt','4630216skPMMp','320FEXWem','yes','执行初始化配置命令','Target\x20environment','init'];a52_0x2b8d=function(){return _0x3d9225;};return a52_0x2b8d();}function a52_0x51bf(_0x30ab09,_0x2ea7fe){_0x30ab09=_0x30ab09-0x75;const _0x2b8dd7=a52_0x2b8d();let _0x51bfb3=_0x2b8dd7[_0x30ab09];return _0x51bfb3;}const flagDefs=[{'name':a52_0x2eca8a(0x88),'type':a52_0x2eca8a(0x89),'description':a52_0x2eca8a(0x8b)},{'name':a52_0x2eca8a(0x8a),'type':a52_0x2eca8a(0x89),'description':a52_0x2eca8a(0x7b)},{'name':a52_0x2eca8a(0x79),'type':a52_0x2eca8a(0x87),'description':a52_0x2eca8a(0x7f),'default':![]}];export const initCommand={'name':a52_0x2eca8a(0x7c),'description':a52_0x2eca8a(0x7d),'flags':flagDefs,async 'run'(_0x4dd3e8,_0x5a3eb5,_0x2ef927){const _0x573047=a52_0x2eca8a;_0x4dd3e8[_0x573047(0x75)][_0x573047(0x80)](_0x573047(0x7c),_0x573047(0x7a)),await initConfig({'appcode':_0x2ef927[_0x573047(0x88)],'env':_0x2ef927[_0x573047(0x8a)],'autoYes':_0x2ef927[_0x573047(0x79)]});}};
|
package/lib/commands/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x493783=a53_0xe244;function a53_0xe244(_0x2f8578,_0x354b08){_0x2f8578=_0x2f8578-0x1e8;const _0x3276b7=a53_0x3276();let _0xe24484=_0x3276b7[_0x2f8578];return _0xe24484;}(function(_0x49f3c0,_0x3508f9){const _0x28cded=a53_0xe244,_0x357b8f=_0x49f3c0();while(!![]){try{const _0x1b139d=parseInt(_0x28cded(0x1ed))/0x1*(parseInt(_0x28cded(0x1eb))/0x2)+-parseInt(_0x28cded(0x1f3))/0x3*(-parseInt(_0x28cded(0x1ee))/0x4)+-parseInt(_0x28cded(0x1f6))/0x5+-parseInt(_0x28cded(0x1f1))/0x6+parseInt(_0x28cded(0x1ea))/0x7*(parseInt(_0x28cded(0x1ec))/0x8)+parseInt(_0x28cded(0x1f2))/0x9*(parseInt(_0x28cded(0x1f4))/0xa)+-parseInt(_0x28cded(0x1e9))/0xb;if(_0x1b139d===_0x3508f9)break;else _0x357b8f['push'](_0x357b8f['shift']());}catch(_0x5a485a){_0x357b8f['push'](_0x357b8f['shift']());}}}(a53_0x3276,0xedb97));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export const logoutCommand={'name':a53_0x493783(0x1ef),'description':'Logout\x20from\x20rabetbase',async 'run'(_0x3a9539,_0x3574bd,_0x51b911){const _0x39c089=a53_0x493783;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x39c089(0x1f0)](_0x39c089(0x1f5))):console['log'](_0x39c089(0x1e8));}};function a53_0x3276(){const _0x435422=['72340RxbNje','✓\x20Logged\x20out','5278255lgaARe','!\x20Not\x20logged\x20in','23599587kJUBbz','42YrenIB','1365638iiKQpt','2388576TebZeI','1NIHdPi','588184AfnFmA','logout','log','10945464nWpyAI','2007fNhYIX','39RCBPPO'];a53_0x3276=function(){return _0x435422;};return a53_0x3276();}
|
package/lib/commands/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a54_0x383d(){const _0x4de112=['level','length','clear','command','526930tXixpX','log','\x20\x20\x20Details:\x20','16ajKoLl','Clear\x20all\x20logs','logger','en-US','stringify','2631760wVnZEP','601364VXkLcl','details','clearLogs','\x20\x20\x20Duration:\x20','*\x20Logs\x20cleared','712ppuPFt','27ZOVvxL','logs','12EZLjdw','success','13482161YcZAAB','26236mZamyP','toLocaleString','*\x20No\x20logs\x20found','58479rpXrHN','View\x20or\x20clear\x20CLI\x20logs','\x20\x20\x20Time:\x20','boolean','357808vbfYlX','*\x20Lovrabet\x20CLI\x20logs:\x0a'];a54_0x383d=function(){return _0x4de112;};return a54_0x383d();}const a54_0x1c41cb=a54_0x3a04;(function(_0x4f13d8,_0x482c6d){const _0xac15a9=a54_0x3a04,_0x4c91ba=_0x4f13d8();while(!![]){try{const _0x49e45d=-parseInt(_0xac15a9(0x1ef))/0x1+-parseInt(_0xac15a9(0x1e9))/0x2*(-parseInt(_0xac15a9(0x1fd))/0x3)+-parseInt(_0xac15a9(0x201))/0x4+-parseInt(_0xac15a9(0x1e6))/0x5*(-parseInt(_0xac15a9(0x1f7))/0x6)+parseInt(_0xac15a9(0x1fa))/0x7*(parseInt(_0xac15a9(0x1f4))/0x8)+parseInt(_0xac15a9(0x1f5))/0x9*(-parseInt(_0xac15a9(0x1ee))/0xa)+parseInt(_0xac15a9(0x1f9))/0xb;if(_0x49e45d===_0x482c6d)break;else _0x4c91ba['push'](_0x4c91ba['shift']());}catch(_0x154f29){_0x4c91ba['push'](_0x4c91ba['shift']());}}}(a54_0x383d,0x6cc9b));function showLogs(_0x322d51){const _0x11b52a=a54_0x3a04,_0x4736b0=_0x322d51[_0x11b52a(0x1eb)]['readLogs']();if(_0x4736b0[_0x11b52a(0x1e3)]===0x0){console[_0x11b52a(0x1e7)](_0x11b52a(0x1fc));return;}console['log'](_0x11b52a(0x1e1)),_0x4736b0['forEach']((_0x273f89,_0x21a89b)=>{const _0x31e7ab=_0x11b52a,_0x1bc5b9=new Date(_0x273f89['timestamp'])[_0x31e7ab(0x1fb)](_0x31e7ab(0x1ec)),_0xd1de7d=_0x273f89[_0x31e7ab(0x1e2)]===_0x31e7ab(0x1f8)?'√':_0x273f89[_0x31e7ab(0x1e2)]==='error'?'×':_0x273f89[_0x31e7ab(0x1e2)]==='warn'?'!':'i';console[_0x31e7ab(0x1e7)](_0x21a89b+0x1+'.\x20'+_0xd1de7d+'\x20['+_0x273f89[_0x31e7ab(0x1e5)]+']\x20'+_0x273f89['message']),console['log'](_0x31e7ab(0x1ff)+_0x1bc5b9),_0x273f89['duration']&&console['log'](_0x31e7ab(0x1f2)+_0x273f89['duration']+'ms'),_0x273f89[_0x31e7ab(0x1f0)]&&Object['keys'](_0x273f89['details'])[_0x31e7ab(0x1e3)]>0x0&&console[_0x31e7ab(0x1e7)](_0x31e7ab(0x1e8)+JSON[_0x31e7ab(0x1ed)](_0x273f89[_0x31e7ab(0x1f0)],null,0x2)),console[_0x31e7ab(0x1e7)]('');});}function clearLogs(_0x8a6959){const _0x4c825a=a54_0x3a04;_0x8a6959[_0x4c825a(0x1eb)][_0x4c825a(0x1f1)](),console[_0x4c825a(0x1e7)](_0x4c825a(0x1f3));}function a54_0x3a04(_0x277c79,_0x5b56ab){_0x277c79=_0x277c79-0x1e1;const _0x383d98=a54_0x383d();let _0x3a04a5=_0x383d98[_0x277c79];return _0x3a04a5;}const flagDefs=[{'name':'clear','type':a54_0x1c41cb(0x200),'description':a54_0x1c41cb(0x1ea),'default':![]}];export const logsCommand={'name':a54_0x1c41cb(0x1f6),'description':a54_0x1c41cb(0x1fe),'flags':flagDefs,async 'run'(_0x1b18a6,_0x12aa59,_0x2b515d){const _0x184874=a54_0x1c41cb;_0x2b515d[_0x184874(0x1e4)]?clearLogs(_0x1b18a6):showLogs(_0x1b18a6);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c4e02,_0x3bd341){const _0x21479e=a55_0x5ceb,_0x3e6036=_0x5c4e02();while(!![]){try{const _0x15e9bc=-parseInt(_0x21479e(0x104))/0x1+-parseInt(_0x21479e(0xff))/0x2+-parseInt(_0x21479e(0x101))/0x3*(parseInt(_0x21479e(0x105))/0x4)+parseInt(_0x21479e(0x102))/0x5+-parseInt(_0x21479e(0xfd))/0x6*(parseInt(_0x21479e(0x103))/0x7)+-parseInt(_0x21479e(0x100))/0x8+parseInt(_0x21479e(0xfe))/0x9;if(_0x15e9bc===_0x3bd341)break;else _0x3e6036['push'](_0x3e6036['shift']());}catch(_0x204ae7){_0x3e6036['push'](_0x3e6036['shift']());}}}(a55_0x1a2a,0x72a05));function a55_0x5ceb(_0x10af02,_0xd94322){_0x10af02=_0x10af02-0xfd;const _0x1a2a0f=a55_0x1a2a();let _0x5cebbd=_0x1a2a0f[_0x10af02];return _0x5cebbd;}import{menuSync}from'./sync.js';function a55_0x1a2a(){const _0x3d76a1=['4116296UvbjNw','60KrAgRb','3420290JRzjUE','1687FpFLPk','92184lBmvXe','14888PTdfQM','12630tldvLG','13846023spwBAC','1129060iVncMl'];a55_0x1a2a=function(){return _0x3d76a1;};return a55_0x1a2a();}import{menuUpdate}from'./update.js';export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23ec79,_0x11232a){const _0x43819c=a56_0x2322,_0x427de8=_0x23ec79();while(!![]){try{const _0x4abaa8=-parseInt(_0x43819c(0x1e5))/0x1+-parseInt(_0x43819c(0x1fb))/0x2+parseInt(_0x43819c(0x1e4))/0x3*(parseInt(_0x43819c(0x1e3))/0x4)+parseInt(_0x43819c(0x1eb))/0x5*(-parseInt(_0x43819c(0x1ec))/0x6)+-parseInt(_0x43819c(0x1f9))/0x7*(parseInt(_0x43819c(0x1f1))/0x8)+parseInt(_0x43819c(0x1f5))/0x9+parseInt(_0x43819c(0x1ed))/0xa;if(_0x4abaa8===_0x11232a)break;else _0x427de8['push'](_0x427de8['shift']());}catch(_0x550e97){_0x427de8['push'](_0x427de8['shift']());}}}(a56_0x15ea,0xd3668));function strWidth(_0x4595ea){const _0x415ae2=a56_0x2322;let _0x5a11f0=0x0;for(const _0x23e8c4 of _0x4595ea){_0x5a11f0+=/[\u4e00-\u9fa5]/[_0x415ae2(0x1fd)](_0x23e8c4)?0x2:0x1;}return _0x5a11f0;}function a56_0x15ea(){const _0x484d62=['join','max','length','13888827jNLpbR','Menu\x20Name','showOnline','(unchanged)','119aeobBT','\x20\x20Affected\x20menus:\x20','2519302GHClLe','\x20\x20\x20\x20•\x20','test','46148DmvRgr','51gRRPQh','1205777hqzwcB','push','label','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','\x20\x20\x20\x20CSS:\x20','local','195ThEBXt','207666PpgoJl','39480680YNeDbm','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','map','repeat','473528ZxkSeN'];a56_0x15ea=function(){return _0x484d62;};return a56_0x15ea();}function padRight(_0x3ea63f,_0x3be388){const _0x59e3c1=a56_0x2322,_0x1655a3=strWidth(_0x3ea63f);return _0x3ea63f+'\x20'[_0x59e3c1(0x1f0)](Math[_0x59e3c1(0x1f3)](0x0,_0x3be388-_0x1655a3));}export function renderCompareTable(_0x572344,_0x292800={}){const _0x274e4f=a56_0x2322;if(_0x572344[_0x274e4f(0x1f4)]===0x0)return'';const _0x18ada5=_0x292800[_0x274e4f(0x1f7)]??!![],_0x43f8dc=Math['max'](0x1e,..._0x572344[_0x274e4f(0x1ef)](_0x4a58aa=>strWidth(_0x4a58aa[_0x274e4f(0x1e7)]))),_0x200ea3=0x4,_0xc0793c=[],_0x57d227='\x20\x20'+padRight(_0x274e4f(0x1f6),_0x43f8dc),_0x3f82d7=padRight('Local',_0x200ea3),_0xd4b984=_0x18ada5?'\x20\x20'+padRight('Platform',_0x200ea3):'';_0xc0793c[_0x274e4f(0x1e6)](_0x57d227+'\x20\x20'+_0x3f82d7+(_0x18ada5?_0xd4b984:'')),_0xc0793c[_0x274e4f(0x1e6)]('\x20\x20'+'─'[_0x274e4f(0x1f0)](_0x43f8dc)+'\x20\x20'+'─'['repeat'](_0x200ea3)+(_0x18ada5?'\x20\x20'+'─'[_0x274e4f(0x1f0)](_0x200ea3):''));for(const _0x1eb3b2 of _0x572344){const _0x27d489=padRight(_0x1eb3b2[_0x274e4f(0x1e7)],_0x43f8dc),_0x58c893=_0x1eb3b2[_0x274e4f(0x1ea)]?'✓':'✗',_0x2ce1d4=padRight(_0x58c893,_0x200ea3);let _0x51e14e='\x20\x20'+_0x27d489+'\x20\x20'+_0x2ce1d4;if(_0x18ada5){const _0x54815c=_0x1eb3b2['online']?'✓':'✗';_0x51e14e+='\x20\x20'+padRight(_0x54815c,_0x200ea3);}_0xc0793c[_0x274e4f(0x1e6)](_0x51e14e);}return _0xc0793c[_0x274e4f(0x1f2)]('\x0a');}export function renderSyncSummary(_0x2ca581,_0x1d14e5){const _0x469a03=a56_0x2322;if(_0x2ca581[_0x469a03(0x1f4)]===0x0)return _0x1d14e5?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':'\x20\x20No\x20pages\x20to\x20sync.';const _0x3d4228=['\x20\x20'+_0x2ca581['length']+_0x469a03(0x1ee)];for(const _0x3103a1 of _0x2ca581){_0x3d4228['push'](_0x469a03(0x1fc)+_0x3103a1['label']+'\x20('+_0x3103a1['path']+')');}return _0x3d4228['join']('\x0a');}function a56_0x2322(_0x103e4f,_0x42e26e){_0x103e4f=_0x103e4f-0x1e3;const _0x15ea9f=a56_0x15ea();let _0x23224e=_0x15ea9f[_0x103e4f];return _0x23224e;}export function renderUpdateSummary(_0xea68e,_0x12d2fe){const _0x219b99=a56_0x2322;if(_0xea68e['length']===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x587b2f=['\x20\x20'+_0xea68e['length']+_0x219b99(0x1e8),'\x20\x20\x20\x20JS:\x20\x20'+(_0x12d2fe[0x0]??_0x219b99(0x1f8)),_0x219b99(0x1e9)+(_0x12d2fe[0x1]??_0x219b99(0x1f8)),'',_0x219b99(0x1fa)+_0xea68e['join'](',\x20')];return _0x587b2f[_0x219b99(0x1f2)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a49ef,_0x20519f){var _0x419cc3=a57_0x1c7b,_0x4a8793=_0x3a49ef();while(!![]){try{var _0x1a29c6=-parseInt(_0x419cc3(0x1ef))/0x1+parseInt(_0x419cc3(0x1f5))/0x2*(parseInt(_0x419cc3(0x1f1))/0x3)+-parseInt(_0x419cc3(0x1ee))/0x4+-parseInt(_0x419cc3(0x1f0))/0x5+parseInt(_0x419cc3(0x1f7))/0x6*(parseInt(_0x419cc3(0x1f3))/0x7)+parseInt(_0x419cc3(0x1f6))/0x8+-parseInt(_0x419cc3(0x1f4))/0x9*(parseInt(_0x419cc3(0x1f2))/0xa);if(_0x1a29c6===_0x20519f)break;else _0x4a8793['push'](_0x4a8793['shift']());}catch(_0x1f2673){_0x4a8793['push'](_0x4a8793['shift']());}}}(a57_0x2e76,0xdbc5f));export*from'./types.js';export*from'./logic.js';export*from'./compare-table.js';function a57_0x1c7b(_0x13d111,_0x2a4c6b){_0x13d111=_0x13d111-0x1ee;var _0x2e76c8=a57_0x2e76();var _0x1c7b34=_0x2e76c8[_0x13d111];return _0x1c7b34;}export*from'./inquirer.js';export*from'./valid-url.js';export*from'./local-pages.js';function a57_0x2e76(){var _0x392908=['1450620xzzMfd','4081365imGHNl','5171442ncPvOJ','20vWQJuL','14oBXvam','214911boIenL','2DcpupB','9099848ZZvNLr','3333138WQjMay','3029996chgiSt'];a57_0x2e76=function(){return _0x392908;};return a57_0x2e76();}export*from'./service.js';export*from'./sync-core.js';export*from'./update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x310075,_0x46d6fd){const _0x76635a=a58_0x384c,_0x4e996b=_0x310075();while(!![]){try{const _0x1ff0d5=-parseInt(_0x76635a(0x176))/0x1+parseInt(_0x76635a(0x15e))/0x2+parseInt(_0x76635a(0x15c))/0x3+parseInt(_0x76635a(0x17b))/0x4+-parseInt(_0x76635a(0x16f))/0x5*(parseInt(_0x76635a(0x172))/0x6)+parseInt(_0x76635a(0x165))/0x7*(parseInt(_0x76635a(0x179))/0x8)+-parseInt(_0x76635a(0x174))/0x9;if(_0x1ff0d5===_0x46d6fd)break;else _0x4e996b['push'](_0x4e996b['shift']());}catch(_0x3f3ec3){_0x4e996b['push'](_0x4e996b['shift']());}}}(a58_0x554f,0x8ba32));import a58_0x543ad3 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a58_0x581f6d from'ora';import{isUrlReachable}from'./valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x211151){return _0x211151['catch'](_0x289f25=>{const _0x39f561=a58_0x384c;if(_0x289f25?.[_0x39f561(0x156)]===_0x39f561(0x16b))throw CliErrors[_0x39f561(0x161)](_0x39f561(0x173));throw _0x289f25;});}function a58_0x554f(){const _0x59a702=['JS\x20URL\x20check\x20failed','has','cancelled','green','succeed','map','896eVtXxi','No\x20menus\x20selected.','error','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','[new]','ExitPromptError','length','red','JS\x20URL\x20checked','35eHketb','filter','CSS\x20URL\x20checked','224346tKLdli','Cancelled.','16536753YpaqFx','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','105567JsREpX','path','No\x20local\x20pages\x20found.','35400UpMsYR','isTTY','2217128OmxsNV','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','start','test','\x20\x20CSS\x20URL:','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','fail','label','stdin','CSS\x20URL\x20check\x20failed','includes','name','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20Checking\x20JS\x20URL\x20reachability...','trim','\x20\x20JS\x20URL:','3402540vwPoCN','\x20\x20Checking\x20CSS\x20URL\x20reachability...','1043626ZZTbKC'];a58_0x554f=function(){return _0x59a702;};return a58_0x554f();}export function startSpinner(_0x35a3c6){const _0x32daf3=a58_0x384c;return a58_0x581f6d({'text':_0x35a3c6,'color':'cyan'})[_0x32daf3(0x17d)]();}export function stopSpinner(_0x31c4fc,_0x152a81,_0x1b28dd){const _0x5967a9=a58_0x384c;_0x1b28dd?_0x31c4fc[_0x5967a9(0x163)](_0x152a81):_0x31c4fc[_0x5967a9(0x181)](_0x152a81);}export async function askConfirm(_0x7473f9){return onCancel(confirm({'message':_0x7473f9,'theme':{'prefix':''}}));}export async function askJsUrl(_0x4c983c){const _0x56c9f3=a58_0x384c;while(!![]){const _0x126a76=await onCancel(input({'message':_0x56c9f3(0x15b),'default':_0x4c983c,'theme':{'prefix':''}}));if(_0x126a76[_0x56c9f3(0x15a)]()==='')throw CliErrors[_0x56c9f3(0x161)](_0x56c9f3(0x173));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x56c9f3(0x17e)](_0x126a76[_0x56c9f3(0x15a)]())){console['error'](a58_0x543ad3[_0x56c9f3(0x16d)](_0x56c9f3(0x158)));continue;}const _0xea83f2=startSpinner(_0x56c9f3(0x159));try{const _0x539a38=await isUrlReachable(_0x126a76[_0x56c9f3(0x15a)]());stopSpinner(_0xea83f2,_0x56c9f3(0x16e),_0x539a38);if(!_0x539a38){console[_0x56c9f3(0x167)](a58_0x543ad3[_0x56c9f3(0x16d)](_0x56c9f3(0x175)));continue;}return _0x126a76['trim']();}catch(_0x134240){stopSpinner(_0xea83f2,_0x56c9f3(0x15f),![]);throw _0x134240;}}}export async function askCssUrl(_0x51d6a8){const _0x4a1abe=a58_0x384c;while(!![]){const _0x4a8db6=await onCancel(input({'message':_0x4a1abe(0x17f),'default':_0x51d6a8,'theme':{'prefix':''}}));if(_0x4a8db6[_0x4a1abe(0x15a)]()==='')throw CliErrors['cancelled'](_0x4a1abe(0x173));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x4a1abe(0x17e)](_0x4a8db6['trim']())){console[_0x4a1abe(0x167)](a58_0x543ad3[_0x4a1abe(0x16d)](_0x4a1abe(0x180)));continue;}const _0x48885d=startSpinner(_0x4a1abe(0x15d));try{const _0x14a810=await isUrlReachable(_0x4a8db6[_0x4a1abe(0x15a)]());stopSpinner(_0x48885d,_0x4a1abe(0x171),_0x14a810);if(!_0x14a810){console[_0x4a1abe(0x167)](a58_0x543ad3[_0x4a1abe(0x16d)](_0x4a1abe(0x169)));continue;}return _0x4a8db6[_0x4a1abe(0x15a)]();}catch(_0x307b02){stopSpinner(_0x48885d,_0x4a1abe(0x154),![]);throw _0x307b02;}}}function a58_0x384c(_0x434fdd,_0x14c522){_0x434fdd=_0x434fdd-0x154;const _0x554f1d=a58_0x554f();let _0x384c6c=_0x554f1d[_0x434fdd];return _0x384c6c;}export async function selectPages(_0x43cc63,_0x55a052,_0x120cb4){const _0x54ecee=a58_0x384c,_0x4fbe81=_0x43cc63[_0x54ecee(0x164)](_0x33c8a5=>({'name':_0x33c8a5[_0x54ecee(0x182)]+'\x20\x20'+(_0x55a052[_0x54ecee(0x160)](_0x33c8a5[_0x54ecee(0x177)])?a58_0x543ad3['gray']('[already\x20on\x20platform]'):a58_0x543ad3[_0x54ecee(0x162)](_0x54ecee(0x16a))),'value':_0x33c8a5[_0x54ecee(0x182)],'checked':_0x120cb4?_0x120cb4[_0x54ecee(0x155)](_0x33c8a5['label']):!_0x55a052[_0x54ecee(0x160)](_0x33c8a5[_0x54ecee(0x177)])}));if(_0x4fbe81[_0x54ecee(0x16c)]===0x0)throw new Error(_0x54ecee(0x178));const _0x5330bd=await onCancel(checkbox({'message':_0x54ecee(0x157),'choices':_0x4fbe81,'loop':![],'theme':{'prefix':''}}));if(_0x5330bd['length']===0x0)throw new Error(_0x54ecee(0x166));return _0x43cc63[_0x54ecee(0x170)](_0x3f921d=>_0x5330bd[_0x54ecee(0x155)](_0x3f921d['label']));}export function isInteractive(){const _0x498b0a=a58_0x384c;return process[_0x498b0a(0x183)][_0x498b0a(0x17a)]===!![];}export function requireInteractive(){const _0x2e2cad=a58_0x384c;if(!isInteractive())throw new Error(_0x2e2cad(0x168)+_0x2e2cad(0x17c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x2fc2fd=a59_0x5932;(function(_0x56daf3,_0x17253e){const _0x5a0c17=a59_0x5932,_0xe0c1ae=_0x56daf3();while(!![]){try{const _0x15578d=parseInt(_0x5a0c17(0xeb))/0x1+parseInt(_0x5a0c17(0xed))/0x2*(parseInt(_0x5a0c17(0xf9))/0x3)+parseInt(_0x5a0c17(0xef))/0x4*(-parseInt(_0x5a0c17(0x102))/0x5)+-parseInt(_0x5a0c17(0x103))/0x6*(-parseInt(_0x5a0c17(0xfe))/0x7)+-parseInt(_0x5a0c17(0xf8))/0x8*(-parseInt(_0x5a0c17(0xf4))/0x9)+-parseInt(_0x5a0c17(0xf0))/0xa+-parseInt(_0x5a0c17(0xec))/0xb*(parseInt(_0x5a0c17(0xfd))/0xc);if(_0x15578d===_0x17253e)break;else _0xe0c1ae['push'](_0xe0c1ae['shift']());}catch(_0x35dbe9){_0xe0c1ae['push'](_0xe0c1ae['shift']());}}}(a59_0x4e86,0xca508));function a59_0x5932(_0x21cc25,_0x160cdc){_0x21cc25=_0x21cc25-0xea;const _0x4e86d1=a59_0x4e86();let _0x593218=_0x4e86d1[_0x21cc25];return _0x593218;}import{readdirSync,statSync,readFileSync}from'fs';function a59_0x4e86(){const _0x1f5b32=['14982ogFrwp','2Tpceep','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','4JuLFYr','9581390ZhaHgD','path','replace','join','1242063yMBvFU','match','utf-8','isDirectory','16ofCEBl','4542387LldmNv','push','endsWith','src/pages','18372QmTLUP','125482wfWsmm','.tsx','slice','cwd','3659905hawlKn','534Jacdxq','trim','1218465rPTZPK'];a59_0x4e86=function(){return _0x1f5b32;};return a59_0x4e86();}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a59_0x2fc2fd(0x101)](),a59_0x2fc2fd(0xfc));export function extractTitleFromComment(_0x3b8cc2){const _0x501576=a59_0x2fc2fd;try{const _0x50c0aa=readFileSync(_0x3b8cc2,_0x501576(0xf6)),_0x41813c=_0x50c0aa[_0x501576(0xf5)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x41813c&&_0x41813c[0x1]){const _0x2a1584=_0x41813c[0x1],_0x2425e7=_0x2a1584['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2425e7&&_0x2425e7[0x1])return _0x2425e7[0x1][_0x501576(0xea)]();}let _0x20d02e=null;const _0x545859=_0x50c0aa['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x545859&&_0x545859[0x1]&&(_0x20d02e=_0x545859[0x1]);if(!_0x20d02e){const _0x4fbc36=_0x50c0aa['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4fbc36&&_0x4fbc36[0x1]&&(_0x20d02e=_0x4fbc36[0x1]);}if(_0x20d02e){const _0x4350a3=new RegExp('\x5cb'+_0x20d02e+_0x501576(0xee)),_0x4010cf=_0x50c0aa[_0x501576(0xf5)](_0x4350a3);if(_0x4010cf&&_0x4010cf[0x1])return _0x4010cf[0x1];return _0x20d02e;}return null;}catch(_0x5e2989){return null;}}export function getLocalPages(_0x430792=pagesDir,_0x17e15a=pagesDir){const _0x59678a=a59_0x2fc2fd;let _0x4f407b=[];const _0x47d63f=readdirSync(_0x430792);return _0x47d63f['forEach'](_0x19ffce=>{const _0x5ebccd=a59_0x5932,_0x29a360=join(_0x430792,_0x19ffce),_0x111056=statSync(_0x29a360);if(_0x111056&&_0x111056[_0x5ebccd(0xf7)]())_0x4f407b=_0x4f407b['concat'](getLocalPages(_0x29a360,_0x17e15a));else{if(_0x19ffce[_0x5ebccd(0xfb)](_0x5ebccd(0xff))){let _0x33bf88=relative(_0x17e15a,_0x29a360);_0x33bf88[_0x5ebccd(0xfb)]('index.tsx')?_0x33bf88=_0x33bf88[_0x5ebccd(0xf2)](/index\.tsx$/,''):_0x33bf88=_0x33bf88['replace'](/\.tsx$/,'');_0x33bf88['endsWith'](sep)&&(_0x33bf88=_0x33bf88[_0x5ebccd(0x100)](0x0,-0x1));const _0x1caa01=_0x33bf88['split'](sep)[_0x5ebccd(0xf3)]('/'),_0xcd7401=extractTitleFromComment(_0x29a360),_0x27092f=_0xcd7401||_0x1caa01;_0x4f407b[_0x5ebccd(0xfa)]({'path':_0x1caa01['replaceAll']('$',':'),'label':_0x27092f});}}}),_0x4f407b['filter'](_0xf5103e=>_0xf5103e[_0x59678a(0xf1)]!=='');}
|