@lovrabet/rabetbase-cli 2.0.2-beta.1 → 2.0.2-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/lib/ai-setup/config.js +1 -1
- 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/api/pull-silent.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/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 -0
- package/lib/commands/api/index.js +1 -0
- package/lib/commands/api/list.js +1 -0
- package/lib/commands/api/pull.js +1 -0
- package/lib/commands/app.js +1 -1
- 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/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/flags.js +1 -0
- package/lib/commands/config.js +1 -1
- 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/init.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.js +1 -1
- package/lib/commands/mcp.js +1 -1
- package/lib/commands/menu/index.js +1 -0
- package/lib/commands/menu/shared/compare-table.js +1 -0
- package/lib/commands/menu/shared/index.js +1 -0
- package/lib/commands/menu/shared/inquirer.js +1 -0
- package/lib/commands/menu/shared/local-pages.js +1 -0
- package/lib/commands/menu/shared/logic.js +1 -0
- package/lib/commands/menu/shared/service.js +1 -0
- package/lib/commands/menu/shared/sync-core.js +1 -0
- package/lib/commands/menu/shared/update-core.js +1 -0
- package/lib/commands/menu/shared/valid-url.js +1 -0
- package/lib/commands/menu/sync.js +1 -0
- package/lib/commands/menu/update.js +1 -0
- package/lib/commands/preview.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/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/config/config-help.js +1 -1
- package/lib/config/main.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/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.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/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/McpInstallUI.js +1 -1
- package/lib/mcp/claude.js +1 -1
- package/lib/mcp/cursor.js +1 -1
- package/lib/mcp/main.js +1 -1
- package/lib/mcp/mcp-install-non-interactive.js +1 -1
- package/lib/mcp/mcp-installer.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/ui/IDESelector.js +1 -1
- package/lib/ui/useIDESelection.js +1 -1
- 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/logger.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/package.json +6 -4
- package/templates/generate-api/api.ts.tpl +4 -4
- package/templates/generate-api/client.ts.tpl +2 -2
- package/lib/api/api-doc-ui.js +0 -1
- package/lib/api/api-pull-ui.js +0 -1
- package/lib/api/main.js +0 -1
- package/lib/app-menu/app-menu-sync-ui.js +0 -1
- package/lib/app-menu/create-menu.js +0 -1
- package/lib/app-menu/get-local-pages.js +0 -1
- package/lib/app-menu/get-online-menu-list.js +0 -1
- package/lib/app-menu/types.js +0 -1
- package/lib/app-menu/use-get-online-menu-list.js +0 -1
- package/lib/app-menu/utils.js +0 -1
- package/lib/app-menu/valid-url.js +0 -1
- package/lib/app-menu-update-cdn/current-content.js +0 -1
- package/lib/app-menu-update-cdn/input-cdn-asset.js +0 -1
- package/lib/app-menu-update-cdn/main.js +0 -1
- package/lib/app-menu-update-cdn/update-menu-cdn-url.js +0 -1
- package/lib/commands/api.js +0 -1
- package/lib/commands/menu.js +0 -1
- /package/lib/{app-menu-update-cdn → commands/menu/shared}/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0x412465=a128_0x9289;(function(_0x47b5f4,_0x42c574){const _0x458ed4=a128_0x9289,_0x14c6f6=_0x47b5f4();while(!![]){try{const _0x37b41a=-parseInt(_0x458ed4(0xbb))/0x1*(-parseInt(_0x458ed4(0xbd))/0x2)+-parseInt(_0x458ed4(0xce))/0x3+parseInt(_0x458ed4(0xb3))/0x4+-parseInt(_0x458ed4(0x9e))/0x5+parseInt(_0x458ed4(0xdd))/0x6+parseInt(_0x458ed4(0xc4))/0x7*(parseInt(_0x458ed4(0xae))/0x8)+-parseInt(_0x458ed4(0xad))/0x9*(-parseInt(_0x458ed4(0xa9))/0xa);if(_0x37b41a===_0x42c574)break;else _0x14c6f6['push'](_0x14c6f6['shift']());}catch(_0x2ae12d){_0x14c6f6['push'](_0x14c6f6['shift']());}}}(a128_0x2ccc,0xe7f60));import a128_0x9407df from'node:fs';import a128_0x56a701 from'node:path';function a128_0x2ccc(){const _0x503b46=['slice','utf8','processTemplate','push','replaceContent','default','toISOString','.css','readdir','alias','模板内容替换完成','.scss','9472248lNuHun','toLocaleString','开始处理模板内容替换','message','toComponentName','5766165tvvXdB','isDirectory','name:\x20\x22','join','.ts','split','numeric','map','copyFile','mkdir','模板内容替换失败','10xCCFek','success','charAt','replace','1543356kusUoZ','8hEEAkd','pop','promises','processDirectory','.md','1449500oPfyQS','isFile','toUpperCase','info','toLocaleDateString','template','processFile','../../package.json','1672RMfcWk','\x0a\x20\x20\x20\x20{\x20','118nQStcu','version','writeFile','readFile','toLowerCase','now','.js','8031863bAzafL','.json','name','toLocaleTimeString','endsWith','error','toDisplayTitle','.tsx','datasetCode','2-digit','3765837hFbZti','replaceApiContent','.tpl'];a128_0x2ccc=function(){return _0x503b46;};return a128_0x2ccc();}import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a128_0x412465(0xba))[a128_0x412465(0xbe)];function a128_0x9289(_0x59b8e2,_0x4a9b43){_0x59b8e2=_0x59b8e2-0x9c;const _0x2cccc3=a128_0x2ccc();let _0x92897a=_0x2cccc3[_0x59b8e2];return _0x92897a;}export class TemplateReplacer{static[a128_0x412465(0x9d)](_0x4f3507){const _0x51ccaa=a128_0x412465,_0x3790b0=_0x4f3507[_0x51ccaa(0xa3)]('/')[_0x51ccaa(0xaf)]()||_0x4f3507;return _0x3790b0[_0x51ccaa(0xa3)]('-')['map'](_0x1e1e26=>_0x1e1e26['charAt'](0x0)['toUpperCase']()+_0x1e1e26[_0x51ccaa(0xd1)](0x1)['toLowerCase']())[_0x51ccaa(0xa1)]('');}static['toDisplayTitle'](_0x2a3b85){const _0x36f07a=a128_0x412465,_0x4b9053=_0x2a3b85[_0x36f07a(0xa3)]('/')['pop']()||_0x2a3b85;return _0x4b9053[_0x36f07a(0xa3)]('-')[_0x36f07a(0xa5)](_0x3d6a62=>_0x3d6a62[_0x36f07a(0xab)](0x0)[_0x36f07a(0xb5)]()+_0x3d6a62['slice'](0x1)[_0x36f07a(0xc1)]())[_0x36f07a(0xa1)]('\x20');}static[a128_0x412465(0xd5)](_0x13ce2f,_0x3c36a1,_0x412fdb){const _0x4f20b6=a128_0x412465,_0x45c02a=this[_0x4f20b6(0x9d)](_0x3c36a1),_0x46aa80=this[_0x4f20b6(0xca)](_0x3c36a1),_0x407c90=new Date(),_0x21ffaf=_0x407c90[_0x4f20b6(0xde)](undefined,{'year':_0x4f20b6(0xa4),'month':_0x4f20b6(0xcd),'day':_0x4f20b6(0xcd),'hour':_0x4f20b6(0xcd),'minute':_0x4f20b6(0xcd),'second':_0x4f20b6(0xcd),'hour12':![]})[_0x4f20b6(0xac)](/\//g,'-'),_0x30bc0d=_0x407c90[_0x4f20b6(0xb7)](undefined,{'year':_0x4f20b6(0xa4),'month':'2-digit','day':'2-digit'})[_0x4f20b6(0xac)](/\//g,'-'),_0xf32398=_0x407c90[_0x4f20b6(0xc7)](undefined,{'hour12':![]});let _0x30d4c8=_0x13ce2f['replace'](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x45c02a)['replace'](/\{DisplayTitle\}/g,_0x46aa80)[_0x4f20b6(0xac)](/\{PageName\}/g,_0x3c36a1)[_0x4f20b6(0xac)](/\{TemplateName\}/g,_0x412fdb)['replace'](/\{CreatedAt\}/g,_0x21ffaf)['replace'](/\{CreatedDate\}/g,_0x30bc0d)[_0x4f20b6(0xac)](/\{CreatedTime\}/g,_0xf32398);return _0x30d4c8;}static[a128_0x412465(0xcf)](_0x50ea77,_0x4040eb,_0x283a9a,_0x5d01eb,_0x5e6178,_0xa326e3,_0x46a5ac,_0x1970d0){const _0x87e24e=a128_0x412465,_0x8e64da=new Date(),_0x58468f=_0x8e64da[_0x87e24e(0xd7)](),_0x330f1c=_0x283a9a[_0x87e24e(0xa5)](_0x4049e2=>{const _0x9cca8b=_0x87e24e,_0x3b9ca8=['datasetCode:\x20\x22'+_0x4049e2[_0x9cca8b(0xcc)]+'\x22','tableName:\x20\x22'+_0x4049e2['tableName']+'\x22',_0x9cca8b(0xa0)+_0x4049e2[_0x9cca8b(0xc6)]+'\x22'];return _0x4049e2[_0x9cca8b(0xda)]&&_0x3b9ca8[_0x9cca8b(0xd4)]('alias:\x20\x22'+_0x4049e2[_0x9cca8b(0xda)]+'\x22'),_0x9cca8b(0xbc)+_0x3b9ca8[_0x9cca8b(0xa1)](',\x20')+'\x20},';})[_0x87e24e(0xa1)](''),_0x55dee0=_0x5d01eb||_0x283a9a[0x0]?.[_0x87e24e(0xda)]||'YourModel';let _0x5d09cc=_0x50ea77[_0x87e24e(0xac)](/\{AppCode\}/g,_0x4040eb)[_0x87e24e(0xac)](/\{ModelConfigs\}/g,_0x330f1c)[_0x87e24e(0xac)](/\{ExampleModelName\}/g,_0x55dee0)[_0x87e24e(0xac)](/\{ApiFileName\}/g,_0x5e6178||'api')[_0x87e24e(0xac)](/\{ConfigName\}/g,_0xa326e3||_0x87e24e(0xd6))[_0x87e24e(0xac)](/\{ClientConfigParam\}/g,_0x46a5ac||'')[_0x87e24e(0xac)](/\{VarPrefix\}/g,_0x1970d0||'LOVRABET')[_0x87e24e(0xac)](/\{CreatedAt\}/g,_0x58468f);return _0x5d09cc;}static async[a128_0x412465(0xd3)](_0x1069a2,_0x2983fe,_0x3655f6,_0x121307,_0x587b89=!![]){const _0xe50b19=a128_0x412465,_0x229a11=Date[_0xe50b19(0xc2)]();try{_0x587b89&&logger[_0xe50b19(0xb6)](_0xe50b19(0xb8),_0xe50b19(0xdf),{'templatePath':_0x1069a2,'targetPath':_0x2983fe,'pageName':_0x3655f6,'templateName':_0x121307});await a128_0x9407df[_0xe50b19(0xb0)][_0xe50b19(0xa7)](_0x2983fe,{'recursive':!![]}),await this[_0xe50b19(0xb1)](_0x1069a2,_0x2983fe,_0x3655f6,_0x121307);if(_0x587b89){const _0x40a278=Date['now']()-_0x229a11;logger[_0xe50b19(0xaa)](_0xe50b19(0xb8),_0xe50b19(0xdb),_0x40a278,{'pageName':_0x3655f6,'templateName':_0x121307});}}catch(_0x4cdc25){if(_0x587b89){const _0x441a1b=Date['now']()-_0x229a11;logger[_0xe50b19(0xc9)]('template',_0xe50b19(0xa8),{'templatePath':_0x1069a2,'targetPath':_0x2983fe,'pageName':_0x3655f6,'templateName':_0x121307,'error':_0x4cdc25 instanceof Error?_0x4cdc25[_0xe50b19(0x9c)]:String(_0x4cdc25),'duration':_0x441a1b});}throw _0x4cdc25;}}static async['processDirectory'](_0x27d034,_0x41c994,_0x354183,_0x428ca4){const _0x3ea4e3=a128_0x412465,_0xea6e41=await a128_0x9407df[_0x3ea4e3(0xb0)][_0x3ea4e3(0xd9)](_0x27d034,{'withFileTypes':!![]});for(const _0x1dddfc of _0xea6e41){const _0x464d38=a128_0x56a701[_0x3ea4e3(0xa1)](_0x27d034,_0x1dddfc[_0x3ea4e3(0xc6)]);let _0x3f3201=a128_0x56a701[_0x3ea4e3(0xa1)](_0x41c994,_0x1dddfc[_0x3ea4e3(0xc6)]);_0x1dddfc['name'][_0x3ea4e3(0xc8)]('.tpl')&&(_0x3f3201=a128_0x56a701[_0x3ea4e3(0xa1)](_0x41c994,_0x1dddfc[_0x3ea4e3(0xc6)][_0x3ea4e3(0xac)](/\.tpl$/,'')));if(_0x1dddfc[_0x3ea4e3(0x9f)]())await a128_0x9407df['promises'][_0x3ea4e3(0xa7)](_0x3f3201,{'recursive':!![]}),await this[_0x3ea4e3(0xb1)](_0x464d38,_0x3f3201,_0x354183,_0x428ca4);else _0x1dddfc[_0x3ea4e3(0xb4)]()&&await this[_0x3ea4e3(0xb9)](_0x464d38,_0x3f3201,_0x354183,_0x428ca4);}}static async['processFile'](_0x56b2a8,_0x5a9bd9,_0x294090,_0x22b754){const _0x2760a1=a128_0x412465,_0x3ff083=a128_0x56a701['extname'](_0x56b2a8)[_0x2760a1(0xc1)]();_0x56b2a8[_0x2760a1(0xc8)]('.tpl')&&(_0x5a9bd9=_0x5a9bd9['replace'](/\.tpl$/,''));const _0x4b6e41=[_0x2760a1(0xcb),_0x2760a1(0xa2),'.jsx',_0x2760a1(0xc3),_0x2760a1(0xc5),_0x2760a1(0xb2),_0x2760a1(0xd8),_0x2760a1(0xdc),_0x2760a1(0xd0)];if(_0x4b6e41['includes'](_0x3ff083)||_0x56b2a8[_0x2760a1(0xc8)](_0x2760a1(0xd0))){const _0x204be2=await a128_0x9407df[_0x2760a1(0xb0)][_0x2760a1(0xc0)](_0x56b2a8,'utf8'),_0x2d4eeb=this[_0x2760a1(0xd5)](_0x204be2,_0x294090,_0x22b754);await a128_0x9407df[_0x2760a1(0xb0)][_0x2760a1(0xbf)](_0x5a9bd9,_0x2d4eeb,_0x2760a1(0xd2));}else await a128_0x9407df[_0x2760a1(0xb0)][_0x2760a1(0xa6)](_0x56b2a8,_0x5a9bd9);}}
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.0.2-beta.
|
|
3
|
+
"version": "2.0.2-beta.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"rabetbase": "lib/cli.js"
|
|
11
|
-
"lovrabet": "lib/cli.js"
|
|
10
|
+
"rabetbase": "lib/cli.js"
|
|
12
11
|
},
|
|
13
12
|
"type": "module",
|
|
14
13
|
"module": "lib/cli.js",
|
|
@@ -51,13 +50,16 @@
|
|
|
51
50
|
"sidecar"
|
|
52
51
|
],
|
|
53
52
|
"dependencies": {
|
|
53
|
+
"@inquirer/prompts": "^8.3.2",
|
|
54
54
|
"@types/winston": "^2.4.4",
|
|
55
|
+
"chalk": "^5.6.2",
|
|
55
56
|
"execa": "^9.6.0",
|
|
56
57
|
"ink": "^6.2.3",
|
|
57
58
|
"ink-spinner": "^5.0.0",
|
|
58
59
|
"javascript-obfuscator": "^4.1.1",
|
|
59
60
|
"listr": "^0.14.3",
|
|
60
61
|
"meow": "^13.2.0",
|
|
62
|
+
"ora": "^9.3.0",
|
|
61
63
|
"prettier": "^3.6.2",
|
|
62
64
|
"react": "^19.2.0",
|
|
63
65
|
"semver": "^7.7.3",
|
|
@@ -74,4 +76,4 @@
|
|
|
74
76
|
"typescript": "latest",
|
|
75
77
|
"vitest": "^3.2.4"
|
|
76
78
|
}
|
|
77
|
-
}
|
|
79
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { registerModels, CONFIG_NAMES, type ModelsConfig } from "@lovrabet/sdk";
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const {VarPrefix}_APP_CODE = "{AppCode}";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 项目的模型配置
|
|
@@ -18,8 +18,8 @@ export const RABETBASE_APP_CODE = "{AppCode}";
|
|
|
18
18
|
* - 标准访问:client.models.dataset_[datasetCode]
|
|
19
19
|
* - 别名访问:client.models.[alias](如果配置了 alias)
|
|
20
20
|
*/
|
|
21
|
-
export const
|
|
22
|
-
appCode:
|
|
21
|
+
export const {VarPrefix}_MODELS_CONFIG: ModelsConfig = {
|
|
22
|
+
appCode: {VarPrefix}_APP_CODE,
|
|
23
23
|
models: [{ModelConfigs}
|
|
24
24
|
]
|
|
25
25
|
} as const;
|
|
@@ -28,7 +28,7 @@ export const RABETBASE_MODELS_CONFIG: ModelsConfig = {
|
|
|
28
28
|
* 自动注册配置
|
|
29
29
|
* 配置名称: {ConfigName}
|
|
30
30
|
*/
|
|
31
|
-
registerModels(
|
|
31
|
+
registerModels({VarPrefix}_MODELS_CONFIG, {ConfigName});
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* 如果需要支持多项目或多环境,可以注册额外的配置:
|
|
@@ -48,8 +48,8 @@ export const lovrabetClient = createClient({ClientConfigParam});
|
|
|
48
48
|
* export const prodClient = createClient('prod');
|
|
49
49
|
*
|
|
50
50
|
* 3. 直接传入配置对象:
|
|
51
|
-
* import {
|
|
52
|
-
* export const lovrabetClient = createClient(
|
|
51
|
+
* import { {VarPrefix}_MODELS_CONFIG } from './api';
|
|
52
|
+
* export const lovrabetClient = createClient({VarPrefix}_MODELS_CONFIG);
|
|
53
53
|
*
|
|
54
54
|
* 4. 通过 ClientConfig 指定配置名和其他选项:
|
|
55
55
|
* export const lovrabetClient = createClient({
|
package/lib/api/api-doc-ui.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a1_0x51e4(){const _0x574496=['\x20datasets','length','success','70395nxKdIE','env','./docs','Generating\x20','log','\x20login\x20again\x20and\x20retry','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','55280GYWKKa','\x20matching\x20datasets\x20from\x20','\x1b[0m','Using\x20configured\x20AppCode:\x20','No\x20datasets\x20found','Doc\x20generation\x20failed:\x20','25629810ImzcBh','The\x20following\x20datasets\x20failed\x20to\x20generate:','All\x20specified\x20dataset\x20codes\x20do\x20not\x20exist:\x20','gray','filter','文档生成完成','Using\x20specified\x20AppCode:\x20','20480soFkfZ','join','Generating\x20docs\x20for\x20','red','datasetCode','15798618ZKoOJT','\x20total\x1b[0m','*\x20Output\x20directory:\x20','[ERROR]\x20','cyan','Fetching\x20dataset\x20list...','column','2208iBGrCj','api-doc','\x20datasets...','includes','expired','dim','8wCqfjt','cwd','6trRBtb','41336UWnmgi','error','No\x20AppCode\x20provided\x20and\x20no\x20default\x20configured','\x1b[90m*\x20Filtered\x20','√\x20Doc\x20generation\x20complete!\x20','.md\x20(','white','\x20-\x20','*\x20Generated\x20doc\x20files:','map','yellow','\x20failed','12730277evOWkm'];a1_0x51e4=function(){return _0x574496;};return a1_0x51e4();}(function(_0x1256e3,_0x3ffe6b){const _0x393115=a1_0x3f55,_0x30a5bb=_0x1256e3();while(!![]){try{const _0x5113f2=-parseInt(_0x393115(0x204))/0x1+parseInt(_0x393115(0x1f4))/0x2*(parseInt(_0x393115(0x1f3))/0x3)+-parseInt(_0x393115(0x20b))/0x4+parseInt(_0x393115(0x218))/0x5*(-parseInt(_0x393115(0x1eb))/0x6)+-parseInt(_0x393115(0x200))/0x7*(parseInt(_0x393115(0x1f1))/0x8)+parseInt(_0x393115(0x21d))/0x9+parseInt(_0x393115(0x211))/0xa;if(_0x5113f2===_0x3ffe6b)break;else _0x30a5bb['push'](_0x30a5bb['shift']());}catch(_0x2f69d9){_0x30a5bb['push'](_0x30a5bb['shift']());}}}(a1_0x51e4,0xe7d3d));import{jsx as a1_0xb1c2f3,jsxs as a1_0x1ecd9c,Fragment as a1_0x59b60e}from'react/jsx-runtime';import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';import{readConfig,getConfigAppCode}from'../utils/config.js';import{initEnv}from'../constant/env.js';import{fetchModelList}from'./fetch-model-list.js';function a1_0x3f55(_0x364e21,_0x37dc1d){_0x364e21=_0x364e21-0x1ea;const _0x51e424=a1_0x51e4();let _0x3f5509=_0x51e424[_0x364e21];return _0x3f5509;}import{generateDatasetDocs}from'./api-doc.js';import{logger}from'../utils/logger.js';export const ApiDocUI=({appCode:_0x1a4c6a,env:_0x4be9b6,output:_0x53346a,extraParams:_0x2a06b0,datasetCodes:_0x43da12})=>{const _0x5699d9=a1_0x3f55,{exit:_0xf04ab0}=useApp(),[_0x352504,_0x54c7d7]=useState(![]),[_0xd6e531,_0x4c89ea]=useState(''),[_0x32a23c,_0x4bacc2]=useState(![]),[_0x9ab147,_0x188571]=useState(null),[_0x44db14,_0x4fef4a]=useState(null),[_0x56877a,_0x4dc2d6]=useState(0x0),_0x245ff9=readConfig(),_0x6b54b9=getConfigAppCode(),_0x522b8c=_0x1a4c6a||_0x6b54b9,_0x4810f5=typeof _0x245ff9?.[_0x5699d9(0x205)]==='string'?_0x245ff9['env']:undefined,_0x2dc889=_0x4be9b6||_0x4810f5||'production';initEnv(_0x2dc889);const _0xb55ee7=_0x53346a||_0x5699d9(0x206),_0x3af676=_0x1a4c6a?_0x5699d9(0x217)+_0x522b8c:_0x5699d9(0x20e)+_0x522b8c;useEffect(()=>{_0x54c7d7(!![]),_0x50c00a();},[]),useEffect(()=>{(_0x32a23c||_0x9ab147)&&_0xf04ab0();},[_0x32a23c,_0x9ab147,_0xf04ab0]);async function _0x50c00a(){const _0x4db291=_0x5699d9;if(!_0x522b8c){_0x188571(_0x4db291(0x1f6));return;}try{logger['setLogPath'](process[_0x4db291(0x1f2)]()),_0x4c89ea(_0x4db291(0x222));const {configArray:_0x3d306a}=await fetchModelList(_0x522b8c);_0x4dc2d6(_0x3d306a['length']);if(_0x3d306a[_0x4db291(0x202)]===0x0){_0x188571(_0x4db291(0x20f));return;}let _0x3fd722=_0x3d306a;if(_0x43da12&&_0x43da12[_0x4db291(0x202)]>0x0){_0x3fd722=_0x3d306a[_0x4db291(0x215)](_0x163bca=>_0x43da12[_0x4db291(0x1ee)](_0x163bca[_0x4db291(0x21c)]));const _0x20550d=_0x3fd722[_0x4db291(0x1fd)](_0x425d48=>_0x425d48[_0x4db291(0x21c)]),_0x5a26a4=_0x43da12['filter'](_0x535989=>!_0x20550d[_0x4db291(0x1ee)](_0x535989));_0x5a26a4[_0x4db291(0x202)]>0x0&&console[_0x4db291(0x208)](_0x4db291(0x20a)+_0x5a26a4[_0x4db291(0x219)](',\x20')+_0x4db291(0x20d));if(_0x3fd722['length']===0x0){_0x188571(_0x4db291(0x213)+_0x43da12[_0x4db291(0x219)](',\x20'));return;}console[_0x4db291(0x208)](_0x4db291(0x1f7)+_0x3fd722[_0x4db291(0x202)]+_0x4db291(0x20c)+_0x3d306a[_0x4db291(0x202)]+_0x4db291(0x21e));}_0x4c89ea(_0x4db291(0x21a)+_0x3fd722[_0x4db291(0x202)]+_0x4db291(0x1ed));const _0x4dd5ce=await generateDatasetDocs(_0x3fd722,_0x522b8c,_0xb55ee7,(_0x31b661,_0x211f4b,_0x4c1dae)=>{const _0x3767bb=_0x4db291;_0x4c89ea(_0x3767bb(0x207)+_0x4c1dae+_0x3767bb(0x1f9)+_0x31b661+'/'+_0x211f4b+')');},_0x2a06b0);_0x4fef4a(_0x4dd5ce),_0x4bacc2(!![]);const _0xfddb09=_0x4dd5ce[_0x4db291(0x215)](_0x2d67d3=>_0x2d67d3[_0x4db291(0x203)])[_0x4db291(0x202)],_0x30f374=_0x4dd5ce[_0x4db291(0x215)](_0xc4d146=>!_0xc4d146[_0x4db291(0x203)])['length'];logger['success'](_0x4db291(0x1ec),_0x4db291(0x216),undefined,{'totalCount':_0x4dd5ce['length'],'successCount':_0xfddb09,'failCount':_0x30f374,'outputDir':_0xb55ee7});}catch(_0x592c74){const _0x3d8458=_0x592c74 instanceof Error?_0x592c74['message']:String(_0x592c74);logger[_0x4db291(0x1f5)](_0x4db291(0x1ec),'文档生成失败:\x20'+_0x3d8458,{'appCode':_0x522b8c,'outputDir':_0xb55ee7}),_0x188571(_0x4db291(0x210)+_0x3d8458);}finally{_0x54c7d7(![]);}}const _0x2cc8b9=_0x44db14?.[_0x5699d9(0x215)](_0x372abf=>_0x372abf[_0x5699d9(0x203)])[_0x5699d9(0x202)]||0x0,_0x10396c=_0x44db14?.[_0x5699d9(0x215)](_0x1916fa=>!_0x1916fa[_0x5699d9(0x203)])[_0x5699d9(0x202)]||0x0;return a1_0x1ecd9c(Box,{'flexDirection':'column','children':[(_0x352504||_0x32a23c)&&a1_0x1ecd9c(Box,{'children':[a1_0xb1c2f3(Text,{'color':_0x5699d9(0x214),'children':'*\x20'}),a1_0xb1c2f3(Text,{'color':_0x1a4c6a?_0x5699d9(0x1fa):_0x5699d9(0x1f0),'children':_0x3af676})]}),_0x352504&&a1_0xb1c2f3(Box,{'children':a1_0x1ecd9c(Text,{'children':['*\x20',_0xd6e531]})}),_0x32a23c&&_0x44db14&&a1_0x1ecd9c(Box,{'flexDirection':_0x5699d9(0x1ea),'children':[a1_0xb1c2f3(Box,{'children':a1_0x1ecd9c(Text,{'color':'green','children':[_0x5699d9(0x1f8)+_0x2cc8b9+'\x20succeeded',_0x10396c>0x0?',\x20'+_0x10396c+_0x5699d9(0x1ff):'']})}),a1_0xb1c2f3(Box,{'marginTop':0x1,'children':a1_0xb1c2f3(Text,{'color':_0x5699d9(0x214),'children':'*\x20Processed\x20'+_0x56877a+_0x5699d9(0x201)})}),a1_0x1ecd9c(Box,{'marginTop':0x1,'children':[a1_0xb1c2f3(Text,{'color':_0x5699d9(0x214),'children':_0x5699d9(0x21f)}),a1_0xb1c2f3(Text,{'color':_0x5699d9(0x221),'children':_0xb55ee7})]}),_0x2cc8b9>0x0&&a1_0x1ecd9c(a1_0x59b60e,{'children':[a1_0xb1c2f3(Box,{'marginTop':0x1,'children':a1_0xb1c2f3(Text,{'color':_0x5699d9(0x214),'children':_0x5699d9(0x1fc)})}),_0x44db14[_0x5699d9(0x215)](_0x5e5583=>_0x5e5583[_0x5699d9(0x203)])['map']((_0x4150f9,_0x1b7d7c)=>a1_0x1ecd9c(Box,{'marginLeft':0x2,'children':[a1_0x1ecd9c(Text,{'color':_0x5699d9(0x221),'children':['•\x20',_0x4150f9['filePath']]}),a1_0x1ecd9c(Text,{'color':_0x5699d9(0x1f0),'children':[_0x5699d9(0x1fb),_0x4150f9['datasetName']]})]},_0x1b7d7c))]}),_0x10396c>0x0&&a1_0x1ecd9c(a1_0x59b60e,{'children':[a1_0xb1c2f3(Box,{'marginTop':0x1,'children':a1_0xb1c2f3(Text,{'color':'yellow','children':_0x5699d9(0x212)})}),_0x44db14[_0x5699d9(0x215)](_0x2f317c=>!_0x2f317c['success'])[_0x5699d9(0x1fd)]((_0x4e008e,_0x385e42)=>a1_0x1ecd9c(Box,{'marginLeft':0x2,'flexDirection':_0x5699d9(0x1ea),'children':[a1_0x1ecd9c(Text,{'color':_0x5699d9(0x21b),'children':['•\x20',_0x4e008e['datasetName'],'\x20(',_0x4e008e[_0x5699d9(0x21c)],')']}),_0x4e008e[_0x5699d9(0x1f5)]&&a1_0xb1c2f3(Box,{'marginLeft':0x2,'children':a1_0xb1c2f3(Text,{'color':_0x5699d9(0x1f0),'children':_0x4e008e['error']})})]},_0x385e42))]})]}),_0x9ab147&&a1_0x1ecd9c(Box,{'flexDirection':_0x5699d9(0x1ea),'children':[a1_0xb1c2f3(Box,{'children':a1_0x1ecd9c(Text,{'color':_0x5699d9(0x21b),'children':[_0x5699d9(0x220),_0x9ab147]})}),(_0x9ab147['includes']('登录')||_0x9ab147[_0x5699d9(0x1ee)]('Authentication')||_0x9ab147['includes'](_0x5699d9(0x1ef)))&&a1_0x1ecd9c(Box,{'marginTop':0x1,'children':[a1_0xb1c2f3(Text,{'color':_0x5699d9(0x1fe),'children':'*\x20'}),a1_0xb1c2f3(Text,{'color':_0x5699d9(0x221),'children':'rabetbase\x20auth'}),a1_0xb1c2f3(Text,{'color':_0x5699d9(0x1fe),'children':_0x5699d9(0x209)})]})]})]});};
|
package/lib/api/api-pull-ui.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0xc1c49a,_0x156455){const _0x365cf3=a3_0x5332,_0x29dd48=_0xc1c49a();while(!![]){try{const _0x4f19da=-parseInt(_0x365cf3(0x208))/0x1+parseInt(_0x365cf3(0x1ec))/0x2*(parseInt(_0x365cf3(0x1f9))/0x3)+parseInt(_0x365cf3(0x20b))/0x4*(parseInt(_0x365cf3(0x1fa))/0x5)+parseInt(_0x365cf3(0x1f6))/0x6*(-parseInt(_0x365cf3(0x1fb))/0x7)+parseInt(_0x365cf3(0x210))/0x8+-parseInt(_0x365cf3(0x1dc))/0x9*(parseInt(_0x365cf3(0x207))/0xa)+-parseInt(_0x365cf3(0x1db))/0xb*(-parseInt(_0x365cf3(0x206))/0xc);if(_0x4f19da===_0x156455)break;else _0x29dd48['push'](_0x29dd48['shift']());}catch(_0x6f3066){_0x29dd48['push'](_0x29dd48['shift']());}}}(a3_0x182f,0x6298d));import{jsx as a3_0x4709df,jsxs as a3_0x1c47da}from'react/jsx-runtime';import{useEffect,useState}from'react';import{Box,Text,useApp}from'ink';function a3_0x182f(){const _0x6e4887=['2849085YFRWLQ','\x20datasets,\x20generated\x20','message','import\x20','length','No\x20AppCode\x20provided\x20and\x20no\x20default\x20configured','production','Using\x20specified\x20AppCode:\x20','white','endsWith','*\x20Generated\x20files:','api','replace','\x20duplicates','cwd','client','1094luowHY','-client','modelCount','duplicateCount','\x20login\x20again\x20and\x20retry','*\x20Pulling\x20API\x20config\x20from\x20server...\x20(env:\x20','\x20from\x20\x27@/','拉取\x20API\x20配置失败:\x20','\x20models','apiDir','14550mpHogF','\x20-\x20Client\x20instance\x20file','gray','2037jqGxlA','287785PlUHvE','567YnUkfx','\x20models)','dim','setLogPath','{\x20lovrabetClient\x20}','!\x20Original\x20','-api','cyan','column','slice','Using\x20configured\x20AppCode:\x20','10920rYgVHS','10EpqKfX','789064UDCotf','-\x20Model\x20config\x20(','./src/api/','4mIDViK','yellow','green','Failed\x20to\x20pull\x20API\x20config:\x20','includes','4398776CPrBjF','[ERROR]\x20','env','string','.ts','split','join','8789atdypD'];a3_0x182f=function(){return _0x6e4887;};return a3_0x182f();}function a3_0x5332(_0x375e85,_0x315e72){_0x375e85=_0x375e85-0x1db;const _0x182f7c=a3_0x182f();let _0x533257=_0x182f7c[_0x375e85];return _0x533257;}import{readConfig,getConfigAppCode}from'../utils/config.js';import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export const ApiPullUI=({appCode:_0x4288f5,env:_0x6b5306,output:_0x1e7366})=>{const _0x47a1ec=a3_0x5332,{exit:_0x2f09ac}=useApp(),[_0xd3c2ae,_0x216d06]=useState(![]),[_0x420828,_0x4aee8a]=useState(![]),[_0x5d56c0,_0x45ea0a]=useState(null),[_0x3b4eac,_0x535dd1]=useState(null),_0x586b80=readConfig(),_0x477cbf=getConfigAppCode(),_0x284425=_0x4288f5||_0x477cbf,_0x9c4bb5=typeof _0x586b80?.[_0x47a1ec(0x212)]==='string'?_0x586b80[_0x47a1ec(0x212)]:undefined,_0x3045a3=_0x6b5306||_0x9c4bb5||_0x47a1ec(0x1e2);initEnv(_0x3045a3);const _0x107be9=typeof _0x586b80?.[_0x47a1ec(0x1f5)]===_0x47a1ec(0x213)?_0x586b80[_0x47a1ec(0x1f5)]:undefined,_0x1d5aa5=_0x1e7366||_0x107be9||_0x47a1ec(0x20a),_0x65d3c3=_0x4288f5&&_0x4288f5[_0x47a1ec(0x20f)]('-')?_0x4288f5[_0x47a1ec(0x215)]('-')[_0x47a1ec(0x204)](0x1)[_0x47a1ec(0x216)]('-'):'',_0x328cfe=_0x4288f5?_0x47a1ec(0x1e3)+_0x284425:_0x47a1ec(0x205)+_0x284425,_0x4f8252=_0x65d3c3?_0x65d3c3+_0x47a1ec(0x201):_0x47a1ec(0x1e7),_0x8bb262=_0x65d3c3?_0x65d3c3+_0x47a1ec(0x1ed):_0x47a1ec(0x1eb);useEffect(()=>{_0x216d06(!![]),_0x2acf65();},[]),useEffect(()=>{(_0x420828||_0x5d56c0)&&_0x2f09ac();},[_0x420828,_0x5d56c0,_0x2f09ac]);async function _0x2acf65(){const _0x1be706=_0x47a1ec;if(!_0x284425){_0x45ea0a(_0x1be706(0x1e1));return;}try{logger[_0x1be706(0x1fe)](process[_0x1be706(0x1ea)]());const {configArray:_0x450a26}=await fetchModelList(_0x284425),_0x51363f=_0x450a26[_0x1be706(0x1e0)],_0x1ae4c7=!_0x4288f5,_0x4f1ee7=await generateApiFile(_0x450a26,_0x65d3c3,_0x284425,_0x1ae4c7,_0x3045a3,_0x1d5aa5),_0x1261cb=_0x1d5aa5[_0x1be706(0x1e5)]('/')?_0x1d5aa5:_0x1d5aa5+'/';_0x535dd1({'api':''+_0x1261cb+_0x4f8252+_0x1be706(0x214),'client':''+_0x1261cb+_0x8bb262+_0x1be706(0x214),'modelCount':_0x4f1ee7[_0x1be706(0x1ee)],'datasetCount':_0x51363f,'originalCount':_0x51363f,'duplicateCount':0x0}),_0x4aee8a(!![]);}catch(_0x22755c){const _0x1d620d=_0x22755c instanceof Error?_0x22755c[_0x1be706(0x1de)]:String(_0x22755c);logger['error']('api-pull',_0x1be706(0x1f3)+_0x1d620d,{'appCode':_0x284425,'error':_0x1d620d}),_0x45ea0a(_0x1be706(0x20e)+_0x1d620d);}finally{_0x216d06(![]);}}return a3_0x1c47da(Box,{'flexDirection':_0x47a1ec(0x203),'children':[(_0xd3c2ae||_0x420828)&&a3_0x1c47da(Box,{'children':[a3_0x4709df(Text,{'color':'gray','children':'*\x20'}),a3_0x4709df(Text,{'color':_0x4288f5?_0x47a1ec(0x1e4):_0x47a1ec(0x1fd),'children':_0x328cfe})]}),_0xd3c2ae&&a3_0x4709df(Box,{'children':a3_0x4709df(Text,{'children':_0x47a1ec(0x1f1)+_0x3045a3+')'})}),_0x420828&&_0x3b4eac&&a3_0x1c47da(Box,{'flexDirection':'column','children':[a3_0x4709df(Box,{'children':a3_0x4709df(Text,{'color':_0x47a1ec(0x20d),'children':'√\x20Pulled\x20'+_0x3b4eac['datasetCount']+_0x47a1ec(0x1dd)+_0x3b4eac[_0x47a1ec(0x1ee)]+_0x47a1ec(0x1f4)})}),_0x3b4eac[_0x47a1ec(0x1ef)]>0x0&&a3_0x4709df(Box,{'marginTop':0x1,'children':a3_0x4709df(Text,{'color':'yellow','children':_0x47a1ec(0x200)+_0x3b4eac['originalCount']+'\x20datasets,\x20filtered\x20'+_0x3b4eac[_0x47a1ec(0x1ef)]+_0x47a1ec(0x1e9)})}),a3_0x4709df(Box,{'marginTop':0x1,'children':a3_0x4709df(Text,{'color':_0x47a1ec(0x1f8),'children':_0x47a1ec(0x1e6)})}),a3_0x1c47da(Box,{'marginLeft':0x2,'children':[a3_0x1c47da(Text,{'color':_0x47a1ec(0x202),'children':['•\x20',_0x3b4eac[_0x47a1ec(0x1e7)]]}),a3_0x1c47da(Text,{'color':_0x47a1ec(0x1fd),'children':['\x20',_0x47a1ec(0x209)+_0x3b4eac[_0x47a1ec(0x1ee)]+_0x47a1ec(0x1fc)]})]}),a3_0x1c47da(Box,{'marginLeft':0x2,'children':[a3_0x1c47da(Text,{'color':_0x47a1ec(0x202),'children':['•\x20',_0x3b4eac[_0x47a1ec(0x1eb)]]}),a3_0x4709df(Text,{'color':_0x47a1ec(0x1fd),'children':_0x47a1ec(0x1f7)})]}),a3_0x4709df(Box,{'marginTop':0x1,'children':a3_0x4709df(Text,{'color':'gray','children':'*\x20Import\x20usage:'})}),a3_0x4709df(Box,{'marginLeft':0x2,'children':a3_0x1c47da(Text,{'color':_0x47a1ec(0x20c),'children':[_0x47a1ec(0x1df),_0x47a1ec(0x1ff),_0x47a1ec(0x1f2),_0x3b4eac[_0x47a1ec(0x1eb)]['replace'](/^\.\//,'')[_0x47a1ec(0x1e8)](_0x47a1ec(0x214),''),'\x27']})})]}),_0x5d56c0&&a3_0x1c47da(Box,{'flexDirection':'column','children':[a3_0x4709df(Box,{'children':a3_0x1c47da(Text,{'color':'red','children':[_0x47a1ec(0x211),_0x5d56c0]})}),(_0x5d56c0[_0x47a1ec(0x20f)]('登录')||_0x5d56c0['includes']('Authentication')||_0x5d56c0['includes']('expired'))&&a3_0x1c47da(Box,{'marginTop':0x1,'children':[a3_0x4709df(Text,{'color':_0x47a1ec(0x20c),'children':'*\x20'}),a3_0x4709df(Text,{'color':_0x47a1ec(0x202),'children':'rabetbase\x20auth'}),a3_0x4709df(Text,{'color':_0x47a1ec(0x20c),'children':_0x47a1ec(0x1f0)})]})]})]});};
|
package/lib/api/main.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x19f589,_0x1fe2fc){const _0x5cfe26=a6_0x4e3b,_0x593e57=_0x19f589();while(!![]){try{const _0xa6ef58=-parseInt(_0x5cfe26(0x155))/0x1+parseInt(_0x5cfe26(0x14e))/0x2+parseInt(_0x5cfe26(0x137))/0x3+-parseInt(_0x5cfe26(0x130))/0x4+-parseInt(_0x5cfe26(0x154))/0x5*(parseInt(_0x5cfe26(0x12e))/0x6)+-parseInt(_0x5cfe26(0x14c))/0x7+-parseInt(_0x5cfe26(0x15a))/0x8*(-parseInt(_0x5cfe26(0x153))/0x9);if(_0xa6ef58===_0x1fe2fc)break;else _0x593e57['push'](_0x593e57['shift']());}catch(_0x5df1dd){_0x593e57['push'](_0x593e57['shift']());}}}(a6_0x2f72,0xd8c26));function a6_0x4e3b(_0x68d79e,_0x2ae3fb){_0x68d79e=_0x68d79e-0x12a;const _0x2f7230=a6_0x2f72();let _0x4e3b3d=_0x2f7230[_0x68d79e];return _0x4e3b3d;}import{jsx as a6_0x3fb278}from'react/jsx-runtime';import{render}from'ink';import{ApiPullUI}from'./api-pull-ui.js';function a6_0x2f72(){const _0x1cba3d=['54PlbRtA','5vifnnk','29840ffQrMh','\x20\x20\x202.\x20Use\x20flag:\x20rabetbase\x20api\x20pull\x20--appcode\x20<app-code>','\x20\x20rabetbase\x20api\x20pull\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20API\x20for\x20specified\x20environment','\x20\x20rabetbase\x20api\x20doc\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Specify\x20doc\x20output\x20directory','\x1b[90m\x20\x20(Note:\x20--appcode\x20flag\x20matches\x20config,\x20using\x20default\x20config)\x1b[0m','16312XAFKYi','\x1b[90m*\x20Using\x20configured\x20AppCode:\x20','appcode','\x20\x20rabetbase\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20docs\x20for\x20all\x20datasets','env','--params\x20must\x20be\x20a\x20valid\x20JSON\x20object','filter','\x20\x20rabetbase\x20api\x20doc\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20//\x20Use\x20specified\x20appcode','3966810RwbFHS','isArray','4901932gorOhC','length','AppCode\x20not\x20configured','\x20\x20rabetbase\x20api\x20pull\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20//\x20Specify\x20output\x20directory','params','exit','pull','5020806ZpovwT','Error:\x20Positional\x20arguments\x20are\x20no\x20longer\x20supported','Please\x20use\x20the\x20--appcode\x20flag,\x20for\x20example:','\x20\x20\x202.\x20Use\x20flag:\x20rabetbase\x20api\x20doc\x20--appcode\x20<app-code>','map','input','\x20\x20rabetbase\x20api\x20doc\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20docs\x20for\x20specified\x20environment','help','split','object','--datasetcode\x20cannot\x20be\x20empty','\x20\x20rabetbase\x20api\x20doc\x20--appcode\x20','\x20\x20\x201.\x20Set\x20default:\x20rabetbase\x20config\x20set\x20appcode\x20<app-code>','trim','\x20\x20rabetbase\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20and\x20generate\x20API\x20config\x20files','flags','\x20\x20rabetbase\x20api\x20pull\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20//\x20Use\x20specified\x20appcode','parse','\x1b[0m','output','log','2416981ZSAlKU','string','2927502CSVgik','error','--params\x20is\x20not\x20valid\x20JSON\x20format','doc','Please\x20use\x20one\x20of\x20the\x20following:'];a6_0x2f72=function(){return _0x1cba3d;};return a6_0x2f72();}import{ApiDocUI}from'./api-doc-ui.js';import{getConfigAppCode}from'../utils/config.js';export async function apiCli(_0x4f9c64){const _0x30188f=a6_0x4e3b,_0x5a758b=_0x4f9c64[_0x30188f(0x13c)][0x1];if(_0x4f9c64[_0x30188f(0x146)][_0x30188f(0x13e)]){console['log']('\x0arabetbase\x20api\x20-\x20API\x20Operations\x0a\x0aUsage:\x0a\x20\x20$\x20rabetbase\x20api\x20pull\x20[options]\x0a\x20\x20$\x20rabetbase\x20api\x20doc\x20[options]\x0a\x0aOptions:\x0a\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20Specify\x20app\x20code\x0a\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20Specify\x20output\x20directory\x20(pull:\x20./src/api/,\x20doc:\x20./docs)\x0a\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Specify\x20environment\x20(e.g.\x20daily,\x20production)\x0a\x20\x20--datasetcode\x20<codes>\x20Specify\x20dataset\x20codes\x20for\x20doc\x20generation\x20(comma-separated,\x20doc\x20command\x20only)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aExamples:\x0a\x20\x20$\x20rabetbase\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20and\x20generate\x20API\x20config\x20files\x0a\x20\x20$\x20rabetbase\x20api\x20pull\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20//\x20Use\x20specified\x20appcode\x0a\x20\x20$\x20rabetbase\x20api\x20pull\x20--output\x20./api\x20\x20\x20\x20\x20\x20\x20\x20//\x20Specify\x20output\x20directory\x0a\x20\x20$\x20rabetbase\x20api\x20pull\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20API\x20for\x20specified\x20environment\x0a\x0a\x20\x20$\x20rabetbase\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20docs\x20for\x20all\x20datasets\x0a\x20\x20$\x20rabetbase\x20api\x20doc\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Use\x20specified\x20appcode\x0a\x20\x20$\x20rabetbase\x20api\x20doc\x20--output\x20./docs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Specify\x20doc\x20output\x20directory\x0a\x20\x20$\x20rabetbase\x20api\x20doc\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20docs\x20for\x20specified\x20environment\x0a\x20\x20$\x20rabetbase\x20api\x20doc\x20--datasetcode\x20ds_001\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20doc\x20for\x20specific\x20dataset\x20only\x0a\x20\x20$\x20rabetbase\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x20\x20\x20\x20\x20\x20//\x20Generate\x20docs\x20for\x20multiple\x20datasets\x0a');return;}if(_0x5a758b===_0x30188f(0x136)){_0x4f9c64[_0x30188f(0x13c)][0x2]&&(console['error'](_0x30188f(0x138)),console[_0x30188f(0x14b)](_0x30188f(0x139)),console['log']('\x20\x20rabetbase\x20api\x20pull\x20--appcode\x20'+_0x4f9c64[_0x30188f(0x13c)][0x2]),process[_0x30188f(0x135)](0x1));const _0x2b2742=getConfigAppCode();let _0x1819d1=_0x4f9c64[_0x30188f(0x146)][_0x30188f(0x15c)];const _0x438e7c=typeof _0x4f9c64[_0x30188f(0x146)][_0x30188f(0x12a)]===_0x30188f(0x14d)?_0x4f9c64['flags'][_0x30188f(0x12a)]:undefined,_0x532f9e=_0x4f9c64['flags']['output'];!_0x1819d1&&!_0x2b2742&&(console[_0x30188f(0x14f)](_0x30188f(0x132)),console['log']('Please\x20use\x20one\x20of\x20the\x20following:'),console['log']('\x20\x20\x201.\x20Set\x20default:\x20rabetbase\x20config\x20set\x20appcode\x20<app-code>'),console['log'](_0x30188f(0x156)),process[_0x30188f(0x135)](0x1)),_0x1819d1&&_0x2b2742&&_0x1819d1===_0x2b2742&&(console[_0x30188f(0x14b)](_0x30188f(0x15b)+_0x1819d1+_0x30188f(0x149)),console['log'](_0x30188f(0x159)),_0x1819d1=undefined),render(a6_0x3fb278(ApiPullUI,{'appCode':_0x1819d1,'env':_0x438e7c,'output':_0x532f9e}));}else{if(_0x5a758b===_0x30188f(0x151)){_0x4f9c64['input'][0x2]&&(console[_0x30188f(0x14f)](_0x30188f(0x138)),console['log'](_0x30188f(0x139)),console[_0x30188f(0x14b)](_0x30188f(0x142)+_0x4f9c64[_0x30188f(0x13c)][0x2]),process[_0x30188f(0x135)](0x1));const _0x459518=getConfigAppCode();let _0x39ad9a=_0x4f9c64[_0x30188f(0x146)][_0x30188f(0x15c)];const _0x511c25=typeof _0x4f9c64[_0x30188f(0x146)][_0x30188f(0x12a)]===_0x30188f(0x14d)?_0x4f9c64[_0x30188f(0x146)]['env']:undefined,_0x170703=_0x4f9c64['flags'][_0x30188f(0x14a)],_0x4d42ed=_0x4f9c64[_0x30188f(0x146)][_0x30188f(0x134)],_0x52aad7=_0x4f9c64[_0x30188f(0x146)]['datasetcode'];!_0x39ad9a&&!_0x459518&&(console[_0x30188f(0x14f)](_0x30188f(0x132)),console[_0x30188f(0x14b)](_0x30188f(0x152)),console[_0x30188f(0x14b)](_0x30188f(0x143)),console[_0x30188f(0x14b)](_0x30188f(0x13a)),process[_0x30188f(0x135)](0x1));_0x39ad9a&&_0x459518&&_0x39ad9a===_0x459518&&(console[_0x30188f(0x14b)](_0x30188f(0x15b)+_0x39ad9a+_0x30188f(0x149)),_0x39ad9a=undefined);let _0x4e6ce8;if(_0x4d42ed)try{_0x4e6ce8=JSON[_0x30188f(0x148)](_0x4d42ed),(typeof _0x4e6ce8!==_0x30188f(0x140)||_0x4e6ce8===null||Array[_0x30188f(0x12f)](_0x4e6ce8))&&(console[_0x30188f(0x14f)](_0x30188f(0x12b)),process['exit'](0x1));}catch(_0x17a07c){console[_0x30188f(0x14f)](_0x30188f(0x150)),console[_0x30188f(0x14f)]('\x20\x20Error:\x20'+(_0x17a07c instanceof Error?_0x17a07c['message']:String(_0x17a07c))),process[_0x30188f(0x135)](0x1);}let _0x4d6604;_0x52aad7&&(_0x4d6604=_0x52aad7[_0x30188f(0x13f)](',')[_0x30188f(0x13b)](_0xfee4fc=>_0xfee4fc[_0x30188f(0x144)]())[_0x30188f(0x12c)](_0x2f2807=>_0x2f2807[_0x30188f(0x131)]>0x0),_0x4d6604[_0x30188f(0x131)]===0x0&&(console[_0x30188f(0x14f)](_0x30188f(0x141)),process[_0x30188f(0x135)](0x1)),console[_0x30188f(0x14b)]('\x1b[90m*\x20Generating\x20docs\x20only\x20for\x20specified\x20datasets:\x20'+_0x4d6604['join'](',\x20')+_0x30188f(0x149))),render(a6_0x3fb278(ApiDocUI,{'appCode':_0x39ad9a,'env':_0x511c25,'output':_0x170703,'extraParams':_0x4e6ce8,'datasetCodes':_0x4d6604}));}else console[_0x30188f(0x14f)]('Unknown\x20api\x20command:\x20'+_0x5a758b),console[_0x30188f(0x14b)]('Available\x20commands:'),console[_0x30188f(0x14b)](_0x30188f(0x145)),console['log'](_0x30188f(0x147)),console[_0x30188f(0x14b)](_0x30188f(0x133)),console[_0x30188f(0x14b)](_0x30188f(0x157)),console['log'](''),console[_0x30188f(0x14b)](_0x30188f(0x15d)),console[_0x30188f(0x14b)](_0x30188f(0x12d)),console[_0x30188f(0x14b)](_0x30188f(0x158)),console[_0x30188f(0x14b)](_0x30188f(0x13d)),process[_0x30188f(0x135)](0x1);}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x5efb3a,_0x1ee91f){const _0x386d67=a8_0x136b,_0x528c49=_0x5efb3a();while(!![]){try{const _0x267381=-parseInt(_0x386d67(0x12d))/0x1*(parseInt(_0x386d67(0x12b))/0x2)+parseInt(_0x386d67(0x142))/0x3+-parseInt(_0x386d67(0x14c))/0x4+parseInt(_0x386d67(0x165))/0x5*(-parseInt(_0x386d67(0x159))/0x6)+-parseInt(_0x386d67(0x169))/0x7*(-parseInt(_0x386d67(0x14a))/0x8)+parseInt(_0x386d67(0x13f))/0x9+parseInt(_0x386d67(0x14f))/0xa;if(_0x267381===_0x1ee91f)break;else _0x528c49['push'](_0x528c49['shift']());}catch(_0x82e8f7){_0x528c49['push'](_0x528c49['shift']());}}}(a8_0x244e,0x7184d));import{jsx as a8_0x29aa4c,jsxs as a8_0x195ad6,Fragment as a8_0x352d22}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a8_0x244e(){const _0x473061=['Failed\x20to\x20create\x20menu','Hint:\x20use\x20','fill','upArrow','JS\x20URL','local','has','\x20command\x20to\x20re-login','\x20Enter\x20project\x20CSS\x20asset\x20URL\x20(https://...)','Please\x20select\x20at\x20least\x20one\x20menu','trim','selecting','column','yellow','input-js','3024801eUdfwf','filter','\x20items','1106718mwPuHV','gray','\x20←\x20','includes','map','CSS\x20URL','label','Menu\x20Name','104jVoMbW','√\x20Menu\x20creation\x20completed','1847796MraWxU','input-css','Selected\x20menus','8527510qLKlAu','online','backspace','test','delete','catch','size','repeat','Please\x20enter\x20a\x20valid\x20JS\x20https\x20URL','[\x20]','540lZtmpT','message','dots','slice','white','then','[✓]','creating','blue','green','Update','length','22535isdRhM','cyan','path','Create','231049OOrVLN','Lovrabet\x20Platform','add','max','value','join','return','red','261714seSLxJ','*\x20Select\x20menus\x20to\x20sync:','5npxnDa','done','Local'];a8_0x244e=function(){return _0x473061;};return a8_0x244e();}import a8_0xb82e28 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';function a8_0x136b(_0xe1861e,_0x41ca27){_0xe1861e=_0xe1861e-0x126;const _0x244ebc=a8_0x244e();let _0x136b5d=_0x244ebc[_0xe1861e];return _0x136b5d;}import{getLocalPages}from'./get-local-pages.js';import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a8_0x29aa4c(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x184960=a8_0x136b,{exit:_0xb7617a}=useApp(),{loading:_0x536907,menuList:_0xe6a22a,error:_0x41c18b}=useGetOnlineMenuList(),_0x267b60=getLocalPages(),_0x367a18=_0xe6a22a[_0x184960(0x146)](_0x5db56e=>_0x5db56e[_0x184960(0x167)]),_0x3f8c40=_0x184960(0x149),_0x573ac1=[_0x3f8c40,..._0x267b60[_0x184960(0x146)](_0xa8a16c=>_0xa8a16c['label'])],_0x2294f4=getStringWidth(getMaxWidth(_0x573ac1,0x4)),_0x5e3dce=getStringWidth(getMaxWidth([_0x3f8c40])),[_0x4d56ae,_0x58c3bc]=useState(_0x184960(0x13b)),[_0x1aa4e8,_0xc1ada4]=useState(new Set()),[_0x43f639,_0x47c91d]=useState(0x0),[_0x3e4623,_0x5ba1aa]=useState(''),[_0x239581,_0x18d564]=useState(''),[_0x290c0a,_0x1dd19f]=useState(''),[_0x385589,_0x567380]=useState(''),[_0x32fa48,_0x2ea9aa]=useState([]),_0x508391=_0x267b60[_0x184960(0x146)](_0x17e9f3=>({'label':_0x17e9f3[_0x184960(0x148)],'path':_0x17e9f3[_0x184960(0x167)],'local':!![],'online':_0x367a18['includes'](_0x17e9f3['path'])})),_0x12d742=_0x267b60['filter'](_0x5a14c1=>{return!_0x367a18['includes'](_0x5a14c1['path']);});useEffect(()=>{const _0x54227e=_0x184960;if(!_0x536907&&_0x267b60['length']>0x0&&_0x1aa4e8['size']===0x0){const _0x1572e3=new Set(_0x267b60[_0x54227e(0x146)]((_0xffd142,_0x367a23)=>({'page':_0xffd142,'index':_0x367a23}))[_0x54227e(0x140)](({page:_0x58caca})=>!_0x367a18[_0x54227e(0x145)](_0x58caca[_0x54227e(0x167)]))[_0x54227e(0x146)](({index:_0x1b886e})=>_0x1b886e));_0xc1ada4(_0x1572e3);}},[_0x536907,_0x267b60[_0x184960(0x164)],_0x367a18[_0x184960(0x164)]]),useInput(async(_0x3671b8,_0x20b858)=>{const _0x34de94=_0x184960;if(_0x4d56ae===_0x34de94(0x13b)){if(_0x20b858[_0x34de94(0x133)]){_0x47c91d(_0x2b6925=>_0x2b6925>0x0?_0x2b6925-0x1:_0x267b60['length']-0x1);return;}if(_0x20b858['downArrow']){_0x47c91d(_0x58d479=>_0x58d479<_0x267b60[_0x34de94(0x164)]-0x1?_0x58d479+0x1:0x0);return;}if(_0x3671b8==='\x20'){_0xc1ada4(_0x5cf21e=>{const _0x13176f=_0x34de94,_0x3713e6=new Set(_0x5cf21e);return _0x3713e6[_0x13176f(0x136)](_0x43f639)?_0x3713e6[_0x13176f(0x153)](_0x43f639):_0x3713e6['add'](_0x43f639),_0x3713e6;});return;}if(_0x3671b8==='a'||_0x3671b8==='A'){const _0x549985=new Set(_0x267b60['map']((_0x21f8da,_0x3b0d79)=>_0x3b0d79));_0xc1ada4(_0x549985);return;}if(_0x3671b8==='i'||_0x3671b8==='I'||_0x3671b8==='r'||_0x3671b8==='R'){_0xc1ada4(_0x4aa8be=>{const _0x11fbed=_0x34de94,_0x244b15=new Set();for(let _0x8208c7=0x0;_0x8208c7<_0x267b60[_0x11fbed(0x164)];_0x8208c7++){!_0x4aa8be['has'](_0x8208c7)&&_0x244b15[_0x11fbed(0x16b)](_0x8208c7);}return _0x244b15;});return;}if(_0x3671b8==='q'||_0x3671b8==='Q'){_0xb7617a();return;}if(_0x20b858[_0x34de94(0x129)]){if(_0x1aa4e8[_0x34de94(0x155)]===0x0){_0x567380(_0x34de94(0x139));return;}const _0x797531=_0x267b60['filter']((_0x18982c,_0x15aebf)=>_0x1aa4e8['has'](_0x15aebf)),_0x217527=_0x797531[_0x34de94(0x146)](_0x54b937=>_0x54b937['label'])[_0x34de94(0x128)](',\x20');_0x2ea9aa([{'label':_0x34de94(0x14e),'value':_0x1aa4e8[_0x34de94(0x155)]+_0x34de94(0x141)}]),_0x567380(''),_0x58c3bc(_0x34de94(0x13e));return;}return;}if(_0x4d56ae==='input-js'){if(_0x20b858[_0x34de94(0x129)]){const _0x1a8714=_0x290c0a[_0x34de94(0x13a)]();if(_0x1a8714==='')return;if(!isValidJsHttpsUrl(_0x1a8714)){_0x567380(_0x34de94(0x157));return;}if(!await isUrlReachable(_0x1a8714)){_0x567380('JS\x20URL\x20is\x20unreachable');return;}_0x5ba1aa(_0x1a8714),_0x2ea9aa(_0x3aecd0=>[..._0x3aecd0,{'label':_0x34de94(0x134),'value':_0x1a8714}]),_0x1dd19f(''),_0x567380(''),_0x58c3bc(_0x34de94(0x14d));return;}if(_0x20b858[_0x34de94(0x151)]||_0x20b858[_0x34de94(0x153)]){_0x1dd19f(_0x39c917=>_0x39c917[_0x34de94(0x15c)](0x0,-0x1)),_0x567380('');return;}_0x1dd19f(_0x53114c=>_0x53114c+_0x3671b8);return;}if(_0x4d56ae===_0x34de94(0x14d)){if(_0x20b858['return']){const _0x39dd57=_0x290c0a[_0x34de94(0x13a)]();if(_0x39dd57==='')return;if(!isValidCssHttpsUrl(_0x39dd57)){_0x567380('Please\x20enter\x20a\x20valid\x20CSS\x20https\x20URL');return;}if(!await isUrlReachable(_0x39dd57)){_0x567380('CSS\x20URL\x20is\x20unreachable');return;}_0x18d564(_0x39dd57),_0x2ea9aa(_0x5e217c=>[..._0x5e217c,{'label':_0x34de94(0x147),'value':_0x39dd57}]),_0x1dd19f(''),_0x567380(''),_0x58c3bc(_0x34de94(0x160));const _0xdf0d5=_0x267b60[_0x34de94(0x140)]((_0x4fa839,_0x4e7e7c)=>_0x1aa4e8['has'](_0x4e7e7c));createMenus(_0xdf0d5,[_0x3e4623,_0x39dd57])[_0x34de94(0x15e)](()=>{_0x58c3bc('done'),setTimeout(()=>{_0xb7617a();},0x3e8);})[_0x34de94(0x154)](_0x344c15=>{const _0x5e0998=_0x34de94;_0x567380(_0x344c15[_0x5e0998(0x15a)]||_0x5e0998(0x130)),_0x58c3bc(_0x5e0998(0x13b));});return;}if(_0x20b858['backspace']||_0x20b858['delete']){_0x1dd19f(_0x81449f=>_0x81449f[_0x34de94(0x15c)](0x0,-0x1)),_0x567380('');return;}_0x1dd19f(_0x4394cb=>_0x4394cb+_0x3671b8);return;}});if(_0x536907)return a8_0x195ad6(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a8_0x29aa4c(Text,{'children':'\x20\x20'}),a8_0x29aa4c(a8_0xb82e28,{'type':_0x184960(0x15b)}),a8_0x29aa4c(Text,{'children':'\x20Fetching\x20online\x20menu\x20list...'})]});if(_0x41c18b)return a8_0x195ad6(Box,{'flexDirection':_0x184960(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a8_0x195ad6(Text,{'color':_0x184960(0x12a),'children':['✗\x20',_0x41c18b]}),a8_0x195ad6(Box,{'marginTop':0x1,'children':[a8_0x29aa4c(Text,{'color':'gray','children':_0x184960(0x131)}),a8_0x29aa4c(Text,{'color':_0x184960(0x166),'children':'rabetbase\x20auth'}),a8_0x29aa4c(Text,{'color':'gray','children':_0x184960(0x137)})]})]});if(_0x267b60[_0x184960(0x164)]===0x0)return a8_0x29aa4c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a8_0x29aa4c(Text,{'color':_0x184960(0x13d),'children':'!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first'})});return a8_0x195ad6(Box,{'flexDirection':_0x184960(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[_0x4d56ae==='selecting'&&a8_0x195ad6(a8_0x352d22,{'children':[a8_0x195ad6(Box,{'children':[a8_0x195ad6(Text,{'bold':!![],'children':['\x20\x20',_0x3f8c40,getRemainingSpaces(_0x2294f4,_0x3f8c40)]}),a8_0x195ad6(Text,{'bold':!![],'children':[_0x184960(0x12f),getRemainingSpaces(_0x5e3dce,_0x3f8c40)]}),a8_0x195ad6(Text,{'bold':!![],'children':[_0x184960(0x16a),getRemainingSpaces(_0x5e3dce,_0x3f8c40)]})]}),_0x508391[_0x184960(0x146)](_0x3ff01d=>a8_0x195ad6(Box,{'children':[a8_0x195ad6(Text,{'children':['\x20\x20',_0x3ff01d[_0x184960(0x148)],getRemainingSpaces(_0x2294f4,_0x3ff01d[_0x184960(0x148)])]}),a8_0x195ad6(Text,{'color':_0x184960(0x162),'children':[_0x3ff01d[_0x184960(0x135)]?'✓':'✗',getRemainingSpaces(_0x5e3dce,'✓')]}),a8_0x195ad6(Text,{'color':_0x3ff01d[_0x184960(0x150)]?_0x184960(0x162):_0x184960(0x12a),'children':[_0x3ff01d[_0x184960(0x150)]?'✓':'✗',getRemainingSpaces(_0x5e3dce,'✓')]})]},_0x3ff01d[_0x184960(0x167)]))]}),_0x4d56ae==='selecting'&&_0x32fa48[_0x184960(0x164)]===0x0&&a8_0x29aa4c(Box,{'marginTop':0x1,'children':a8_0x29aa4c(Text,{'color':_0x184960(0x166),'children':'*\x20Sync\x20menus\x20to\x20Lovrabet\x20platform'})}),_0x32fa48[_0x184960(0x146)]((_0x4615d5,_0x27dbd4)=>a8_0x195ad6(Box,{'children':[a8_0x195ad6(Text,{'color':_0x184960(0x162),'children':['√\x20',_0x4615d5[_0x184960(0x148)],':\x20']}),a8_0x29aa4c(Text,{'color':_0x184960(0x166),'children':_0x4615d5[_0x184960(0x127)]})]},_0x27dbd4)),_0x385589&&_0x4d56ae===_0x184960(0x13b)&&a8_0x29aa4c(Box,{'marginTop':0x1,'children':a8_0x195ad6(Text,{'color':_0x184960(0x12a),'children':['✗\x20',_0x385589]})}),_0x4d56ae===_0x184960(0x13b)&&a8_0x29aa4c(a8_0x352d22,{'children':a8_0x195ad6(Box,{'marginTop':_0x32fa48[_0x184960(0x164)]>0x0||_0x385589?0x1:0x0,'flexDirection':'column','children':[a8_0x29aa4c(Text,{'bold':!![],'children':_0x184960(0x12c)}),_0x267b60[_0x184960(0x146)]((_0x40f4fd,_0x48ac25)=>{const _0x4b06c3=_0x184960,_0x43627c=_0x43f639===_0x48ac25,_0x15f7c1=_0x1aa4e8[_0x4b06c3(0x136)](_0x48ac25),_0x30f87e=_0x367a18['includes'](_0x40f4fd['path']),_0x8df9a6=_0x30f87e?_0x4b06c3(0x163):_0x4b06c3(0x168);return a8_0x29aa4c(Box,{'children':a8_0x195ad6(Text,{'backgroundColor':_0x43627c?_0x4b06c3(0x161):undefined,'color':_0x43627c?_0x4b06c3(0x15d):undefined,'children':['\x20\x20',_0x15f7c1?_0x4b06c3(0x15f):_0x4b06c3(0x158),'\x20',_0x40f4fd['label']]})},_0x40f4fd[_0x4b06c3(0x167)]);}),a8_0x29aa4c(Box,{'marginTop':0x1,'children':a8_0x29aa4c(Text,{'color':_0x184960(0x143),'children':'\x20↑/↓:\x20Move\x20\x20Space:\x20Toggle\x20\x20a:\x20All\x20\x20i/r:\x20Invert\x20\x20Enter:\x20Confirm'})})]})}),_0x4d56ae==='input-js'&&a8_0x195ad6(a8_0x352d22,{'children':[a8_0x195ad6(Box,{'children':[a8_0x29aa4c(Text,{'children':'*\x20JS\x20URL:\x20'}),a8_0x29aa4c(Text,{'color':_0x184960(0x162),'children':_0x290c0a}),_0x385589&&a8_0x195ad6(Text,{'color':'red','children':[_0x184960(0x144),_0x385589]})]}),!_0x385589&&a8_0x29aa4c(Box,{'children':a8_0x29aa4c(Text,{'color':_0x184960(0x143),'children':'\x20Enter\x20project\x20JS\x20asset\x20URL\x20(https://...)'})})]}),_0x4d56ae===_0x184960(0x14d)&&a8_0x195ad6(a8_0x352d22,{'children':[a8_0x195ad6(Box,{'children':[a8_0x29aa4c(Text,{'children':'*\x20CSS\x20URL:\x20'}),a8_0x29aa4c(Text,{'color':_0x184960(0x162),'children':_0x290c0a}),_0x385589&&a8_0x195ad6(Text,{'color':_0x184960(0x12a),'children':[_0x184960(0x144),_0x385589]})]}),!_0x385589&&a8_0x29aa4c(Box,{'children':a8_0x29aa4c(Text,{'color':'gray','children':_0x184960(0x138)})})]}),_0x4d56ae===_0x184960(0x160)&&a8_0x29aa4c(Box,{'children':a8_0x29aa4c(Text,{'children':'*\x20Creating\x20menus...'})}),_0x4d56ae===_0x184960(0x12e)&&a8_0x29aa4c(Box,{'children':a8_0x29aa4c(Text,{'color':_0x184960(0x162),'children':_0x184960(0x14b)})})]});}function getStringWidth(_0x3d6175){const _0x3b1a45=a8_0x136b;let _0x7b670b=0x0;for(const _0x3a25ae of _0x3d6175){/[\u4e00-\u9fa5]/[_0x3b1a45(0x152)](_0x3a25ae)?_0x7b670b+=0x2:_0x7b670b+=0x1;}return _0x7b670b;}function getRemainingSpaces(_0xc2436a,_0x11f27a){const _0xd9ac0f=a8_0x136b,_0x4e5d3f=getStringWidth(_0x11f27a);return Array(Math[_0xd9ac0f(0x126)](0x0,_0xc2436a-_0x4e5d3f))[_0xd9ac0f(0x132)]('\x20')[_0xd9ac0f(0x128)]('');}function getMaxWidth(_0x38092f,_0x4fa959=0x2){const _0x5016ee=a8_0x136b;let _0x5df4a7='',_0x34fc9d=0x0;for(const _0x36ee68 of _0x38092f){const _0x3d1bf8=getStringWidth(_0x36ee68);_0x3d1bf8>_0x34fc9d&&(_0x34fc9d=_0x3d1bf8,_0x5df4a7=_0x36ee68);}return _0x5df4a7+'\x20'[_0x5016ee(0x156)](_0x4fa959);}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x39d0aa,_0x2821aa){const _0x190080=a9_0x2a74,_0x3af0b9=_0x39d0aa();while(!![]){try{const _0x35c4b9=-parseInt(_0x190080(0x180))/0x1+-parseInt(_0x190080(0x19d))/0x2*(-parseInt(_0x190080(0x179))/0x3)+parseInt(_0x190080(0x18d))/0x4*(parseInt(_0x190080(0x191))/0x5)+-parseInt(_0x190080(0x185))/0x6+parseInt(_0x190080(0x17a))/0x7+parseInt(_0x190080(0x18c))/0x8*(-parseInt(_0x190080(0x17c))/0x9)+parseInt(_0x190080(0x194))/0xa*(parseInt(_0x190080(0x1a8))/0xb);if(_0x35c4b9===_0x2821aa)break;else _0x3af0b9['push'](_0x3af0b9['shift']());}catch(_0x408fdc){_0x3af0b9['push'](_0x3af0b9['shift']());}}}(a9_0x4d30,0x97ac6));import{getCookie}from'../auth/get-cookie.js';function a9_0x2a74(_0x338aa0,_0x1d9412){_0x338aa0=_0x338aa0-0x178;const _0x4d304f=a9_0x4d30();let _0x2a74c0=_0x4d304f[_0x338aa0];return _0x2a74c0;}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a9_0x4d30(){const _0x255332=['38uWEDXm','error','No\x20AppCode\x20provided\x20and\x20no\x20default\x20configured','create-menu','errorMsg','create-menus','application/json','stringify','success','data','info','1067dxhRpa','Auth\x20validation\x20failed.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','Failed\x20to\x20create\x20menu,\x20HTTP\x20status:\x20','163002zhtXWe','353521DXgoxr','\x20\x20\x202.\x20Set\x20default:\x20rabetbase\x20config\x20set\x20app\x20<app-code>','1986651HJXqai','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','json','label','128778atcyai','Creating\x20menu:\x20','appcode','resources','map','5617338FOjDSX','includes','length','all','status','Failed\x20to\x20create\x20menu:\x20','path','40bcYWfJ','20OccZgI','procode','import','Error','771730gZnetI','errorCode','\x20\x20\x201.\x20Specify\x20directly:\x20rabetbase\x20api\x20pull\x20<app-code>','96430UgmKgk','0011','/smartapi/menu/create','POST','Menu\x20created\x20successfully:','Start\x20batch\x20menu\x20creation,\x20total\x20','log','!\x20Please\x20use\x20one\x20of\x20the\x20following:','Batch\x20menu\x20creation\x20completed,\x20total\x20'];a9_0x4d30=function(){return _0x255332;};return a9_0x4d30();}import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x1319f0){const _0xe99fae=a9_0x2a74,_0x54498c=config?.[_0xe99fae(0x182)];if(!_0x54498c){const _0x27e2cd=_0xe99fae(0x19f);logger['error'](_0xe99fae(0x1a0),_0x27e2cd),console[_0xe99fae(0x19e)]('×\x20'+_0x27e2cd),console['log'](_0xe99fae(0x19b)),console[_0xe99fae(0x19a)](_0xe99fae(0x193)),console[_0xe99fae(0x19a)](_0xe99fae(0x17b));return;}logger['info']('create-menu',_0xe99fae(0x181)+_0x1319f0['label']+'\x20('+_0x1319f0['path']+')');const _0x136ea8={'appCode':_0x54498c,'type':_0xe99fae(0x18e),'sort':0x0,'extend':{'loadScriptMode':_0xe99fae(0x18f),'resources':_0x1319f0[_0xe99fae(0x183)]?JSON[_0xe99fae(0x1a4)](_0x1319f0[_0xe99fae(0x183)]):undefined},..._0x1319f0},_0x357528=await fetch(getApiDomain()+_0xe99fae(0x196),{'method':_0xe99fae(0x197),'body':JSON[_0xe99fae(0x1a4)](_0x136ea8),'headers':{'Content-Type':_0xe99fae(0x1a3),'Cookie':getCookie()}});if(!_0x357528['ok']){if(_0x357528[_0xe99fae(0x189)]===0x191){const _0x1aa58a=_0xe99fae(0x17d);logger[_0xe99fae(0x19e)](_0xe99fae(0x1a0),_0x1aa58a,{'status':_0x357528[_0xe99fae(0x189)],'menu':_0x1319f0[_0xe99fae(0x17f)]});throw new Error(_0x1aa58a);}const _0x4ae7b0=_0xe99fae(0x178)+_0x357528[_0xe99fae(0x189)];logger['error'](_0xe99fae(0x1a0),_0x4ae7b0,{'menu':_0x1319f0[_0xe99fae(0x17f)]});throw new Error(_0x4ae7b0);}const _0x435f72=await _0x357528[_0xe99fae(0x17e)]();if(!_0x435f72['success']){const _0x5c2a59='Failed\x20to\x20create\x20menu:\x20'+(_0x435f72[_0xe99fae(0x1a1)]||_0xe99fae(0x190));logger['error'](_0xe99fae(0x1a0),_0x5c2a59,{'errorCode':_0x435f72['errorCode'],'errorMsg':_0x435f72[_0xe99fae(0x1a1)],'menu':_0x1319f0[_0xe99fae(0x17f)]});throw new Error(_0x5c2a59);}logger[_0xe99fae(0x1a7)](_0xe99fae(0x1a0),_0xe99fae(0x198)+_0x1319f0[_0xe99fae(0x17f)],_0x435f72[_0xe99fae(0x1a6)]),console[_0xe99fae(0x19a)](_0xe99fae(0x198),_0x435f72[_0xe99fae(0x1a6)]);}async function _createMenu(_0x1b3b04,_0x22f5ee){const _0x28345d=a9_0x2a74,_0x489be8=config?.['appcode'];if(!_0x489be8){const _0x5151be=_0x28345d(0x19f);logger[_0x28345d(0x19e)]('create-menu',_0x5151be),console[_0x28345d(0x19e)]('×\x20'+_0x5151be),console[_0x28345d(0x19a)](_0x28345d(0x19b)),console[_0x28345d(0x19a)](_0x28345d(0x193)),console[_0x28345d(0x19a)](_0x28345d(0x17b));return;}const _0x20a3fa={'appCode':_0x489be8,'type':_0x28345d(0x18e),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x22f5ee?JSON[_0x28345d(0x1a4)](_0x22f5ee):undefined},'label':_0x1b3b04[_0x28345d(0x17f)],'path':_0x1b3b04[_0x28345d(0x18b)]},_0x35b923=await fetch(getApiDomain()+_0x28345d(0x196),{'method':_0x28345d(0x197),'body':JSON[_0x28345d(0x1a4)](_0x20a3fa),'headers':{'Content-Type':_0x28345d(0x1a3),'Cookie':getCookie()}});if(!_0x35b923['ok']){if(_0x35b923[_0x28345d(0x189)]===0x191){const _0xf5c09a='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger[_0x28345d(0x19e)]('create-menu',_0xf5c09a,{'status':_0x35b923['status'],'menu':_0x1b3b04[_0x28345d(0x17f)]});throw new Error(_0xf5c09a);}const _0x20c83b=_0x28345d(0x178)+_0x35b923[_0x28345d(0x189)];logger['error'](_0x28345d(0x1a0),_0x20c83b,{'menu':_0x1b3b04[_0x28345d(0x17f)]});throw new Error(_0x20c83b);}const _0x2b161d=await _0x35b923['json']();if(!_0x2b161d[_0x28345d(0x1a5)]){if(_0x2b161d[_0x28345d(0x192)]===_0x28345d(0x195)||_0x2b161d[_0x28345d(0x1a1)]?.[_0x28345d(0x186)]('登录')){const _0x574f53=_0x28345d(0x1a9);logger[_0x28345d(0x19e)](_0x28345d(0x1a0),_0x574f53,{'errorCode':_0x2b161d[_0x28345d(0x192)],'errorMsg':_0x2b161d[_0x28345d(0x1a1)],'menu':_0x1b3b04['label']});throw new Error(_0x574f53);}const _0x2a3761=_0x28345d(0x18a)+(_0x2b161d['errorMsg']||_0x28345d(0x190));logger['error'](_0x28345d(0x1a0),_0x2a3761,{'errorCode':_0x2b161d[_0x28345d(0x192)],'errorMsg':_0x2b161d[_0x28345d(0x1a1)],'menu':_0x1b3b04[_0x28345d(0x17f)]});throw new Error(_0x2a3761);}logger[_0x28345d(0x1a7)](_0x28345d(0x1a0),_0x28345d(0x198)+_0x1b3b04[_0x28345d(0x17f)]);}export async function createMenus(_0x173db0,_0x48b02b){const _0x5ee646=a9_0x2a74;logger['info'](_0x5ee646(0x1a2),_0x5ee646(0x199)+_0x173db0[_0x5ee646(0x187)]),await Promise[_0x5ee646(0x188)](_0x173db0[_0x5ee646(0x184)](async _0x373bcb=>{await _createMenu(_0x373bcb,_0x48b02b);})),logger[_0x5ee646(0x1a7)]('create-menus',_0x5ee646(0x19c)+_0x173db0[_0x5ee646(0x187)]);}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x4c78db,_0x3d9e95){const _0x20f8b4=a10_0x1f8c,_0x465e20=_0x4c78db();while(!![]){try{const _0x3d159d=-parseInt(_0x20f8b4(0x9d))/0x1+parseInt(_0x20f8b4(0xa4))/0x2+-parseInt(_0x20f8b4(0x9a))/0x3+-parseInt(_0x20f8b4(0x9e))/0x4*(parseInt(_0x20f8b4(0xa8))/0x5)+parseInt(_0x20f8b4(0xa1))/0x6+parseInt(_0x20f8b4(0xa0))/0x7*(parseInt(_0x20f8b4(0xa9))/0x8)+-parseInt(_0x20f8b4(0x9b))/0x9;if(_0x3d159d===_0x3d9e95)break;else _0x465e20['push'](_0x465e20['shift']());}catch(_0x5cbf33){_0x465e20['push'](_0x465e20['shift']());}}}(a10_0x7a72,0x77514));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';function a10_0x1f8c(_0x3f2093,_0x1ff9ac){_0x3f2093=_0x3f2093-0x98;const _0x7a7216=a10_0x7a72();let _0x1f8c45=_0x7a7216[_0x3f2093];return _0x1f8c45;}function a10_0x7a72(){const _0x740c4c=['.tsx','310035dWKFZG','380TsGdgE','isDirectory','158795YTlWpe','3281400mTdqLe','trim','push','1553782bZZQVq','match','endsWith','filter','14470pjPYFG','296DWlGFp','replace','slice','forEach','2818956GDgYIi','1348155YQPNDA'];a10_0x7a72=function(){return _0x740c4c;};return a10_0x7a72();}const pagesDir=resolve(process['cwd'](),'src/pages');export function extractTitleFromComment(_0x806f20){const _0x18673a=a10_0x1f8c;try{const _0x3e557b=readFileSync(_0x806f20,'utf-8'),_0x3f7cc5=_0x3e557b['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x3f7cc5&&_0x3f7cc5[0x1]){const _0x2dbc88=_0x3f7cc5[0x1],_0x4f43d4=_0x2dbc88[_0x18673a(0xa5)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4f43d4&&_0x4f43d4[0x1])return _0x4f43d4[0x1][_0x18673a(0xa2)]();}let _0x1c9123=null;const _0x508f00=_0x3e557b['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x508f00&&_0x508f00[0x1]&&(_0x1c9123=_0x508f00[0x1]);if(!_0x1c9123){const _0x439a5d=_0x3e557b['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x439a5d&&_0x439a5d[0x1]&&(_0x1c9123=_0x439a5d[0x1]);}if(_0x1c9123){const _0x14a93d=new RegExp('\x5cb'+_0x1c9123+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x3d1230=_0x3e557b[_0x18673a(0xa5)](_0x14a93d);if(_0x3d1230&&_0x3d1230[0x1])return _0x3d1230[0x1];return _0x1c9123;}return null;}catch(_0x3b39ec){return null;}}export function getLocalPages(_0x42087f=pagesDir,_0x33b895=pagesDir){const _0x1f44e8=a10_0x1f8c;let _0x9669b0=[];const _0x3317fc=readdirSync(_0x42087f);return _0x3317fc[_0x1f44e8(0x99)](_0x3e2f86=>{const _0x2e7515=_0x1f44e8,_0x53f98a=join(_0x42087f,_0x3e2f86),_0xcc2083=statSync(_0x53f98a);if(_0xcc2083&&_0xcc2083[_0x2e7515(0x9f)]())_0x9669b0=_0x9669b0['concat'](getLocalPages(_0x53f98a,_0x33b895));else{if(_0x3e2f86['endsWith'](_0x2e7515(0x9c))){let _0x17c39a=relative(_0x33b895,_0x53f98a);_0x17c39a[_0x2e7515(0xa6)]('index.tsx')?_0x17c39a=_0x17c39a[_0x2e7515(0xaa)](/index\.tsx$/,''):_0x17c39a=_0x17c39a['replace'](/\.tsx$/,'');_0x17c39a[_0x2e7515(0xa6)]('/')&&(_0x17c39a=_0x17c39a[_0x2e7515(0x98)](0x0,-0x1));const _0x8ac52e=extractTitleFromComment(_0x53f98a),_0x20bd5b=_0x8ac52e||_0x17c39a;_0x9669b0[_0x2e7515(0xa3)]({'path':_0x17c39a['replaceAll']('$',':'),'label':_0x20bd5b});}}}),_0x9669b0[_0x1f44e8(0xa7)](_0x369c4b=>_0x369c4b['path']!=='');}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x3ba76a,_0xfcca35){const _0x518fd4=a11_0x2f7b,_0x10b473=_0x3ba76a();while(!![]){try{const _0x5931e3=parseInt(_0x518fd4(0x8c))/0x1+parseInt(_0x518fd4(0x7d))/0x2*(-parseInt(_0x518fd4(0x82))/0x3)+-parseInt(_0x518fd4(0x97))/0x4+-parseInt(_0x518fd4(0x91))/0x5*(-parseInt(_0x518fd4(0x8e))/0x6)+-parseInt(_0x518fd4(0x83))/0x7+-parseInt(_0x518fd4(0x70))/0x8*(-parseInt(_0x518fd4(0x8a))/0x9)+parseInt(_0x518fd4(0x79))/0xa;if(_0x5931e3===_0xfcca35)break;else _0x10b473['push'](_0x10b473['shift']());}catch(_0x4ebb43){_0x10b473['push'](_0x10b473['shift']());}}}(a11_0x7d7e,0x6cdf0));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a11_0x7d7e(){const _0x2eada6=['extend','data','130OMNReR','length','GET','isArray','\x20\x20\x201.\x20Specify\x20directly:\x20rabetbase\x20api\x20pull\x20<app-code>','flat','980400nufvKO','online','520yiEYkb','Failed\x20to\x20fetch\x20menu\x20list,\x20HTTP\x20status:\x20','info','push','json','\x20\x20\x202.\x20Set\x20default:\x20rabetbase\x20config\x20set\x20app\x20<app-code>','resources','log','appcode','17287430yHNtam','No\x20AppCode\x20provided\x20and\x20no\x20default\x20configured','error','Error','2AYLuMs','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Server\x20returned\x20empty\x20menu\x20list','label','!\x20Please\x20use\x20one\x20of\x20the\x20following:','2672130GdZVmo','5365416rRnYDK','map','Failed\x20to\x20fetch\x20menu\x20list:\x20','success','status','/smartapi/menu/find?appCode=','parse','1233EtBUlE','application/json','484902LFppdV','get-online-menu-list','29004PtkgEq'];a11_0x7d7e=function(){return _0x2eada6;};return a11_0x7d7e();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();export async function getOnlineMenuList(){const _0x1d4948=a11_0x2f7b,_0x42a0c2=config?.[_0x1d4948(0x78)];if(!_0x42a0c2){const _0x1dc152=_0x1d4948(0x7a);return logger[_0x1d4948(0x7b)](_0x1d4948(0x8d),_0x1dc152),console[_0x1d4948(0x7b)]('×\x20'+_0x1dc152),console['log'](_0x1d4948(0x81)),console[_0x1d4948(0x77)](_0x1d4948(0x95)),console[_0x1d4948(0x77)](_0x1d4948(0x75)),[];}const _0xf8a5f8=getEnv();logger[_0x1d4948(0x72)](_0x1d4948(0x8d),_0xf8a5f8===_0x1d4948(0x98)?_0x1d4948(0x7e)+_0x42a0c2+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x42a0c2+')');const _0x25e769=await fetch(getApiDomain()+_0x1d4948(0x88)+_0x42a0c2,{'method':_0x1d4948(0x93),'headers':{'Content-Type':_0x1d4948(0x8b),'Cookie':getCookie()}});if(!_0x25e769['ok']){if(_0x25e769['status']===0x191){const _0x3901bd='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger[_0x1d4948(0x7b)]('get-online-menu-list',_0x3901bd,{'status':_0x25e769['status']});throw new Error(_0x3901bd);}const _0x1d4ce1=_0x1d4948(0x71)+_0x25e769[_0x1d4948(0x87)];logger[_0x1d4948(0x7b)](_0x1d4948(0x8d),_0x1d4ce1);throw new Error(_0x1d4ce1);}const _0x5506e0=await _0x25e769[_0x1d4948(0x74)]();if(!_0x5506e0[_0x1d4948(0x86)]){const _0x5c475b=_0x1d4948(0x85)+(_0x5506e0['errorMsg']||_0x1d4948(0x7c));logger['error'](_0x1d4948(0x8d),_0x5c475b,{'errorCode':_0x5506e0['errorCode'],'errorMsg':_0x5506e0['errorMsg']});throw new Error(_0x5c475b);}if(!_0x5506e0['data'])return logger[_0x1d4948(0x72)](_0x1d4948(0x8d),_0x1d4948(0x7f)),[];return logger[_0x1d4948(0x72)](_0x1d4948(0x8d),'Fetched\x20'+_0x5506e0['data'][_0x1d4948(0x92)]+'\x20online\x20menus\x20successfully'),_0x5506e0[_0x1d4948(0x90)][_0x1d4948(0x84)](formatMenuList)[_0x1d4948(0x96)]();}function a11_0x2f7b(_0x1ade4a,_0x366fe4){_0x1ade4a=_0x1ade4a-0x70;const _0x7d7ea=a11_0x7d7e();let _0x2f7b84=_0x7d7ea[_0x1ade4a];return _0x2f7b84;}function formatMenuList(_0x46916c){const _0x824e6c=a11_0x2f7b;let _0x2b185f=[];try{if(_0x46916c[_0x824e6c(0x8f)]?.['resources']){const _0x3a2756=JSON[_0x824e6c(0x89)](_0x46916c[_0x824e6c(0x8f)][_0x824e6c(0x76)]);Array[_0x824e6c(0x94)](_0x3a2756)&&(_0x2b185f=_0x3a2756);}}catch(_0xc6c44d){}const _0x15e39b=[{'id':_0x46916c['id'],'path':_0x46916c['path'],'label':_0x46916c[_0x824e6c(0x80)],'resources':_0x2b185f}];if(_0x46916c['children']&&_0x46916c['children']['length']>0x0)for(const _0xe61793 of _0x46916c['children']){_0x15e39b[_0x824e6c(0x73)](...formatMenuList(_0xe61793));}return _0x15e39b;}
|
package/lib/app-menu/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x3106d6,_0x539f10){const _0x8d4cb=a13_0x1bfb,_0x4098ee=_0x3106d6();while(!![]){try{const _0x47084d=parseInt(_0x8d4cb(0x106))/0x1*(-parseInt(_0x8d4cb(0x104))/0x2)+-parseInt(_0x8d4cb(0x10d))/0x3+parseInt(_0x8d4cb(0x10c))/0x4*(-parseInt(_0x8d4cb(0x101))/0x5)+-parseInt(_0x8d4cb(0x10a))/0x6*(parseInt(_0x8d4cb(0x105))/0x7)+parseInt(_0x8d4cb(0x10f))/0x8+parseInt(_0x8d4cb(0x10b))/0x9*(parseInt(_0x8d4cb(0x109))/0xa)+parseInt(_0x8d4cb(0x108))/0xb;if(_0x47084d===_0x539f10)break;else _0x4098ee['push'](_0x4098ee['shift']());}catch(_0x3a4778){_0x4098ee['push'](_0x4098ee['shift']());}}}(a13_0x5349,0x547bc));import{useEffect,useState}from'react';function a13_0x1bfb(_0x1e0d2d,_0x2ed1f7){_0x1e0d2d=_0x1e0d2d-0x101;const _0x5349cc=a13_0x5349();let _0x1bfb6c=_0x5349cc[_0x1e0d2d];return _0x1bfb6c;}function a13_0x5349(){const _0x122b76=['91dXBEeI','1OSMIgW','finally','11469348bdlcDF','87790mqgQJC','205692YntlJg','180wOfzRn','4QkzFFl','548931FNLJoA','Failed\x20to\x20fetch\x20menu\x20list:\x20Error','4159344tJElDU','2900805MMAoWG','catch','message','366636XTsUoh'];a13_0x5349=function(){return _0x122b76;};return a13_0x5349();}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x49472d,_0x45f781]=useState([]),[_0x9810a7,_0x40e3ba]=useState(!![]),[_0x263cfb,_0x57178b]=useState('');return useEffect(()=>{const _0x4345d6=a13_0x1bfb;_0x40e3ba(!![]),_0x57178b(''),getOnlineMenuList()['then'](_0x45f781)[_0x4345d6(0x102)](_0x2e1e64=>{const _0xdacd78=_0x4345d6;_0x57178b(_0x2e1e64[_0xdacd78(0x103)]||_0xdacd78(0x10e));})[_0x4345d6(0x107)](()=>_0x40e3ba(![]));},[]),{'menuList':_0x49472d,'loading':_0x9810a7,'error':_0x263cfb};}
|
package/lib/app-menu/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x29b540,_0x4bae3c){const _0x2f471e=a14_0x5273,_0x4e63ad=_0x29b540();while(!![]){try{const _0x19b11f=-parseInt(_0x2f471e(0x185))/0x1*(-parseInt(_0x2f471e(0x182))/0x2)+-parseInt(_0x2f471e(0x17c))/0x3+parseInt(_0x2f471e(0x180))/0x4*(parseInt(_0x2f471e(0x17a))/0x5)+parseInt(_0x2f471e(0x176))/0x6+-parseInt(_0x2f471e(0x184))/0x7+parseInt(_0x2f471e(0x183))/0x8*(-parseInt(_0x2f471e(0x17b))/0x9)+parseInt(_0x2f471e(0x17e))/0xa*(parseInt(_0x2f471e(0x17f))/0xb);if(_0x19b11f===_0x4bae3c)break;else _0x4e63ad['push'](_0x4e63ad['shift']());}catch(_0x290bd8){_0x4e63ad['push'](_0x4e63ad['shift']());}}}(a14_0xacd3,0x4f202));export function getRemainingSpaces(_0x567bf4,_0x2d36a1){const _0x190676=a14_0x5273,_0x4ff277=getStringWidth(_0x2d36a1);return Array(Math[_0x190676(0x17d)](0x0,_0x567bf4-_0x4ff277))[_0x190676(0x178)]('\x20')[_0x190676(0x177)]('');}function a14_0xacd3(){const _0x352f99=['2678949KERoIM','20441DfLqwA','2047782TXqcNb','join','fill','test','95LZzIeI','49482EKTosF','295767fMHZPw','max','1270JwRQwi','62117hRttcj','23768XVsqsO','repeat','4UoYuFi','592JzTCRI'];a14_0xacd3=function(){return _0x352f99;};return a14_0xacd3();}export function getMaxWidth(_0x600698,_0x25e392=0x2){const _0x4a56cc=a14_0x5273;let _0x3e5d73='',_0xa9ce08=0x0;for(const _0x1ece7d of _0x600698){const _0x354f1e=getStringWidth(_0x1ece7d);_0x354f1e>_0xa9ce08&&(_0xa9ce08=_0x354f1e,_0x3e5d73=_0x1ece7d);}return _0x3e5d73+'\x20'[_0x4a56cc(0x181)](_0x25e392);}function a14_0x5273(_0xfa1a28,_0x1b2faf){_0xfa1a28=_0xfa1a28-0x176;const _0xacd39=a14_0xacd3();let _0x5273c2=_0xacd39[_0xfa1a28];return _0x5273c2;}export function getStringWidth(_0x5626d2){const _0x438ccf=a14_0x5273;let _0x504116=0x0;for(const _0x37b5fd of _0x5626d2){/[\u4e00-\u9fa5]/[_0x438ccf(0x179)](_0x37b5fd)?_0x504116+=0x2:_0x504116+=0x1;}return _0x504116;}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a15_0x2e20(){const _0x56bc13=['12336RHmWbJ','90050HKylHI','189682ZewwVI','1741985gvuKhX','2254596PsRNUv','55JVtTMr','HEAD','137008eCIziK','412792CESneR','test','8yEIxll','1685LRrYJo','trim','9dBYQAS'];a15_0x2e20=function(){return _0x56bc13;};return a15_0x2e20();}function a15_0x5b32(_0x475893,_0x3bfc04){_0x475893=_0x475893-0x7b;const _0x2e206e=a15_0x2e20();let _0x5b32de=_0x2e206e[_0x475893];return _0x5b32de;}(function(_0x5c5ab2,_0x4dea8e){const _0x57a0fa=a15_0x5b32,_0x54b046=_0x5c5ab2();while(!![]){try{const _0x140843=parseInt(_0x57a0fa(0x86))/0x1*(-parseInt(_0x57a0fa(0x80))/0x2)+parseInt(_0x57a0fa(0x88))/0x3+parseInt(_0x57a0fa(0x7d))/0x4+-parseInt(_0x57a0fa(0x81))/0x5*(-parseInt(_0x57a0fa(0x84))/0x6)+-parseInt(_0x57a0fa(0x87))/0x7+-parseInt(_0x57a0fa(0x7e))/0x8*(parseInt(_0x57a0fa(0x83))/0x9)+parseInt(_0x57a0fa(0x85))/0xa*(parseInt(_0x57a0fa(0x7b))/0xb);if(_0x140843===_0x4dea8e)break;else _0x54b046['push'](_0x54b046['shift']());}catch(_0x3161ad){_0x54b046['push'](_0x54b046['shift']());}}}(a15_0x2e20,0x71673));export function isValidJsHttpsUrl(_0x202c16){const _0x19f8d0=a15_0x5b32;return/^https:\/\/.+\.js(\?.*)?$/[_0x19f8d0(0x7f)](_0x202c16[_0x19f8d0(0x82)]());}export function isValidCssHttpsUrl(_0x45defe){const _0xbb03ec=a15_0x5b32;return/^https:\/\/.+\.css(\?.*)?$/[_0xbb03ec(0x7f)](_0x45defe[_0xbb03ec(0x82)]());}export async function isUrlReachable(_0x22d1a0){const _0xa9b68a=a15_0x5b32;try{const _0xf12e82=await fetch(_0x22d1a0,{'method':_0xa9b68a(0x7c)});return _0xf12e82['ok'];}catch{return![];}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a16_0x63a6(){const _0x33383f=['*\x20Menus\x20and\x20asset\x20links\x20to\x20update','2101050cuPiQi','resources','2172254aiqxSB','779931USHShC','164480iudjKB','12yzUWGR','join','filter','cyan','2730bvJAIc','column','length','21258XRXYcr','map','32CqPYMq','6014575uiZhxy','Asset\x20links\x20to\x20update:','416194MZuBwq','Menus\x20to\x20update:'];a16_0x63a6=function(){return _0x33383f;};return a16_0x63a6();}(function(_0x44fd50,_0x386719){const _0x184918=a16_0x2633,_0x40a0b3=_0x44fd50();while(!![]){try{const _0x31a05e=-parseInt(_0x184918(0xad))/0x1+parseInt(_0x184918(0xb4))/0x2+parseInt(_0x184918(0xb3))/0x3*(parseInt(_0x184918(0xb5))/0x4)+-parseInt(_0x184918(0xbf))/0x5+-parseInt(_0x184918(0xb0))/0x6+-parseInt(_0x184918(0xb2))/0x7*(-parseInt(_0x184918(0xbe))/0x8)+-parseInt(_0x184918(0xbc))/0x9*(-parseInt(_0x184918(0xb9))/0xa);if(_0x31a05e===_0x386719)break;else _0x40a0b3['push'](_0x40a0b3['shift']());}catch(_0x199c85){_0x40a0b3['push'](_0x40a0b3['shift']());}}}(a16_0x63a6,0xbe2f9));function a16_0x2633(_0xd0784b,_0x7715ee){_0xd0784b=_0xd0784b-0xad;const _0x63a688=a16_0x63a6();let _0x26332e=_0x63a688[_0xd0784b];return _0x26332e;}import{jsx as a16_0x1ead2c,jsxs as a16_0x1d9d4d}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x1d1743){const _0x9185e=a16_0x2633,{menuList:_0x1aa56e}=_0x1d1743,_0x2de395=_0x1aa56e[_0x9185e(0xb7)](_0x37143e=>_0x37143e[_0x9185e(0xb1)][_0x9185e(0xbb)]),_0x243f20=Array['from'](new Set(_0x1aa56e[_0x9185e(0xbd)](_0x6239cf=>_0x6239cf['resources'])['flat']()));return a16_0x1d9d4d(Box,{'flexDirection':'column','children':[a16_0x1ead2c(Text,{'color':_0x9185e(0xb8),'children':_0x9185e(0xaf)}),a16_0x1d9d4d(Box,{'marginTop':0x1,'flexDirection':_0x9185e(0xba),'children':[a16_0x1d9d4d(Text,{'bold':!![],'children':['\x20\x20',_0x9185e(0xae)]}),a16_0x1d9d4d(Text,{'children':['\x20\x20',_0x2de395[_0x9185e(0xbd)](_0x1a0e85=>_0x1a0e85['label'])[_0x9185e(0xb6)](',\x20')]})]}),a16_0x1ead2c(Box,{'marginTop':0x1,'children':a16_0x1d9d4d(Text,{'bold':!![],'children':['\x20\x20',_0x9185e(0xc0)]})}),_0x243f20[_0x9185e(0xbd)](_0x2b8d49=>a16_0x1ead2c(Box,{'children':a16_0x1d9d4d(Text,{'children':['\x20\x20',_0x2b8d49]})},_0x2b8d49))]});}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x180ebb,_0x3b31ce){const _0x340723=a17_0x247e,_0x406de7=_0x180ebb();while(!![]){try{const _0x553d4d=parseInt(_0x340723(0x195))/0x1+parseInt(_0x340723(0x190))/0x2*(-parseInt(_0x340723(0x18d))/0x3)+parseInt(_0x340723(0x189))/0x4*(-parseInt(_0x340723(0x193))/0x5)+-parseInt(_0x340723(0x18c))/0x6+parseInt(_0x340723(0x18e))/0x7+-parseInt(_0x340723(0x18f))/0x8+parseInt(_0x340723(0x18a))/0x9*(parseInt(_0x340723(0x191))/0xa);if(_0x553d4d===_0x3b31ce)break;else _0x406de7['push'](_0x406de7['shift']());}catch(_0x198a95){_0x406de7['push'](_0x406de7['shift']());}}}(a17_0x82f3,0x54bb9));function a17_0x247e(_0x342d41,_0x5703bf){_0x342d41=_0x342d41-0x189;const _0x82f308=a17_0x82f3();let _0x247ed1=_0x82f308[_0x342d41];return _0x247ed1;}import{jsx as a17_0x54804d,jsxs as a17_0x160932}from'react/jsx-runtime';function a17_0x82f3(){const _0x524d9b=['479676sdsxtY','257214kqzxqM','2371187jJLwwK','1333032OrvuYw','6tnGIhS','20abedko','green','5cwRlwy','cyan','183844eECFsb','578212hWvctf','2127699esEEfL','JS\x20URL:\x20'];a17_0x82f3=function(){return _0x524d9b;};return a17_0x82f3();}import{Text,Box}from'ink';export function InputCdnAsset(_0x4804e8){const _0x5b08e4=a17_0x247e,{jsCdnUrl:_0xbb24ca,cssCdnUrl:_0x16874f}=_0x4804e8;return a17_0x160932(Box,{'flexDirection':'column','marginTop':0x1,'children':[a17_0x54804d(Text,{'color':_0x5b08e4(0x194),'children':'*\x20Entered\x20asset\x20URLs'}),a17_0x160932(Box,{'children':[a17_0x160932(Text,{'children':['\x20\x20',_0x5b08e4(0x18b)]}),a17_0x54804d(Text,{'color':_0x5b08e4(0x192),'children':_0xbb24ca})]}),a17_0x160932(Box,{'children':[a17_0x160932(Text,{'children':['\x20\x20','CSS\x20URL:\x20']}),a17_0x54804d(Text,{'color':'green','children':_0x16874f})]})]});}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x465bc4,_0xa27090){const _0x318478=a18_0x29ee,_0x3ca415=_0x465bc4();while(!![]){try{const _0x306775=parseInt(_0x318478(0xea))/0x1*(parseInt(_0x318478(0x100))/0x2)+parseInt(_0x318478(0x116))/0x3*(parseInt(_0x318478(0xf4))/0x4)+-parseInt(_0x318478(0x10e))/0x5*(parseInt(_0x318478(0xfb))/0x6)+parseInt(_0x318478(0xe9))/0x7+parseInt(_0x318478(0x101))/0x8+parseInt(_0x318478(0x115))/0x9+parseInt(_0x318478(0xfd))/0xa*(-parseInt(_0x318478(0xed))/0xb);if(_0x306775===_0xa27090)break;else _0x3ca415['push'](_0x3ca415['shift']());}catch(_0x5826c4){_0x3ca415['push'](_0x3ca415['shift']());}}}(a18_0xc3d3,0x26cbd));import{jsx as a18_0x5b3efd,jsxs as a18_0x57250a,Fragment as a18_0x854b00}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a18_0x29ee(_0x34a0cd,_0x311244){_0x34a0cd=_0x34a0cd-0xe7;const _0xc3d32f=a18_0xc3d3();let _0x29ee1c=_0xc3d32f[_0x34a0cd];return _0x29ee1c;}function a18_0xc3d3(){const _0x18fad4=['return','cyan','gray','label','input-css','red','trim','value','backspace','90OkOHVe','green','map','Continue\x20update','slice','cancel','Please\x20enter\x20a\x20valid\x20CSS\x20https\x20URL','2542590ystYoM','135juZwDJ','column','updated','1864422rbsher','887nPmOqt','need-confirm','dots','11hnlDAI','CSS\x20URL:\x20','\x20Assets\x20are\x20syncing...','all','\x20←\x20','input-js','Enter\x20project\x20CSS\x20asset\x20URL\x20(https://...)','1736NITBtw','JS\x20URL:\x20','Please\x20enter\x20a\x20valid\x20JS\x20https\x20URL','yellow','length','resources','upArrow','91830cpTtRZ','delete','3044200mpdNca','creating','\x20command\x20to\x20re-login','382qVqFPo','8128uWDdbJ','flat','√\x20Updated\x20successfully','Cancel\x20update'];a18_0xc3d3=function(){return _0x18fad4;};return a18_0xc3d3();}import a18_0x1c7254 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a18_0x5b3efd(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x5c13cb=a18_0x29ee,{exit:_0x424886}=useApp(),{loading:_0x55c193,menuList:_0x1f6a66,error:_0x2147af}=useGetOnlineMenuList(),[_0x369b35,_0x556635]=useState('ok'),[_0x3689f0,_0x486996]=useState('input-js'),[_0x2ec9ea,_0x3d5077]=useState(''),[_0x30f7a6,_0x1f61b5]=useState(''),[_0x596e8f,_0x15d600]=useState(''),[_0x331dc2,_0x11d546]=useState(''),_0xede7fb=Array['from'](new Set(_0x1f6a66[_0x5c13cb(0x110)](_0x42b153=>_0x42b153[_0x5c13cb(0xf9)])[_0x5c13cb(0x102)]()));useEffect(()=>{const _0x4c9f69=_0x5c13cb;_0x3689f0===_0x4c9f69(0xe8)&&setTimeout(_0x424886,0x32);},[_0x3689f0]),useInput(async(_0x1377c7,_0x41046e)=>{const _0x198974=_0x5c13cb;if(_0x3689f0===_0x198974(0xf2)){if(_0x41046e['return']){const _0x56056b=_0x596e8f[_0x198974(0x10b)]();if(_0x56056b==='')return;if(!isValidJsHttpsUrl(_0x56056b)){_0x11d546(_0x198974(0xf6));return;}if(!await isUrlReachable(_0x56056b)){_0x11d546('JS\x20URL\x20is\x20unreachable');return;}_0x3d5077(_0x56056b),_0x15d600(''),_0x11d546(''),_0x486996(_0x198974(0x109));return;}if(_0x41046e[_0x198974(0x10d)]||_0x41046e[_0x198974(0xfc)]){_0x15d600(_0x3dfb9b=>_0x3dfb9b[_0x198974(0x112)](0x0,-0x1)),_0x11d546('');return;}_0x15d600(_0x268279=>_0x268279+_0x1377c7);return;}if(_0x3689f0==='input-css'){if(_0x41046e[_0x198974(0x105)]){const _0x563301=_0x596e8f[_0x198974(0x10b)]();if(_0x563301==='')return;if(!isValidCssHttpsUrl(_0x563301)){_0x11d546(_0x198974(0x114));return;}if(!await isUrlReachable(_0x563301)){_0x11d546('CSS\x20URL\x20is\x20unreachable');return;}_0x1f61b5(_0x563301),_0x15d600(''),_0x11d546(''),_0x486996(_0x198974(0xeb));return;}if(_0x41046e[_0x198974(0x10d)]||_0x41046e['delete']){_0x15d600(_0x133a4b=>_0x133a4b[_0x198974(0x112)](0x0,-0x1)),_0x11d546('');return;}_0x15d600(_0x21240e=>_0x21240e+_0x1377c7);return;}if(_0x3689f0===_0x198974(0xeb)){(_0x41046e[_0x198974(0xfa)]||_0x41046e['downArrow']||_0x41046e['leftArrow']||_0x41046e['rightArrow'])&&_0x556635(_0x11a79a=>_0x11a79a==='ok'?'cancel':'ok');if(_0x41046e[_0x198974(0x105)]){_0x486996(_0x198974(0xfe));if(_0x369b35==='ok')await Promise[_0x198974(0xf0)](_0x1f6a66[_0x198974(0x110)](_0x539db4=>{const _0x417f81=_0x198974,_0x45c4e4={'id':_0x539db4['id'],'label':_0x539db4['label'],'path':_0x539db4['path'],'resources':[_0x2ec9ea,_0x30f7a6]};if(_0x539db4[_0x417f81(0xf9)]['length']===0x0)return Promise['resolve']();return updateMenuCdnUrl(_0x45c4e4);})),await new Promise(_0x480a56=>setTimeout(_0x480a56,0x3e8)),_0x486996(_0x198974(0xe8));else _0x369b35===_0x198974(0x113)&&_0x424886();}}});if(_0x55c193)return a18_0x57250a(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(Text,{}),a18_0x5b3efd(a18_0x1c7254,{'type':_0x5c13cb(0xec)}),a18_0x5b3efd(Text,{'children':'\x20Fetching\x20online\x20menu\x20asset\x20links...'})]});if(_0x2147af)return a18_0x57250a(Box,{'flexDirection':_0x5c13cb(0xe7),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x57250a(Text,{'color':_0x5c13cb(0x10a),'children':['✗\x20',_0x2147af]}),a18_0x57250a(Box,{'marginTop':0x1,'children':[a18_0x5b3efd(Text,{'color':_0x5c13cb(0x107),'children':'Hint:\x20use\x20'}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x106),'children':'rabetbase\x20auth'}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x107),'children':_0x5c13cb(0xff)})]})]});if(_0xede7fb[_0x5c13cb(0xf8)]===0x0)return a18_0x5b3efd(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a18_0x5b3efd(Text,{'color':_0x5c13cb(0xf7),'children':'!\x20No\x20menu\x20asset\x20links\x20found'})});if(_0x3689f0==='need-confirm')return a18_0x57250a(Box,{'flexDirection':_0x5c13cb(0xe7),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x5b3efd(InputCdnAsset,{'jsCdnUrl':_0x2ec9ea,'cssCdnUrl':_0x30f7a6}),a18_0x5b3efd(Box,{'marginTop':0x1,'flexDirection':_0x5c13cb(0xe7),'children':[{'label':_0x5c13cb(0x111),'value':'ok'},{'label':_0x5c13cb(0x104),'value':_0x5c13cb(0x113)}][_0x5c13cb(0x110)](_0x52a21e=>a18_0x57250a(Text,{'color':_0x369b35===_0x52a21e[_0x5c13cb(0x10c)]?_0x5c13cb(0xf7):undefined,'children':[_0x369b35===_0x52a21e[_0x5c13cb(0x10c)]?'>\x20':'\x20\x20',_0x52a21e[_0x5c13cb(0x108)]]},_0x52a21e[_0x5c13cb(0x10c)]))})]});if(_0x3689f0==='creating')return a18_0x57250a(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x5b3efd(InputCdnAsset,{'jsCdnUrl':_0x2ec9ea,'cssCdnUrl':_0x30f7a6}),a18_0x57250a(Box,{'marginTop':0x1,'children':[a18_0x5b3efd(a18_0x1c7254,{'type':_0x5c13cb(0xec)}),a18_0x5b3efd(Text,{'children':_0x5c13cb(0xef)})]})]});if(_0x3689f0===_0x5c13cb(0xe8))return a18_0x57250a(Box,{'flexDirection':_0x5c13cb(0xe7),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x5b3efd(InputCdnAsset,{'jsCdnUrl':_0x2ec9ea,'cssCdnUrl':_0x30f7a6}),a18_0x5b3efd(Box,{'marginTop':0x1,'children':a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x5c13cb(0x103)})})]});return a18_0x57250a(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x57250a(Box,{'marginTop':0x1,'flexDirection':'column','children':[a18_0x5b3efd(Text,{'color':_0x5c13cb(0x106),'children':'*\x20Enter\x20new\x20asset\x20URLs'}),_0x2ec9ea?a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'color':_0x5c13cb(0x107),'children':['\x20\x20',_0x5c13cb(0xf5)]}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x2ec9ea})]}):_0x3689f0===_0x5c13cb(0xf2)&&a18_0x57250a(a18_0x854b00,{'children':[a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'children':['\x20\x20','JS\x20URL:\x20']}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x596e8f}),_0x331dc2&&a18_0x57250a(Text,{'color':'red','children':[_0x5c13cb(0xf1),_0x331dc2]})]}),!_0x331dc2&&a18_0x5b3efd(Box,{'children':a18_0x57250a(Text,{'color':_0x5c13cb(0x107),'children':['\x20\x20','Enter\x20project\x20JS\x20asset\x20URL\x20(https://...)']})})]}),_0x30f7a6?a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'children':['\x20\x20',_0x5c13cb(0xee)]}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x30f7a6})]}):_0x3689f0===_0x5c13cb(0x109)&&a18_0x57250a(a18_0x854b00,{'children':[a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'children':['\x20\x20',_0x5c13cb(0xee)]}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x596e8f}),_0x331dc2&&a18_0x57250a(Text,{'color':'red','children':[_0x5c13cb(0xf1),_0x331dc2]})]}),!_0x331dc2&&a18_0x5b3efd(Box,{'children':a18_0x57250a(Text,{'color':_0x5c13cb(0x107),'children':['\x20\x20',_0x5c13cb(0xf3)]})})]})]})]});}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a20_0x27fb49=a20_0x5e41;function a20_0x3d72(){const _0x367e19=['application/json','5071416bLuvPT','error','info','\x20\x20\x202.\x20Set\x20default:\x20rabetbase\x20config\x20set\x20app\x20<app-code>','import','227559iFkuDS','No\x20AppCode\x20provided\x20and\x20no\x20default\x20configured','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','json','\x20\x20\x201.\x20Specify\x20directly:\x20rabetbase\x20api\x20pull\x20<app-code>','5025921aItFAz','stringify','success','label','10524vrfKwQ','Menu\x20assets\x20synced:\x20','POST','errorCode','/smartapi/menu/update','resources','sdk-demo','update-menu-cdn-url','path','Failed\x20to\x20update\x20menu\x20assets:\x20','21080064vFxYkT','1195abFQjD','SdkDemo1','367896ifGdPV','log','!\x20Please\x20use\x20one\x20of\x20the\x20following:','data','status','Error','5970992aJulRp'];a20_0x3d72=function(){return _0x367e19;};return a20_0x3d72();}(function(_0x5a980f,_0x59332b){const _0x1a3bde=a20_0x5e41,_0x2ec9a9=_0x5a980f();while(!![]){try{const _0xfd09ea=-parseInt(_0x1a3bde(0x1c4))/0x1+-parseInt(_0x1a3bde(0x1b7))/0x2+-parseInt(_0x1a3bde(0x1c9))/0x3+parseInt(_0x1a3bde(0x1bd))/0x4+parseInt(_0x1a3bde(0x1b5))/0x5*(-parseInt(_0x1a3bde(0x1cd))/0x6)+-parseInt(_0x1a3bde(0x1bf))/0x7+parseInt(_0x1a3bde(0x1b4))/0x8;if(_0xfd09ea===_0x59332b)break;else _0x2ec9a9['push'](_0x2ec9a9['shift']());}catch(_0x902d15){_0x2ec9a9['push'](_0x2ec9a9['shift']());}}}(a20_0x3d72,0xdb0e0));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a20_0x5e41(_0x16c9b6,_0x52cb62){_0x16c9b6=_0x16c9b6-0x1b3;const _0x3d72ef=a20_0x3d72();let _0x5e41dd=_0x3d72ef[_0x16c9b6];return _0x5e41dd;}import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a20_0x27fb49(0x1d4);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a20_0x27fb49(0x1b6),'path':a20_0x27fb49(0x1d3),'resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js',a20_0x27fb49(0x1c6)]});export async function updateMenuCdnUrl(_0x41e499){const _0x870aba=a20_0x27fb49,_0x21be19=config?.['appcode'];if(!_0x21be19){const _0x340691=_0x870aba(0x1c5);logger['error'](logLabel,_0x340691),console['error']('×\x20'+_0x340691),console[_0x870aba(0x1b8)](_0x870aba(0x1b9)),console[_0x870aba(0x1b8)](_0x870aba(0x1c8)),console[_0x870aba(0x1b8)](_0x870aba(0x1c2));return;}logger['info'](logLabel,'Updating\x20menu\x20asset\x20links:\x20'+_0x41e499['label']+'\x20('+_0x41e499[_0x870aba(0x1d5)]+')');const _0x184113={'id':_0x41e499['id'],'appCode':_0x21be19,'extend':{'loadScriptMode':_0x870aba(0x1c3),'resources':_0x41e499['resources']?JSON[_0x870aba(0x1ca)](_0x41e499[_0x870aba(0x1d2)]):undefined}},_0x454d6d=await fetch(getApiDomain()+_0x870aba(0x1d1),{'method':_0x870aba(0x1cf),'body':JSON[_0x870aba(0x1ca)](_0x184113),'headers':{'Content-Type':_0x870aba(0x1be),'Cookie':getCookie()}});if(!_0x454d6d['ok']){if(_0x454d6d['status']===0x191){const _0x308d8a='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger['error'](logLabel,_0x308d8a,{'status':_0x454d6d[_0x870aba(0x1bb)],'menu':_0x41e499[_0x870aba(0x1cc)]});throw new Error(_0x308d8a);}const _0x46d216=_0x870aba(0x1b3)+_0x454d6d[_0x870aba(0x1bb)];logger[_0x870aba(0x1c0)](logLabel,_0x46d216,{'menu':_0x41e499[_0x870aba(0x1cc)]});throw new Error(_0x46d216);}const _0x4fb496=await _0x454d6d[_0x870aba(0x1c7)]();if(!_0x4fb496[_0x870aba(0x1cb)]){const _0x1cf9a9=_0x870aba(0x1b3)+(_0x4fb496['errorMsg']||_0x870aba(0x1bc));logger[_0x870aba(0x1c0)](logLabel,_0x1cf9a9,{'errorCode':_0x4fb496[_0x870aba(0x1d0)],'errorMsg':_0x4fb496['errorMsg'],'menu':_0x41e499[_0x870aba(0x1cc)]});throw new Error(_0x1cf9a9);}logger[_0x870aba(0x1c1)](logLabel,_0x870aba(0x1ce)+_0x41e499[_0x870aba(0x1cc)],_0x4fb496[_0x870aba(0x1ba)]);}
|
package/lib/commands/api.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a29_0x2159e9=a29_0x54da;function a29_0x54da(_0x2a5765,_0x485a63){_0x2a5765=_0x2a5765-0x1b2;const _0xcd02e1=a29_0xcd02();let _0x54dadf=_0xcd02e1[_0x2a5765];return _0x54dadf;}(function(_0x2007bb,_0x31c611){const _0x5499ea=a29_0x54da,_0x12cf20=_0x2007bb();while(!![]){try{const _0x481f47=-parseInt(_0x5499ea(0x1c4))/0x1*(-parseInt(_0x5499ea(0x1d6))/0x2)+-parseInt(_0x5499ea(0x1e6))/0x3+-parseInt(_0x5499ea(0x1e7))/0x4*(-parseInt(_0x5499ea(0x1d4))/0x5)+-parseInt(_0x5499ea(0x1c2))/0x6*(parseInt(_0x5499ea(0x1e1))/0x7)+parseInt(_0x5499ea(0x1e5))/0x8+parseInt(_0x5499ea(0x1e3))/0x9+-parseInt(_0x5499ea(0x1d7))/0xa;if(_0x481f47===_0x31c611)break;else _0x12cf20['push'](_0x12cf20['shift']());}catch(_0x32df56){_0x12cf20['push'](_0x12cf20['shift']());}}}(a29_0xcd02,0x8722a));import{jsx as a29_0x16ec08}from'react/jsx-runtime';function a29_0xcd02(){const _0x42ab63=['trim','7xNMswp','filter','9285948VgOKBw','Use:\x20rabetbase\x20api\x20pull\x20--appcode\x20','6602000wazboB','2039175qddEtv','410452VNpIuP','Set\x20appcode:\x20`rabetbase\x20config\x20set\x20appcode\x20<code>`\x20or\x20pass\x20--appcode.','datasetcode','split','output','slice','repeat','api\x20(missing\x20subcommand:\x20list,\x20pull\x20or\x20doc)','\x1b[0m','\x1b[90m*\x20Using\x20configured\x20AppCode:\x20','parse','max','name','must\x20be\x20a\x20JSON\x20object','join','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','Positional\x20arguments\x20are\x20no\x20longer\x20supported\x20for\x20`api\x20pull`.','doc','Pull\x20API\x20config\x20and\x20generate\x20documentation','api\x20','246642mAMgej','log','1097csqOQZ','unknownCommand','configMissing','string','\x0a\x20\x20rabetbase\x20api\x20—\x20API\x20Operations\x0a\x0a\x20\x20USAGE\x0a\x20\x20\x20\x20rabetbase\x20api\x20list\x20[options]\x0a\x20\x20\x20\x20rabetbase\x20api\x20pull\x20[options]\x0a\x20\x20\x20\x20rabetbase\x20api\x20doc\x20\x20[options]\x0a\x0a\x20\x20OPTIONS\x0a\x20\x20\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20Specify\x20app\x20code\x0a\x20\x20\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20Output\x20directory\x20(pull:\x20./src/api/,\x20doc:\x20./docs)\x0a\x20\x20\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Environment\x20(daily\x20/\x20production)\x0a\x20\x20\x20\x20--datasetcode\x20<codes>\x20Dataset\x20codes\x20for\x20doc\x20(comma-separated,\x20doc\x20only)\x0a\x20\x20\x20\x20--params\x20<json>\x20\x20\x20\x20\x20\x20\x20Extra\x20params\x20JSON\x20(doc\x20only)\x0a\x0a\x20\x20EXAMPLES\x0a\x20\x20\x20\x20rabetbase\x20api\x20list\x0a\x20\x20\x20\x20rabetbase\x20api\x20list\x20--appcode\x20myapp\x0a\x20\x20\x20\x20rabetbase\x20api\x20pull\x0a\x20\x20\x20\x20rabetbase\x20api\x20pull\x20--appcode\x20myapp\x20--output\x20./api\x0a\x20\x20\x20\x20rabetbase\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x0a','No\x20models\x20found.','message','validation','help','appcode','\x20model(s)\x0a','min','Positional\x20arguments\x20are\x20no\x20longer\x20supported\x20for\x20`api\x20doc`.','env','key','params','45OXMZzJ','Key','20uBnrIE','15171630UnJuDq','padStart','Name','\x0a\x20\x20App:\x20','Invalid\x20--params:\x20','api','DatasetCode','length','Use:\x20rabetbase\x20api\x20doc\x20--appcode\x20'];a29_0xcd02=function(){return _0x42ab63;};return a29_0xcd02();}import{render}from'ink';import{ApiPullUI}from'../api/api-pull-ui.js';import{ApiDocUI}from'../api/api-doc-ui.js';import{fetchModelList}from'../api/fetch-model-list.js';import{getConfigAppCode}from'../utils/config.js';import{CliErrors}from'../errors.js';const API_HELP=a29_0x2159e9(0x1c8);export const apiCommand={'name':a29_0x2159e9(0x1dc),'description':a29_0x2159e9(0x1c0),async 'run'(_0x6d7bfc,_0x5099e1,_0x505b2c){const _0x4562f5=a29_0x2159e9,_0x30d7ec=_0x5099e1[0x0];if(_0x505b2c[_0x4562f5(0x1cc)]||!_0x30d7ec&&!_0x505b2c[_0x4562f5(0x1cc)]){console[_0x4562f5(0x1c3)](API_HELP);if(!_0x30d7ec&&!_0x505b2c[_0x4562f5(0x1cc)])throw CliErrors[_0x4562f5(0x1c5)](_0x4562f5(0x1b5));return;}if(_0x30d7ec==='list'){const _0x633c8f=getConfigAppCode(),_0x21e4ab=_0x505b2c['appcode']??_0x633c8f;if(!_0x21e4ab)throw CliErrors[_0x4562f5(0x1c6)](_0x4562f5(0x1e8));const {configArray:_0x15631d,count:_0x584021}=await fetchModelList(_0x21e4ab);if(_0x584021===0x0){console[_0x4562f5(0x1c3)](_0x4562f5(0x1c9));return;}const _0x33cb4f=Math[_0x4562f5(0x1cf)](0x28,Math[_0x4562f5(0x1b9)](0x4,..._0x15631d['map'](_0xa041e9=>_0xa041e9[_0x4562f5(0x1ba)][_0x4562f5(0x1de)]))),_0xee799f=Math[_0x4562f5(0x1cf)](0x24,Math[_0x4562f5(0x1b9)](0x3,..._0x15631d['map'](_0xa7cae7=>_0xa7cae7[_0x4562f5(0x1d2)][_0x4562f5(0x1de)]))),_0x3a8193=Math['min'](0x28,Math['max'](0x4,..._0x15631d['map'](_0x12447d=>_0x12447d['datasetCode']['length']))),_0x10d544=(_0x3afb7f,_0x17792f)=>_0x3afb7f[_0x4562f5(0x1b3)](0x0,_0x17792f)['padEnd'](_0x17792f),_0x36b217=(_0xfe821c,_0x4dd9e6,_0x3293fc,_0x3bf613)=>'\x20\x20'+String(_0xfe821c)[_0x4562f5(0x1d8)](0x6)+'\x20\x20'+_0x10d544(_0x4dd9e6,_0x33cb4f)+'\x20\x20'+_0x10d544(_0x3293fc,_0xee799f)+'\x20\x20'+_0x10d544(_0x3bf613,_0x3a8193);console[_0x4562f5(0x1c3)](_0x4562f5(0x1da)+_0x21e4ab+'\x20\x20|\x20\x20'+_0x584021+_0x4562f5(0x1ce)),console[_0x4562f5(0x1c3)](_0x36b217('ID',_0x4562f5(0x1d9),_0x4562f5(0x1d5),_0x4562f5(0x1dd))),console[_0x4562f5(0x1c3)]('\x20\x20'+'─'['repeat'](0x6)+'\x20\x20'+'─'[_0x4562f5(0x1b4)](_0x33cb4f)+'\x20\x20'+'─'[_0x4562f5(0x1b4)](_0xee799f)+'\x20\x20'+'─'[_0x4562f5(0x1b4)](_0x3a8193));for(const _0x37b3f8 of _0x15631d){console[_0x4562f5(0x1c3)](_0x36b217(_0x37b3f8['id'],_0x37b3f8[_0x4562f5(0x1ba)],_0x37b3f8[_0x4562f5(0x1d2)],_0x37b3f8['datasetCode']));}console[_0x4562f5(0x1c3)]();return;}if(_0x30d7ec==='pull'){if(_0x5099e1[0x1])throw CliErrors[_0x4562f5(0x1cb)](_0x4562f5(0x1be),_0x4562f5(0x1e4)+_0x5099e1[0x1]);const _0x392f4d=getConfigAppCode();let _0x2d3172=_0x505b2c['appcode'];const _0x5d7047=typeof _0x505b2c[_0x4562f5(0x1d1)]===_0x4562f5(0x1c7)?_0x505b2c['env']:undefined,_0x47672b=_0x505b2c[_0x4562f5(0x1b2)];if(!_0x2d3172&&!_0x392f4d)throw CliErrors[_0x4562f5(0x1c6)](_0x4562f5(0x1e8));_0x2d3172&&_0x392f4d&&_0x2d3172===_0x392f4d&&(console[_0x4562f5(0x1c3)]('\x1b[90m*\x20Using\x20configured\x20AppCode:\x20'+_0x2d3172+_0x4562f5(0x1b6)),_0x2d3172=undefined),render(a29_0x16ec08(ApiPullUI,{'appCode':_0x2d3172,'env':_0x5d7047,'output':_0x47672b}));}else{if(_0x30d7ec===_0x4562f5(0x1bf)){if(_0x5099e1[0x1])throw CliErrors['validation'](_0x4562f5(0x1d0),_0x4562f5(0x1df)+_0x5099e1[0x1]);const _0x5ac544=getConfigAppCode();let _0x431e60=_0x505b2c[_0x4562f5(0x1cd)];const _0x879ea2=typeof _0x505b2c[_0x4562f5(0x1d1)]==='string'?_0x505b2c[_0x4562f5(0x1d1)]:undefined,_0x135cd2=_0x505b2c[_0x4562f5(0x1b2)],_0x2ea43b=_0x505b2c[_0x4562f5(0x1d3)],_0x229eeb=_0x505b2c[_0x4562f5(0x1e9)];if(!_0x431e60&&!_0x5ac544)throw CliErrors[_0x4562f5(0x1c6)](_0x4562f5(0x1e8));_0x431e60&&_0x5ac544&&_0x431e60===_0x5ac544&&(console[_0x4562f5(0x1c3)](_0x4562f5(0x1b7)+_0x431e60+_0x4562f5(0x1b6)),_0x431e60=undefined);let _0x9d7614;if(_0x2ea43b)try{_0x9d7614=JSON[_0x4562f5(0x1b8)](_0x2ea43b);if(typeof _0x9d7614!=='object'||_0x9d7614===null||Array['isArray'](_0x9d7614))throw new Error(_0x4562f5(0x1bb));}catch(_0x1000a8){throw CliErrors[_0x4562f5(0x1cb)](_0x4562f5(0x1db)+(_0x1000a8 instanceof Error?_0x1000a8[_0x4562f5(0x1ca)]:String(_0x1000a8)),_0x4562f5(0x1bd));}let _0x57976d;if(_0x229eeb){const _0xf63c21=_0x229eeb[_0x4562f5(0x1ea)](',')['map'](_0x3b611a=>_0x3b611a[_0x4562f5(0x1e0)]())[_0x4562f5(0x1e2)](_0x204fba=>_0x204fba[_0x4562f5(0x1de)]>0x0);if(_0xf63c21[_0x4562f5(0x1de)]===0x0)throw CliErrors[_0x4562f5(0x1cb)]('--datasetcode\x20cannot\x20be\x20empty.');console[_0x4562f5(0x1c3)]('\x1b[90m*\x20Generating\x20docs\x20for:\x20'+_0xf63c21[_0x4562f5(0x1bc)](',\x20')+'\x1b[0m'),_0x57976d=_0xf63c21;}render(a29_0x16ec08(ApiDocUI,{'appCode':_0x431e60,'env':_0x879ea2,'output':_0x135cd2,'extraParams':_0x9d7614,'datasetCodes':_0x57976d}));}else{console[_0x4562f5(0x1c3)](API_HELP);throw CliErrors[_0x4562f5(0x1c5)](_0x4562f5(0x1c1)+_0x30d7ec);}}}};
|
package/lib/commands/menu.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a55_0x223cad=a55_0x5c85;(function(_0x27c9c4,_0x37a245){const _0x3e5a54=a55_0x5c85,_0x80694=_0x27c9c4();while(!![]){try{const _0x46b845=parseInt(_0x3e5a54(0x1a9))/0x1+parseInt(_0x3e5a54(0x1ab))/0x2+-parseInt(_0x3e5a54(0x1a3))/0x3*(parseInt(_0x3e5a54(0x1af))/0x4)+-parseInt(_0x3e5a54(0x1a5))/0x5*(-parseInt(_0x3e5a54(0x1aa))/0x6)+parseInt(_0x3e5a54(0x1a8))/0x7+-parseInt(_0x3e5a54(0x1ae))/0x8*(-parseInt(_0x3e5a54(0x19e))/0x9)+-parseInt(_0x3e5a54(0x1a0))/0xa*(parseInt(_0x3e5a54(0x19b))/0xb);if(_0x46b845===_0x37a245)break;else _0x80694['push'](_0x80694['shift']());}catch(_0x1c0c79){_0x80694['push'](_0x80694['shift']());}}}(a55_0x5cb7,0x22897));function a55_0x5c85(_0x4a2825,_0x2eeb84){_0x4a2825=_0x4a2825-0x19b;const _0x5cb724=a55_0x5cb7();let _0x5c8561=_0x5cb724[_0x4a2825];return _0x5c8561;}function a55_0x5cb7(){const _0x8687e8=['70101xVjvUI','menu-update-cdn','750azcZfV','menu-sync','cwd','6RLYZbh','info','121885mfYLxf','update','menu','941024WIapkT','136047CZpggk','12OpyqoN','487062dPrugW','setLogPath','执行更新菜单\x20CDN\x20资源命令','144DYJqOi','58456KffcmB','78067zqsrpF','Sync\x20menu\x20and\x20update\x20CDN\x20resources','logger'];a55_0x5cb7=function(){return _0x8687e8;};return a55_0x5cb7();}import{jsx as a55_0x236db7}from'react/jsx-runtime';import{render}from'ink';import{AppMenuSyncUI}from'../app-menu/app-menu-sync-ui.js';import{AppMenuUpdateCdn}from'../app-menu-update-cdn/main.js';export const menuCommand={'name':a55_0x223cad(0x1a7),'description':a55_0x223cad(0x19c),async 'run'(_0x3f114a,_0x2150db,_0x2f897b){const _0x55d8c4=a55_0x223cad,_0x2101e8=_0x2150db[0x0];_0x2101e8===_0x55d8c4(0x1a6)?(_0x3f114a[_0x55d8c4(0x19d)][_0x55d8c4(0x1ac)](process[_0x55d8c4(0x1a2)]()),_0x3f114a[_0x55d8c4(0x19d)][_0x55d8c4(0x1a4)](_0x55d8c4(0x19f),_0x55d8c4(0x1ad)),render(a55_0x236db7(AppMenuUpdateCdn,{}))):(_0x3f114a[_0x55d8c4(0x19d)][_0x55d8c4(0x1ac)](process['cwd']()),_0x3f114a['logger'][_0x55d8c4(0x1a4)](_0x55d8c4(0x1a1),'同步菜单命令'),render(a55_0x236db7(AppMenuSyncUI,{})));}};
|
|
File without changes
|