@lovrabet/rabetbase-cli 2.1.1 → 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.
Files changed (162) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -0
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -0
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -0
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/delete.js +1 -1
  28. package/lib/commands/bff/detail.js +1 -1
  29. package/lib/commands/bff/index.js +1 -1
  30. package/lib/commands/bff/list.js +1 -1
  31. package/lib/commands/bff/new.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/db/analyze-cancel.js +1 -1
  53. package/lib/commands/db/analyze-start.js +1 -1
  54. package/lib/commands/db/analyze-status.js +1 -1
  55. package/lib/commands/db/create.js +1 -1
  56. package/lib/commands/db/delete.js +1 -1
  57. package/lib/commands/db/detail.js +1 -1
  58. package/lib/commands/db/diff.js +1 -1
  59. package/lib/commands/db/index.js +1 -1
  60. package/lib/commands/db/list.js +1 -1
  61. package/lib/commands/db/shared.js +1 -1
  62. package/lib/commands/db/tables.js +1 -1
  63. package/lib/commands/db/test.js +1 -1
  64. package/lib/commands/db/update.js +1 -1
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  81. package/lib/commands/project/create/format-elapsed.js +1 -1
  82. package/lib/commands/project/create/main.js +1 -1
  83. package/lib/commands/project/create/non-interactive.js +1 -1
  84. package/lib/commands/project/create/project-template-path.js +1 -1
  85. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  86. package/lib/commands/project/create/use-format-code.js +1 -1
  87. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  88. package/lib/commands/project/index.js +1 -1
  89. package/lib/commands/project/init.js +1 -1
  90. package/lib/commands/project/upgrade.js +1 -1
  91. package/lib/commands/registry.js +1 -1
  92. package/lib/commands/run/index.js +1 -1
  93. package/lib/commands/schema.js +1 -1
  94. package/lib/commands/skill/index.js +1 -1
  95. package/lib/commands/sql/detail.js +1 -1
  96. package/lib/commands/sql/exec.js +1 -1
  97. package/lib/commands/sql/index.js +1 -1
  98. package/lib/commands/sql/list.js +1 -1
  99. package/lib/commands/sql/pull.js +1 -1
  100. package/lib/commands/sql/save.js +1 -1
  101. package/lib/commands/sql/shared.js +1 -1
  102. package/lib/commands/sql/validate.js +1 -1
  103. package/lib/config/schema.js +1 -0
  104. package/lib/constant/cli.js +1 -1
  105. package/lib/constant/defaults.js +1 -0
  106. package/lib/constant/domain.js +1 -1
  107. package/lib/constant/env.js +1 -1
  108. package/lib/constant/output.js +1 -0
  109. package/lib/constant/paths.js +1 -1
  110. package/lib/constant/risk.js +1 -0
  111. package/lib/context.js +1 -1
  112. package/lib/core/alias-resolver.js +1 -1
  113. package/lib/core/api-client.js +1 -1
  114. package/lib/core/bff/config.js +1 -1
  115. package/lib/core/bff/file-system.js +1 -1
  116. package/lib/core/bff/hash.js +1 -1
  117. package/lib/core/bff/lock.js +1 -1
  118. package/lib/core/bff/utils.js +1 -1
  119. package/lib/core/db-resolver.js +1 -1
  120. package/lib/core/sql-validator.js +1 -1
  121. package/lib/errors.js +1 -1
  122. package/lib/framework/build-all-flags.js +1 -1
  123. package/lib/framework/flags.js +1 -1
  124. package/lib/framework/help.js +1 -1
  125. package/lib/framework/index.js +1 -1
  126. package/lib/framework/output.js +1 -1
  127. package/lib/framework/response.js +1 -1
  128. package/lib/framework/runner-alias.js +1 -0
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/types.js +1 -1
  132. package/lib/generated/build-info.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/skills/main.js +1 -1
  135. package/lib/skills/npx-skills-add.js +1 -1
  136. package/lib/telemetry/cli-command-trace.js +1 -1
  137. package/lib/telemetry/cli-help-trace.js +1 -1
  138. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  139. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  140. package/lib/telemetry/send-cli-trace-log.js +1 -1
  141. package/lib/utils/ai_config.js +1 -1
  142. package/lib/utils/apply-jq-filter.js +1 -1
  143. package/lib/utils/cdn-config.js +1 -1
  144. package/lib/utils/check-sdk-version.js +1 -1
  145. package/lib/utils/cli-version-check.js +1 -1
  146. package/lib/utils/config.js +1 -1
  147. package/lib/utils/copy-directory.js +1 -1
  148. package/lib/utils/file-utils.js +1 -1
  149. package/lib/utils/guides-cdn.js +1 -1
  150. package/lib/utils/http-client.js +1 -1
  151. package/lib/utils/is-non-interactive.js +1 -1
  152. package/lib/utils/logger.js +1 -1
  153. package/lib/utils/platform.js +1 -1
  154. package/lib/utils/rules-cdn.js +1 -1
  155. package/lib/utils/sleep.js +1 -1
  156. package/lib/utils/template-replacer.js +1 -1
  157. package/lib/utils/version.js +1 -1
  158. package/lib/utils/with-active-cookie.js +1 -1
  159. package/lib/utils/write-cli-side-channel.js +1 -1
  160. package/package.json +3 -2
  161. package/lib/commands/api/doc.js +0 -1
  162. package/lib/commands/app/remote.js +0 -1
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.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
+ }
@@ -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};