@lovrabet/rabetbase-cli 2.1.1-beta.0 → 2.1.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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_0x478814=a158_0x39bf;function a158_0x39bf(_0x16f6de,_0x44f8ee){_0x16f6de=_0x16f6de-0xac;const _0x232049=a158_0x2320();let _0x39bffa=_0x232049[_0x16f6de];return _0x39bffa;}(function(_0x2b4e8d,_0x27613e){const _0x22275f=a158_0x39bf,_0x3159dc=_0x2b4e8d();while(!![]){try{const _0x218e66=parseInt(_0x22275f(0xbd))/0x1*(-parseInt(_0x22275f(0xe3))/0x2)+parseInt(_0x22275f(0xe8))/0x3*(-parseInt(_0x22275f(0xb9))/0x4)+parseInt(_0x22275f(0xc9))/0x5+parseInt(_0x22275f(0xc3))/0x6+parseInt(_0x22275f(0xd9))/0x7+-parseInt(_0x22275f(0xdb))/0x8*(-parseInt(_0x22275f(0xe5))/0x9)+parseInt(_0x22275f(0xe2))/0xa*(-parseInt(_0x22275f(0xc6))/0xb);if(_0x218e66===_0x27613e)break;else _0x3159dc['push'](_0x3159dc['shift']());}catch(_0x30ed07){_0x3159dc['push'](_0x3159dc['shift']());}}}(a158_0x2320,0x64e07));import a158_0x382145 from'node:fs';import a158_0x478a45 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a158_0x478814(0xd6)](_0x401f74){const _0x325d4b=a158_0x478814;return String(_0x401f74)[_0x325d4b(0xc4)](0x2,'0');}static[a158_0x478814(0xc7)](_0x5b71a6){const _0x56a94a=a158_0x478814,_0xfc58f=_0x5b71a6[_0x56a94a(0xce)](),_0x2a4147=this[_0x56a94a(0xd6)](_0x5b71a6['getMonth']()+0x1),_0x59ccc5=this[_0x56a94a(0xd6)](_0x5b71a6['getDate']()),_0x209b74=this['pad'](_0x5b71a6['getHours']()),_0x2d1cd8=this['pad'](_0x5b71a6[_0x56a94a(0xd2)]()),_0x9a72d1=this[_0x56a94a(0xd6)](_0x5b71a6[_0x56a94a(0xe0)]());return{'createdAt':_0xfc58f+'-'+_0x2a4147+'-'+_0x59ccc5+'\x20'+_0x209b74+':'+_0x2d1cd8+':'+_0x9a72d1,'createdDate':_0xfc58f+'-'+_0x2a4147+'-'+_0x59ccc5,'createdTime':_0x209b74+':'+_0x2d1cd8+':'+_0x9a72d1};}static[a158_0x478814(0xd4)](_0x43d7b6){const _0x553f2d=a158_0x478814,_0x3b2f9f=_0x43d7b6[_0x553f2d(0xb0)]('/')['pop']()||_0x43d7b6;return _0x3b2f9f[_0x553f2d(0xb0)]('-')[_0x553f2d(0xe6)](_0x565e55=>_0x565e55['charAt'](0x0)['toUpperCase']()+_0x565e55['slice'](0x1)[_0x553f2d(0xb3)]())[_0x553f2d(0xaf)]('');}static[a158_0x478814(0xc1)](_0x3e566b){const _0x462a7e=a158_0x478814,_0x569b95=_0x3e566b[_0x462a7e(0xb0)]('/')[_0x462a7e(0xc0)]()||_0x3e566b;return _0x569b95['split']('-')[_0x462a7e(0xe6)](_0x2a11e8=>_0x2a11e8[_0x462a7e(0xd5)](0x0)[_0x462a7e(0xbb)]()+_0x2a11e8[_0x462a7e(0xbf)](0x1)[_0x462a7e(0xb3)]())['join']('\x20');}static['replaceContent'](_0x11e971,_0x1cd110,_0x2e3781){const _0x43dca3=a158_0x478814,_0x2b4f05=this['toComponentName'](_0x1cd110),_0x3b79be=this['toDisplayTitle'](_0x1cd110),{createdAt:_0x4b3c40,createdDate:_0x24bb69,createdTime:_0x17ce00}=this[_0x43dca3(0xc7)](new Date());let _0x26dba0=_0x11e971[_0x43dca3(0xd8)](/\{CliVersion\}/g,CLI_VERSION)[_0x43dca3(0xd8)](/\{ComponentName\}/g,_0x2b4f05)[_0x43dca3(0xd8)](/\{DisplayTitle\}/g,_0x3b79be)[_0x43dca3(0xd8)](/\{PageName\}/g,_0x1cd110)[_0x43dca3(0xd8)](/\{TemplateName\}/g,_0x2e3781)['replace'](/\{CreatedAt\}/g,_0x4b3c40)[_0x43dca3(0xd8)](/\{CreatedDate\}/g,_0x24bb69)[_0x43dca3(0xd8)](/\{CreatedTime\}/g,_0x17ce00);return _0x26dba0;}static[a158_0x478814(0xc8)](_0x5247ec,_0x2ab588,_0x265fcc,_0x4c2fee,_0x2e9cbc,_0x668651,_0x3c8ed6,_0x149828){const _0x11defb=a158_0x478814,_0x3e3e0f=new Date(),_0x313482=_0x3e3e0f[_0x11defb(0xdd)](),_0x58b652=_0x265fcc[_0x11defb(0xe6)](_0x1283e3=>{const _0x337811=_0x11defb,_0x3a93a8=['datasetCode:\x20\x22'+_0x1283e3[_0x337811(0xae)]+'\x22','tableName:\x20\x22'+_0x1283e3[_0x337811(0xea)]+'\x22',_0x337811(0xe7)+_0x1283e3[_0x337811(0xd3)]+'\x22'];return _0x1283e3[_0x337811(0xbc)]&&_0x3a93a8[_0x337811(0xcb)](_0x337811(0xd7)+_0x1283e3['alias']+'\x22'),_0x337811(0xb2)+_0x3a93a8[_0x337811(0xaf)](',\x20')+_0x337811(0xad);})[_0x11defb(0xaf)](''),_0x5b2276=_0x4c2fee||_0x265fcc[0x0]?.[_0x11defb(0xbc)]||_0x11defb(0xd0);let _0x48904d=_0x5247ec[_0x11defb(0xd8)](/\{AppCode\}/g,_0x2ab588)[_0x11defb(0xd8)](/\{ModelConfigs\}/g,_0x58b652)[_0x11defb(0xd8)](/\{ExampleModelName\}/g,_0x5b2276)[_0x11defb(0xd8)](/\{ApiFileName\}/g,_0x2e9cbc||'api')[_0x11defb(0xd8)](/\{ConfigName\}/g,_0x668651||'default')[_0x11defb(0xd8)](/\{ClientConfigParam\}/g,_0x3c8ed6||'')[_0x11defb(0xd8)](/\{VarPrefix\}/g,_0x149828||'LOVRABET')[_0x11defb(0xd8)](/\{CreatedAt\}/g,_0x313482);return _0x48904d;}static async['processTemplate'](_0x2c2c0c,_0x5ed4dd,_0x3df863,_0xad94cb,_0x4f5ded=!![]){const _0x4791e3=a158_0x478814,_0x29913f=Date['now']();try{_0x4f5ded&&logger['info'](_0x4791e3(0xca),_0x4791e3(0xb4),{'templatePath':_0x2c2c0c,'targetPath':_0x5ed4dd,'pageName':_0x3df863,'templateName':_0xad94cb});await a158_0x382145[_0x4791e3(0xcf)][_0x4791e3(0xb5)](_0x5ed4dd,{'recursive':!![]}),await this[_0x4791e3(0xdf)](_0x2c2c0c,_0x5ed4dd,_0x3df863,_0xad94cb);if(_0x4f5ded){const _0x308d7c=Date[_0x4791e3(0xbe)]()-_0x29913f;logger['success'](_0x4791e3(0xca),_0x4791e3(0xb1),_0x308d7c,{'pageName':_0x3df863,'templateName':_0xad94cb});}}catch(_0x1ef9dd){if(_0x4f5ded){const _0x8ced8b=Date[_0x4791e3(0xbe)]()-_0x29913f;logger[_0x4791e3(0xe4)](_0x4791e3(0xca),_0x4791e3(0xde),{'templatePath':_0x2c2c0c,'targetPath':_0x5ed4dd,'pageName':_0x3df863,'templateName':_0xad94cb,'error':_0x1ef9dd instanceof Error?_0x1ef9dd[_0x4791e3(0xe9)]:String(_0x1ef9dd),'duration':_0x8ced8b});}throw _0x1ef9dd;}}static async[a158_0x478814(0xdf)](_0x5e7d02,_0x59b8cc,_0xdb7260,_0x3cbbf6){const _0x4cf8fb=a158_0x478814,_0xbba4c8=await a158_0x382145['promises'][_0x4cf8fb(0xda)](_0x5e7d02,{'withFileTypes':!![]});for(const _0x25454a of _0xbba4c8){const _0x485663=a158_0x478a45['join'](_0x5e7d02,_0x25454a[_0x4cf8fb(0xd3)]);let _0x44a18c=a158_0x478a45[_0x4cf8fb(0xaf)](_0x59b8cc,_0x25454a[_0x4cf8fb(0xd3)]);_0x25454a[_0x4cf8fb(0xd3)]['endsWith'](_0x4cf8fb(0xac))&&(_0x44a18c=a158_0x478a45[_0x4cf8fb(0xaf)](_0x59b8cc,_0x25454a[_0x4cf8fb(0xd3)][_0x4cf8fb(0xd8)](/\.tpl$/,'')));if(_0x25454a['isDirectory']())await a158_0x382145[_0x4cf8fb(0xcf)][_0x4cf8fb(0xb5)](_0x44a18c,{'recursive':!![]}),await this[_0x4cf8fb(0xdf)](_0x485663,_0x44a18c,_0xdb7260,_0x3cbbf6);else _0x25454a[_0x4cf8fb(0xe1)]()&&await this[_0x4cf8fb(0xcc)](_0x485663,_0x44a18c,_0xdb7260,_0x3cbbf6);}}static async[a158_0x478814(0xcc)](_0x5100c9,_0xaef824,_0x93dd71,_0x5684e7){const _0x2509bd=a158_0x478814,_0x2a6b84=a158_0x478a45[_0x2509bd(0xc5)](_0x5100c9)[_0x2509bd(0xb3)]();_0x5100c9[_0x2509bd(0xdc)](_0x2509bd(0xac))&&(_0xaef824=_0xaef824[_0x2509bd(0xd8)](/\.tpl$/,''));const _0x50ef2c=[_0x2509bd(0xb8),'.ts',_0x2509bd(0xba),'.js','.json',_0x2509bd(0xcd),'.css',_0x2509bd(0xec),'.tpl'];if(_0x50ef2c['includes'](_0x2a6b84)||_0x5100c9[_0x2509bd(0xdc)]('.tpl')){const _0x51b85e=await a158_0x382145[_0x2509bd(0xcf)][_0x2509bd(0xeb)](_0x5100c9,_0x2509bd(0xb7)),_0x27bc1c=this[_0x2509bd(0xc2)](_0x51b85e,_0x93dd71,_0x5684e7);await a158_0x382145[_0x2509bd(0xcf)][_0x2509bd(0xd1)](_0xaef824,_0x27bc1c,'utf8');}else await a158_0x382145[_0x2509bd(0xcf)][_0x2509bd(0xb6)](_0x5100c9,_0xaef824);}}function a158_0x2320(){const _0x3487c2=['getSeconds','isFile','3971500MOJMdb','2XPeHVF','error','2031219rrFDJv','map','name:\x20\x22','220659lWCxQT','message','tableName','readFile','.scss','.tpl','\x20},','datasetCode','join','split','模板内容替换完成','\x0a\x20\x20\x20\x20{\x20','toLowerCase','开始处理模板内容替换','mkdir','copyFile','utf8','.tsx','12GCYvoc','.jsx','toUpperCase','alias','286905nkfnvk','now','slice','pop','toDisplayTitle','replaceContent','3418236YgNbcF','padStart','extname','22uTOkrA','formatLocalTimestamp','replaceApiContent','3080025KiIRQY','template','push','processFile','.md','getFullYear','promises','YourModel','writeFile','getMinutes','name','toComponentName','charAt','pad','alias:\x20\x22','replace','2125571ZVitdf','readdir','8ymDXsW','endsWith','toISOString','模板内容替换失败','processDirectory'];a158_0x2320=function(){return _0x3487c2;};return a158_0x2320();}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a159_0x2f98(){var _0x2bbe8=['30407nUrTXv','14531TnbsqD','2HgKEZg','3228NTyYBv','1333520qWvsUj','3580yUUyhw','12414VNLEqF','182637dATkzj','4NJNTIv','67779vCLOCo','28MxqTgt','380cseKub','278354iUipMK'];a159_0x2f98=function(){return _0x2bbe8;};return a159_0x2f98();}(function(_0x104f7c,_0x31fcd7){var _0x55c7b6=a159_0x1d86,_0x2b1bb5=_0x104f7c();while(!![]){try{var _0x550f84=parseInt(_0x55c7b6(0x74))/0x1*(-parseInt(_0x55c7b6(0x71))/0x2)+parseInt(_0x55c7b6(0x79))/0x3*(-parseInt(_0x55c7b6(0x7a))/0x4)+parseInt(_0x55c7b6(0x70))/0x5*(parseInt(_0x55c7b6(0x78))/0x6)+parseInt(_0x55c7b6(0x6f))/0x7*(parseInt(_0x55c7b6(0x76))/0x8)+parseInt(_0x55c7b6(0x7b))/0x9+parseInt(_0x55c7b6(0x77))/0xa*(parseInt(_0x55c7b6(0x73))/0xb)+-parseInt(_0x55c7b6(0x75))/0xc*(parseInt(_0x55c7b6(0x72))/0xd);if(_0x550f84===_0x31fcd7)break;else _0x2b1bb5['push'](_0x2b1bb5['shift']());}catch(_0x5af152){_0x2b1bb5['push'](_0x2b1bb5['shift']());}}}(a159_0x2f98,0x5209d));function a159_0x1d86(_0x44d545,_0x5a5ea4){_0x44d545=_0x44d545-0x6f;var _0x2f9898=a159_0x2f98();var _0x1d86b1=_0x2f9898[_0x44d545];return _0x1d86b1;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x321d31,_0x511fef){var _0x24eb34=a160_0x2053,_0x5ed377=_0x321d31();while(!![]){try{var _0x31f88e=-parseInt(_0x24eb34(0x160))/0x1*(-parseInt(_0x24eb34(0x167))/0x2)+-parseInt(_0x24eb34(0x165))/0x3*(parseInt(_0x24eb34(0x168))/0x4)+parseInt(_0x24eb34(0x169))/0x5*(-parseInt(_0x24eb34(0x163))/0x6)+parseInt(_0x24eb34(0x16b))/0x7+parseInt(_0x24eb34(0x164))/0x8*(-parseInt(_0x24eb34(0x166))/0x9)+parseInt(_0x24eb34(0x16a))/0xa+-parseInt(_0x24eb34(0x162))/0xb*(parseInt(_0x24eb34(0x161))/0xc);if(_0x31f88e===_0x511fef)break;else _0x5ed377['push'](_0x5ed377['shift']());}catch(_0x790b2a){_0x5ed377['push'](_0x5ed377['shift']());}}}(a160_0x2255,0xa9a30));function a160_0x2053(_0x2ad342,_0xc5d8eb){_0x2ad342=_0x2ad342-0x160;var _0x2255f2=a160_0x2255();var _0x205335=_0x2255f2[_0x2ad342];return _0x205335;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a160_0x2255(){var _0x5d8334=['135513BLaaOY','22hGKwRv','1388gjYAxx','2410vALoqR','2897600qAibFx','5886811jtEKHN','21061feoGpL','14592XxKaaT','1661uqbxtN','864vSyylz','136ugarIx','1371hOrzIg'];a160_0x2255=function(){return _0x5d8334;};return a160_0x2255();}export async function withActiveCookie(_0x5f35c1,_0x8b4077){setActiveCookie(_0x5f35c1);try{return await _0x8b4077();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b5596,_0x53899d){var _0x212547=a161_0xf76a,_0x5223f5=_0x4b5596();while(!![]){try{var _0x429786=-parseInt(_0x212547(0xda))/0x1+-parseInt(_0x212547(0xe0))/0x2+-parseInt(_0x212547(0xd9))/0x3*(parseInt(_0x212547(0xe1))/0x4)+parseInt(_0x212547(0xd8))/0x5+parseInt(_0x212547(0xdf))/0x6+-parseInt(_0x212547(0xde))/0x7*(parseInt(_0x212547(0xdb))/0x8)+parseInt(_0x212547(0xdc))/0x9;if(_0x429786===_0x53899d)break;else _0x5223f5['push'](_0x5223f5['shift']());}catch(_0x567cb7){_0x5223f5['push'](_0x5223f5['shift']());}}}(a161_0x4306,0xed173));export function writeCliSideChannelLine(_0x5ba673){var _0x3f4b4c=a161_0xf76a;process[_0x3f4b4c(0xdd)]['write'](_0x5ba673+'\x0a');}function a161_0xf76a(_0x3713b9,_0x45e859){_0x3713b9=_0x3713b9-0xd8;var _0x4306b4=a161_0x4306();var _0xf76a3=_0x4306b4[_0x3713b9];return _0xf76a3;}function a161_0x4306(){var _0x55bc9f=['1956546XEhxiQ','2171454tfeSoE','6135940XcZtTV','2036240gMBUAf','3OXYNok','1802753tmQuXm','122064JuVWhl','58558203IzUxQM','stderr','847DjMmzO'];a161_0x4306=function(){return _0x55bc9f;};return a161_0x4306();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2-beta.0",
|
|
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_0x33942a=a12_0x2360;(function(_0x47082d,_0x46dc8d){const _0x42ca0e=a12_0x2360,_0x328f07=_0x47082d();while(!![]){try{const _0x192813=-parseInt(_0x42ca0e(0x1ef))/0x1+parseInt(_0x42ca0e(0x1e0))/0x2+-parseInt(_0x42ca0e(0x209))/0x3+-parseInt(_0x42ca0e(0x1fe))/0x4+parseInt(_0x42ca0e(0x211))/0x5+parseInt(_0x42ca0e(0x20d))/0x6+parseInt(_0x42ca0e(0x208))/0x7;if(_0x192813===_0x46dc8d)break;else _0x328f07['push'](_0x328f07['shift']());}catch(_0x36cc05){_0x328f07['push'](_0x328f07['shift']());}}}(a12_0x32a2,0x2e4f3));import a12_0x3d8f3a from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';function a12_0x2360(_0x1f8981,_0x1efac4){_0x1f8981=_0x1f8981-0x1e0;const _0x32a2fc=a12_0x32a2();let _0x2360a7=_0x32a2fc[_0x1f8981];return _0x2360a7;}import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a12_0x32a2(){const _0x221d9f=['\x1b[90m*\x20Generating\x20docs\x20for:\x20','Invalid\x20--params:\x20','doc','validation','...','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','Output\x20directory\x20(default:\x20./docs)','stdout','datasetCode','join','362749YKSPry','filter','output','\x20file(s)','datasetName','Doc\x20generation:\x20','Fetching\x20dataset\x20list\x20for\x20','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','\x1b[0m','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','./docs','datasetcode','\x20succeeded,\x20','\x20dataset(s)\x1b[0m','253764HTyPyd','.md','api','Doc\x20generation\x20complete:\x20','appCode','params','string','succeed','write','split','1288798kRzxUX','49869sRutWA','\x0d\x20\x20[','cookie','str','181128WKtqWD','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','Failed\x20to\x20fetch\x20datasets','):\x20','956135nSZCdv','\x20doc(s)\x20failed','some','✓\x20Generated\x20','success','453934QgNrVU','isArray','length','!\x20No\x20datasets\x20found.','start'];a12_0x32a2=function(){return _0x221d9f;};return a12_0x32a2();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiDoc={'service':a12_0x33942a(0x200),'command':a12_0x33942a(0x1e7),'description':a12_0x33942a(0x1ea),'risk':a12_0x33942a(0x206),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a12_0x33942a(0x1f1),'type':a12_0x33942a(0x204),'description':a12_0x33942a(0x1eb)},{'name':a12_0x33942a(0x1fb),'type':a12_0x33942a(0x204),'description':a12_0x33942a(0x1f6)},{'name':'params','type':a12_0x33942a(0x204),'description':a12_0x33942a(0x1f8)}],async 'execute'(_0x1d8763){const _0x113463=a12_0x33942a,_0x5d9547=_0x1d8763['str']('output')||_0x113463(0x1fa),_0x10790e=_0x1d8763[_0x113463(0x20c)](_0x113463(0x1fb)),_0x19168e=_0x1d8763['str'](_0x113463(0x203));let _0x29a27c;if(_0x19168e)try{_0x29a27c=JSON['parse'](_0x19168e);if(typeof _0x29a27c!=='object'||_0x29a27c===null||Array[_0x113463(0x1e1)](_0x29a27c))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x1faeca){throw CliErrors[_0x113463(0x1e8)](_0x113463(0x1e6)+(_0x1faeca instanceof Error?_0x1faeca['message']:String(_0x1faeca)),_0x113463(0x1f9));}let _0x5667f7;if(_0x10790e){const _0x3bf0f3=_0x10790e[_0x113463(0x207)](',')['map'](_0xa16b5c=>_0xa16b5c['trim']())[_0x113463(0x1f0)](_0x2eac5e=>_0x2eac5e[_0x113463(0x1e2)]>0x0);if(_0x3bf0f3[_0x113463(0x1e2)]===0x0)throw CliErrors[_0x113463(0x1e8)]('--datasetcode\x20cannot\x20be\x20empty.');_0x5667f7=new Set(_0x3bf0f3),writeCliSideChannelLine(_0x113463(0x1e5)+_0x3bf0f3[_0x113463(0x1ee)](',\x20')+_0x113463(0x1f7));}const _0x562244=a12_0x3d8f3a(_0x113463(0x1f5)+_0x1d8763[_0x113463(0x202)]+_0x113463(0x1e9))[_0x113463(0x1e4)]();let _0x29e7ac;try{({configArray:_0x29e7ac}=await fetchModelList(_0x1d8763['appCode'],_0x1d8763[_0x113463(0x20b)]),_0x562244[_0x113463(0x205)]('Fetched\x20'+_0x29e7ac[_0x113463(0x1e2)]+'\x20dataset(s)'));}catch(_0x355e80){_0x562244['fail'](_0x113463(0x20f));throw _0x355e80;}if(_0x29e7ac[_0x113463(0x1e2)]===0x0)return writeCliSideChannelLine(_0x113463(0x1e3)),{'ok':!![]};let _0x26e56f=_0x29e7ac;if(_0x5667f7){_0x26e56f=_0x29e7ac['filter'](_0x1132fc=>_0x5667f7['has'](_0x1132fc[_0x113463(0x1ed)]));const _0x17966d=[..._0x5667f7][_0x113463(0x1f0)](_0x11bd3b=>!_0x29e7ac[_0x113463(0x213)](_0xff3e63=>_0xff3e63[_0x113463(0x1ed)]===_0x11bd3b));_0x17966d[_0x113463(0x1e2)]>0x0&&writeCliSideChannelLine('\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20'+_0x17966d[_0x113463(0x1ee)](',\x20')+_0x113463(0x1f7));if(_0x26e56f[_0x113463(0x1e2)]===0x0)throw CliErrors[_0x113463(0x1e8)](_0x113463(0x20e)+[..._0x5667f7]['join'](',\x20'));writeCliSideChannelLine('\x1b[90m*\x20Filtered\x20'+_0x26e56f['length']+'\x20of\x20'+_0x29e7ac[_0x113463(0x1e2)]+_0x113463(0x1fd));}let _0x15582c=0x0;const _0x5e7986=await generateDatasetDocs(_0x26e56f,_0x1d8763[_0x113463(0x202)],_0x1d8763['cookie'],_0x5d9547,(_0x73177c,_0x377e3f,_0x8029f4)=>{const _0x4da0a6=_0x113463;_0x15582c=_0x73177c,process[_0x4da0a6(0x1ec)][_0x4da0a6(0x206)](_0x4da0a6(0x20a)+String(_0x73177c)['padStart'](String(_0x377e3f)['length'])+'/'+_0x377e3f+']\x20'+_0x8029f4+_0x4da0a6(0x1ff));},_0x29a27c);if(_0x15582c>0x0)process[_0x113463(0x1ec)][_0x113463(0x206)]('\x0a');const _0xc566e2=_0x5e7986[_0x113463(0x1f0)](_0x5f12ca=>_0x5f12ca[_0x113463(0x215)])['length'],_0x188dfd=_0x5e7986[_0x113463(0x1f0)](_0x1d48a5=>!_0x1d48a5['success'])[_0x113463(0x1e2)];writeCliSideChannelLine(''),writeCliSideChannelLine(_0x113463(0x214)+_0xc566e2+'\x20doc(s)\x20in\x20'+_0x5d9547);if(_0x188dfd>0x0){writeCliSideChannelLine('!\x20'+_0x188dfd+_0x113463(0x212));for(const _0x3b8f50 of _0x5e7986['filter'](_0x1c4a77=>!_0x1c4a77['success'])){writeCliSideChannelLine('\x20\x20•\x20'+_0x3b8f50[_0x113463(0x1f3)]+'\x20('+_0x3b8f50[_0x113463(0x1ed)]+_0x113463(0x210)+_0x3b8f50['error']);}}return{'ok':_0x188dfd===0x0,'message':_0x188dfd>0x0?_0x113463(0x1f4)+_0xc566e2+_0x113463(0x1fc)+_0x188dfd+'\x20failed':_0x113463(0x201)+_0xc566e2+_0x113463(0x1f2)};}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a20_0x483a4a=a20_0x2a9b;(function(_0x5cd83b,_0x1d3a1c){const _0x3d42b5=a20_0x2a9b,_0x51a4cc=_0x5cd83b();while(!![]){try{const _0x15e4aa=parseInt(_0x3d42b5(0x108))/0x1+parseInt(_0x3d42b5(0x10f))/0x2*(parseInt(_0x3d42b5(0x102))/0x3)+parseInt(_0x3d42b5(0x111))/0x4+-parseInt(_0x3d42b5(0x110))/0x5*(parseInt(_0x3d42b5(0x106))/0x6)+-parseInt(_0x3d42b5(0x10d))/0x7*(-parseInt(_0x3d42b5(0x10e))/0x8)+parseInt(_0x3d42b5(0x103))/0x9+parseInt(_0x3d42b5(0x10a))/0xa*(-parseInt(_0x3d42b5(0x105))/0xb);if(_0x15e4aa===_0x1d3a1c)break;else _0x51a4cc['push'](_0x51a4cc['shift']());}catch(_0x22fdd6){_0x51a4cc['push'](_0x51a4cc['shift']());}}}(a20_0x185e,0xe5185));function a20_0x2a9b(_0x4a051c,_0x143c41){_0x4a051c=_0x4a051c-0x101;const _0x185e8d=a20_0x185e();let _0x2a9be3=_0x185e8d[_0x4a051c];return _0x2a9be3;}import{listRemoteApps}from'../../core/api-client.js';function a20_0x185e(){const _0x4a693a=['42CyVidJ','read','626323hFjVyH','List\x20apps\x20available\x20on\x20the\x20platform','3310ygUDpg','map','../../core/api-client.js','4340245pdthgj','8cexqZx','825876GzAyxy','273355AGTAUI','4706364qEAmmB','appDesc','6EzyrGH','3521079fflVYN','appCode','77066FdyxfO'];a20_0x185e=function(){return _0x4a693a;};return a20_0x185e();}async function execute(_0x20df05){const _0x38ad8b=a20_0x2a9b,{setActiveCookie:_0x2b336e}=await import(_0x38ad8b(0x10c));_0x2b336e(_0x20df05['cookie']);const _0x232977=await listRemoteApps(),_0x268487=_0x232977[_0x38ad8b(0x10b)](_0x5a4f5b=>({..._0x5a4f5b['id']!=null?{'id':_0x5a4f5b['id']}:{},'appCode':_0x5a4f5b[_0x38ad8b(0x104)],'appName':_0x5a4f5b['appName'],..._0x5a4f5b[_0x38ad8b(0x101)]!=null?{'appDesc':_0x5a4f5b['appDesc']}:{}}));return{'ok':!![],'data':_0x268487};}export const appRemoteDefinition={'service':'app','command':'remote','description':a20_0x483a4a(0x109),'risk':a20_0x483a4a(0x107),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
|