@lovrabet/rabetbase-cli 2.1.1 → 2.1.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/lib/commands/api/doc.js +0 -1
- package/lib/commands/app/remote.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x16cb4b=a158_0x554b;function a158_0x554b(_0x183df4,_0x35fbef){_0x183df4=_0x183df4-0x125;const _0x3eb6dc=a158_0x3eb6();let _0x554b3f=_0x3eb6dc[_0x183df4];return _0x554b3f;}(function(_0x44c725,_0x52c460){const _0x997efc=a158_0x554b,_0x45e1f5=_0x44c725();while(!![]){try{const _0x2e99f5=-parseInt(_0x997efc(0x14f))/0x1*(parseInt(_0x997efc(0x158))/0x2)+-parseInt(_0x997efc(0x149))/0x3*(parseInt(_0x997efc(0x12b))/0x4)+parseInt(_0x997efc(0x12e))/0x5*(parseInt(_0x997efc(0x160))/0x6)+parseInt(_0x997efc(0x156))/0x7+-parseInt(_0x997efc(0x145))/0x8+-parseInt(_0x997efc(0x15a))/0x9+-parseInt(_0x997efc(0x136))/0xa*(-parseInt(_0x997efc(0x137))/0xb);if(_0x2e99f5===_0x52c460)break;else _0x45e1f5['push'](_0x45e1f5['shift']());}catch(_0x4cd9b2){_0x45e1f5['push'](_0x45e1f5['shift']());}}}(a158_0x3eb6,0x68269));import a158_0x4599b7 from'node:fs';import a158_0x218c53 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a158_0x3eb6(){const _0x5299f8=['push','replaceApiContent','toComponentName','endsWith','465WSsCTS','toUpperCase','getMinutes','tableName','datasetCode:\x20\x22','extname','模板内容替换完成','5220488fgLmcw','processDirectory','2530ZEXmTu','api','5192793PpXOEy','processFile','copyFile','.css','readFile','alias','114EwSCMx','getDate','map','pad','padStart','now','tableName:\x20\x22','success','isFile','toDisplayTitle','.jsx','getHours','split','join','name','promises','\x0a\x20\x20\x20\x20{\x20','2612caJRdi','.scss','template','35345fvIgUj','name:\x20\x22','LOVRABET','message','slice','.md','replace','toLowerCase','20FxkMdo','10553477FstURk','getSeconds','\x20},','charAt','formatLocalTimestamp','isDirectory','processTemplate','includes','mkdir','alias:\x20\x22','模板内容替换失败','.ts','.tpl','getMonth','6104528NTwSfA','default','开始处理模板内容替换','readdir','2040bhPtxV','replaceContent'];a158_0x3eb6=function(){return _0x5299f8;};return a158_0x3eb6();}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x3560f9){const _0x196a74=a158_0x554b;return String(_0x3560f9)[_0x196a74(0x164)](0x2,'0');}static[a158_0x16cb4b(0x13b)](_0x5440a8){const _0x13281e=a158_0x16cb4b,_0x382b5a=_0x5440a8['getFullYear'](),_0x4175ba=this[_0x13281e(0x163)](_0x5440a8[_0x13281e(0x144)]()+0x1),_0x2b681b=this[_0x13281e(0x163)](_0x5440a8[_0x13281e(0x161)]()),_0x33206c=this[_0x13281e(0x163)](_0x5440a8[_0x13281e(0x125)]()),_0x1291d8=this[_0x13281e(0x163)](_0x5440a8[_0x13281e(0x151)]()),_0x343a7d=this['pad'](_0x5440a8[_0x13281e(0x138)]());return{'createdAt':_0x382b5a+'-'+_0x4175ba+'-'+_0x2b681b+'\x20'+_0x33206c+':'+_0x1291d8+':'+_0x343a7d,'createdDate':_0x382b5a+'-'+_0x4175ba+'-'+_0x2b681b,'createdTime':_0x33206c+':'+_0x1291d8+':'+_0x343a7d};}static[a158_0x16cb4b(0x14d)](_0x46fae9){const _0x492679=a158_0x16cb4b,_0x123471=_0x46fae9[_0x492679(0x126)]('/')['pop']()||_0x46fae9;return _0x123471[_0x492679(0x126)]('-')[_0x492679(0x162)](_0x52490c=>_0x52490c[_0x492679(0x13a)](0x0)[_0x492679(0x150)]()+_0x52490c[_0x492679(0x132)](0x1)[_0x492679(0x135)]())[_0x492679(0x127)]('');}static[a158_0x16cb4b(0x169)](_0xfda19e){const _0x57992e=a158_0x16cb4b,_0x1defa1=_0xfda19e[_0x57992e(0x126)]('/')['pop']()||_0xfda19e;return _0x1defa1['split']('-')[_0x57992e(0x162)](_0x57ff69=>_0x57ff69[_0x57992e(0x13a)](0x0)['toUpperCase']()+_0x57ff69[_0x57992e(0x132)](0x1)[_0x57992e(0x135)]())[_0x57992e(0x127)]('\x20');}static[a158_0x16cb4b(0x14a)](_0x146bf4,_0x2af2ed,_0xf8a5a9){const _0x3eea2b=a158_0x16cb4b,_0x3bfbd8=this[_0x3eea2b(0x14d)](_0x2af2ed),_0x1fc5d5=this['toDisplayTitle'](_0x2af2ed),{createdAt:_0x2aeb58,createdDate:_0x3d1246,createdTime:_0x6322e4}=this[_0x3eea2b(0x13b)](new Date());let _0x40c8c9=_0x146bf4[_0x3eea2b(0x134)](/\{CliVersion\}/g,CLI_VERSION)[_0x3eea2b(0x134)](/\{ComponentName\}/g,_0x3bfbd8)[_0x3eea2b(0x134)](/\{DisplayTitle\}/g,_0x1fc5d5)['replace'](/\{PageName\}/g,_0x2af2ed)[_0x3eea2b(0x134)](/\{TemplateName\}/g,_0xf8a5a9)[_0x3eea2b(0x134)](/\{CreatedAt\}/g,_0x2aeb58)[_0x3eea2b(0x134)](/\{CreatedDate\}/g,_0x3d1246)[_0x3eea2b(0x134)](/\{CreatedTime\}/g,_0x6322e4);return _0x40c8c9;}static[a158_0x16cb4b(0x14c)](_0x34dcbd,_0x16d7a7,_0x1d608e,_0x51b6ad,_0x327891,_0x246a6f,_0x5833bb,_0x1af395){const _0x5dd594=a158_0x16cb4b,_0x4a85ec=new Date(),_0x96bbae=_0x4a85ec['toISOString'](),_0x115fe0=_0x1d608e[_0x5dd594(0x162)](_0x320d49=>{const _0x4899c2=_0x5dd594,_0x3e5f69=[_0x4899c2(0x153)+_0x320d49['datasetCode']+'\x22',_0x4899c2(0x166)+_0x320d49[_0x4899c2(0x152)]+'\x22',_0x4899c2(0x12f)+_0x320d49[_0x4899c2(0x128)]+'\x22'];return _0x320d49[_0x4899c2(0x15f)]&&_0x3e5f69[_0x4899c2(0x14b)](_0x4899c2(0x140)+_0x320d49[_0x4899c2(0x15f)]+'\x22'),_0x4899c2(0x12a)+_0x3e5f69[_0x4899c2(0x127)](',\x20')+_0x4899c2(0x139);})['join'](''),_0x5af18f=_0x51b6ad||_0x1d608e[0x0]?.[_0x5dd594(0x15f)]||'YourModel';let _0x2040cb=_0x34dcbd[_0x5dd594(0x134)](/\{AppCode\}/g,_0x16d7a7)[_0x5dd594(0x134)](/\{ModelConfigs\}/g,_0x115fe0)[_0x5dd594(0x134)](/\{ExampleModelName\}/g,_0x5af18f)[_0x5dd594(0x134)](/\{ApiFileName\}/g,_0x327891||_0x5dd594(0x159))[_0x5dd594(0x134)](/\{ConfigName\}/g,_0x246a6f||_0x5dd594(0x146))['replace'](/\{ClientConfigParam\}/g,_0x5833bb||'')['replace'](/\{VarPrefix\}/g,_0x1af395||_0x5dd594(0x130))['replace'](/\{CreatedAt\}/g,_0x96bbae);return _0x2040cb;}static async[a158_0x16cb4b(0x13d)](_0x52739f,_0x4d6025,_0x22a10e,_0x1e1420,_0x1242a8=!![]){const _0x4982ea=a158_0x16cb4b,_0x2c07ed=Date[_0x4982ea(0x165)]();try{_0x1242a8&&logger['info']('template',_0x4982ea(0x147),{'templatePath':_0x52739f,'targetPath':_0x4d6025,'pageName':_0x22a10e,'templateName':_0x1e1420});await a158_0x4599b7[_0x4982ea(0x129)]['mkdir'](_0x4d6025,{'recursive':!![]}),await this[_0x4982ea(0x157)](_0x52739f,_0x4d6025,_0x22a10e,_0x1e1420);if(_0x1242a8){const _0x54ec71=Date[_0x4982ea(0x165)]()-_0x2c07ed;logger[_0x4982ea(0x167)](_0x4982ea(0x12d),_0x4982ea(0x155),_0x54ec71,{'pageName':_0x22a10e,'templateName':_0x1e1420});}}catch(_0x3e1c8c){if(_0x1242a8){const _0x164b27=Date[_0x4982ea(0x165)]()-_0x2c07ed;logger['error'](_0x4982ea(0x12d),_0x4982ea(0x141),{'templatePath':_0x52739f,'targetPath':_0x4d6025,'pageName':_0x22a10e,'templateName':_0x1e1420,'error':_0x3e1c8c instanceof Error?_0x3e1c8c[_0x4982ea(0x131)]:String(_0x3e1c8c),'duration':_0x164b27});}throw _0x3e1c8c;}}static async[a158_0x16cb4b(0x157)](_0x3f004f,_0x1a35f4,_0x57e79d,_0x31c237){const _0x3ed8ca=a158_0x16cb4b,_0x4a936b=await a158_0x4599b7[_0x3ed8ca(0x129)][_0x3ed8ca(0x148)](_0x3f004f,{'withFileTypes':!![]});for(const _0x46031b of _0x4a936b){const _0x539382=a158_0x218c53[_0x3ed8ca(0x127)](_0x3f004f,_0x46031b[_0x3ed8ca(0x128)]);let _0x335a9c=a158_0x218c53[_0x3ed8ca(0x127)](_0x1a35f4,_0x46031b[_0x3ed8ca(0x128)]);_0x46031b[_0x3ed8ca(0x128)][_0x3ed8ca(0x14e)]('.tpl')&&(_0x335a9c=a158_0x218c53['join'](_0x1a35f4,_0x46031b[_0x3ed8ca(0x128)][_0x3ed8ca(0x134)](/\.tpl$/,'')));if(_0x46031b[_0x3ed8ca(0x13c)]())await a158_0x4599b7[_0x3ed8ca(0x129)][_0x3ed8ca(0x13f)](_0x335a9c,{'recursive':!![]}),await this[_0x3ed8ca(0x157)](_0x539382,_0x335a9c,_0x57e79d,_0x31c237);else _0x46031b[_0x3ed8ca(0x168)]()&&await this[_0x3ed8ca(0x15b)](_0x539382,_0x335a9c,_0x57e79d,_0x31c237);}}static async[a158_0x16cb4b(0x15b)](_0x1a1971,_0x2b8eda,_0x47b0ac,_0x1f8e19){const _0x30ca1e=a158_0x16cb4b,_0x50dc69=a158_0x218c53[_0x30ca1e(0x154)](_0x1a1971)[_0x30ca1e(0x135)]();_0x1a1971['endsWith'](_0x30ca1e(0x143))&&(_0x2b8eda=_0x2b8eda[_0x30ca1e(0x134)](/\.tpl$/,''));const _0x55a5e7=['.tsx',_0x30ca1e(0x142),_0x30ca1e(0x16a),'.js','.json',_0x30ca1e(0x133),_0x30ca1e(0x15d),_0x30ca1e(0x12c),_0x30ca1e(0x143)];if(_0x55a5e7[_0x30ca1e(0x13e)](_0x50dc69)||_0x1a1971[_0x30ca1e(0x14e)](_0x30ca1e(0x143))){const _0x13551f=await a158_0x4599b7[_0x30ca1e(0x129)][_0x30ca1e(0x15e)](_0x1a1971,'utf8'),_0x58c4c6=this[_0x30ca1e(0x14a)](_0x13551f,_0x47b0ac,_0x1f8e19);await a158_0x4599b7[_0x30ca1e(0x129)]['writeFile'](_0x2b8eda,_0x58c4c6,'utf8');}else await a158_0x4599b7[_0x30ca1e(0x129)][_0x30ca1e(0x15c)](_0x1a1971,_0x2b8eda);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a159_0xb3ca(_0x3e1a28,_0x533c5c){_0x3e1a28=_0x3e1a28-0x105;var _0x3376eb=a159_0x3376();var _0xb3ca3c=_0x3376eb[_0x3e1a28];return _0xb3ca3c;}(function(_0x2fe1c8,_0x2cabe0){var _0xa09f3=a159_0xb3ca,_0x6bf954=_0x2fe1c8();while(!![]){try{var _0x43b82e=parseInt(_0xa09f3(0x10b))/0x1*(parseInt(_0xa09f3(0x105))/0x2)+-parseInt(_0xa09f3(0x108))/0x3*(parseInt(_0xa09f3(0x109))/0x4)+-parseInt(_0xa09f3(0x10a))/0x5*(parseInt(_0xa09f3(0x10c))/0x6)+parseInt(_0xa09f3(0x106))/0x7+-parseInt(_0xa09f3(0x10e))/0x8+parseInt(_0xa09f3(0x10d))/0x9+parseInt(_0xa09f3(0x107))/0xa;if(_0x43b82e===_0x2cabe0)break;else _0x6bf954['push'](_0x6bf954['shift']());}catch(_0x1ddef5){_0x6bf954['push'](_0x6bf954['shift']());}}}(a159_0x3376,0x8a676));function a159_0x3376(){var _0x1a5fda=['80997TpKvvQ','27131470vzQOLd','9DiOYPE','1220156obucfm','2055HymbNh','1wqSoKD','13302KAvElc','4145031tpcLiO','7667424mqMrcG','332714SuvooQ'];a159_0x3376=function(){return _0x1a5fda;};return a159_0x3376();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3543bd,_0x571a9f){var _0x48294f=a160_0x80b2,_0x419285=_0x3543bd();while(!![]){try{var _0x2c23bd=parseInt(_0x48294f(0x111))/0x1*(parseInt(_0x48294f(0x10f))/0x2)+parseInt(_0x48294f(0x10d))/0x3*(-parseInt(_0x48294f(0x109))/0x4)+-parseInt(_0x48294f(0x10b))/0x5*(parseInt(_0x48294f(0x112))/0x6)+parseInt(_0x48294f(0x10a))/0x7+parseInt(_0x48294f(0x10c))/0x8+parseInt(_0x48294f(0x10e))/0x9*(-parseInt(_0x48294f(0x110))/0xa)+parseInt(_0x48294f(0x108))/0xb;if(_0x2c23bd===_0x571a9f)break;else _0x419285['push'](_0x419285['shift']());}catch(_0x5d7d63){_0x419285['push'](_0x419285['shift']());}}}(a160_0x38b6,0x47a6c));function a160_0x38b6(){var _0x3ac43f=['13123242jkmOEp','359672gKnoFt','3272437GORKWF','5Uwwizb','569984zGThVZ','18BjhPxK','293121ycuWvA','6028QJTRbz','140ZVgHEg','8kqAHfH','2801490VSfmFN'];a160_0x38b6=function(){return _0x3ac43f;};return a160_0x38b6();}function a160_0x80b2(_0x5d8805,_0x2825d8){_0x5d8805=_0x5d8805-0x108;var _0x38b6aa=a160_0x38b6();var _0x80b25=_0x38b6aa[_0x5d8805];return _0x80b25;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x5b7e46,_0x49e695){setActiveCookie(_0x5b7e46);try{return await _0x49e695();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3910ac,_0x49f8a7){var _0x36b05d=a161_0xe75a,_0x2ac22c=_0x3910ac();while(!![]){try{var _0x4120ce=parseInt(_0x36b05d(0xcb))/0x1*(parseInt(_0x36b05d(0xcd))/0x2)+-parseInt(_0x36b05d(0xc8))/0x3*(parseInt(_0x36b05d(0xd1))/0x4)+-parseInt(_0x36b05d(0xc7))/0x5+parseInt(_0x36b05d(0xc6))/0x6*(-parseInt(_0x36b05d(0xce))/0x7)+-parseInt(_0x36b05d(0xcc))/0x8*(parseInt(_0x36b05d(0xd0))/0x9)+-parseInt(_0x36b05d(0xd2))/0xa+parseInt(_0x36b05d(0xc9))/0xb;if(_0x4120ce===_0x49f8a7)break;else _0x2ac22c['push'](_0x2ac22c['shift']());}catch(_0x2533df){_0x2ac22c['push'](_0x2ac22c['shift']());}}}(a161_0x42ee,0x60983));function a161_0xe75a(_0x1f2b9f,_0x4355b6){_0x1f2b9f=_0x1f2b9f-0xc6;var _0x42ee9b=a161_0x42ee();var _0xe75a51=_0x42ee9b[_0x1f2b9f];return _0xe75a51;}function a161_0x42ee(){var _0x39e801=['1222746wNXILK','16681544lmbeqv','write','623509QDbjcn','344LTHeFT','2vjQGaw','1522507dSIYEs','stderr','100161IBZXXu','4PQglYG','3918950YOvyHO','12uxHGyO','156680NLirrg'];a161_0x42ee=function(){return _0x39e801;};return a161_0x42ee();}export function writeCliSideChannelLine(_0x5eb575){var _0x3768f2=a161_0xe75a;process[_0x3768f2(0xcf)][_0x3768f2(0xca)](_0x5eb575+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.1.1",
|
|
3
|
+
"version": "2.1.2-beta.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@inquirer/prompts": "^8.3.2",
|
|
55
|
+
"@lovrabet/cli-framework": "1.0.1",
|
|
55
56
|
"@lovrabet/otel-logger": "1.0.1-beta.2",
|
|
56
57
|
"@types/winston": "^2.4.4",
|
|
57
58
|
"chalk": "^5.6.2",
|
|
@@ -76,4 +77,4 @@
|
|
|
76
77
|
"typescript": "latest",
|
|
77
78
|
"vitest": "^3.2.4"
|
|
78
79
|
}
|
|
79
|
-
}
|
|
80
|
+
}
|
package/lib/commands/api/doc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a12_0x2953d8=a12_0x15b1;(function(_0x1882f0,_0x4bb414){const _0x2038a4=a12_0x15b1,_0x37292f=_0x1882f0();while(!![]){try{const _0x285ce7=-parseInt(_0x2038a4(0x1e3))/0x1*(-parseInt(_0x2038a4(0x1c3))/0x2)+-parseInt(_0x2038a4(0x1ee))/0x3*(-parseInt(_0x2038a4(0x1f6))/0x4)+parseInt(_0x2038a4(0x1df))/0x5*(-parseInt(_0x2038a4(0x1c0))/0x6)+parseInt(_0x2038a4(0x1c8))/0x7*(-parseInt(_0x2038a4(0x1d9))/0x8)+-parseInt(_0x2038a4(0x1fc))/0x9*(-parseInt(_0x2038a4(0x1d7))/0xa)+-parseInt(_0x2038a4(0x1ce))/0xb*(parseInt(_0x2038a4(0x1f4))/0xc)+parseInt(_0x2038a4(0x1c4))/0xd;if(_0x285ce7===_0x4bb414)break;else _0x37292f['push'](_0x37292f['shift']());}catch(_0x10ee09){_0x37292f['push'](_0x37292f['shift']());}}}(a12_0x2aa4,0xef010));import a12_0x4b9309 from'ora';function a12_0x15b1(_0x2a5a62,_0x173104){_0x2a5a62=_0x2a5a62-0x1bb;const _0x2aa468=a12_0x2aa4();let _0x15b141=_0x2aa468[_0x2a5a62];return _0x15b141;}import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';function a12_0x2aa4(){const _0x35a594=['40hipnDX','\x20succeeded,\x20','some','\x1b[0m','7jRRftx','isArray','join','api','\x20dataset(s)\x1b[0m','stdout','appCode','object','\x20doc(s)\x20in\x20','\x20doc(s)\x20failed','datasetcode','1956PSwoQN','succeed','filter','!\x20No\x20datasets\x20found.','fail','datasetName','6105828teEHCh','✓\x20Generated\x20','9748hxhGTd','Invalid\x20--params:\x20','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','Doc\x20generation:\x20','params','parse','3113307KObWxf','\x1b[90m*\x20Filtered\x20','\x0d\x20\x20[','doc','...','cookie','string','datasetCode','855426tFJcwc','start','--datasetcode\x20cannot\x20be\x20empty.','124130PhznTz','26179712nMOiTt','padStart','str','message','7BOSfqA','Output\x20directory\x20(default:\x20./docs)','must\x20be\x20a\x20JSON\x20object','Fetching\x20dataset\x20list\x20for\x20','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','has','22zHEGvd','Fetched\x20','\x20dataset(s)','\x20file(s)','map','length','output','./docs','\x20\x20•\x20','20qlKVsd','):\x20','12735064cQXLTs','\x20of\x20','validation','split','success','write'];a12_0x2aa4=function(){return _0x35a594;};return a12_0x2aa4();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiDoc={'service':a12_0x2953d8(0x1e6),'command':a12_0x2953d8(0x1bb),'description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':a12_0x2953d8(0x1de),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a12_0x2953d8(0x1d4),'type':a12_0x2953d8(0x1be),'description':a12_0x2953d8(0x1c9)},{'name':a12_0x2953d8(0x1ed),'type':a12_0x2953d8(0x1be),'description':'Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for'},{'name':a12_0x2953d8(0x1fa),'type':'string','description':a12_0x2953d8(0x1f8)}],async 'execute'(_0x4ad663){const _0x5f540d=a12_0x2953d8,_0x445018=_0x4ad663['str']('output')||_0x5f540d(0x1d5),_0x38480a=_0x4ad663[_0x5f540d(0x1c6)](_0x5f540d(0x1ed)),_0xeb8e1e=_0x4ad663[_0x5f540d(0x1c6)](_0x5f540d(0x1fa));let _0x27bd64;if(_0xeb8e1e)try{_0x27bd64=JSON[_0x5f540d(0x1fb)](_0xeb8e1e);if(typeof _0x27bd64!==_0x5f540d(0x1ea)||_0x27bd64===null||Array[_0x5f540d(0x1e4)](_0x27bd64))throw new Error(_0x5f540d(0x1ca));}catch(_0xc0374c){throw CliErrors[_0x5f540d(0x1db)](_0x5f540d(0x1f7)+(_0xc0374c instanceof Error?_0xc0374c[_0x5f540d(0x1c7)]:String(_0xc0374c)),_0x5f540d(0x1cc));}let _0x407fbb;if(_0x38480a){const _0x4033a7=_0x38480a[_0x5f540d(0x1dc)](',')[_0x5f540d(0x1d2)](_0xa4d62c=>_0xa4d62c['trim']())[_0x5f540d(0x1f0)](_0x59f52e=>_0x59f52e[_0x5f540d(0x1d3)]>0x0);if(_0x4033a7[_0x5f540d(0x1d3)]===0x0)throw CliErrors['validation'](_0x5f540d(0x1c2));_0x407fbb=new Set(_0x4033a7),writeCliSideChannelLine('\x1b[90m*\x20Generating\x20docs\x20for:\x20'+_0x4033a7[_0x5f540d(0x1e5)](',\x20')+'\x1b[0m');}const _0x296c90=a12_0x4b9309(_0x5f540d(0x1cb)+_0x4ad663['appCode']+_0x5f540d(0x1bc))[_0x5f540d(0x1c1)]();let _0x4d4d94;try{({configArray:_0x4d4d94}=await fetchModelList(_0x4ad663[_0x5f540d(0x1e9)],_0x4ad663['cookie']),_0x296c90[_0x5f540d(0x1ef)](_0x5f540d(0x1cf)+_0x4d4d94[_0x5f540d(0x1d3)]+_0x5f540d(0x1d0)));}catch(_0x556379){_0x296c90[_0x5f540d(0x1f2)]('Failed\x20to\x20fetch\x20datasets');throw _0x556379;}if(_0x4d4d94[_0x5f540d(0x1d3)]===0x0)return writeCliSideChannelLine(_0x5f540d(0x1f1)),{'ok':!![]};let _0x9f1d70=_0x4d4d94;if(_0x407fbb){_0x9f1d70=_0x4d4d94[_0x5f540d(0x1f0)](_0x1f1cf2=>_0x407fbb[_0x5f540d(0x1cd)](_0x1f1cf2[_0x5f540d(0x1bf)]));const _0x5c6f59=[..._0x407fbb][_0x5f540d(0x1f0)](_0x385923=>!_0x4d4d94[_0x5f540d(0x1e1)](_0x2b483a=>_0x2b483a[_0x5f540d(0x1bf)]===_0x385923));_0x5c6f59[_0x5f540d(0x1d3)]>0x0&&writeCliSideChannelLine('\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20'+_0x5c6f59['join'](',\x20')+_0x5f540d(0x1e2));if(_0x9f1d70[_0x5f540d(0x1d3)]===0x0)throw CliErrors['validation']('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x407fbb][_0x5f540d(0x1e5)](',\x20'));writeCliSideChannelLine(_0x5f540d(0x1fd)+_0x9f1d70[_0x5f540d(0x1d3)]+_0x5f540d(0x1da)+_0x4d4d94['length']+_0x5f540d(0x1e7));}let _0x5160f5=0x0;const _0x15578e=await generateDatasetDocs(_0x9f1d70,_0x4ad663[_0x5f540d(0x1e9)],_0x4ad663[_0x5f540d(0x1bd)],_0x445018,(_0x2e76bc,_0x27036b,_0x372c78)=>{const _0x3f7172=_0x5f540d;_0x5160f5=_0x2e76bc,process[_0x3f7172(0x1e8)][_0x3f7172(0x1de)](_0x3f7172(0x1fe)+String(_0x2e76bc)[_0x3f7172(0x1c5)](String(_0x27036b)[_0x3f7172(0x1d3)])+'/'+_0x27036b+']\x20'+_0x372c78+'.md');},_0x27bd64);if(_0x5160f5>0x0)process[_0x5f540d(0x1e8)]['write']('\x0a');const _0x137bff=_0x15578e[_0x5f540d(0x1f0)](_0x3bc769=>_0x3bc769[_0x5f540d(0x1dd)])[_0x5f540d(0x1d3)],_0xe81308=_0x15578e[_0x5f540d(0x1f0)](_0x3e8745=>!_0x3e8745[_0x5f540d(0x1dd)])[_0x5f540d(0x1d3)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x5f540d(0x1f5)+_0x137bff+_0x5f540d(0x1eb)+_0x445018);if(_0xe81308>0x0){writeCliSideChannelLine('!\x20'+_0xe81308+_0x5f540d(0x1ec));for(const _0x3b754b of _0x15578e[_0x5f540d(0x1f0)](_0xd4b8af=>!_0xd4b8af[_0x5f540d(0x1dd)])){writeCliSideChannelLine(_0x5f540d(0x1d6)+_0x3b754b[_0x5f540d(0x1f3)]+'\x20('+_0x3b754b[_0x5f540d(0x1bf)]+_0x5f540d(0x1d8)+_0x3b754b['error']);}}return{'ok':_0xe81308===0x0,'message':_0xe81308>0x0?_0x5f540d(0x1f9)+_0x137bff+_0x5f540d(0x1e0)+_0xe81308+'\x20failed':'Doc\x20generation\x20complete:\x20'+_0x137bff+_0x5f540d(0x1d1)};}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a20_0x4cb835=a20_0x1ad6;function a20_0x1ad6(_0x4cc6e2,_0x382f81){_0x4cc6e2=_0x4cc6e2-0x162;const _0x559466=a20_0x5594();let _0x1ad6b4=_0x559466[_0x4cc6e2];return _0x1ad6b4;}function a20_0x5594(){const _0x4d982e=['read','map','287IxOrVE','6835885DSmaCq','530348MuVGqV','100131EVehka','78546OpuuHD','1534816AtMZBR','appDesc','appCode','1718774GKUnLV','remote','cookie','20916624XstFxC','app','appName'];a20_0x5594=function(){return _0x4d982e;};return a20_0x5594();}(function(_0x1cf596,_0x860655){const _0x5b0536=a20_0x1ad6,_0x59b3d0=_0x1cf596();while(!![]){try{const _0x29f2fa=-parseInt(_0x5b0536(0x16f))/0x1+-parseInt(_0x5b0536(0x165))/0x2+-parseInt(_0x5b0536(0x170))/0x3+parseInt(_0x5b0536(0x162))/0x4+-parseInt(_0x5b0536(0x16e))/0x5+-parseInt(_0x5b0536(0x171))/0x6*(-parseInt(_0x5b0536(0x16d))/0x7)+parseInt(_0x5b0536(0x168))/0x8;if(_0x29f2fa===_0x860655)break;else _0x59b3d0['push'](_0x59b3d0['shift']());}catch(_0x3f8532){_0x59b3d0['push'](_0x59b3d0['shift']());}}}(a20_0x5594,0xb5d14));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x5df5d0){const _0x38145a=a20_0x1ad6,{setActiveCookie:_0x3f5aac}=await import('../../core/api-client.js');_0x3f5aac(_0x5df5d0[_0x38145a(0x167)]);const _0x44df64=await listRemoteApps(),_0x530961=_0x44df64[_0x38145a(0x16c)](_0x36e7a3=>({..._0x36e7a3['id']!=null?{'id':_0x36e7a3['id']}:{},'appCode':_0x36e7a3[_0x38145a(0x164)],'appName':_0x36e7a3[_0x38145a(0x16a)],..._0x36e7a3[_0x38145a(0x163)]!=null?{'appDesc':_0x36e7a3[_0x38145a(0x163)]}:{}}));return{'ok':!![],'data':_0x530961};}export const appRemoteDefinition={'service':a20_0x4cb835(0x169),'command':a20_0x4cb835(0x166),'description':'List\x20apps\x20available\x20on\x20the\x20platform','risk':a20_0x4cb835(0x16b),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
|