@lovrabet/rabetbase-cli 2.0.2-beta.8 → 2.0.4-beta.3
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 -0
- 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/ai-setup/config.js +0 -1
- package/lib/commands/app.js +0 -1
- package/lib/commands/config.js +0 -1
- package/lib/commands/mcp.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
- package/lib/mcp/McpInstallUI.js +0 -1
- package/lib/mcp/claude.js +0 -1
- package/lib/mcp/cursor.js +0 -1
- package/lib/mcp/main.js +0 -1
- package/lib/mcp/mcp-install-non-interactive.js +0 -1
- package/lib/mcp/mcp-installer.js +0 -1
- package/lib/telemetry/otel-logger-version.js +0 -1
- package/lib/ui/IDESelector.js +0 -1
- package/lib/ui/useIDESelection.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a40_0x1f5b52=a40_0x4053;(function(_0x270bd6,_0x41679f){const _0x40b7b9=a40_0x4053,_0x384fca=_0x270bd6();while(!![]){try{const _0x461bef=-parseInt(_0x40b7b9(0xa0))/0x1+parseInt(_0x40b7b9(0x94))/0x2+parseInt(_0x40b7b9(0x99))/0x3*(parseInt(_0x40b7b9(0xa3))/0x4)+-parseInt(_0x40b7b9(0x9b))/0x5+-parseInt(_0x40b7b9(0x9c))/0x6*(parseInt(_0x40b7b9(0x92))/0x7)+parseInt(_0x40b7b9(0x90))/0x8*(parseInt(_0x40b7b9(0x9f))/0x9)+parseInt(_0x40b7b9(0x95))/0xa;if(_0x461bef===_0x41679f)break;else _0x384fca['push'](_0x384fca['shift']());}catch(_0x181a76){_0x384fca['push'](_0x384fca['shift']());}}}(a40_0x4432,0x19674));import{CliErrors}from'../../errors.js';function a40_0x4432(){const _0x4318d0=['app','2072StWWjc','string','742TWJwBw','Missing\x20key.','195146TWKYPz','1847890WugfuQ','Config\x20key\x20to\x20read','validation','Get\x20a\x20config\x20value\x20by\x20key','18099XEjPZS','str','941550HBRrLs','8220yrbBAC','appcode','Key\x20not\x20found:\x20','4410RXgeOy','92350VrGYCL','Usage:\x20','\x20config\x20get\x20--key\x20<key>','80dXQXlA','read','key'];a40_0x4432=function(){return _0x4318d0;};return a40_0x4432();}import{readConfig}from'../../utils/config.js';function a40_0x4053(_0x13f88b,_0x1fdc12){_0x13f88b=_0x13f88b-0x8d;const _0x4432cf=a40_0x4432();let _0x4053dd=_0x4432cf[_0x13f88b];return _0x4053dd;}import{CLI_BIN_NAME}from'../../constant/cli.js';async function execute(_0x339265){const _0x57e5d4=a40_0x4053,_0x4059eb=_0x339265[_0x57e5d4(0x9a)](_0x57e5d4(0x8e));if(!_0x4059eb)throw CliErrors['validation'](_0x57e5d4(0x93),_0x57e5d4(0xa1)+CLI_BIN_NAME+_0x57e5d4(0xa2));const _0x100de6=readConfig(),_0x37af93=_0x4059eb===_0x57e5d4(0x8f)?_0x57e5d4(0x9d):_0x4059eb,_0x343cac=_0x100de6[_0x37af93];if(_0x343cac===undefined)throw CliErrors[_0x57e5d4(0x97)](_0x57e5d4(0x9e)+_0x4059eb);return{'ok':!![],'data':typeof _0x343cac==='object'?_0x343cac:{[_0x37af93]:_0x343cac},'message':typeof _0x343cac==='object'?undefined:String(_0x343cac)};}export const configGetDefinition={'service':'config','command':'get','description':a40_0x1f5b52(0x98),'risk':a40_0x1f5b52(0x8d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a40_0x1f5b52(0x8e),'type':a40_0x1f5b52(0x91),'description':a40_0x1f5b52(0x96),'required':!![]}],'execute':execute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x15f46c,_0x2095eb){const _0x305953=a41_0x2e10,_0x2e9caa=_0x15f46c();while(!![]){try{const _0x22f122=-parseInt(_0x305953(0x151))/0x1+parseInt(_0x305953(0x14f))/0x2+parseInt(_0x305953(0x155))/0x3*(-parseInt(_0x305953(0x157))/0x4)+-parseInt(_0x305953(0x158))/0x5*(parseInt(_0x305953(0x153))/0x6)+parseInt(_0x305953(0x152))/0x7+-parseInt(_0x305953(0x150))/0x8+parseInt(_0x305953(0x156))/0x9*(parseInt(_0x305953(0x154))/0xa);if(_0x22f122===_0x2095eb)break;else _0x2e9caa['push'](_0x2e9caa['shift']());}catch(_0x4eb0f0){_0x2e9caa['push'](_0x2e9caa['shift']());}}}(a41_0x22b0,0xaf7c3));import{configListDefinition}from'./list.js';import{configGetDefinition}from'./get.js';function a41_0x22b0(){const _0x235c6a=['957560eOsjTp','716475eDJgpw','5807102KAKiWL','1126362TTAoYR','10eIzfQu','3TlgiIt','1615995UlZgHJ','2331412lhSKXa','5bRIftk','2632792qTUHmI'];a41_0x22b0=function(){return _0x235c6a;};return a41_0x22b0();}import{configSetDefinition}from'./set.js';function a41_0x2e10(_0x2fec66,_0x37086e){_0x2fec66=_0x2fec66-0x14f;const _0x22b0c3=a41_0x22b0();let _0x2e10c5=_0x22b0c3[_0x2fec66];return _0x2e10c5;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a42_0x4edbed=a42_0x546f;(function(_0x1949ce,_0x48dbf8){const _0x2a2536=a42_0x546f,_0x9af5ad=_0x1949ce();while(!![]){try{const _0xe7333=-parseInt(_0x2a2536(0x83))/0x1+parseInt(_0x2a2536(0x80))/0x2*(parseInt(_0x2a2536(0x84))/0x3)+parseInt(_0x2a2536(0x73))/0x4*(-parseInt(_0x2a2536(0x7c))/0x5)+parseInt(_0x2a2536(0x74))/0x6*(-parseInt(_0x2a2536(0x7f))/0x7)+parseInt(_0x2a2536(0x81))/0x8+-parseInt(_0x2a2536(0x7b))/0x9+parseInt(_0x2a2536(0x7e))/0xa*(parseInt(_0x2a2536(0x76))/0xb);if(_0xe7333===_0x48dbf8)break;else _0x9af5ad['push'](_0x9af5ad['shift']());}catch(_0x2baeaa){_0x9af5ad['push'](_0x9af5ad['shift']());}}}(a42_0x465b,0x3eae4));import{readScopedConfig}from'./shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x125f3b){const _0x372702=a42_0x546f,_0x14c9d7=_0x125f3b[_0x372702(0x78)]('global')?readScopedConfig(_0x372702(0x77)):readConfig();return{'ok':!![],'data':_0x14c9d7};}export const configListDefinition={'service':a42_0x4edbed(0x82),'command':a42_0x4edbed(0x79),'description':a42_0x4edbed(0x7d),'risk':a42_0x4edbed(0x75),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a42_0x4edbed(0x77),'type':'boolean','description':a42_0x4edbed(0x7a),'default':![]}],'execute':execute};function a42_0x546f(_0x4e94af,_0x4912ad){_0x4e94af=_0x4e94af-0x73;const _0x465b71=a42_0x465b();let _0x546ff1=_0x465b71[_0x4e94af];return _0x546ff1;}function a42_0x465b(){const _0x171295=['4126AJBSzz','1045944FuuSnY','config','179641rUOzCP','114zEEXre','2053592fsiAlL','37104VwPdbm','read','39710vCTQBS','global','bool','list','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','274104pOVSMO','5dzEEYb','List\x20all\x20config\x20values','2530FZhQMN','161uHCJaM'];a42_0x465b=function(){return _0x171295;};return a42_0x465b();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a43_0x15cac5=a43_0x319a;function a43_0x319a(_0x21b292,_0x156d01){_0x21b292=_0x21b292-0x15b;const _0x1b5202=a43_0x1b52();let _0x319adf=_0x1b5202[_0x21b292];return _0x319adf;}function a43_0x1b52(){const _0x5d8da7=['global','Global','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Set\x20a\x20config\x20value','Missing\x20value.','152956KYqgCN','boolean','Missing\x20key.','Project','9EIncwZ','521vFsckN','18xrqQJi','2719367YkqOrK','\x20set\x20to:\x20','Invalid\x20locale\x20value.','includes','env','882CDnjVs','22XVspfZ','write','value','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','production','key','bool','3118000dJiozf','Usage:\x20','string','7953180NIylwr','2593776hCsSbg','app','online','validation','316735JXASRU','9VJDxGZ','appcode','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)'];a43_0x1b52=function(){return _0x5d8da7;};return a43_0x1b52();}(function(_0x5683f1,_0x1ce93f){const _0x330496=a43_0x319a,_0xebcbe7=_0x5683f1();while(!![]){try{const _0x3901fc=parseInt(_0x330496(0x17b))/0x1*(parseInt(_0x330496(0x15d))/0x2)+parseInt(_0x330496(0x16e))/0x3*(-parseInt(_0x330496(0x176))/0x4)+-parseInt(_0x330496(0x16d))/0x5*(-parseInt(_0x330496(0x17c))/0x6)+parseInt(_0x330496(0x17d))/0x7+-parseInt(_0x330496(0x169))/0x8*(parseInt(_0x330496(0x17a))/0x9)+-parseInt(_0x330496(0x165))/0xa*(-parseInt(_0x330496(0x15e))/0xb)+-parseInt(_0x330496(0x168))/0xc;if(_0x3901fc===_0x1ce93f)break;else _0xebcbe7['push'](_0xebcbe7['shift']());}catch(_0x5a5f68){_0xebcbe7['push'](_0xebcbe7['shift']());}}}(a43_0x1b52,0x509c3));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'./shared.js';async function execute(_0x1ff897){const _0x1df7d0=a43_0x319a,_0x481137=_0x1ff897['str'](_0x1df7d0(0x163)),_0x2579c8=_0x1ff897['str'](_0x1df7d0(0x160));if(!_0x481137)throw CliErrors[_0x1df7d0(0x16c)](_0x1df7d0(0x178),'Usage:\x20'+CLI_BIN_NAME+_0x1df7d0(0x161));if(_0x2579c8===undefined||_0x2579c8==='')throw CliErrors['validation'](_0x1df7d0(0x175),_0x1df7d0(0x166)+CLI_BIN_NAME+_0x1df7d0(0x161));if(_0x2579c8['length']>0x1f4)throw CliErrors[_0x1df7d0(0x16c)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x481137===_0x1df7d0(0x15c)&&![_0x1df7d0(0x16b),_0x1df7d0(0x162),'daily'][_0x1df7d0(0x15b)](_0x2579c8))throw CliErrors[_0x1df7d0(0x16c)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily,\x20online');if(_0x481137==='locale'&&!normalizeLocale(_0x2579c8))throw CliErrors[_0x1df7d0(0x16c)](_0x1df7d0(0x17f),_0x1df7d0(0x173));const _0x421a92={'global':_0x1ff897[_0x1df7d0(0x164)]('global')},_0x879853=resolveWriteScope(_0x421a92),_0x55bef6=readScopedConfig(_0x879853);let _0x1498af=_0x481137,_0x106785=_0x2579c8;_0x481137===_0x1df7d0(0x16a)&&(_0x1498af=_0x1df7d0(0x16f),delete _0x55bef6[_0x1df7d0(0x16a)]);_0x481137==='appcode'&&delete _0x55bef6['app'];_0x481137==='locale'&&(_0x106785=normalizeLocale(_0x2579c8));_0x55bef6[_0x1498af]=_0x106785,writeScopedConfig(_0x55bef6,_0x879853);const _0x133b93=_0x879853===_0x1df7d0(0x171)?_0x1df7d0(0x172):_0x1df7d0(0x179);return{'ok':!![],'message':'✓\x20'+_0x133b93+'\x20'+_0x1498af+_0x1df7d0(0x17e)+_0x106785};}export const configSetDefinition={'service':'config','command':'set','description':a43_0x15cac5(0x174),'risk':a43_0x15cac5(0x15f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x15cac5(0x163),'type':a43_0x15cac5(0x167),'description':'Config\x20key','required':!![]},{'name':a43_0x15cac5(0x160),'type':a43_0x15cac5(0x167),'description':'Config\x20value','required':!![]},{'name':'global','type':a43_0x15cac5(0x177),'description':a43_0x15cac5(0x170),'default':![]}],'execute':execute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a44_0x296360=a44_0x552c;(function(_0x57745b,_0x1ca7f5){const _0x13f6f0=a44_0x552c,_0x329f64=_0x57745b();while(!![]){try{const _0x397b9b=parseInt(_0x13f6f0(0xcb))/0x1*(-parseInt(_0x13f6f0(0xc5))/0x2)+-parseInt(_0x13f6f0(0xc8))/0x3*(-parseInt(_0x13f6f0(0xc9))/0x4)+-parseInt(_0x13f6f0(0xc0))/0x5+-parseInt(_0x13f6f0(0xc4))/0x6*(-parseInt(_0x13f6f0(0xcd))/0x7)+-parseInt(_0x13f6f0(0xca))/0x8*(-parseInt(_0x13f6f0(0xc3))/0x9)+-parseInt(_0x13f6f0(0xce))/0xa*(parseInt(_0x13f6f0(0xbf))/0xb)+parseInt(_0x13f6f0(0xcc))/0xc;if(_0x397b9b===_0x1ca7f5)break;else _0x329f64['push'](_0x329f64['shift']());}catch(_0x5abc52){_0x329f64['push'](_0x329f64['shift']());}}}(a44_0x2eec,0xac61c));function a44_0x552c(_0x582e69,_0x3d79ec){_0x582e69=_0x582e69-0xbf;const _0x2eec1a=a44_0x2eec();let _0x552cda=_0x2eec1a[_0x582e69];return _0x552cda;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a44_0x2eec(){const _0x371749=['71496lgHqcw','21926ieaKMc','478896BGMSqC','305641yRXiog','61210sCxJHI','242mdcEHz','4952065MvEJJq','zh-CN','global','738twITTb','138ixnYCU','116MfTzYH','project','en-US','3977604raFthP','4hhShCU'];a44_0x2eec=function(){return _0x371749;};return a44_0x2eec();}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export{CLI_BIN_NAME};const LOCALE_MAP={'zh':'zh-CN','zh-cn':a44_0x296360(0xc1),'zh_cn':'zh-CN','en':a44_0x296360(0xc7),'en-us':a44_0x296360(0xc7),'en_us':a44_0x296360(0xc7)};export function normalizeLocale(_0x59c22f){if(!_0x59c22f)return null;return LOCALE_MAP[_0x59c22f['toLowerCase']()]??null;}export function resolveWriteScope(_0x8c4133){const _0x1b2b5b=a44_0x296360;if(_0x8c4133[_0x1b2b5b(0xc2)])return _0x1b2b5b(0xc2);return isInProject()?_0x1b2b5b(0xc6):_0x1b2b5b(0xc2);}export function readScopedConfig(_0x786f31){return readConfigFile(resolveWriteConfigPath(_0x786f31));}export function writeScopedConfig(_0x346cf3,_0x3a0e66){writeConfigFile(resolveWriteConfigPath(_0x3a0e66),_0x346cf3);}
|
package/lib/commands/create.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x4c4504=a45_0x47bd;(function(_0x2cac6e,_0x3b223b){const _0x498732=a45_0x47bd,_0x8a0404=_0x2cac6e();while(!![]){try{const _0x1892aa=-parseInt(_0x498732(0x110))/0x1+parseInt(_0x498732(0xfa))/0x2*(-parseInt(_0x498732(0x108))/0x3)+-parseInt(_0x498732(0x100))/0x4*(-parseInt(_0x498732(0x106))/0x5)+-parseInt(_0x498732(0x104))/0x6*(-parseInt(_0x498732(0x10b))/0x7)+-parseInt(_0x498732(0xf9))/0x8*(-parseInt(_0x498732(0x103))/0x9)+-parseInt(_0x498732(0xf7))/0xa*(parseInt(_0x498732(0x107))/0xb)+parseInt(_0x498732(0x10d))/0xc*(parseInt(_0x498732(0xfc))/0xd);if(_0x1892aa===_0x3b223b)break;else _0x8a0404['push'](_0x8a0404['shift']());}catch(_0x3eef1d){_0x8a0404['push'](_0x8a0404['shift']());}}}(a45_0x4e52,0xd5279));import{createApp}from'../create-app/main.js';import{CliErrors}from'../errors.js';function a45_0x47bd(_0x8648c0,_0x5058ec){_0x8648c0=_0x8648c0-0xf7;const _0x4e529a=a45_0x4e52();let _0x47bdc2=_0x4e529a[_0x8648c0];return _0x47bdc2;}const flagDefs=[{'name':a45_0x4c4504(0xfb),'type':'string','description':a45_0x4c4504(0x101)},{'name':a45_0x4c4504(0xf8),'type':a45_0x4c4504(0xfe),'description':'Target\x20environment'},{'name':'appcode','type':a45_0x4c4504(0xfe),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}];function a45_0x4e52(){const _0x3b257f=['name','10492170XTqcDU','cookie','string','logger','4194444INhcmv','Project\x20name','nonInteractive','12177PUzBab','6KiAZpo','非交互模式创建项目:\x20','5ZtRgkV','14668973YyLSgV','3LGxLjv','appcode','create','7377685wUAnSu','Usage:\x20rabetbase\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20[--ci]','12ynUbEr','validation','auth','303841lcknIX','../create-app/non-interactive.js','10myCEHk','env','4672POoPye','2378686zBPXiV'];a45_0x4e52=function(){return _0x3b257f;};return a45_0x4e52();}export const createCommand={'name':a45_0x4c4504(0x10a),'description':'Create\x20a\x20new\x20project','usage':'rabetbase\x20project\x20create\x20[<project-name>]\x20[flags]','flags':flagDefs,async 'run'(_0x1f72e9,_0x30a2e6,_0x1487f1){const _0x397ead=a45_0x4c4504,_0xdbd35c=_0x1487f1['name']?.['trim']()||_0x30a2e6[0x0]?.['trim'](),_0x192557=_0x1487f1['env'],_0xef02b0=_0x1487f1[_0x397ead(0x109)];if(_0x1f72e9[_0x397ead(0x102)]){if(!_0xdbd35c)throw CliErrors[_0x397ead(0x10e)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x397ead(0x10c));_0x1f72e9[_0x397ead(0xff)]['info'](_0x397ead(0x10a),_0x397ead(0x105)+_0xdbd35c);const {createProjectNonInteractive:_0x2d4655}=await import(_0x397ead(0x111));await _0x2d4655(_0xdbd35c,_0x192557,_0xef02b0,_0x1f72e9[_0x397ead(0x10f)][_0x397ead(0xfd)]);}else await createApp({'projectCode':_0xdbd35c,'appCode':_0xef02b0,'env':_0x192557,'cookie':_0x1f72e9['auth'][_0x397ead(0xfd)]});}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x4a4e80=a46_0x57e6;(function(_0x598acc,_0x477d2c){const _0x48d4eb=a46_0x57e6,_0x26d073=_0x598acc();while(!![]){try{const _0xda08fe=-parseInt(_0x48d4eb(0x1b4))/0x1*(-parseInt(_0x48d4eb(0x1c6))/0x2)+-parseInt(_0x48d4eb(0x1a2))/0x3+parseInt(_0x48d4eb(0x1bc))/0x4+-parseInt(_0x48d4eb(0x1cb))/0x5+parseInt(_0x48d4eb(0x1c9))/0x6+-parseInt(_0x48d4eb(0x1ab))/0x7*(-parseInt(_0x48d4eb(0x1ae))/0x8)+-parseInt(_0x48d4eb(0x19d))/0x9*(parseInt(_0x48d4eb(0x1b1))/0xa);if(_0xda08fe===_0x477d2c)break;else _0x26d073['push'](_0x26d073['shift']());}catch(_0x48e5f1){_0x26d073['push'](_0x26d073['shift']());}}}(a46_0x2cfc,0x8ae47));import{getDatasetDetail}from'../../core/api-client.js';function a46_0x2cfc(){const _0x14f073=['tableComment','10jhnMrA','alias','dataType','14970qxKBbo','description','read','toField','dbtableConfig','toDatasetCode','toDatasetName','dbType','1942864hILSbQ','doType','method','sourceType','bool','verbose','code','indexes','type','isArray','46yvrJrR','required','detail','6823020WcONfk','datasetKey','3772015hHJmYX','str','properties','extend','string','relations','displayName','parse','filter','4474809bwRNgf','pkField','object','toFieldLabel','options','492333tywTct','toTableName','entries','map','fromField','deleted','fields','modelId','path','217gobMOX','tableName','length','4496tlRadL','name'];a46_0x2cfc=function(){return _0x14f073;};return a46_0x2cfc();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../common/flags.js';function normalizeField(_0x2650c5){const _0x491a64=a46_0x57e6;if(_0x2650c5[_0x491a64(0x1a7)])return null;const _0x34fb54=Boolean(_0x2650c5['displayName']!==undefined||_0x2650c5['doType']!==undefined);let _0x5ea519={};if(!_0x34fb54&&typeof _0x2650c5['extend']==='string')try{_0x5ea519=JSON[_0x491a64(0x19b)](_0x2650c5[_0x491a64(0x1ce)]);}catch{}const _0x33ac42=_0x34fb54?_0x2650c5['name']:_0x2650c5[_0x491a64(0x1c2)],_0x1f2a8c=_0x34fb54?_0x2650c5[_0x491a64(0x19a)]:_0x2650c5['name'],_0x412ce8=_0x34fb54?_0x2650c5[_0x491a64(0x1bd)]:_0x2650c5[_0x491a64(0x1c4)]||_0x2650c5[_0x491a64(0x1b3)],_0xd3256c=_0x34fb54?_0x2650c5[_0x491a64(0x19e)]===!![]:_0x5ea519[_0x491a64(0x19e)]===!![],_0x2036d2=_0x34fb54?_0x2650c5[_0x491a64(0x1c7)]===!![]:_0x5ea519['required']===!![],_0x44265f=_0x34fb54?_0x2650c5['options']??null:_0x5ea519[_0x491a64(0x1a1)]??null,_0x396d63={'name':_0x33ac42,'displayName':_0x1f2a8c||_0x33ac42,'type':_0x412ce8,'dbType':_0x2650c5[_0x491a64(0x1bb)],'pk':_0xd3256c,'required':_0x2036d2,'description':_0x2650c5[_0x491a64(0x1b5)]||undefined};return Array[_0x491a64(0x1c5)](_0x44265f)&&_0x44265f[_0x491a64(0x1ad)]>0x0&&(_0x396d63['options']=_0x44265f),_0x396d63;}function a46_0x57e6(_0x192ba9,_0x3bf3e0){_0x192ba9=_0x192ba9-0x19a;const _0x2cfc55=a46_0x2cfc();let _0x57e63c=_0x2cfc55[_0x192ba9];return _0x57e63c;}export const datasetDetail={'service':'dataset','command':a46_0x4a4e80(0x1c8),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a46_0x4a4e80(0x1b6),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a46_0x4a4e80(0x1b2),'type':a46_0x4a4e80(0x1cf),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'},{'name':'verbose','type':'boolean','description':'Return\x20full\x20raw\x20detail\x20object'}],async 'execute'(_0x3e5d27){const _0x2bb948=a46_0x4a4e80,_0x111c08=await getDatasetDetail(_0x3e5d27[_0x2bb948(0x1cc)](_0x2bb948(0x1c2))),_0x1ded44=_0x3e5d27[_0x2bb948(0x1c0)](_0x2bb948(0x1c1));if(_0x1ded44)return{'ok':!![],'data':_0x111c08};const _0x57b2ca=Array[_0x2bb948(0x1c5)](_0x111c08[_0x2bb948(0x1a8)])?_0x111c08['fields']:Array[_0x2bb948(0x1c5)](_0x111c08[_0x2bb948(0x1cd)])?_0x111c08[_0x2bb948(0x1cd)]:[],_0x58b519=_0x57b2ca[_0x2bb948(0x1a5)](_0x3c085b=>normalizeField(_0x3c085b))[_0x2bb948(0x19c)](_0x9d7a48=>_0x9d7a48!==null),_0x4e4e3d=_0x111c08['operations']??{},_0x471a8a=[];for(const [_0x11cc15,_0x466e5b]of Object[_0x2bb948(0x1a4)](_0x4e4e3d)){if(_0x466e5b&&typeof _0x466e5b===_0x2bb948(0x19f)){const _0x39b6de=_0x466e5b;_0x39b6de[_0x2bb948(0x1be)]&&_0x39b6de[_0x2bb948(0x1aa)]&&_0x471a8a['push']({'name':_0x11cc15,'method':_0x39b6de[_0x2bb948(0x1be)],'path':_0x39b6de[_0x2bb948(0x1aa)]});}}const _0x1f47ce=_0x111c08[_0x2bb948(0x1b8)]??{},_0x54c998=_0x111c08['dataset']??{};return{'ok':!![],'data':{'id':_0x111c08[_0x2bb948(0x1a9)]??_0x111c08['id'],'name':_0x111c08[_0x2bb948(0x1af)],'code':_0x111c08['modelCode']||_0x111c08[_0x2bb948(0x1c2)],'description':_0x111c08[_0x2bb948(0x1b5)]||_0x54c998[_0x2bb948(0x1b0)]||undefined,'source':_0x111c08['source']||_0x54c998[_0x2bb948(0x1bf)],'table':_0x1f47ce['tableName']||_0x54c998[_0x2bb948(0x1ac)],'datasetKey':_0x1f47ce[_0x2bb948(0x1ca)],'pk':_0x1f47ce[_0x2bb948(0x19e)],'fields':_0x58b519,'operations':_0x471a8a,'indexes':Array[_0x2bb948(0x1c5)](_0x54c998[_0x2bb948(0x1c3)])?_0x54c998['indexes']:[],'relations':Array[_0x2bb948(0x1c5)](_0x111c08[_0x2bb948(0x1d0)])?_0x111c08[_0x2bb948(0x1d0)][_0x2bb948(0x1a5)](_0x3af2b0=>({'fromField':_0x3af2b0[_0x2bb948(0x1a6)],'toDataset':_0x3af2b0[_0x2bb948(0x1ba)],'toCode':_0x3af2b0[_0x2bb948(0x1b9)],'toTable':_0x3af2b0[_0x2bb948(0x1a3)],'toField':_0x3af2b0[_0x2bb948(0x1b7)],'labelField':_0x3af2b0[_0x2bb948(0x1a0)]||undefined})):[],'stats':{'fieldCount':_0x58b519['length'],'operationCount':_0x471a8a['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a47_0x1d40(_0x5cd4cc,_0x1ba49e){_0x5cd4cc=_0x5cd4cc-0x10b;const _0x39b7fc=a47_0x39b7();let _0x1d4003=_0x39b7fc[_0x5cd4cc];return _0x1d4003;}(function(_0x335f82,_0x46c58b){const _0x50ca55=a47_0x1d40,_0x1e6233=_0x335f82();while(!![]){try{const _0x3d640b=parseInt(_0x50ca55(0x110))/0x1*(-parseInt(_0x50ca55(0x10d))/0x2)+-parseInt(_0x50ca55(0x112))/0x3+-parseInt(_0x50ca55(0x111))/0x4+-parseInt(_0x50ca55(0x115))/0x5*(-parseInt(_0x50ca55(0x10f))/0x6)+parseInt(_0x50ca55(0x113))/0x7+-parseInt(_0x50ca55(0x10b))/0x8*(parseInt(_0x50ca55(0x10c))/0x9)+parseInt(_0x50ca55(0x10e))/0xa*(parseInt(_0x50ca55(0x114))/0xb);if(_0x3d640b===_0x46c58b)break;else _0x1e6233['push'](_0x1e6233['shift']());}catch(_0x4704d4){_0x1e6233['push'](_0x1e6233['shift']());}}}(a47_0x39b7,0x68611));import{datasetList}from'./list.js';import{datasetDetail}from'./detail.js';import{datasetOperations}from'./operations.js';import{datasetLinks}from'./links.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetOperations,datasetLinks];function a47_0x39b7(){const _0x407a72=['21142olZpNv','10hIqOze','132VZvnlU','29yJdIVx','190256uIysJH','35649JepOAw','3147221EdeDqO','4630725ZFBGUv','128340PmiZQa','248iPIeLK','186309WJdEyX'];a47_0x39b7=function(){return _0x407a72;};return a47_0x39b7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x29b784=a48_0x568d;(function(_0x8c18f5,_0x146d6f){const _0x507c2a=a48_0x568d,_0x170a8c=_0x8c18f5();while(!![]){try{const _0xba24a4=-parseInt(_0x507c2a(0x136))/0x1*(parseInt(_0x507c2a(0x142))/0x2)+parseInt(_0x507c2a(0x15c))/0x3*(-parseInt(_0x507c2a(0x134))/0x4)+-parseInt(_0x507c2a(0x138))/0x5*(parseInt(_0x507c2a(0x159))/0x6)+-parseInt(_0x507c2a(0x146))/0x7+-parseInt(_0x507c2a(0x14b))/0x8*(parseInt(_0x507c2a(0x15e))/0x9)+parseInt(_0x507c2a(0x158))/0xa+-parseInt(_0x507c2a(0x151))/0xb*(-parseInt(_0x507c2a(0x160))/0xc);if(_0xba24a4===_0x146d6f)break;else _0x170a8c['push'](_0x170a8c['shift']());}catch(_0x29533a){_0x170a8c['push'](_0x170a8c['shift']());}}}(a48_0x2e69,0xb5f58));function a48_0x568d(_0x520936,_0x2268ec){_0x520936=_0x520936-0x130;const _0x2e6953=a48_0x2e69();let _0x568d85=_0x2e6953[_0x520936];return _0x568d85;}import{getErConfig}from'../../core/api-client.js';function a48_0x2e69(){const _0x4d8c93=['8flPtnm','isPrimaryKey','\x20relation(s)','displayName','toDatasetName','string','1597409mpBIEr','fields','reduce','\x20database(s)','length','dbId','Fetched\x20link\x20graph\x20for\x20','137430DGqbWa','7794kpHXVo','filter','LEFT','447KorMgt','Returns\x20all\x20datasets\x20with\x20their\x20fields\x20(PK/FK\x20flags)\x20and\x20cross-dataset\x20JOIN\x20relationships.\x20','6544773EJbZXC','Defaults\x20to\x20auto-detect\x20all\x20linked\x20databases.','300ShaoFE','datasetCount','tableName','relations','Ideal\x20for\x20AI\x20to\x20understand\x20the\x20full\x20data\x20model\x20in\x20a\x20single\x20call\x20before\x20writing\x20queries\x20or\x20BFF\x20scripts.','read','meta','13528LRHqbN','isForeignKey','2649iRSTQb','links','705SuHpGp','fromField','toDataset','map','appCode','joinType','bool','verbose','datasetId','dbType','514ZOlItf','\x20dataset(s),\x20','relationCount','\x20database(s),\x20','5626929TXAjbn','dbName','name','Link\x20graph:\x20','tableComment'];a48_0x2e69=function(){return _0x4d8c93;};return a48_0x2e69();}import{resolveDb}from'../../core/db-resolver.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const datasetLinks={'service':'dataset','command':a48_0x29b784(0x137),'description':'Get\x20the\x20link\x20graph\x20(entity-relationship)\x20for\x20the\x20app\x27s\x20datasets.\x20'+a48_0x29b784(0x15d)+a48_0x29b784(0x131),'risk':a48_0x29b784(0x132),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'db','type':a48_0x29b784(0x150),'description':'Filter\x20by\x20database\x20—\x20accepts\x20a\x20numeric\x20dblink\x20ID\x20or\x20a\x20database\x20name\x20(e.g.\x20ecommerce_db).\x20'+a48_0x29b784(0x15f)},{'name':a48_0x29b784(0x13f),'type':'boolean','description':'Return\x20full\x20raw\x20ER\x20response\x20from\x20API'}],async 'execute'(_0x345cda){const _0x2c3202=a48_0x29b784,_0x368330=_0x345cda[_0x2c3202(0x13e)](_0x2c3202(0x13f)),{resolved:_0x5ac41c,error:_0x385b0d}=await resolveDb(_0x345cda[_0x2c3202(0x13c)],_0x345cda['str']('db')||undefined);if(_0x385b0d)return{'ok':![],'message':_0x385b0d};const _0x38994e=_0x5ac41c[_0x2c3202(0x13b)](_0x8d02c7=>_0x8d02c7[_0x2c3202(0x156)]),_0xa578df=await Promise['all'](_0x38994e['map'](_0x5e14c0=>getErConfig(_0x345cda[_0x2c3202(0x13c)],_0x5e14c0)));if(_0x368330)return{'ok':!![],'data':_0xa578df['length']===0x1?_0xa578df[0x0]:_0xa578df,'message':_0x2c3202(0x157)+_0x38994e[_0x2c3202(0x155)]+_0x2c3202(0x154)};const _0x1be8dc=_0xa578df['map'](_0x44db53=>{const _0x1edd87=_0x2c3202,_0x286bdf=(_0x44db53['datasets']??[])[_0x1edd87(0x13b)](_0x242e2b=>{const _0x36733c=_0x1edd87,_0x13fbf1=_0x242e2b[_0x36733c(0x152)]?.[_0x36733c(0x15a)](_0xa3919e=>_0xa3919e[_0x36733c(0x14c)])['map'](_0x15db4b=>_0x15db4b['name'])??[],_0x2aff20=_0x242e2b[_0x36733c(0x152)]?.['filter'](_0x8aacc3=>_0x8aacc3['isForeignKey'])['map'](_0x5ee4a1=>_0x5ee4a1[_0x36733c(0x148)])??[];return{'id':_0x242e2b[_0x36733c(0x140)],'name':_0x242e2b['datasetName'],'code':_0x242e2b['datasetCode'],'table':_0x242e2b[_0x36733c(0x162)],'comment':_0x242e2b[_0x36733c(0x14a)]||undefined,'fields':(_0x242e2b[_0x36733c(0x152)]??[])[_0x36733c(0x13b)](_0x4b9016=>({'name':_0x4b9016[_0x36733c(0x148)],'displayName':_0x4b9016[_0x36733c(0x14e)],'type':_0x4b9016[_0x36733c(0x141)],'pk':_0x4b9016[_0x36733c(0x14c)],'fk':_0x4b9016[_0x36733c(0x135)]})),'relations':(_0x242e2b['relations']??[])['filter'](_0xa2f7dd=>_0xa2f7dd[_0x36733c(0x139)]&&_0xa2f7dd[_0x36733c(0x13a)])['map'](_0x46fe94=>({'from':_0x46fe94[_0x36733c(0x139)],'toDataset':_0x46fe94[_0x36733c(0x14f)],'toCode':_0x46fe94[_0x36733c(0x13a)],'toField':_0x46fe94['toField'],'joinType':_0x46fe94[_0x36733c(0x13d)]||_0x36733c(0x15b)})),'stats':{'fieldCount':_0x242e2b['fields']?.['length']??0x0,'pkCount':_0x13fbf1[_0x36733c(0x155)],'fkCount':_0x2aff20['length'],'relationCount':_0x242e2b[_0x36733c(0x130)]?.[_0x36733c(0x155)]??0x0}};}),_0x26c5da=_0x286bdf['filter'](_0x3bd577=>_0x3bd577['stats'][_0x1edd87(0x144)]>0x0)[_0x1edd87(0x13b)](_0x1debde=>_0x1debde[_0x1edd87(0x148)]);return{'db':_0x44db53[_0x1edd87(0x133)]?.[_0x1edd87(0x147)],'dbId':_0x44db53[_0x1edd87(0x133)]?.[_0x1edd87(0x156)],'appCode':_0x44db53[_0x1edd87(0x133)]?.[_0x1edd87(0x13c)],'datasetCount':_0x286bdf[_0x1edd87(0x155)],'connectedDatasets':_0x26c5da,'datasets':_0x286bdf};}),_0x24bdd0=_0x1be8dc['reduce']((_0x5c3920,_0x490b27)=>_0x5c3920+_0x490b27[_0x2c3202(0x161)],0x0),_0x2670de=_0x1be8dc[_0x2c3202(0x153)]((_0x28f0ba,_0x272e92)=>_0x28f0ba+_0x272e92['datasets'][_0x2c3202(0x153)]((_0x143c2f,_0x53d3e8)=>_0x143c2f+_0x53d3e8['stats'][_0x2c3202(0x144)],0x0),0x0);return{'ok':!![],'data':_0x1be8dc[_0x2c3202(0x155)]===0x1?_0x1be8dc[0x0]:{'databases':_0x1be8dc},'message':_0x2c3202(0x149)+_0x1be8dc['length']+_0x2c3202(0x145)+_0x24bdd0+_0x2c3202(0x143)+_0x2670de+_0x2c3202(0x14d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x5813c1=a49_0x4cb2;(function(_0x3c3afb,_0x34070b){const _0x4e36f2=a49_0x4cb2,_0x330a08=_0x3c3afb();while(!![]){try{const _0x49cb62=-parseInt(_0x4e36f2(0x1cf))/0x1*(parseInt(_0x4e36f2(0x1ba))/0x2)+parseInt(_0x4e36f2(0x1ca))/0x3+-parseInt(_0x4e36f2(0x1ce))/0x4+-parseInt(_0x4e36f2(0x1bd))/0x5+parseInt(_0x4e36f2(0x1d0))/0x6*(-parseInt(_0x4e36f2(0x1c6))/0x7)+parseInt(_0x4e36f2(0x1bc))/0x8+parseInt(_0x4e36f2(0x1b8))/0x9;if(_0x49cb62===_0x34070b)break;else _0x330a08['push'](_0x330a08['shift']());}catch(_0x4fa567){_0x330a08['push'](_0x330a08['shift']());}}}(a49_0x1bb8,0x800ad));function a49_0x4cb2(_0xc1a804,_0x5b5f0b){_0xc1a804=_0xc1a804-0x1b6;const _0x1bb8e4=a49_0x1bb8();let _0x4cb2a4=_0x1bb8e4[_0xc1a804];return _0x4cb2a4;}function a49_0x1bb8(){const _0x11688a=['954OdSrmd','dbName','list','Found\x20','\x20dataset(s)','allFields','dataset','List\x20all\x20datasets\x20with\x20metadata','14606649yUJlPR','boolean','842508GwNOXy','bool','1497048LRkTfK','2731465qvcsAD','verbose','description','string','datasetKey','source','Return\x20full\x20dataset\x20objects\x20including\x20columns,\x20operations\x20and\x20relations','read','tableName','12313AKMPPw','pkField','name','dbtableConfig','1672935duajkY','map','code','str','699176gaIGVJ','2Kvwkoj'];a49_0x1bb8=function(){return _0x11688a;};return a49_0x1bb8();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const datasetList={'service':a49_0x5813c1(0x1b6),'command':a49_0x5813c1(0x1d2),'description':a49_0x5813c1(0x1b7),'risk':a49_0x5813c1(0x1c4),'flags':[{'name':a49_0x5813c1(0x1c8),'type':a49_0x5813c1(0x1c0),'description':'Filter\x20datasets\x20by\x20name\x20(server-side\x20fuzzy\x20match)'},CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':'verbose','type':a49_0x5813c1(0x1b9),'description':a49_0x5813c1(0x1c3)}],async 'execute'(_0x26108f){const _0x3444c0=a49_0x5813c1,_0x25d438=_0x26108f[_0x3444c0(0x1cd)](_0x3444c0(0x1c8)),_0xf55aa=_0x26108f[_0x3444c0(0x1cd)](_0x3444c0(0x1cc)),_0x5ca334=_0x26108f[_0x3444c0(0x1bb)](_0x3444c0(0x1be)),_0x3a3224=await listDatasets(_0x26108f['appCode'],{..._0x25d438&&{'name':_0x25d438},..._0xf55aa&&{'code':_0xf55aa}}),_0x11fe80=_0x5ca334?_0x3a3224:_0x3a3224[_0x3444c0(0x1cb)](_0x1f75e0=>{const _0x234a7f=_0x3444c0,_0x667cde=_0x1f75e0[_0x234a7f(0x1c9)]??{};return{'id':_0x1f75e0['id'],'name':_0x1f75e0['name'],'code':_0x1f75e0['code'],'description':_0x1f75e0[_0x234a7f(0x1bf)],'source':_0x1f75e0[_0x234a7f(0x1c2)],'db':_0x667cde[_0x234a7f(0x1d1)],'table':_0x667cde[_0x234a7f(0x1c5)],'datasetKey':_0x667cde[_0x234a7f(0x1c1)],'pk':_0x667cde[_0x234a7f(0x1c7)],'fields':_0x667cde['allFields']?_0x667cde[_0x234a7f(0x1d5)]['split'](',')['map'](_0x68cc59=>_0x68cc59['trim']()):[]};});return{'ok':!![],'data':{'total':_0x11fe80['length'],'datasets':_0x11fe80},'message':_0x3444c0(0x1d3)+_0x11fe80['length']+_0x3444c0(0x1d4)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x12520a=a50_0x1063;(function(_0x3f3d7,_0x241f36){const _0x22fc85=a50_0x1063,_0x1fed98=_0x3f3d7();while(!![]){try{const _0x1314fb=parseInt(_0x22fc85(0x16a))/0x1*(parseInt(_0x22fc85(0x163))/0x2)+parseInt(_0x22fc85(0x166))/0x3+parseInt(_0x22fc85(0x176))/0x4*(-parseInt(_0x22fc85(0x174))/0x5)+parseInt(_0x22fc85(0x17b))/0x6*(parseInt(_0x22fc85(0x173))/0x7)+parseInt(_0x22fc85(0x167))/0x8+-parseInt(_0x22fc85(0x168))/0x9*(-parseInt(_0x22fc85(0x17c))/0xa)+-parseInt(_0x22fc85(0x170))/0xb;if(_0x1314fb===_0x241f36)break;else _0x1fed98['push'](_0x1fed98['shift']());}catch(_0x1fbeb6){_0x1fed98['push'](_0x1fed98['shift']());}}}(a50_0x1788,0xb41ce));function a50_0x1788(){const _0x821539=['method','bool','appCode','35442132kzdnOt','code','map','22519pqzfmf','25eufrpY','Get\x20operations\x20for\x20a\x20dataset,\x20optionally\x20with\x20full\x20detail\x20for\x20one\x20operation','353572mNdIxW','str','type','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','verbose','1110aSXKji','230mZdBIp','dataset','displayName','boolean','string','operations','Return\x20full\x20operation\x20objects\x20including\x20requestFields\x20and\x20responseFields','3316XsJvGy','operation','name','3807822RwxJOG','8159720hmTSLJ','503559lSkmjE','alias','139mrxRXC','enabled','length'];a50_0x1788=function(){return _0x821539;};return a50_0x1788();}import{getDatasetOperations,getOperationDetail}from'../../core/api-client.js';function a50_0x1063(_0x55130e,_0x2e7344){_0x55130e=_0x55130e-0x161;const _0x1788d4=a50_0x1788();let _0x1063ec=_0x1788d4[_0x55130e];return _0x1063ec;}import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const datasetOperations={'service':a50_0x12520a(0x17d),'command':a50_0x12520a(0x161),'description':a50_0x12520a(0x175),'risk':'read','flags':[CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a50_0x12520a(0x169),'type':a50_0x12520a(0x180),'description':a50_0x12520a(0x179)},{'name':a50_0x12520a(0x164),'type':a50_0x12520a(0x180),'description':'Operation\x20name\x20to\x20get\x20full\x20detail\x20(e.g.\x20filter,\x20getOne,\x20create)'},{'name':'verbose','type':a50_0x12520a(0x17f),'description':a50_0x12520a(0x162)}],async 'execute'(_0x5a0a7d){const _0x17fecc=a50_0x12520a,_0x377b8d=_0x5a0a7d[_0x17fecc(0x177)](_0x17fecc(0x171)),_0x310d7c=_0x5a0a7d[_0x17fecc(0x177)](_0x17fecc(0x164)),_0x3e24a0=_0x5a0a7d[_0x17fecc(0x16e)](_0x17fecc(0x17a));if(_0x310d7c){const {dataset:_0x30af28,operation:_0x361a5e}=await getOperationDetail(_0x5a0a7d[_0x17fecc(0x16f)],_0x377b8d,_0x310d7c);return{'ok':!![],'data':{'dataset':_0x30af28,'operation':_0x361a5e}};}const {dataset:_0x308385,operations:_0x147f7b}=await getDatasetOperations(_0x377b8d);return{'ok':!![],'data':{'dataset':_0x308385,'total':_0x147f7b[_0x17fecc(0x16c)],'operations':_0x3e24a0?_0x147f7b:_0x147f7b[_0x17fecc(0x172)](_0x5de41f=>({'name':_0x5de41f[_0x17fecc(0x165)],'displayName':_0x5de41f[_0x17fecc(0x17e)],'type':_0x5de41f[_0x17fecc(0x178)],'method':_0x5de41f[_0x17fecc(0x16d)],'enabled':_0x5de41f[_0x17fecc(0x16b)]}))}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a51_0x1224(){const _0x5375f5=['length','keys','10XXuVRq','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','1144102uhaEPO','(not\x20found)','\x20\x20Auth','appcode','116mQirDv','explicitAppName','\x20doctor','630492FnGENl','472tDjLaA','(default:\x20pretty)','\x20\x20runtimeDomain:\x20\x20\x20','(not\x20set)','\x20\x20\x20\x20apiDir:\x20\x20\x20','format','gray','check','repeat','slice','\x20\x20\x20\x20appcode:\x20\x20','apps','✗\x20Not\x20logged\x20in','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','locale','\x20(default)','(inherit)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','log','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','18982997zArVFY','apiDir','red','green','appCode','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','platform','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','8076523DHHCfB','env','verbose','✗\x20Expired','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','\x20\x20explicitAppName:\x20','bold','defaultApp','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','(none)','currentApp','2155TKjbXo','read','8166RohLOU','riskLevel','188883suEJcb','24705uVhoAk','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','cookie','\x20\x20Merged\x20Config'];a51_0x1224=function(){return _0x5375f5;};return a51_0x1224();}const a51_0x5e4441=a51_0x1b42;(function(_0x53c475,_0x2de46b){const _0xa16abe=a51_0x1b42,_0x38c136=_0x53c475();while(!![]){try{const _0x4588bc=-parseInt(_0xa16abe(0x115))/0x1+parseInt(_0xa16abe(0x11c))/0x2+-parseInt(_0xa16abe(0x10c))/0x3*(-parseInt(_0xa16abe(0x119))/0x4)+parseInt(_0xa16abe(0x107))/0x5*(-parseInt(_0xa16abe(0x109))/0x6)+-parseInt(_0xa16abe(0xf7))/0x7+-parseInt(_0xa16abe(0x11d))/0x8*(-parseInt(_0xa16abe(0x10b))/0x9)+-parseInt(_0xa16abe(0x113))/0xa*(-parseInt(_0xa16abe(0x131))/0xb);if(_0x4588bc===_0x2de46b)break;else _0x38c136['push'](_0x38c136['shift']());}catch(_0x4c1b85){_0x38c136['push'](_0x38c136['shift']());}}}(a51_0x1224,0x9aac3));import a51_0x467d24 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';function a51_0x1b42(_0x5bf905,_0x38fa24){_0x5bf905=_0x5bf905-0xec;const _0x12241d=a51_0x1224();let _0x1b42f5=_0x12241d[_0x5bf905];return _0x1b42f5;}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(_0x3e73e7){const _0x32d26f=a51_0x1b42,_0x4af091=getCliVersion(),_0x5b7912=GIT_COMMIT!==_0x32d26f(0xff)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x32d26f(0x126)](0x0,0xa)+')':VERSION,_0x3e9dda=buildConfigFromFlags({});console[_0x32d26f(0x12f)](),console[_0x32d26f(0x12f)](a51_0x467d24['bold'](CLI_BIN_NAME+_0x32d26f(0x11b))),console[_0x32d26f(0x12f)](a51_0x467d24[_0x32d26f(0x123)]('─'[_0x32d26f(0x125)](0x32))),console[_0x32d26f(0x12f)](_0x32d26f(0x114)+_0x5b7912),console[_0x32d26f(0x12f)](_0x32d26f(0x130)+process['version']),console[_0x32d26f(0x12f)](_0x32d26f(0xfc)+process[_0x32d26f(0xf1)]+'\x20'+process[_0x32d26f(0x104)]),console[_0x32d26f(0x12f)](),console[_0x32d26f(0x12f)](a51_0x467d24[_0x32d26f(0x101)](_0x32d26f(0xf3))),console[_0x32d26f(0x12f)](a51_0x467d24[_0x32d26f(0x123)]('\x20\x20─'[_0x32d26f(0x125)](0x1e)));const _0x5be850=getGlobalConfigPath(),_0x322b36=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5be850||a51_0x467d24[_0x32d26f(0x123)](_0x32d26f(0x116)))),console[_0x32d26f(0x12f)](_0x32d26f(0xf4)+(_0x322b36||a51_0x467d24[_0x32d26f(0x123)](_0x32d26f(0x116)))),console[_0x32d26f(0x12f)](),console[_0x32d26f(0x12f)](a51_0x467d24[_0x32d26f(0x101)](_0x32d26f(0x110))),console[_0x32d26f(0x12f)](a51_0x467d24[_0x32d26f(0x123)]('\x20\x20─'[_0x32d26f(0x125)](0x1e))),console['log'](_0x32d26f(0xfe)+(_0x3e9dda[_0x32d26f(0xee)]||a51_0x467d24['red'](_0x32d26f(0x120)))),console[_0x32d26f(0x12f)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9dda['env']),console[_0x32d26f(0x12f)](_0x32d26f(0x10d)+_0x3e9dda[_0x32d26f(0x12b)]),console[_0x32d26f(0x12f)](_0x32d26f(0xf5)+_0x3e9dda[_0x32d26f(0x132)]),console[_0x32d26f(0x12f)](_0x32d26f(0x12a)+(_0x3e9dda[_0x32d26f(0x102)]||a51_0x467d24['gray'](_0x32d26f(0x105)))),console[_0x32d26f(0x12f)](_0x32d26f(0xf0)+(_0x3e9dda[_0x32d26f(0x106)]||a51_0x467d24[_0x32d26f(0x123)](_0x32d26f(0x105)))),console['log'](_0x32d26f(0x100)+(_0x3e9dda[_0x32d26f(0x11a)]||a51_0x467d24['gray'](_0x32d26f(0x105)))),console[_0x32d26f(0x12f)](_0x32d26f(0xf2)+(_0x3e9dda[_0x32d26f(0x122)]||a51_0x467d24[_0x32d26f(0x123)](_0x32d26f(0x11e)))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3e9dda['pageSize']??a51_0x467d24[_0x32d26f(0x123)]('(default)'))),console[_0x32d26f(0x12f)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x3e9dda[_0x32d26f(0x10a)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9dda[_0x32d26f(0xf9)]),console[_0x32d26f(0x12f)](_0x32d26f(0xef)+(_0x3e9dda[_0x32d26f(0x10f)]?a51_0x467d24[_0x32d26f(0xed)]('(set,\x20length='+_0x3e9dda[_0x32d26f(0x10f)][_0x32d26f(0x111)]+')'):a51_0x467d24[_0x32d26f(0x123)]('(none)')));const _0x336902=Object[_0x32d26f(0x112)](_0x3e9dda[_0x32d26f(0x128)]);if(_0x336902[_0x32d26f(0x111)]>0x0){console[_0x32d26f(0x12f)](),console[_0x32d26f(0x12f)](a51_0x467d24[_0x32d26f(0x101)]('\x20\x20Apps')),console[_0x32d26f(0x12f)](a51_0x467d24['gray']('\x20\x20─'[_0x32d26f(0x125)](0x1e)));for(const _0xf326cb of _0x336902){const _0x18b9fc=_0x3e9dda[_0x32d26f(0x128)][_0xf326cb],_0x41e03b=_0xf326cb===_0x3e9dda['defaultApp'],_0x1cc18c=_0xf326cb===_0x3e9dda['currentApp'],_0x27552a=_0x1cc18c?a51_0x467d24[_0x32d26f(0xed)](_0x32d26f(0xfd)):'',_0x4bcd08=_0x41e03b?_0x32d26f(0x12c):'';console[_0x32d26f(0x12f)]('\x20\x20'+_0xf326cb+_0x4bcd08+_0x27552a),console['log'](_0x32d26f(0x127)+_0x18b9fc[_0x32d26f(0x118)]),console[_0x32d26f(0x12f)](_0x32d26f(0xfb)+(_0x18b9fc[_0x32d26f(0xf8)]||a51_0x467d24[_0x32d26f(0x123)](_0x32d26f(0x12d)))),console['log'](_0x32d26f(0x121)+(_0x18b9fc['apiDir']||a51_0x467d24[_0x32d26f(0x123)]('(inherit)'))),console[_0x32d26f(0x12f)]('\x20\x20\x20\x20cookie:\x20\x20\x20'+(_0x18b9fc[_0x32d26f(0x10f)]?a51_0x467d24[_0x32d26f(0xed)]('(set)'):a51_0x467d24[_0x32d26f(0x123)](_0x32d26f(0x12d))));}}console[_0x32d26f(0x12f)](),console['log'](a51_0x467d24[_0x32d26f(0x101)]('\x20\x20API\x20Endpoints')),console['log'](a51_0x467d24['gray'](_0x32d26f(0x10e)['repeat'](0x1e))),console[_0x32d26f(0x12f)](_0x32d26f(0x12e)+getApiDomain()),console[_0x32d26f(0x12f)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log'](_0x32d26f(0x11f)+getRuntimeDomain()),console[_0x32d26f(0x12f)](),console[_0x32d26f(0x12f)](a51_0x467d24[_0x32d26f(0x101)](_0x32d26f(0x117))),console[_0x32d26f(0x12f)](a51_0x467d24['gray'](_0x32d26f(0x10e)[_0x32d26f(0x125)](0x1e)));const _0x37a433=_0x3e9dda[_0x32d26f(0x10f)];if(_0x37a433){const _0x1a1aed=await getIsSessionValid();console[_0x32d26f(0x12f)](_0x32d26f(0x103)+(_0x1a1aed?a51_0x467d24[_0x32d26f(0xed)]('✓\x20Valid'):a51_0x467d24['red'](_0x32d26f(0xfa))));}else console[_0x32d26f(0x12f)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a51_0x467d24[_0x32d26f(0xec)](_0x32d26f(0x129)));return console[_0x32d26f(0x12f)](),{'ok':!![]};}export const doctorDefinition={'service':a51_0x5e4441(0xf6),'command':a51_0x5e4441(0x124),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a51_0x5e4441(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a52_0x2a02(_0x351d31,_0x1b6c73){_0x351d31=_0x351d31-0xc3;const _0xed1f75=a52_0xed1f();let _0x2a0251=_0xed1f75[_0x351d31];return _0x2a0251;}const a52_0x20cbf7=a52_0x2a02;function a52_0xed1f(){const _0x14a94f=['logger','appcode','info','2798rfErwP','2363528oEKdzH','env','yes','Target\x20environment','init','6501096ljkENS','App\x20code\x20to\x20initialize','boolean','5168890tihtYa','1842470RRzZTD','1415792BKoNms','1087527fKdknk','44enVfyE','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','Auto-confirm\x20prompts'];a52_0xed1f=function(){return _0x14a94f;};return a52_0xed1f();}(function(_0x1dc02d,_0x5168a4){const _0x24d864=a52_0x2a02,_0x1f73b6=_0x1dc02d();while(!![]){try{const _0x58385f=parseInt(_0x24d864(0xcf))/0x1*(-parseInt(_0x24d864(0xd5))/0x2)+parseInt(_0x24d864(0xce))/0x3+parseInt(_0x24d864(0xcd))/0x4+parseInt(_0x24d864(0xcb))/0x5+-parseInt(_0x24d864(0xc8))/0x6+-parseInt(_0x24d864(0xcc))/0x7+parseInt(_0x24d864(0xc3))/0x8;if(_0x58385f===_0x5168a4)break;else _0x1f73b6['push'](_0x1f73b6['shift']());}catch(_0x394153){_0x1f73b6['push'](_0x1f73b6['shift']());}}}(a52_0xed1f,0x9b9d2));import{initConfig}from'../init/main.js';const flagDefs=[{'name':a52_0x20cbf7(0xd3),'type':'string','description':a52_0x20cbf7(0xc9)},{'name':'env','type':'string','description':a52_0x20cbf7(0xc6)},{'name':a52_0x20cbf7(0xc5),'type':a52_0x20cbf7(0xca),'description':a52_0x20cbf7(0xd1),'default':![]}];export const initCommand={'name':a52_0x20cbf7(0xc7),'description':a52_0x20cbf7(0xd0),'flags':flagDefs,async 'run'(_0x2b64ae,_0x44e2e8,_0x365bc5){const _0x1e6232=a52_0x20cbf7;_0x2b64ae[_0x1e6232(0xd2)][_0x1e6232(0xd4)](_0x1e6232(0xc7),'执行初始化配置命令'),await initConfig({'appcode':_0x365bc5['appcode'],'env':_0x365bc5[_0x1e6232(0xc4)],'autoYes':_0x365bc5[_0x1e6232(0xc5)]});}};
|
package/lib/commands/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a53_0x2f03(){const _0x3c4ec1=['589044wIstoj','1874604qzRcJJ','12471705wEIBaU','8435FUrNkZ','✓\x20Logged\x20out','7616364uNUuss','706249DBpmTi','1596032oFwUMR','6ecWUjX','!\x20Not\x20logged\x20in','3396ZfFyrE'];a53_0x2f03=function(){return _0x3c4ec1;};return a53_0x2f03();}(function(_0x371dfb,_0x20bb24){const _0x5fa8e9=a53_0x2b27,_0x37da87=_0x371dfb();while(!![]){try{const _0xa8dbcb=parseInt(_0x5fa8e9(0x89))/0x1+parseInt(_0x5fa8e9(0x8e))/0x2+parseInt(_0x5fa8e9(0x8b))/0x3*(parseInt(_0x5fa8e9(0x8f))/0x4)+-parseInt(_0x5fa8e9(0x91))/0x5*(-parseInt(_0x5fa8e9(0x8d))/0x6)+-parseInt(_0x5fa8e9(0x88))/0x7+parseInt(_0x5fa8e9(0x8a))/0x8+-parseInt(_0x5fa8e9(0x90))/0x9;if(_0xa8dbcb===_0x20bb24)break;else _0x37da87['push'](_0x37da87['shift']());}catch(_0x157aab){_0x37da87['push'](_0x37da87['shift']());}}}(a53_0x2f03,0x9707e));import{unlinkSync,existsSync}from'node:fs';function a53_0x2b27(_0x4aa052,_0x46e3d8){_0x4aa052=_0x4aa052-0x88;const _0x2f0305=a53_0x2f03();let _0x2b2759=_0x2f0305[_0x4aa052];return _0x2b2759;}import{cookieFile}from'../auth/constant.js';export const logoutCommand={'name':'logout','description':'Logout\x20from\x20rabetbase',async 'run'(_0x44ef5b,_0x11aacc,_0x129ed7){const _0xb4bdcc=a53_0x2b27;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0xb4bdcc(0x92))):console['log'](_0xb4bdcc(0x8c));}};
|
package/lib/commands/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x34aa84=a54_0x2a92;function a54_0x5640(){const _0x3a2f2a=['forEach','5BVkKyZ','\x20\x20\x20Details:\x20','boolean','length','*\x20Logs\x20cleared','logger','warn','readLogs','3079951OtVEsg','1863159rnnoVT','error','6328648pTmYhs','*\x20Lovrabet\x20CLI\x20logs:\x0a','986162UQrOMQ','message','toLocaleString','duration','en-US','30108584pkVVWb','\x20\x20\x20Duration:\x20','log','9675462trhpuf','level','Clear\x20all\x20logs','2740532pjCcRL'];a54_0x5640=function(){return _0x3a2f2a;};return a54_0x5640();}(function(_0x7e2f6f,_0x4cb8e2){const _0x220bb5=a54_0x2a92,_0x355943=_0x7e2f6f();while(!![]){try{const _0x3f801f=-parseInt(_0x220bb5(0x126))/0x1+parseInt(_0x220bb5(0x131))/0x2+parseInt(_0x220bb5(0x122))/0x3+parseInt(_0x220bb5(0x124))/0x4*(parseInt(_0x220bb5(0x133))/0x5)+parseInt(_0x220bb5(0x12e))/0x6+parseInt(_0x220bb5(0x121))/0x7+-parseInt(_0x220bb5(0x12b))/0x8;if(_0x3f801f===_0x4cb8e2)break;else _0x355943['push'](_0x355943['shift']());}catch(_0x2616db){_0x355943['push'](_0x355943['shift']());}}}(a54_0x5640,0xd5f1c));function showLogs(_0x385707){const _0x47eb36=a54_0x2a92,_0x3d3a99=_0x385707['logger'][_0x47eb36(0x120)]();if(_0x3d3a99[_0x47eb36(0x136)]===0x0){console[_0x47eb36(0x12d)]('*\x20No\x20logs\x20found');return;}console[_0x47eb36(0x12d)](_0x47eb36(0x125)),_0x3d3a99[_0x47eb36(0x132)]((_0x5d2de2,_0x4dd471)=>{const _0xd4587b=_0x47eb36,_0x417224=new Date(_0x5d2de2['timestamp'])[_0xd4587b(0x128)](_0xd4587b(0x12a)),_0x17b0d4=_0x5d2de2[_0xd4587b(0x12f)]==='success'?'√':_0x5d2de2['level']===_0xd4587b(0x123)?'×':_0x5d2de2[_0xd4587b(0x12f)]===_0xd4587b(0x11f)?'!':'i';console[_0xd4587b(0x12d)](_0x4dd471+0x1+'.\x20'+_0x17b0d4+'\x20['+_0x5d2de2['command']+']\x20'+_0x5d2de2[_0xd4587b(0x127)]),console[_0xd4587b(0x12d)]('\x20\x20\x20Time:\x20'+_0x417224),_0x5d2de2[_0xd4587b(0x129)]&&console[_0xd4587b(0x12d)](_0xd4587b(0x12c)+_0x5d2de2[_0xd4587b(0x129)]+'ms'),_0x5d2de2['details']&&Object['keys'](_0x5d2de2['details'])[_0xd4587b(0x136)]>0x0&&console[_0xd4587b(0x12d)](_0xd4587b(0x134)+JSON['stringify'](_0x5d2de2['details'],null,0x2)),console['log']('');});}function clearLogs(_0x258abf){const _0x1d3e30=a54_0x2a92;_0x258abf[_0x1d3e30(0x138)]['clearLogs'](),console['log'](_0x1d3e30(0x137));}function a54_0x2a92(_0x26a449,_0x1809d7){_0x26a449=_0x26a449-0x11f;const _0x564064=a54_0x5640();let _0x2a9280=_0x564064[_0x26a449];return _0x2a9280;}const flagDefs=[{'name':'clear','type':a54_0x34aa84(0x135),'description':a54_0x34aa84(0x130),'default':![]}];export const logsCommand={'name':'logs','description':'View\x20or\x20clear\x20CLI\x20logs','flags':flagDefs,async 'run'(_0x29fb9d,_0x1418cb,_0x140279){_0x140279['clear']?clearLogs(_0x29fb9d):showLogs(_0x29fb9d);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x400d85,_0x113f86){const _0x382072=a55_0x19fe,_0xa9d74b=_0x400d85();while(!![]){try{const _0x59d814=-parseInt(_0x382072(0x172))/0x1*(parseInt(_0x382072(0x16e))/0x2)+-parseInt(_0x382072(0x173))/0x3*(parseInt(_0x382072(0x170))/0x4)+-parseInt(_0x382072(0x16b))/0x5+-parseInt(_0x382072(0x175))/0x6*(-parseInt(_0x382072(0x174))/0x7)+-parseInt(_0x382072(0x16f))/0x8+-parseInt(_0x382072(0x16d))/0x9+parseInt(_0x382072(0x16c))/0xa*(parseInt(_0x382072(0x171))/0xb);if(_0x59d814===_0x113f86)break;else _0xa9d74b['push'](_0xa9d74b['shift']());}catch(_0x594899){_0xa9d74b['push'](_0xa9d74b['shift']());}}}(a55_0x5c51,0xf263a));import{menuSync}from'./sync.js';import{menuUpdate}from'./update.js';function a55_0x19fe(_0x34eb8c,_0x4e5480){_0x34eb8c=_0x34eb8c-0x16b;const _0x5c51d0=a55_0x5c51();let _0x19fe3d=_0x5c51d0[_0x34eb8c];return _0x19fe3d;}function a55_0x5c51(){const _0x39d52b=['8992220XkrGUG','2275659kIhGpt','103382wTjyMx','12622072KKAbgJ','109264lAqkXi','33NYFCIc','11TqFTwL','75SVAxbR','3759FctQaU','18702BDaCwo','1482790dDxNfE'];a55_0x5c51=function(){return _0x39d52b;};return a55_0x5c51();}export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a56_0x28bb(_0xad0caa,_0x6eab60){_0xad0caa=_0xad0caa-0x1c5;const _0xfd2e07=a56_0xfd2e();let _0x28bba6=_0xfd2e07[_0xad0caa];return _0x28bba6;}(function(_0x1c4288,_0x1206ae){const _0x26a2a4=a56_0x28bb,_0x2ca46c=_0x1c4288();while(!![]){try{const _0x49ac8c=parseInt(_0x26a2a4(0x1d5))/0x1+parseInt(_0x26a2a4(0x1d8))/0x2*(-parseInt(_0x26a2a4(0x1d0))/0x3)+parseInt(_0x26a2a4(0x1ca))/0x4+parseInt(_0x26a2a4(0x1cf))/0x5+-parseInt(_0x26a2a4(0x1c6))/0x6*(parseInt(_0x26a2a4(0x1dc))/0x7)+-parseInt(_0x26a2a4(0x1ce))/0x8+-parseInt(_0x26a2a4(0x1dd))/0x9*(-parseInt(_0x26a2a4(0x1d6))/0xa);if(_0x49ac8c===_0x1206ae)break;else _0x2ca46c['push'](_0x2ca46c['shift']());}catch(_0x31f88d){_0x2ca46c['push'](_0x2ca46c['shift']());}}}(a56_0xfd2e,0x489a6));function strWidth(_0x171c5d){const _0x43225b=a56_0x28bb;let _0x1703cf=0x0;for(const _0x468766 of _0x171c5d){_0x1703cf+=/[\u4e00-\u9fa5]/[_0x43225b(0x1c7)](_0x468766)?0x2:0x1;}return _0x1703cf;}function padRight(_0x9fc366,_0x2b2c96){const _0x4225e6=a56_0x28bb,_0x3e4173=strWidth(_0x9fc366);return _0x9fc366+'\x20'[_0x4225e6(0x1df)](Math[_0x4225e6(0x1e0)](0x0,_0x2b2c96-_0x3e4173));}export function renderCompareTable(_0x2234a7,_0x324769={}){const _0x124165=a56_0x28bb;if(_0x2234a7[_0x124165(0x1d3)]===0x0)return'';const _0x2cefef=_0x324769['showOnline']??!![],_0x311f8a=Math[_0x124165(0x1e0)](0x1e,..._0x2234a7[_0x124165(0x1cd)](_0x200859=>strWidth(_0x200859['label']))),_0x37ad3b=0x4,_0x10a004=[],_0x5e930a='\x20\x20'+padRight('Menu\x20Name',_0x311f8a),_0x4ec4b6=padRight('Local',_0x37ad3b),_0x2bf112=_0x2cefef?'\x20\x20'+padRight(_0x124165(0x1d7),_0x37ad3b):'';_0x10a004[_0x124165(0x1d1)](_0x5e930a+'\x20\x20'+_0x4ec4b6+(_0x2cefef?_0x2bf112:'')),_0x10a004[_0x124165(0x1d1)]('\x20\x20'+'─'[_0x124165(0x1df)](_0x311f8a)+'\x20\x20'+'─'[_0x124165(0x1df)](_0x37ad3b)+(_0x2cefef?'\x20\x20'+'─'[_0x124165(0x1df)](_0x37ad3b):''));for(const _0x83873c of _0x2234a7){const _0x98b557=padRight(_0x83873c[_0x124165(0x1d9)],_0x311f8a),_0x378b64=_0x83873c[_0x124165(0x1d2)]?'✓':'✗',_0x288290=padRight(_0x378b64,_0x37ad3b);let _0x5adc44='\x20\x20'+_0x98b557+'\x20\x20'+_0x288290;if(_0x2cefef){const _0x170b85=_0x83873c[_0x124165(0x1c5)]?'✓':'✗';_0x5adc44+='\x20\x20'+padRight(_0x170b85,_0x37ad3b);}_0x10a004[_0x124165(0x1d1)](_0x5adc44);}return _0x10a004['join']('\x0a');}export function renderSyncSummary(_0x162cf8,_0x22ea70){const _0x4cd03a=a56_0x28bb;if(_0x162cf8[_0x4cd03a(0x1d3)]===0x0)return _0x22ea70?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x4cd03a(0x1de);const _0x319552=['\x20\x20'+_0x162cf8[_0x4cd03a(0x1d3)]+_0x4cd03a(0x1d4)];for(const _0x30af28 of _0x162cf8){_0x319552['push']('\x20\x20\x20\x20•\x20'+_0x30af28[_0x4cd03a(0x1d9)]+'\x20('+_0x30af28[_0x4cd03a(0x1cb)]+')');}return _0x319552[_0x4cd03a(0x1da)]('\x0a');}export function renderUpdateSummary(_0x5ad41f,_0x59f645){const _0x2a5764=a56_0x28bb;if(_0x5ad41f[_0x2a5764(0x1d3)]===0x0)return _0x2a5764(0x1db);const _0x2051ee=['\x20\x20'+_0x5ad41f[_0x2a5764(0x1d3)]+'\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:',_0x2a5764(0x1c9)+(_0x59f645[0x0]??_0x2a5764(0x1cc)),_0x2a5764(0x1c8)+(_0x59f645[0x1]??_0x2a5764(0x1cc)),'','\x20\x20Affected\x20menus:\x20'+_0x5ad41f['join'](',\x20')];return _0x2051ee['join']('\x0a');}function a56_0xfd2e(){const _0x301d1f=['\x20\x20\x20\x20JS:\x20\x20','1016064KYfJwR','path','(unchanged)','map','3367200IfYMKn','1060655mIBfAo','422595HKsTHW','push','local','length','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','116807LXUgCf','10KMNLpB','Platform','8hHETcx','label','join','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','101003VSFwxm','7587702YRazWH','\x20\x20No\x20pages\x20to\x20sync.','repeat','max','online','60jlYZHj','test','\x20\x20\x20\x20CSS:\x20'];a56_0xfd2e=function(){return _0x301d1f;};return a56_0xfd2e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x440397,_0x4bd07b){var _0x2dc22c=a57_0x4158,_0x117d67=_0x440397();while(!![]){try{var _0x52a1f1=parseInt(_0x2dc22c(0x14b))/0x1+-parseInt(_0x2dc22c(0x146))/0x2*(parseInt(_0x2dc22c(0x149))/0x3)+-parseInt(_0x2dc22c(0x14e))/0x4+parseInt(_0x2dc22c(0x147))/0x5+parseInt(_0x2dc22c(0x148))/0x6+parseInt(_0x2dc22c(0x14d))/0x7*(parseInt(_0x2dc22c(0x14c))/0x8)+-parseInt(_0x2dc22c(0x14a))/0x9;if(_0x52a1f1===_0x4bd07b)break;else _0x117d67['push'](_0x117d67['shift']());}catch(_0x261de9){_0x117d67['push'](_0x117d67['shift']());}}}(a57_0x1fb7,0x22483));export*from'./types.js';function a57_0x4158(_0x348439,_0x24072b){_0x348439=_0x348439-0x146;var _0x1fb7f5=a57_0x1fb7();var _0x415868=_0x1fb7f5[_0x348439];return _0x415868;}export*from'./logic.js';export*from'./compare-table.js';export*from'./inquirer.js';export*from'./valid-url.js';export*from'./local-pages.js';function a57_0x1fb7(){var _0x2dcccf=['39752wedhYJ','4xWfHsW','1206945vlZmJV','1360056Tgtlgl','102747LEaklq','6025320ZuqCpf','148128WKVyWA','16AKWNWq','952497qWtSjR'];a57_0x1fb7=function(){return _0x2dcccf;};return a57_0x1fb7();}export*from'./service.js';export*from'./sync-core.js';export*from'./update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a58_0x49da(_0x494622,_0x104f02){_0x494622=_0x494622-0x1ca;const _0x292c18=a58_0x292c();let _0x49da89=_0x292c18[_0x494622];return _0x49da89;}(function(_0x369b17,_0x5a72fd){const _0x459d5d=a58_0x49da,_0x4881d9=_0x369b17();while(!![]){try{const _0x313fff=parseInt(_0x459d5d(0x1dd))/0x1*(-parseInt(_0x459d5d(0x1e1))/0x2)+-parseInt(_0x459d5d(0x1db))/0x3*(parseInt(_0x459d5d(0x1e0))/0x4)+-parseInt(_0x459d5d(0x1df))/0x5*(-parseInt(_0x459d5d(0x1d7))/0x6)+parseInt(_0x459d5d(0x1d8))/0x7+parseInt(_0x459d5d(0x1d9))/0x8+-parseInt(_0x459d5d(0x1d6))/0x9+parseInt(_0x459d5d(0x1e2))/0xa;if(_0x313fff===_0x5a72fd)break;else _0x4881d9['push'](_0x4881d9['shift']());}catch(_0x2c9ec1){_0x4881d9['push'](_0x4881d9['shift']());}}}(a58_0x292c,0x24165));import a58_0x4b7c67 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a58_0x49c80b from'ora';import{isUrlReachable}from'./valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x5d1250){return _0x5d1250['catch'](_0x2e4f76=>{const _0x462b4d=a58_0x49da;if(_0x2e4f76?.['name']==='ExitPromptError')throw CliErrors[_0x462b4d(0x1ee)]('Cancelled.');throw _0x2e4f76;});}function a58_0x292c(){const _0x31fef4=['fail','red','cyan','CSS\x20URL\x20checked','947475WoAdid','12612nZusvz','1285956PXwtTw','725856aVdNlj','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','9lxUcXf','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','178hUwmPv','includes','335EQpngW','391084ZNGbGi','1654iGnvLK','2783330PdTDdv','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','path','gray','has','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','green','isTTY','Cancelled.','No\x20local\x20pages\x20found.','\x20\x20Checking\x20CSS\x20URL\x20reachability...','cancelled','\x20\x20CSS\x20URL:','[new]','trim','CSS\x20URL\x20check\x20failed','JS\x20URL\x20checked','label','\x20\x20Checking\x20JS\x20URL\x20reachability...','stdin','No\x20menus\x20selected.','length','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','error','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','test','JS\x20URL\x20check\x20failed','filter','succeed'];a58_0x292c=function(){return _0x31fef4;};return a58_0x292c();}export function startSpinner(_0x1a6b1b){const _0x3774b0=a58_0x49da;return a58_0x49c80b({'text':_0x1a6b1b,'color':_0x3774b0(0x1d4)})['start']();}export function stopSpinner(_0x57c662,_0x427711,_0x348c95){const _0x5320ec=a58_0x49da;_0x348c95?_0x57c662[_0x5320ec(0x1d1)](_0x427711):_0x57c662[_0x5320ec(0x1d2)](_0x427711);}export async function askConfirm(_0xf73e5e){return onCancel(confirm({'message':_0xf73e5e,'theme':{'prefix':''}}));}export async function askJsUrl(_0x718e5a){const _0xf4b070=a58_0x49da;while(!![]){const _0x56c389=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x718e5a,'theme':{'prefix':''}}));if(_0x56c389[_0xf4b070(0x1f1)]()==='')throw CliErrors[_0xf4b070(0x1ee)](_0xf4b070(0x1eb));if(!/^https:\/\/.+\.js(\?.*)?$/[_0xf4b070(0x1ce)](_0x56c389[_0xf4b070(0x1f1)]())){console[_0xf4b070(0x1cc)](a58_0x4b7c67[_0xf4b070(0x1d3)](_0xf4b070(0x1e4)));continue;}const _0x2ed35e=startSpinner(_0xf4b070(0x1f5));try{const _0x1ced1c=await isUrlReachable(_0x56c389[_0xf4b070(0x1f1)]());stopSpinner(_0x2ed35e,_0xf4b070(0x1f3),_0x1ced1c);if(!_0x1ced1c){console[_0xf4b070(0x1cc)](a58_0x4b7c67[_0xf4b070(0x1d3)](_0xf4b070(0x1e3)));continue;}return _0x56c389[_0xf4b070(0x1f1)]();}catch(_0x9f9329){stopSpinner(_0x2ed35e,_0xf4b070(0x1cf),![]);throw _0x9f9329;}}}export async function askCssUrl(_0x420033){const _0x51d801=a58_0x49da;while(!![]){const _0x382d1f=await onCancel(input({'message':_0x51d801(0x1ef),'default':_0x420033,'theme':{'prefix':''}}));if(_0x382d1f['trim']()==='')throw CliErrors[_0x51d801(0x1ee)](_0x51d801(0x1eb));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x51d801(0x1ce)](_0x382d1f[_0x51d801(0x1f1)]())){console[_0x51d801(0x1cc)](a58_0x4b7c67[_0x51d801(0x1d3)](_0x51d801(0x1dc)));continue;}const _0x7870d7=startSpinner(_0x51d801(0x1ed));try{const _0x1b6b00=await isUrlReachable(_0x382d1f[_0x51d801(0x1f1)]());stopSpinner(_0x7870d7,_0x51d801(0x1d5),_0x1b6b00);if(!_0x1b6b00){console[_0x51d801(0x1cc)](a58_0x4b7c67[_0x51d801(0x1d3)](_0x51d801(0x1e8)));continue;}return _0x382d1f[_0x51d801(0x1f1)]();}catch(_0x36759f){stopSpinner(_0x7870d7,_0x51d801(0x1f2),![]);throw _0x36759f;}}}export async function selectPages(_0x4e89c5,_0xa09306,_0x529ac){const _0x4f430a=a58_0x49da,_0x44a43d=_0x4e89c5['map'](_0x177c66=>({'name':_0x177c66[_0x4f430a(0x1f4)]+'\x20\x20'+(_0xa09306[_0x4f430a(0x1e7)](_0x177c66['path'])?a58_0x4b7c67[_0x4f430a(0x1e6)]('[already\x20on\x20platform]'):a58_0x4b7c67[_0x4f430a(0x1e9)](_0x4f430a(0x1f0))),'value':_0x177c66[_0x4f430a(0x1f4)],'checked':_0x529ac?_0x529ac[_0x4f430a(0x1de)](_0x177c66['label']):!_0xa09306['has'](_0x177c66[_0x4f430a(0x1e5)])}));if(_0x44a43d[_0x4f430a(0x1ca)]===0x0)throw new Error(_0x4f430a(0x1ec));const _0x49f91c=await onCancel(checkbox({'message':_0x4f430a(0x1da),'choices':_0x44a43d,'loop':![],'theme':{'prefix':''}}));if(_0x49f91c[_0x4f430a(0x1ca)]===0x0)throw new Error(_0x4f430a(0x1f7));return _0x4e89c5[_0x4f430a(0x1d0)](_0xc18f4d=>_0x49f91c['includes'](_0xc18f4d[_0x4f430a(0x1f4)]));}export function isInteractive(){const _0x228bf2=a58_0x49da;return process[_0x228bf2(0x1f6)][_0x228bf2(0x1ea)]===!![];}export function requireInteractive(){const _0x558353=a58_0x49da;if(!isInteractive())throw new Error(_0x558353(0x1cb)+_0x558353(0x1cd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x223561,_0x529b31){const _0x32da03=a59_0x2b22,_0x2838ef=_0x223561();while(!![]){try{const _0xb8f12f=-parseInt(_0x32da03(0xef))/0x1*(-parseInt(_0x32da03(0xf0))/0x2)+parseInt(_0x32da03(0xe6))/0x3*(-parseInt(_0x32da03(0xf7))/0x4)+-parseInt(_0x32da03(0xe8))/0x5+parseInt(_0x32da03(0xe0))/0x6*(-parseInt(_0x32da03(0xf4))/0x7)+parseInt(_0x32da03(0xe2))/0x8*(parseInt(_0x32da03(0xea))/0x9)+-parseInt(_0x32da03(0xe9))/0xa+parseInt(_0x32da03(0xe7))/0xb;if(_0xb8f12f===_0x529b31)break;else _0x2838ef['push'](_0x2838ef['shift']());}catch(_0x4d4486){_0x2838ef['push'](_0x2838ef['shift']());}}}(a59_0x5594,0xf1070));function a59_0x5594(){const _0x1fea9e=['166120gDGVNd','utf-8','forEach','slice','1897944gyRmGU','56374582rLVmla','9475890dbKiFg','1363030YWrbSu','333sOjzHt','filter','replaceAll','join','trim','507iXsJIy','922kvBNzM','endsWith','index.tsx','push','1211dRcPWS','split','isDirectory','8olkRjr','match','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','63918eBtQVJ','concat'];a59_0x5594=function(){return _0x1fea9e;};return a59_0x5594();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),'src/pages');export function extractTitleFromComment(_0x7a3239){const _0x3f89c5=a59_0x2b22;try{const _0x26c524=readFileSync(_0x7a3239,_0x3f89c5(0xe3)),_0x452423=_0x26c524[_0x3f89c5(0xf8)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x452423&&_0x452423[0x1]){const _0x59f57b=_0x452423[0x1],_0x2332f5=_0x59f57b[_0x3f89c5(0xf8)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2332f5&&_0x2332f5[0x1])return _0x2332f5[0x1][_0x3f89c5(0xee)]();}let _0x19324e=null;const _0x34b588=_0x26c524[_0x3f89c5(0xf8)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x34b588&&_0x34b588[0x1]&&(_0x19324e=_0x34b588[0x1]);if(!_0x19324e){const _0xd7e97f=_0x26c524[_0x3f89c5(0xf8)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0xd7e97f&&_0xd7e97f[0x1]&&(_0x19324e=_0xd7e97f[0x1]);}if(_0x19324e){const _0x34d35d=new RegExp('\x5cb'+_0x19324e+_0x3f89c5(0xdf)),_0x50d73e=_0x26c524['match'](_0x34d35d);if(_0x50d73e&&_0x50d73e[0x1])return _0x50d73e[0x1];return _0x19324e;}return null;}catch(_0x59936e){return null;}}function a59_0x2b22(_0x23f7d7,_0x38ddc4){_0x23f7d7=_0x23f7d7-0xdf;const _0x5594b3=a59_0x5594();let _0x2b2269=_0x5594b3[_0x23f7d7];return _0x2b2269;}export function getLocalPages(_0x1bfb95=pagesDir,_0x1eaf37=pagesDir){const _0x10744c=a59_0x2b22;let _0x109c2f=[];const _0x2ebdf5=readdirSync(_0x1bfb95);return _0x2ebdf5[_0x10744c(0xe4)](_0x5b9b7e=>{const _0x5df07b=_0x10744c,_0x60e4da=join(_0x1bfb95,_0x5b9b7e),_0xd83882=statSync(_0x60e4da);if(_0xd83882&&_0xd83882[_0x5df07b(0xf6)]())_0x109c2f=_0x109c2f[_0x5df07b(0xe1)](getLocalPages(_0x60e4da,_0x1eaf37));else{if(_0x5b9b7e[_0x5df07b(0xf1)]('.tsx')){let _0x3af8b0=relative(_0x1eaf37,_0x60e4da);_0x3af8b0[_0x5df07b(0xf1)](_0x5df07b(0xf2))?_0x3af8b0=_0x3af8b0['replace'](/index\.tsx$/,''):_0x3af8b0=_0x3af8b0['replace'](/\.tsx$/,'');_0x3af8b0[_0x5df07b(0xf1)](sep)&&(_0x3af8b0=_0x3af8b0[_0x5df07b(0xe5)](0x0,-0x1));const _0x34bfdc=_0x3af8b0[_0x5df07b(0xf5)](sep)[_0x5df07b(0xed)]('/'),_0x131c86=extractTitleFromComment(_0x60e4da),_0x1d0485=_0x131c86||_0x34bfdc;_0x109c2f[_0x5df07b(0xf3)]({'path':_0x34bfdc[_0x5df07b(0xec)]('$',':'),'label':_0x1d0485});}}}),_0x109c2f[_0x10744c(0xeb)](_0xe04519=>_0xe04519['path']!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x248643,_0xa67876){const _0x442601=a60_0x1471,_0x4cd09f=_0x248643();while(!![]){try{const _0x2ec137=parseInt(_0x442601(0x14e))/0x1+parseInt(_0x442601(0x14a))/0x2*(parseInt(_0x442601(0x147))/0x3)+parseInt(_0x442601(0x148))/0x4*(-parseInt(_0x442601(0x140))/0x5)+parseInt(_0x442601(0x159))/0x6+-parseInt(_0x442601(0x150))/0x7+-parseInt(_0x442601(0x153))/0x8*(-parseInt(_0x442601(0x142))/0x9)+parseInt(_0x442601(0x157))/0xa;if(_0x2ec137===_0xa67876)break;else _0x4cd09f['push'](_0x4cd09f['shift']());}catch(_0x13c813){_0x4cd09f['push'](_0x4cd09f['shift']());}}}(a60_0x33b4,0x681b7));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';export function validateJsUrl(_0x3db21b){const _0x3f1047=a60_0x1471,_0x570309=[];return!isValidJsHttpsUrl(_0x3db21b)&&_0x570309[_0x3f1047(0x146)](_0x3f1047(0x14d)),{'ok':_0x570309[_0x3f1047(0x156)]===0x0,'errors':_0x570309};}export function validateCssUrl(_0x17a760){const _0x3b2f05=a60_0x1471,_0x5d38de=[];return!isValidCssHttpsUrl(_0x17a760)&&_0x5d38de[_0x3b2f05(0x146)](_0x3b2f05(0x154)),{'ok':_0x5d38de[_0x3b2f05(0x156)]===0x0,'errors':_0x5d38de};}export async function validateJsUrlReachable(_0x31e067){const _0x14cbde=a60_0x1471,_0x1b3ddb=validateJsUrl(_0x31e067);if(!_0x1b3ddb['ok'])return _0x1b3ddb;const _0x6a7958=await isUrlReachable(_0x31e067);if(!_0x6a7958)_0x1b3ddb[_0x14cbde(0x14c)][_0x14cbde(0x146)](_0x14cbde(0x152));return{'ok':_0x1b3ddb[_0x14cbde(0x14c)][_0x14cbde(0x156)]===0x0,'errors':_0x1b3ddb[_0x14cbde(0x14c)]};}export async function validateCssUrlReachable(_0x280ecc){const _0xa122dd=a60_0x1471,_0x15265e=validateCssUrl(_0x280ecc);if(!_0x15265e['ok'])return _0x15265e;const _0x146b74=await isUrlReachable(_0x280ecc);if(!_0x146b74)_0x15265e[_0xa122dd(0x14c)][_0xa122dd(0x146)](_0xa122dd(0x151));return{'ok':_0x15265e[_0xa122dd(0x14c)][_0xa122dd(0x156)]===0x0,'errors':_0x15265e['errors']};}export function buildCompareRows(_0x559b8a,_0x1780a4){const _0x1a1172=a60_0x1471;return _0x559b8a[_0x1a1172(0x145)](_0x5a0752=>({'label':_0x5a0752[_0x1a1172(0x143)],'path':_0x5a0752['path'],'local':!![],'online':_0x1780a4[_0x1a1172(0x158)](_0x5a0752['path'])}));}function a60_0x1471(_0x11efe4,_0x456edb){_0x11efe4=_0x11efe4-0x140;const _0x33b4df=a60_0x33b4();let _0x147189=_0x33b4df[_0x11efe4];return _0x147189;}export function filterNewPages(_0x3ac500,_0x7f04f9,_0x5dec69){const _0x41a1fb=a60_0x1471;if(_0x5dec69&&_0x5dec69['length']>0x0){const _0x3c06e5=new Set(_0x5dec69[_0x41a1fb(0x145)](_0x29c68a=>_0x29c68a[_0x41a1fb(0x14f)]())),_0x52c34c=_0x3ac500[_0x41a1fb(0x144)](_0xa6b583=>_0x3c06e5[_0x41a1fb(0x158)](_0xa6b583[_0x41a1fb(0x143)]));if(_0x52c34c[_0x41a1fb(0x156)]===0x0)throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x3c06e5][_0x41a1fb(0x149)](',\x20'));return _0x52c34c;}return _0x3ac500['filter'](_0x24023c=>!_0x7f04f9[_0x41a1fb(0x158)](_0x24023c[_0x41a1fb(0x15a)]));}export function filterPagesByLabels(_0x5d3ef0,_0x5a24e5){const _0x5e7aed=a60_0x1471,_0x20602a=[],_0x44dceb=[];for(const _0x3b5f10 of _0x5a24e5){const _0x234eb0=_0x3b5f10['trim'](),_0x2d0f1f=_0x5d3ef0[_0x5e7aed(0x141)](_0x340718=>_0x340718[_0x5e7aed(0x143)]===_0x234eb0);if(_0x2d0f1f)_0x20602a['push'](_0x2d0f1f);else _0x44dceb[_0x5e7aed(0x146)](_0x3b5f10);}return{'matched':_0x20602a,'unmatched':_0x44dceb};}function a60_0x33b4(){const _0x369127=['trim','4076702AuevRf','CSS\x20URL\x20is\x20unreachable','JS\x20URL\x20is\x20unreachable','8ndqDtR','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','resources','length','961070WJShTY','has','737220KEduuN','path','1687480aIQLxE','find','1115676LiBgVj','label','filter','map','push','907980inGSZz','8WCZvkg','join','4WhwPwS','status','errors','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','735540JOrUpW'];a60_0x33b4=function(){return _0x369127;};return a60_0x33b4();}export async function doCreateMenus(_0x14315c,_0x3e1875,_0x2498b3,_0x40f5c2){const _0x13788e=a60_0x1471;return await createMenus(_0x14315c,_0x3e1875,_0x2498b3,_0x40f5c2),{'created':_0x2498b3[_0x13788e(0x156)],'failed':0x0,'labels':_0x2498b3[_0x13788e(0x145)](_0xf783ab=>_0xf783ab[_0x13788e(0x143)])};}export function filterMenusWithResources(_0x2fc2f0){const _0x34a0e9=a60_0x1471;return _0x2fc2f0[_0x34a0e9(0x144)](_0x4b0fbd=>_0x4b0fbd['resources']['length']>0x0);}export async function doUpdateCdnUrls(_0x479ffd,_0x93d62c,_0x59a7f1,_0x5c8612){const _0x1774f1=a60_0x1471,_0x22a379=_0x59a7f1[_0x1774f1(0x144)](_0x4cb7d6=>_0x4cb7d6[_0x1774f1(0x155)][_0x1774f1(0x156)]>0x0),_0x2c8f16=await Promise['allSettled'](_0x22a379[_0x1774f1(0x145)](_0x320d8b=>updateMenuCdnUrl(_0x479ffd,_0x93d62c,{'id':_0x320d8b['id'],'label':_0x320d8b[_0x1774f1(0x143)],'path':_0x320d8b[_0x1774f1(0x15a)],'resources':_0x5c8612}))),_0x3ecbd8=_0x2c8f16[_0x1774f1(0x144)](_0x3c453f=>_0x3c453f[_0x1774f1(0x14b)]==='rejected')[_0x1774f1(0x156)];return{'updated':_0x22a379['length']-_0x3ecbd8,'failed':_0x3ecbd8};}export async function fetchMenuData(_0x3010d8,_0x1cbbc0){const _0x5cbc5e=getLocalPages(),_0x4a1884=await getOnlineMenuList(_0x3010d8,_0x1cbbc0),_0x3b8af4=new Set(_0x4a1884['map'](_0x1d0190=>_0x1d0190['path']));return{'localPages':_0x5cbc5e,'onlineMenuList':_0x4a1884,'onlinePaths':_0x3b8af4};}export async function fetchOnlineMenuList(_0x1efb15,_0x16f97d){return getOnlineMenuList(_0x1efb15,_0x16f97d);}
|