@lovrabet/rabetbase-cli 2.1.2-beta.1 → 2.1.2-beta.2

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 (161) 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 -1
  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 -1
  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 -1
  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 -1
  104. package/lib/constant/cli.js +1 -1
  105. package/lib/constant/defaults.js +1 -1
  106. package/lib/constant/domain.js +1 -1
  107. package/lib/constant/env.js +1 -1
  108. package/lib/constant/output.js +1 -1
  109. package/lib/constant/paths.js +1 -1
  110. package/lib/constant/risk.js +1 -1
  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 -1
  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/entity-with-id.js +1 -0
  149. package/lib/utils/file-utils.js +1 -1
  150. package/lib/utils/guides-cdn.js +1 -1
  151. package/lib/utils/http-client.js +1 -1
  152. package/lib/utils/is-non-interactive.js +1 -1
  153. package/lib/utils/logger.js +1 -1
  154. package/lib/utils/platform.js +1 -1
  155. package/lib/utils/rules-cdn.js +1 -1
  156. package/lib/utils/sleep.js +1 -1
  157. package/lib/utils/template-replacer.js +1 -1
  158. package/lib/utils/version.js +1 -1
  159. package/lib/utils/with-active-cookie.js +1 -1
  160. package/lib/utils/write-cli-side-channel.js +1 -1
  161. package/package.json +2 -2
@@ -1 +1 @@
1
- export function sleep(_0x579efb){return new Promise(_0x5b6b9c=>setTimeout(_0x5b6b9c,_0x579efb));}
1
+ export function sleep(_0x4c3671){return new Promise(_0x47ef27=>setTimeout(_0x47ef27,_0x4c3671));}
@@ -1 +1 @@
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);}}
1
+ function a159_0x3721(){const _0x2bf31f=['开始处理模板内容替换','toComponentName','replaceContent','getHours','tableName','readFile','push','endsWith','slice','.js','alias','success','161502ovENeQ','alias:\x20\x22','error','charAt','\x20},','processFile','readdir','join','api','formatLocalTimestamp','default','copyFile','.scss','writeFile','135imVifL','toUpperCase','.ts','pop','now','template','name','9546720qwTXTc','.tpl','pad','map','.json','模板内容替换完成','getMonth','mkdir','toLowerCase','226CVGFon','YourModel','6594FixBis','isFile','name:\x20\x22','.jsx','1847TWJsgf','1554XyRnEH','模板内容替换失败','toISOString','padStart','4565080BYSqml','processTemplate','replace','550576RxtmPH','getSeconds','split','processDirectory','promises','.tsx','9KPaKvl','450RMtrfb','68208LHjrUn','utf8'];a159_0x3721=function(){return _0x2bf31f;};return a159_0x3721();}const a159_0x3bbeda=a159_0x58d8;function a159_0x58d8(_0x3d9690,_0x21b048){_0x3d9690=_0x3d9690-0x1e0;const _0x3721cc=a159_0x3721();let _0x58d8f6=_0x3721cc[_0x3d9690];return _0x58d8f6;}(function(_0x1f0077,_0x5922ee){const _0x2f8154=a159_0x58d8,_0x4ea638=_0x1f0077();while(!![]){try{const _0x2ea244=-parseInt(_0x2f8154(0x21a))/0x1*(-parseInt(_0x2f8154(0x214))/0x2)+parseInt(_0x2f8154(0x204))/0x3*(parseInt(_0x2f8154(0x1e8))/0x4)+-parseInt(_0x2f8154(0x21f))/0x5+parseInt(_0x2f8154(0x21b))/0x6*(parseInt(_0x2f8154(0x216))/0x7)+parseInt(_0x2f8154(0x1e0))/0x8*(parseInt(_0x2f8154(0x1e6))/0x9)+parseInt(_0x2f8154(0x1e7))/0xa*(-parseInt(_0x2f8154(0x1f6))/0xb)+parseInt(_0x2f8154(0x20b))/0xc;if(_0x2ea244===_0x5922ee)break;else _0x4ea638['push'](_0x4ea638['shift']());}catch(_0x49613a){_0x4ea638['push'](_0x4ea638['shift']());}}}(a159_0x3721,0x7caf1));import a159_0x9f274 from'node:fs';import a159_0x4dc330 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a159_0x3bbeda(0x20d)](_0x202587){const _0x5d806b=a159_0x3bbeda;return String(_0x202587)[_0x5d806b(0x21e)](0x2,'0');}static[a159_0x3bbeda(0x1ff)](_0x5e4f1e){const _0x1c0b62=a159_0x3bbeda,_0x35d36c=_0x5e4f1e['getFullYear'](),_0xde2ae6=this[_0x1c0b62(0x20d)](_0x5e4f1e[_0x1c0b62(0x211)]()+0x1),_0x213d02=this[_0x1c0b62(0x20d)](_0x5e4f1e['getDate']()),_0x31fc5b=this[_0x1c0b62(0x20d)](_0x5e4f1e[_0x1c0b62(0x1ed)]()),_0x29c37d=this[_0x1c0b62(0x20d)](_0x5e4f1e['getMinutes']()),_0x4fac27=this[_0x1c0b62(0x20d)](_0x5e4f1e[_0x1c0b62(0x1e1)]());return{'createdAt':_0x35d36c+'-'+_0xde2ae6+'-'+_0x213d02+'\x20'+_0x31fc5b+':'+_0x29c37d+':'+_0x4fac27,'createdDate':_0x35d36c+'-'+_0xde2ae6+'-'+_0x213d02,'createdTime':_0x31fc5b+':'+_0x29c37d+':'+_0x4fac27};}static[a159_0x3bbeda(0x1eb)](_0x3cdf45){const _0x58918d=a159_0x3bbeda,_0x454e6e=_0x3cdf45[_0x58918d(0x1e2)]('/')[_0x58918d(0x207)]()||_0x3cdf45;return _0x454e6e['split']('-')[_0x58918d(0x20e)](_0x5a2adf=>_0x5a2adf[_0x58918d(0x1f9)](0x0)[_0x58918d(0x205)]()+_0x5a2adf[_0x58918d(0x1f2)](0x1)[_0x58918d(0x213)]())[_0x58918d(0x1fd)]('');}static['toDisplayTitle'](_0x5814f2){const _0x40c0aa=a159_0x3bbeda,_0x4983ff=_0x5814f2[_0x40c0aa(0x1e2)]('/')[_0x40c0aa(0x207)]()||_0x5814f2;return _0x4983ff[_0x40c0aa(0x1e2)]('-')[_0x40c0aa(0x20e)](_0x19fff3=>_0x19fff3['charAt'](0x0)[_0x40c0aa(0x205)]()+_0x19fff3[_0x40c0aa(0x1f2)](0x1)[_0x40c0aa(0x213)]())['join']('\x20');}static[a159_0x3bbeda(0x1ec)](_0x1a915e,_0x2c8db0,_0x1ed41f){const _0x46089b=a159_0x3bbeda,_0x1a2dcb=this[_0x46089b(0x1eb)](_0x2c8db0),_0x485ab8=this['toDisplayTitle'](_0x2c8db0),{createdAt:_0x36621e,createdDate:_0x1f4502,createdTime:_0x290d0d}=this[_0x46089b(0x1ff)](new Date());let _0x3942ab=_0x1a915e[_0x46089b(0x221)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x1a2dcb)[_0x46089b(0x221)](/\{DisplayTitle\}/g,_0x485ab8)['replace'](/\{PageName\}/g,_0x2c8db0)[_0x46089b(0x221)](/\{TemplateName\}/g,_0x1ed41f)[_0x46089b(0x221)](/\{CreatedAt\}/g,_0x36621e)['replace'](/\{CreatedDate\}/g,_0x1f4502)[_0x46089b(0x221)](/\{CreatedTime\}/g,_0x290d0d);return _0x3942ab;}static['replaceApiContent'](_0x2ec96e,_0x3d370a,_0x5eb374,_0x96bf21,_0x349bbd,_0x1492a9,_0x1a44c6,_0x41159e){const _0x13f443=a159_0x3bbeda,_0x12f703=new Date(),_0x43f7cb=_0x12f703[_0x13f443(0x21d)](),_0x2e0a71=_0x5eb374[_0x13f443(0x20e)](_0x121be4=>{const _0x48fb0a=_0x13f443,_0x4bfc09=['datasetCode:\x20\x22'+_0x121be4['datasetCode']+'\x22','tableName:\x20\x22'+_0x121be4[_0x48fb0a(0x1ee)]+'\x22',_0x48fb0a(0x218)+_0x121be4[_0x48fb0a(0x20a)]+'\x22'];return _0x121be4[_0x48fb0a(0x1f4)]&&_0x4bfc09[_0x48fb0a(0x1f0)](_0x48fb0a(0x1f7)+_0x121be4[_0x48fb0a(0x1f4)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x4bfc09[_0x48fb0a(0x1fd)](',\x20')+_0x48fb0a(0x1fa);})[_0x13f443(0x1fd)](''),_0x29acac=_0x96bf21||_0x5eb374[0x0]?.[_0x13f443(0x1f4)]||_0x13f443(0x215);let _0x3915e8=_0x2ec96e[_0x13f443(0x221)](/\{AppCode\}/g,_0x3d370a)[_0x13f443(0x221)](/\{ModelConfigs\}/g,_0x2e0a71)[_0x13f443(0x221)](/\{ExampleModelName\}/g,_0x29acac)[_0x13f443(0x221)](/\{ApiFileName\}/g,_0x349bbd||_0x13f443(0x1fe))[_0x13f443(0x221)](/\{ConfigName\}/g,_0x1492a9||_0x13f443(0x200))[_0x13f443(0x221)](/\{ClientConfigParam\}/g,_0x1a44c6||'')[_0x13f443(0x221)](/\{VarPrefix\}/g,_0x41159e||'LOVRABET')['replace'](/\{CreatedAt\}/g,_0x43f7cb);return _0x3915e8;}static async[a159_0x3bbeda(0x220)](_0x223944,_0x313c34,_0x4da0d8,_0x30eaf5,_0x46c028=!![]){const _0x455787=a159_0x3bbeda,_0x28c79a=Date[_0x455787(0x208)]();try{_0x46c028&&logger['info'](_0x455787(0x209),_0x455787(0x1ea),{'templatePath':_0x223944,'targetPath':_0x313c34,'pageName':_0x4da0d8,'templateName':_0x30eaf5});await a159_0x9f274[_0x455787(0x1e4)][_0x455787(0x212)](_0x313c34,{'recursive':!![]}),await this[_0x455787(0x1e3)](_0x223944,_0x313c34,_0x4da0d8,_0x30eaf5);if(_0x46c028){const _0x2c66c7=Date['now']()-_0x28c79a;logger[_0x455787(0x1f5)]('template',_0x455787(0x210),_0x2c66c7,{'pageName':_0x4da0d8,'templateName':_0x30eaf5});}}catch(_0xdf6faf){if(_0x46c028){const _0x3ff728=Date[_0x455787(0x208)]()-_0x28c79a;logger[_0x455787(0x1f8)](_0x455787(0x209),_0x455787(0x21c),{'templatePath':_0x223944,'targetPath':_0x313c34,'pageName':_0x4da0d8,'templateName':_0x30eaf5,'error':_0xdf6faf instanceof Error?_0xdf6faf['message']:String(_0xdf6faf),'duration':_0x3ff728});}throw _0xdf6faf;}}static async[a159_0x3bbeda(0x1e3)](_0x2f1830,_0x58d896,_0x4526e7,_0x1e3ccd){const _0x162667=a159_0x3bbeda,_0x3c2b1f=await a159_0x9f274[_0x162667(0x1e4)][_0x162667(0x1fc)](_0x2f1830,{'withFileTypes':!![]});for(const _0xc53ee1 of _0x3c2b1f){const _0xbb9ce4=a159_0x4dc330[_0x162667(0x1fd)](_0x2f1830,_0xc53ee1[_0x162667(0x20a)]);let _0x528196=a159_0x4dc330['join'](_0x58d896,_0xc53ee1['name']);_0xc53ee1[_0x162667(0x20a)]['endsWith']('.tpl')&&(_0x528196=a159_0x4dc330[_0x162667(0x1fd)](_0x58d896,_0xc53ee1['name'][_0x162667(0x221)](/\.tpl$/,'')));if(_0xc53ee1['isDirectory']())await a159_0x9f274[_0x162667(0x1e4)]['mkdir'](_0x528196,{'recursive':!![]}),await this[_0x162667(0x1e3)](_0xbb9ce4,_0x528196,_0x4526e7,_0x1e3ccd);else _0xc53ee1[_0x162667(0x217)]()&&await this[_0x162667(0x1fb)](_0xbb9ce4,_0x528196,_0x4526e7,_0x1e3ccd);}}static async[a159_0x3bbeda(0x1fb)](_0x29f52a,_0x30691c,_0x5e7f34,_0x1de8f6){const _0x149f8a=a159_0x3bbeda,_0x5ef2b9=a159_0x4dc330['extname'](_0x29f52a)[_0x149f8a(0x213)]();_0x29f52a['endsWith'](_0x149f8a(0x20c))&&(_0x30691c=_0x30691c[_0x149f8a(0x221)](/\.tpl$/,''));const _0x216e27=[_0x149f8a(0x1e5),_0x149f8a(0x206),_0x149f8a(0x219),_0x149f8a(0x1f3),_0x149f8a(0x20f),'.md','.css',_0x149f8a(0x202),'.tpl'];if(_0x216e27['includes'](_0x5ef2b9)||_0x29f52a[_0x149f8a(0x1f1)]('.tpl')){const _0x2a601f=await a159_0x9f274[_0x149f8a(0x1e4)][_0x149f8a(0x1ef)](_0x29f52a,_0x149f8a(0x1e9)),_0x9dc873=this[_0x149f8a(0x1ec)](_0x2a601f,_0x5e7f34,_0x1de8f6);await a159_0x9f274[_0x149f8a(0x1e4)][_0x149f8a(0x203)](_0x30691c,_0x9dc873,_0x149f8a(0x1e9));}else await a159_0x9f274[_0x149f8a(0x1e4)][_0x149f8a(0x201)](_0x29f52a,_0x30691c);}}
@@ -1 +1 @@
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
+ function a160_0x57d9(_0x1db086,_0x534c23){_0x1db086=_0x1db086-0xaa;var _0x229d3f=a160_0x229d();var _0x57d979=_0x229d3f[_0x1db086];return _0x57d979;}(function(_0x4d9134,_0xe4cca0){var _0x377806=a160_0x57d9,_0x4ad9bc=_0x4d9134();while(!![]){try{var _0x37f087=parseInt(_0x377806(0xae))/0x1+parseInt(_0x377806(0xac))/0x2*(-parseInt(_0x377806(0xb2))/0x3)+parseInt(_0x377806(0xaf))/0x4+parseInt(_0x377806(0xab))/0x5+parseInt(_0x377806(0xb0))/0x6*(parseInt(_0x377806(0xad))/0x7)+-parseInt(_0x377806(0xaa))/0x8+-parseInt(_0x377806(0xb1))/0x9;if(_0x37f087===_0xe4cca0)break;else _0x4ad9bc['push'](_0x4ad9bc['shift']());}catch(_0x3ff22f){_0x4ad9bc['push'](_0x4ad9bc['shift']());}}}(a160_0x229d,0x9c4a9));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a160_0x229d(){var _0x2d75be=['1773420TxYJgI','554202LYyDuU','19906731JvmnOf','648678TZwZyt','1763592gcwBJU','3150895HHIKKR','2ytQuiA','91wGQYbY','1014398HIEusO'];a160_0x229d=function(){return _0x2d75be;};return a160_0x229d();}
@@ -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
+ function a161_0x1711(){var _0x361ca7=['885983bFBFRL','378510EVwUyD','2827422MLNqiq','3385260OwFnlb','3223935BjamOs','8ablZZR','366354FrwrSw','2863415fUAdXY','4iZvFnZ'];a161_0x1711=function(){return _0x361ca7;};return a161_0x1711();}function a161_0x7ea1(_0x128d17,_0x365e54){_0x128d17=_0x128d17-0x12d;var _0x171149=a161_0x1711();var _0x7ea1ab=_0x171149[_0x128d17];return _0x7ea1ab;}(function(_0x1e2eef,_0x36b73f){var _0x2bd7ac=a161_0x7ea1,_0x5de2c6=_0x1e2eef();while(!![]){try{var _0x2fa101=-parseInt(_0x2bd7ac(0x134))/0x1+parseInt(_0x2bd7ac(0x12f))/0x2+parseInt(_0x2bd7ac(0x131))/0x3+-parseInt(_0x2bd7ac(0x12d))/0x4*(-parseInt(_0x2bd7ac(0x135))/0x5)+-parseInt(_0x2bd7ac(0x130))/0x6+parseInt(_0x2bd7ac(0x12e))/0x7*(-parseInt(_0x2bd7ac(0x133))/0x8)+-parseInt(_0x2bd7ac(0x132))/0x9;if(_0x2fa101===_0x36b73f)break;else _0x5de2c6['push'](_0x5de2c6['shift']());}catch(_0x3e4e99){_0x5de2c6['push'](_0x5de2c6['shift']());}}}(a161_0x1711,0x8aaaf));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x56beab,_0x3566bc){setActiveCookie(_0x56beab);try{return await _0x3566bc();}finally{clearActiveCookie();}}
@@ -1 +1 @@
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');}
1
+ (function(_0x5545bd,_0x548c9f){var _0x5ca1a6=a162_0x3bdd,_0x4667c1=_0x5545bd();while(!![]){try{var _0x4842ec=-parseInt(_0x5ca1a6(0xfd))/0x1*(parseInt(_0x5ca1a6(0x100))/0x2)+parseInt(_0x5ca1a6(0x101))/0x3*(-parseInt(_0x5ca1a6(0x106))/0x4)+parseInt(_0x5ca1a6(0xfe))/0x5+-parseInt(_0x5ca1a6(0x105))/0x6*(-parseInt(_0x5ca1a6(0x102))/0x7)+parseInt(_0x5ca1a6(0x103))/0x8*(-parseInt(_0x5ca1a6(0x107))/0x9)+parseInt(_0x5ca1a6(0xfb))/0xa*(parseInt(_0x5ca1a6(0xfa))/0xb)+parseInt(_0x5ca1a6(0x104))/0xc;if(_0x4842ec===_0x548c9f)break;else _0x4667c1['push'](_0x4667c1['shift']());}catch(_0x22a23b){_0x4667c1['push'](_0x4667c1['shift']());}}}(a162_0x4933,0x1fd58));function a162_0x3bdd(_0x38122c,_0x8b2e9f){_0x38122c=_0x38122c-0xfa;var _0x493325=a162_0x4933();var _0x3bdd1f=_0x493325[_0x38122c];return _0x3bdd1f;}function a162_0x4933(){var _0x222dd7=['174GKdEnx','4gaFTKP','524331rounUk','1342fvOfGD','1060XinpKD','stderr','659bVVlzw','397525zkBgee','write','230cGCayi','707412PFoMxg','41853ucoCtY','8rblwJF','2812944SPGONZ'];a162_0x4933=function(){return _0x222dd7;};return a162_0x4933();}export function writeCliSideChannelLine(_0x3fbb56){var _0x3f204b=a162_0x3bdd;process[_0x3f204b(0xfc)][_0x3f204b(0xff)](_0x3fbb56+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.1.2-beta.1",
3
+ "version": "2.1.2-beta.2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,7 +53,7 @@
53
53
  "dependencies": {
54
54
  "@inquirer/prompts": "^8.3.2",
55
55
  "@lovrabet/cli-framework": "1.0.1",
56
- "@lovrabet/otel-logger": "1.0.1-beta.2",
56
+ "@lovrabet/otel-logger": "1.0.1-beta.3",
57
57
  "@types/winston": "^2.4.4",
58
58
  "chalk": "^5.6.2",
59
59
  "execa": "^9.6.0",