@lovrabet/rabetbase-cli 2.0.13 → 2.1.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.
Files changed (155) hide show
  1. package/README.md +2 -2
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.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/doc.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/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote.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 -0
  53. package/lib/commands/db/analyze-start.js +1 -0
  54. package/lib/commands/db/analyze-status.js +1 -0
  55. package/lib/commands/db/create.js +1 -0
  56. package/lib/commands/db/delete.js +1 -0
  57. package/lib/commands/db/detail.js +1 -0
  58. package/lib/commands/db/diff.js +1 -0
  59. package/lib/commands/db/index.js +1 -0
  60. package/lib/commands/db/list.js +1 -0
  61. package/lib/commands/db/shared.js +1 -0
  62. package/lib/commands/db/tables.js +1 -0
  63. package/lib/commands/db/test.js +1 -0
  64. package/lib/commands/db/update.js +1 -0
  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/constant/cli.js +1 -1
  104. package/lib/constant/domain.js +1 -1
  105. package/lib/constant/env.js +1 -1
  106. package/lib/constant/paths.js +1 -1
  107. package/lib/context.js +1 -1
  108. package/lib/core/alias-resolver.js +1 -1
  109. package/lib/core/api-client.js +1 -1
  110. package/lib/core/bff/config.js +1 -1
  111. package/lib/core/bff/file-system.js +1 -1
  112. package/lib/core/bff/hash.js +1 -1
  113. package/lib/core/bff/lock.js +1 -1
  114. package/lib/core/bff/utils.js +1 -1
  115. package/lib/core/db-resolver.js +1 -1
  116. package/lib/core/sql-validator.js +1 -1
  117. package/lib/errors.js +1 -1
  118. package/lib/framework/build-all-flags.js +1 -1
  119. package/lib/framework/flags.js +1 -1
  120. package/lib/framework/help.js +1 -1
  121. package/lib/framework/index.js +1 -1
  122. package/lib/framework/output.js +1 -1
  123. package/lib/framework/response.js +1 -1
  124. package/lib/framework/runner.js +1 -1
  125. package/lib/framework/schema-export.js +1 -1
  126. package/lib/framework/types.js +1 -1
  127. package/lib/generated/build-info.js +1 -1
  128. package/lib/help.js +1 -1
  129. package/lib/skills/main.js +1 -1
  130. package/lib/skills/npx-skills-add.js +1 -1
  131. package/lib/telemetry/cli-command-trace.js +1 -1
  132. package/lib/telemetry/cli-help-trace.js +1 -1
  133. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  134. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  135. package/lib/telemetry/send-cli-trace-log.js +1 -1
  136. package/lib/utils/ai_config.js +1 -1
  137. package/lib/utils/apply-jq-filter.js +1 -1
  138. package/lib/utils/cdn-config.js +1 -1
  139. package/lib/utils/check-sdk-version.js +1 -1
  140. package/lib/utils/cli-version-check.js +1 -1
  141. package/lib/utils/config.js +1 -1
  142. package/lib/utils/copy-directory.js +1 -1
  143. package/lib/utils/file-utils.js +1 -1
  144. package/lib/utils/guides-cdn.js +1 -1
  145. package/lib/utils/http-client.js +1 -1
  146. package/lib/utils/is-non-interactive.js +1 -1
  147. package/lib/utils/logger.js +1 -1
  148. package/lib/utils/platform.js +1 -1
  149. package/lib/utils/rules-cdn.js +1 -1
  150. package/lib/utils/sleep.js +1 -1
  151. package/lib/utils/template-replacer.js +1 -1
  152. package/lib/utils/version.js +1 -1
  153. package/lib/utils/with-active-cookie.js +1 -1
  154. package/lib/utils/write-cli-side-channel.js +1 -0
  155. package/package.json +1 -1
@@ -1 +1 @@
1
- const a77_0x1fea39=a77_0x5b27;(function(_0x1a8a40,_0x320c65){const _0x42c2e6=a77_0x5b27,_0x1bce05=_0x1a8a40();while(!![]){try{const _0x48f406=-parseInt(_0x42c2e6(0x1b8))/0x1*(parseInt(_0x42c2e6(0x1c3))/0x2)+parseInt(_0x42c2e6(0x1b3))/0x3*(-parseInt(_0x42c2e6(0x1b1))/0x4)+parseInt(_0x42c2e6(0x1ca))/0x5+parseInt(_0x42c2e6(0x1a3))/0x6*(parseInt(_0x42c2e6(0x1be))/0x7)+-parseInt(_0x42c2e6(0x1ae))/0x8+parseInt(_0x42c2e6(0x1a4))/0x9+-parseInt(_0x42c2e6(0x1ac))/0xa;if(_0x48f406===_0x320c65)break;else _0x1bce05['push'](_0x1bce05['shift']());}catch(_0x5f46ef){_0x1bce05['push'](_0x1bce05['shift']());}}}(a77_0x1d66,0x29793));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';function a77_0x5b27(_0x2e9a36,_0x5095af){_0x2e9a36=_0x2e9a36-0x19d;const _0x1d6627=a77_0x1d66();let _0x5b2727=_0x1d6627[_0x2e9a36];return _0x5b2727;}import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();function a77_0x1d66(){const _0x44cb46=['Authentication','defaultCommand','auth','push','1705580cGvrFy','start','836928JJOoNJ','show','SQL\x20Queries','4yiTVtF','values','597444HvzjzS','\x20\x20[write]','get','create','isSingleCommand','36217ybetfZ','commands','read','set','run','API','2296qxkwhR','length','Skills','command','Logs','2qKhcZg','Dataset\x20&\x20Operations','wildcardDef','<script>','Quick\x20Start','has','Run\x20any\x20package.json\x20script','1323775ffrtab','\x20\x20[high-risk-write]','Code\x20Generation','risk','description','service','Run\x20Scripts','2766MbEfAP','2380059HkDqNR','logout','project','Self\x20Update'];a77_0x1d66=function(){return _0x44cb46;};return a77_0x1d66();}export const serviceGroups=new Map();function registerDefinitions(_0x11a69d){const _0x176a97=a77_0x5b27;for(const _0x56c666 of _0x11a69d){definitions[_0x176a97(0x1bb)](_0x56c666['service']+':'+_0x56c666[_0x176a97(0x1c1)],_0x56c666);let _0x1e789c=serviceGroups['get'](_0x56c666[_0x176a97(0x1a1)]);!_0x1e789c&&(_0x1e789c=[],serviceGroups[_0x176a97(0x1bb)](_0x56c666[_0x176a97(0x1a1)],_0x1e789c)),_0x1e789c['push'](_0x56c666);}}function registerDeclarativeService(_0x16d559,_0x2ada50,_0x253f59){const _0x4af7ed=a77_0x5b27;registerDefinitions(_0x2ada50);_0x253f59?.[_0x4af7ed(0x1c5)]&&registerDefinitions([_0x253f59[_0x4af7ed(0x1c5)]]);const _0x5b849f=_0x21252a=>_0x21252a===_0x4af7ed(0x1ba)?'':_0x21252a==='write'?_0x4af7ed(0x1b4):_0x4af7ed(0x19d),_0x4eb462={'service':_0x2ada50[0x0][_0x4af7ed(0x1a1)],'label':_0x16d559,'commands':_0x2ada50['map'](_0xfdbf29=>({'command':_0xfdbf29['command'],'description':_0xfdbf29[_0x4af7ed(0x1a0)],'tag':_0x5b849f(_0xfdbf29[_0x4af7ed(0x19f)])})),'declarative':!![],'defaultCommand':_0x253f59?.[_0x4af7ed(0x1a9)]??(_0x253f59?.[_0x4af7ed(0x1b7)]?_0x2ada50[0x0][_0x4af7ed(0x1c1)]:undefined),'wildcardDef':_0x253f59?.[_0x4af7ed(0x1c5)],'isSingleCommand':_0x253f59?.[_0x4af7ed(0x1b7)]};serviceRegistry[_0x4af7ed(0x1ab)](_0x4eb462),serviceByName[_0x4af7ed(0x1bb)](_0x4eb462['service'],_0x4eb462);}registerDeclarativeService(a77_0x1fea39(0x1c7),initDefinitions,{'defaultCommand':a77_0x1fea39(0x1bc),'isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a77_0x1fea39(0x1a2),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a77_0x1fea39(0x1bf)]-0x1];last[a77_0x1fea39(0x1b9)]=[{'command':a77_0x1fea39(0x1c6),'description':a77_0x1fea39(0x1c9),'tag':''}];}registerDeclarativeService(a77_0x1fea39(0x1a8),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a77_0x1fea39(0x1a7),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a77_0x1fea39(0x1bd),apiDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a77_0x1fea39(0x1c4),datasetDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a77_0x1fea39(0x1b0),sqlDefinitions),registerDeclarativeService(a77_0x1fea39(0x19e),codegenDefinitions),registerDeclarativeService(a77_0x1fea39(0x1c0),skillDefinitions),registerDeclarativeService(a77_0x1fea39(0x1c2),logsDefinitions,{'defaultCommand':a77_0x1fea39(0x1af)});export const deprecatedAliases={'create':{'service':a77_0x1fea39(0x1a6),'command':a77_0x1fea39(0x1b6)},'start':{'service':a77_0x1fea39(0x1bc),'command':a77_0x1fea39(0x1ad)},'build':{'service':a77_0x1fea39(0x1bc),'command':'build'},'preview':{'service':a77_0x1fea39(0x1bc),'command':'preview'},'logout':{'service':a77_0x1fea39(0x1aa),'command':a77_0x1fea39(0x1a5)},'skills':{'service':'skill','command':'install'}};export function findDefinition(_0x5c0fc9,_0x1143f9){return definitions['get'](_0x5c0fc9+':'+_0x1143f9);}export function isKnownService(_0x3d4b59){const _0xad09f1=a77_0x1fea39;return serviceByName[_0xad09f1(0x1c8)](_0x3d4b59);}export function isDeclarativeService(_0x34cfc0){const _0x1b7301=a77_0x1fea39;return serviceGroups[_0x1b7301(0x1c8)](_0x34cfc0)||serviceByName[_0x1b7301(0x1b5)](_0x34cfc0)?.[_0x1b7301(0x1c5)]!==undefined;}export function getServiceEntry(_0x31cfea){const _0x4be5da=a77_0x1fea39;return serviceByName[_0x4be5da(0x1b5)](_0x31cfea);}export function getLegacyHandler(_0x3a72a5,_0x4203df){return undefined;}export function getAllDefinitions(){const _0x1e9abb=a77_0x1fea39;return Array['from'](definitions[_0x1e9abb(0x1b2)]());}
1
+ const a90_0x8d63fe=a90_0x5e96;(function(_0x130cc5,_0x1a01b9){const _0x4232ad=a90_0x5e96,_0x40ba80=_0x130cc5();while(!![]){try{const _0x1ae2f8=-parseInt(_0x4232ad(0x1da))/0x1+-parseInt(_0x4232ad(0x1db))/0x2*(parseInt(_0x4232ad(0x1eb))/0x3)+parseInt(_0x4232ad(0x1d2))/0x4+-parseInt(_0x4232ad(0x1e9))/0x5+parseInt(_0x4232ad(0x1e4))/0x6+-parseInt(_0x4232ad(0x1c2))/0x7*(-parseInt(_0x4232ad(0x1d7))/0x8)+parseInt(_0x4232ad(0x1e2))/0x9;if(_0x1ae2f8===_0x1a01b9)break;else _0x40ba80['push'](_0x40ba80['shift']());}catch(_0x1de360){_0x40ba80['push'](_0x40ba80['shift']());}}}(a90_0xdee6,0x9e737));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';function a90_0xdee6(){const _0xa6c000=['<script>','write','description','Menu','build','Dataset\x20&\x20Operations','Skills','defaultCommand','Authentication','Code\x20Generation','Schema','Configuration','3698356OSowhf','Run\x20Scripts','\x20\x20[high-risk-write]','BFF\x20Scripts','Database\x20Connections','888oRsLmr','\x20\x20[write]','API','370861tFtxgM','970czUwLD','create','SQL\x20Queries','from','Diagnostics','length','risk','3205953MUTHrJ','install','6358416AWGLOd','get','wildcardDef','service','Project','4163290BJIkRA','command','4479GEJypH','login','values','project','logout','has','preview','show','run','14889TRxKtk','set','App\x20Management','push'];a90_0xdee6=function(){return _0xa6c000;};return a90_0xdee6();}import{schemaDefinition}from'../commands/schema.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x4645ee){const _0x10e5b2=a90_0x5e96;for(const _0x2c3710 of _0x4645ee){definitions['set'](_0x2c3710[_0x10e5b2(0x1e7)]+':'+_0x2c3710[_0x10e5b2(0x1ea)],_0x2c3710);let _0x290bab=serviceGroups[_0x10e5b2(0x1e5)](_0x2c3710[_0x10e5b2(0x1e7)]);!_0x290bab&&(_0x290bab=[],serviceGroups['set'](_0x2c3710[_0x10e5b2(0x1e7)],_0x290bab)),_0x290bab[_0x10e5b2(0x1c5)](_0x2c3710);}}function registerDeclarativeService(_0xdfe335,_0x556e12,_0x3840e6){const _0x9e0f95=a90_0x5e96;registerDefinitions(_0x556e12);_0x3840e6?.[_0x9e0f95(0x1e6)]&&registerDefinitions([_0x3840e6[_0x9e0f95(0x1e6)]]);const _0x4f4e9d=_0x427ce0=>_0x427ce0==='read'?'':_0x427ce0===_0x9e0f95(0x1c7)?_0x9e0f95(0x1d8):_0x9e0f95(0x1d4),_0x6e128c={'service':_0x556e12[0x0][_0x9e0f95(0x1e7)],'label':_0xdfe335,'commands':_0x556e12['map'](_0x392078=>({'command':_0x392078[_0x9e0f95(0x1ea)],'description':_0x392078[_0x9e0f95(0x1c8)],'tag':_0x4f4e9d(_0x392078[_0x9e0f95(0x1e1)])})),'declarative':!![],'defaultCommand':_0x3840e6?.[_0x9e0f95(0x1cd)]??(_0x3840e6?.['isSingleCommand']?_0x556e12[0x0][_0x9e0f95(0x1ea)]:undefined),'wildcardDef':_0x3840e6?.[_0x9e0f95(0x1e6)],'isSingleCommand':_0x3840e6?.['isSingleCommand']};serviceRegistry[_0x9e0f95(0x1c5)](_0x6e128c),serviceByName[_0x9e0f95(0x1c3)](_0x6e128c['service'],_0x6e128c);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a90_0x8d63fe(0x1c1),'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1e8),projectDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1c4),appDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d3),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a90_0x8d63fe(0x1e0)]-0x1];last['commands']=[{'command':a90_0x8d63fe(0x1c6),'description':'Run\x20any\x20package.json\x20script','tag':''}];}registerDeclarativeService(a90_0x8d63fe(0x1ce),authDefinitions,{'defaultCommand':a90_0x8d63fe(0x1ec)}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1df),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1d0),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1d1),configDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d9),apiDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1c9),menuDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d6),dbDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1cb),datasetDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d5),bffDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1dd),sqlDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1cf),codegenDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1cc),skillDefinitions),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a90_0x8d63fe(0x1c0)});export const deprecatedAliases={'create':{'service':a90_0x8d63fe(0x1bc),'command':a90_0x8d63fe(0x1dc)},'start':{'service':'run','command':'start'},'build':{'service':a90_0x8d63fe(0x1c1),'command':a90_0x8d63fe(0x1ca)},'preview':{'service':a90_0x8d63fe(0x1c1),'command':a90_0x8d63fe(0x1bf)},'logout':{'service':'auth','command':a90_0x8d63fe(0x1bd)},'skills':{'service':'skill','command':a90_0x8d63fe(0x1e3)}};function a90_0x5e96(_0x496f68,_0x5ee3d7){_0x496f68=_0x496f68-0x1bb;const _0xdee6c6=a90_0xdee6();let _0x5e9673=_0xdee6c6[_0x496f68];return _0x5e9673;}export function findDefinition(_0x3518e5,_0x26ca35){const _0x33cd94=a90_0x8d63fe;return definitions[_0x33cd94(0x1e5)](_0x3518e5+':'+_0x26ca35);}export function isKnownService(_0x59464e){const _0x1b023d=a90_0x8d63fe;return serviceByName[_0x1b023d(0x1be)](_0x59464e);}export function isDeclarativeService(_0x544634){const _0x51083c=a90_0x8d63fe;return serviceGroups[_0x51083c(0x1be)](_0x544634)||serviceByName['get'](_0x544634)?.[_0x51083c(0x1e6)]!==undefined;}export function getServiceEntry(_0x534d0e){return serviceByName['get'](_0x534d0e);}export function getLegacyHandler(_0x9c008c,_0x2a6133){return undefined;}export function getAllDefinitions(){const _0x483929=a90_0x8d63fe;return Array[_0x483929(0x1de)](definitions[_0x483929(0x1bb)]());}
@@ -1 +1 @@
1
- const a78_0xec616d=a78_0x1525;function a78_0x1525(_0x229c25,_0x2640ef){_0x229c25=_0x229c25-0x1bf;const _0x44d80c=a78_0x44d8();let _0x152540=_0x44d80c[_0x229c25];return _0x152540;}(function(_0x53d236,_0x2bb9b8){const _0x453f3d=a78_0x1525,_0x2376fc=_0x53d236();while(!![]){try{const _0x436d65=-parseInt(_0x453f3d(0x1bf))/0x1+-parseInt(_0x453f3d(0x1ed))/0x2+parseInt(_0x453f3d(0x1d5))/0x3+parseInt(_0x453f3d(0x1c1))/0x4*(parseInt(_0x453f3d(0x1f2))/0x5)+-parseInt(_0x453f3d(0x1c3))/0x6+parseInt(_0x453f3d(0x1d0))/0x7*(-parseInt(_0x453f3d(0x1da))/0x8)+parseInt(_0x453f3d(0x1cf))/0x9;if(_0x436d65===_0x2bb9b8)break;else _0x2376fc['push'](_0x2376fc['shift']());}catch(_0x53be32){_0x2376fc['push'](_0x2376fc['shift']());}}}(a78_0x44d8,0x9a275));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a78_0xec616d(0x1d2),a78_0xec616d(0x1f8)]);function readPackageScripts(_0x56c90b){const _0x219120=a78_0xec616d,_0x7c9b60=resolve(_0x56c90b,'package.json');if(!existsSync(_0x7c9b60))return null;try{const _0x3c2293=JSON[_0x219120(0x1e2)](readFileSync(_0x7c9b60,'utf-8'));return _0x3c2293['scripts']??{};}catch{return null;}}function detectPackageManager(_0x429ca4){const _0x458017=a78_0xec616d;if(existsSync(resolve(_0x429ca4,'bun.lockb'))||existsSync(resolve(_0x429ca4,'bun.lock')))return'bun';if(existsSync(resolve(_0x429ca4,_0x458017(0x1f4))))return _0x458017(0x1c5);if(existsSync(resolve(_0x429ca4,_0x458017(0x1d4))))return _0x458017(0x1e7);return _0x458017(0x1cd);}async function versionCheck(_0x443a00){const _0x2855bc=a78_0xec616d,_0x2e437f=await checkCliVersion();if(_0x2e437f['needsUpgrade'])printCliUpgradeWarning(_0x2e437f);const _0x2db6df=await checkSdkVersion(_0x443a00);if(_0x2db6df[_0x2855bc(0x1fa)])printSdkUpgradeWarning(_0x2db6df);}function spawnScript(_0x3a697e,_0x2cdfc9,_0x5c4fc3,_0x5d0153){return new Promise((_0x1f41d9,_0x32eb2f)=>{const _0x228790=a78_0x1525,_0x25dc2d=['run',_0x2cdfc9,..._0x5c4fc3],_0x29bcc5=spawn(_0x3a697e,_0x25dc2d,{'cwd':_0x5d0153,'stdio':_0x228790(0x1df),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5d0153,_0x228790(0x1e9),_0x228790(0x1f6))+delimiter+process.env.PATH}});_0x29bcc5['on'](_0x228790(0x1e5),_0x20db6e=>{const _0x863231=_0x228790;if(_0x20db6e===0x0||_0x20db6e===null)_0x1f41d9();else _0x32eb2f(new Error(_0x3a697e+_0x863231(0x1e3)+_0x2cdfc9+_0x863231(0x1e6)+_0x20db6e));}),_0x29bcc5['on'](_0x228790(0x1c2),_0x32eb2f);});}function spawnViteBuildWatch(_0x17d378){return new Promise((_0x175308,_0x13508c)=>{const _0x3a350c=a78_0x1525,_0x2cf49b=spawn(_0x3a350c(0x1c0),[_0x3a350c(0x1cc),_0x3a350c(0x1d1)],{'cwd':_0x17d378,'stdio':_0x3a350c(0x1df),'shell':!![],'env':{...process.env,'PATH':''+join(_0x17d378,_0x3a350c(0x1e9),'.bin')+delimiter+process.env.PATH}});_0x2cf49b['on'](_0x3a350c(0x1e5),_0x110258=>{if(_0x110258===0x0||_0x110258===null)_0x175308();else _0x13508c(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x110258));}),_0x2cf49b['on'](_0x3a350c(0x1c2),_0x13508c);});}function spawnVitePreview(_0x3fd1eb){return new Promise((_0x2769f5,_0x2f7bc7)=>{const _0x13a64d=a78_0x1525,_0x14ac28=spawn(_0x13a64d(0x1c0),[_0x13a64d(0x1db)],{'cwd':_0x3fd1eb,'stdio':_0x13a64d(0x1df),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3fd1eb,_0x13a64d(0x1e9),_0x13a64d(0x1f6))+delimiter+process.env.PATH}});_0x14ac28['on'](_0x13a64d(0x1e5),_0x2cd795=>{const _0x1dafda=_0x13a64d;if(_0x2cd795===0x0||_0x2cd795===null)_0x2769f5();else _0x2f7bc7(new Error(_0x1dafda(0x1fb)+_0x2cd795));}),_0x14ac28['on']('error',_0x2f7bc7);});}function a78_0x44d8(){const _0x2dbdcf=['\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','\x20\x20\x20\x20','join','24uXCqBa','preview','push','entries','Script\x20name\x20defined\x20in\x20package.json','inherit','args','Script\x20\x22','parse','\x20run\x20','\x0a\x20\x20Available\x20scripts:\x0a','close','\x20exited\x20with\x20code\x20','yarn','keys','node_modules','script','\x20run\x20build','run','1022090cnrzvw','(none)','max','Run\x20a\x20package.json\x20script','validation','5RjbFTv','\x22\x20not\x20found\x20in\x20package.json.','pnpm-lock.yaml','log','.bin','length','dev','Available:\x20','needsUpgrade','vite\x20preview\x20exited\x20with\x20code\x20','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','818561oOQbuq','vite','1407056dnGQbZ','error','355116uWEXWJ','\x20run\x20start','pnpm','boolean','map','\x20run\x20<script>\x0a','bool','watch','Enable\x20watch\x20mode\x20for\x20preview','build','npm','\x20\x20EXAMPLES','8790201OjoRIH','1310022bmMPNI','--watch','start','No\x20scripts\x20defined\x20in\x20package.json.','yarn.lock','3759570UxRMFo','padEnd'];a78_0x44d8=function(){return _0x2dbdcf;};return a78_0x44d8();}const runFlags=[{'name':a78_0xec616d(0x1ca),'type':a78_0xec616d(0x1c6),'description':a78_0xec616d(0x1cb),'default':![]}];export const runDefinition={'service':a78_0xec616d(0x1ec),'command':a78_0xec616d(0x1ec),'description':a78_0xec616d(0x1f0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a78_0xec616d(0x1ea),'description':a78_0xec616d(0x1de),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3f6129=a78_0xec616d,_0x5ed30b=readPackageScripts(process['cwd']()),_0x2a0f1e=[];if(_0x5ed30b&&Object[_0x3f6129(0x1e8)](_0x5ed30b)[_0x3f6129(0x1f7)]>0x0){const _0xa37ec1=Object['keys'](_0x5ed30b),_0x47292d=Math[_0x3f6129(0x1ef)](..._0xa37ec1[_0x3f6129(0x1c7)](_0x307f84=>_0x307f84[_0x3f6129(0x1f7)]));_0x2a0f1e['push'](_0x3f6129(0x1d7));for(const [_0x46a8ac,_0x1b786b]of Object[_0x3f6129(0x1dd)](_0x5ed30b)){_0x2a0f1e[_0x3f6129(0x1dc)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x3f6129(0x1e3)+_0x46a8ac[_0x3f6129(0x1d6)](_0x47292d+0x2)+'#\x20'+_0x1b786b);}}else _0x2a0f1e[_0x3f6129(0x1dc)](_0x3f6129(0x1ce)),_0x2a0f1e['push'](_0x3f6129(0x1d8)+CLI_BIN_NAME+_0x3f6129(0x1c4)),_0x2a0f1e[_0x3f6129(0x1dc)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x3f6129(0x1eb)),_0x2a0f1e[_0x3f6129(0x1dc)](_0x3f6129(0x1d8)+CLI_BIN_NAME+'\x20run\x20preview'),_0x2a0f1e[_0x3f6129(0x1dc)](_0x3f6129(0x1d8)+CLI_BIN_NAME+_0x3f6129(0x1fc));return _0x2a0f1e[_0x3f6129(0x1d9)]('\x0a');},async 'execute'(_0x2f3652){const _0x2ba35a=a78_0xec616d,_0x509dc9=process['cwd'](),_0x3846bb=_0x2f3652[_0x2ba35a(0x1e0)][0x0],_0x39392a=_0x2f3652['args']['slice'](0x1),_0x3b60ee=readPackageScripts(_0x509dc9);if(!_0x3b60ee)throw CliErrors['validation']('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x3846bb){const _0x7d6ef0=Object[_0x2ba35a(0x1e8)](_0x3b60ee);if(_0x7d6ef0[_0x2ba35a(0x1f7)]===0x0)console['log'](_0x2ba35a(0x1d3));else{console['log'](_0x2ba35a(0x1e4));const _0xb03660=Math[_0x2ba35a(0x1ef)](..._0x7d6ef0[_0x2ba35a(0x1c7)](_0x3164cd=>_0x3164cd[_0x2ba35a(0x1f7)]));for(const [_0x16b43a,_0x2d1318]of Object['entries'](_0x3b60ee)){console['log'](_0x2ba35a(0x1d8)+_0x16b43a[_0x2ba35a(0x1d6)](_0xb03660+0x2)+_0x2d1318);}console[_0x2ba35a(0x1f5)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x2ba35a(0x1c8));}return{'ok':!![]};}if(!_0x3b60ee[_0x3846bb])throw CliErrors[_0x2ba35a(0x1f1)](_0x2ba35a(0x1e1)+_0x3846bb+_0x2ba35a(0x1f3),_0x2ba35a(0x1f9)+(Object['keys'](_0x3b60ee)[_0x2ba35a(0x1d9)](',\x20')||_0x2ba35a(0x1ee)));const _0x3517cf=detectPackageManager(_0x509dc9);VERSION_CHECK_SCRIPTS['has'](_0x3846bb)&&await versionCheck(_0x509dc9);if(_0x3846bb===_0x2ba35a(0x1db)&&_0x2f3652[_0x2ba35a(0x1c9)](_0x2ba35a(0x1ca)))return await Promise['all']([spawnViteBuildWatch(_0x509dc9),spawnVitePreview(_0x509dc9)]),{'ok':!![]};return await spawnScript(_0x3517cf,_0x3846bb,_0x39392a,_0x509dc9),{'ok':!![]};}};
1
+ const a91_0x3d1933=a91_0x8f53;function a91_0x8f53(_0x379e6a,_0x1fc777){_0x379e6a=_0x379e6a-0x159;const _0x5575b9=a91_0x5575();let _0x8f5358=_0x5575b9[_0x379e6a];return _0x8f5358;}(function(_0x34860b,_0x502fa8){const _0x495caa=a91_0x8f53,_0x4f1d31=_0x34860b();while(!![]){try{const _0xcf7d18=parseInt(_0x495caa(0x172))/0x1*(-parseInt(_0x495caa(0x16b))/0x2)+parseInt(_0x495caa(0x15f))/0x3+parseInt(_0x495caa(0x175))/0x4+-parseInt(_0x495caa(0x162))/0x5*(-parseInt(_0x495caa(0x177))/0x6)+-parseInt(_0x495caa(0x17c))/0x7+-parseInt(_0x495caa(0x196))/0x8+parseInt(_0x495caa(0x178))/0x9;if(_0xcf7d18===_0x502fa8)break;else _0x4f1d31['push'](_0x4f1d31['shift']());}catch(_0x5b6b57){_0x4f1d31['push'](_0x4f1d31['shift']());}}}(a91_0x5575,0xdc8b8));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set(['start','dev']);function readPackageScripts(_0x117067){const _0x1e840d=a91_0x8f53,_0x3f9ffe=resolve(_0x117067,'package.json');if(!existsSync(_0x3f9ffe))return null;try{const _0x27d425=JSON[_0x1e840d(0x182)](readFileSync(_0x3f9ffe,_0x1e840d(0x181)));return _0x27d425[_0x1e840d(0x191)]??{};}catch{return null;}}function detectPackageManager(_0x4c5658){const _0x340f6d=a91_0x8f53;if(existsSync(resolve(_0x4c5658,_0x340f6d(0x176)))||existsSync(resolve(_0x4c5658,'bun.lock')))return _0x340f6d(0x190);if(existsSync(resolve(_0x4c5658,_0x340f6d(0x184))))return _0x340f6d(0x17f);if(existsSync(resolve(_0x4c5658,_0x340f6d(0x17d))))return _0x340f6d(0x18d);return _0x340f6d(0x194);}async function versionCheck(_0x3673f2){const _0x5b344a=a91_0x8f53,_0x43844d=await checkCliVersion();if(_0x43844d[_0x5b344a(0x186)])printCliUpgradeWarning(_0x43844d);const _0x5082fa=await checkSdkVersion(_0x3673f2);if(_0x5082fa[_0x5b344a(0x186)])printSdkUpgradeWarning(_0x5082fa);}function spawnScript(_0x101033,_0xe8621f,_0x30c78f,_0x3854f1){return new Promise((_0x36ff30,_0x78b810)=>{const _0x43de3a=a91_0x8f53,_0x4e4e8c=[_0x43de3a(0x174),_0xe8621f,..._0x30c78f],_0x550118=spawn(_0x101033,_0x4e4e8c,{'cwd':_0x3854f1,'stdio':_0x43de3a(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3854f1,_0x43de3a(0x165),_0x43de3a(0x167))+delimiter+process.env.PATH}});_0x550118['on'](_0x43de3a(0x163),_0xde6937=>{const _0x3c65b7=_0x43de3a;if(_0xde6937===0x0||_0xde6937===null)_0x36ff30();else _0x78b810(new Error(_0x101033+_0x3c65b7(0x183)+_0xe8621f+_0x3c65b7(0x15c)+_0xde6937));}),_0x550118['on'](_0x43de3a(0x171),_0x78b810);});}function a91_0x5575(){const _0x148383=['watch','4117551nEQVxr','entries','push','20WAyKmR','close','validation','node_modules','length','.bin','No\x20package.json\x20found\x20in\x20current\x20directory.','args','inherit','1644494ZLZhIP','slice','keys','log','Run\x20a\x20package.json\x20script','preview','error','1QrujSV','Enable\x20watch\x20mode\x20for\x20preview','run','1313844UyakHF','bun.lockb','2123622oayJNf','10306611XnDVlg','script','max','map','5198263scjCkw','yarn.lock','Script\x20name\x20defined\x20in\x20package.json','pnpm','boolean','utf-8','parse','\x20run\x20','pnpm-lock.yaml','\x0a\x20\x20Available\x20scripts:\x0a','needsUpgrade','(none)','\x20\x20\x20\x20','padEnd','bool','Available:\x20','\x20run\x20preview','yarn','\x0a\x20\x20Usage:\x20','join','bun','scripts','vite','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','npm','Script\x20\x22','14349576IxUJqN','No\x20scripts\x20defined\x20in\x20package.json.','all','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','--watch','\x20exited\x20with\x20code\x20','\x20\x20EXAMPLES'];a91_0x5575=function(){return _0x148383;};return a91_0x5575();}function spawnViteBuildWatch(_0x24476a){return new Promise((_0x27b903,_0x2c5d0a)=>{const _0x474705=a91_0x8f53,_0x20ecb5=spawn(_0x474705(0x192),['build',_0x474705(0x15b)],{'cwd':_0x24476a,'stdio':_0x474705(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x24476a,_0x474705(0x165),_0x474705(0x167))+delimiter+process.env.PATH}});_0x20ecb5['on'](_0x474705(0x163),_0x423c26=>{const _0x6f6387=_0x474705;if(_0x423c26===0x0||_0x423c26===null)_0x27b903();else _0x2c5d0a(new Error(_0x6f6387(0x15a)+_0x423c26));}),_0x20ecb5['on'](_0x474705(0x171),_0x2c5d0a);});}function spawnVitePreview(_0x17e9ac){return new Promise((_0x28565c,_0x24c8fc)=>{const _0x204e05=a91_0x8f53,_0x18bb4b=spawn('vite',[_0x204e05(0x170)],{'cwd':_0x17e9ac,'stdio':_0x204e05(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x17e9ac,'node_modules','.bin')+delimiter+process.env.PATH}});_0x18bb4b['on'](_0x204e05(0x163),_0x4f0a7c=>{if(_0x4f0a7c===0x0||_0x4f0a7c===null)_0x28565c();else _0x24c8fc(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x4f0a7c));}),_0x18bb4b['on'](_0x204e05(0x171),_0x24c8fc);});}const runFlags=[{'name':a91_0x3d1933(0x15e),'type':a91_0x3d1933(0x180),'description':a91_0x3d1933(0x173),'default':![]}];export const runDefinition={'service':a91_0x3d1933(0x174),'command':'run','description':a91_0x3d1933(0x16f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a91_0x3d1933(0x179),'description':a91_0x3d1933(0x17e),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x1461b2=a91_0x3d1933,_0x4e1479=readPackageScripts(process['cwd']()),_0x1d2fa2=[];if(_0x4e1479&&Object[_0x1461b2(0x16d)](_0x4e1479)[_0x1461b2(0x166)]>0x0){const _0x3fa3ba=Object['keys'](_0x4e1479),_0x5f20be=Math['max'](..._0x3fa3ba[_0x1461b2(0x17b)](_0x59ecac=>_0x59ecac[_0x1461b2(0x166)]));_0x1d2fa2['push'](_0x1461b2(0x193));for(const [_0x1c91d9,_0x5c085e]of Object[_0x1461b2(0x160)](_0x4e1479)){_0x1d2fa2['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20'+_0x1c91d9[_0x1461b2(0x189)](_0x5f20be+0x2)+'#\x20'+_0x5c085e);}}else _0x1d2fa2['push'](_0x1461b2(0x15d)),_0x1d2fa2['push'](_0x1461b2(0x188)+CLI_BIN_NAME+'\x20run\x20start'),_0x1d2fa2[_0x1461b2(0x161)](_0x1461b2(0x188)+CLI_BIN_NAME+'\x20run\x20build'),_0x1d2fa2['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x1461b2(0x18c)),_0x1d2fa2['push'](_0x1461b2(0x188)+CLI_BIN_NAME+'\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview');return _0x1d2fa2['join']('\x0a');},async 'execute'(_0x8d0143){const _0x1b735e=a91_0x3d1933,_0x50b587=process['cwd'](),_0x1a47e4=_0x8d0143[_0x1b735e(0x169)][0x0],_0x206383=_0x8d0143[_0x1b735e(0x169)][_0x1b735e(0x16c)](0x1),_0x31a86b=readPackageScripts(_0x50b587);if(!_0x31a86b)throw CliErrors[_0x1b735e(0x164)](_0x1b735e(0x168));if(!_0x1a47e4){const _0x411f4a=Object[_0x1b735e(0x16d)](_0x31a86b);if(_0x411f4a[_0x1b735e(0x166)]===0x0)console[_0x1b735e(0x16e)](_0x1b735e(0x197));else{console[_0x1b735e(0x16e)](_0x1b735e(0x185));const _0x428931=Math[_0x1b735e(0x17a)](..._0x411f4a[_0x1b735e(0x17b)](_0x58ef38=>_0x58ef38[_0x1b735e(0x166)]));for(const [_0x2da530,_0x5ebb23]of Object[_0x1b735e(0x160)](_0x31a86b)){console[_0x1b735e(0x16e)](_0x1b735e(0x188)+_0x2da530['padEnd'](_0x428931+0x2)+_0x5ebb23);}console[_0x1b735e(0x16e)](_0x1b735e(0x18e)+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x31a86b[_0x1a47e4])throw CliErrors[_0x1b735e(0x164)](_0x1b735e(0x195)+_0x1a47e4+'\x22\x20not\x20found\x20in\x20package.json.',_0x1b735e(0x18b)+(Object['keys'](_0x31a86b)[_0x1b735e(0x18f)](',\x20')||_0x1b735e(0x187)));const _0xe7c224=detectPackageManager(_0x50b587);VERSION_CHECK_SCRIPTS['has'](_0x1a47e4)&&await versionCheck(_0x50b587);if(_0x1a47e4==='preview'&&_0x8d0143[_0x1b735e(0x18a)](_0x1b735e(0x15e)))return await Promise[_0x1b735e(0x159)]([spawnViteBuildWatch(_0x50b587),spawnVitePreview(_0x50b587)]),{'ok':!![]};return await spawnScript(_0xe7c224,_0x1a47e4,_0x206383,_0x50b587),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a79_0x39cd41=a79_0x4b4d;function a79_0x4b4d(_0x40be04,_0x1f9bf3){_0x40be04=_0x40be04-0x114;const _0x2c5838=a79_0x2c58();let _0x4b4d56=_0x2c5838[_0x40be04];return _0x4b4d56;}(function(_0x22c0c3,_0x5d787f){const _0x727c37=a79_0x4b4d,_0x4a20e4=_0x22c0c3();while(!![]){try{const _0x3a15de=-parseInt(_0x727c37(0x11b))/0x1*(parseInt(_0x727c37(0x117))/0x2)+parseInt(_0x727c37(0x11e))/0x3+parseInt(_0x727c37(0x119))/0x4+parseInt(_0x727c37(0x121))/0x5*(-parseInt(_0x727c37(0x116))/0x6)+parseInt(_0x727c37(0x115))/0x7*(-parseInt(_0x727c37(0x118))/0x8)+-parseInt(_0x727c37(0x11d))/0x9+parseInt(_0x727c37(0x114))/0xa;if(_0x3a15de===_0x5d787f)break;else _0x4a20e4['push'](_0x4a20e4['shift']());}catch(_0x3b62ed){_0x4a20e4['push'](_0x4a20e4['shift']());}}}(a79_0x2c58,0xdd515));function a79_0x2c58(){const _0xfc9108=['export','22696JnlJTz','json','4845843eiLdLi','4705449sGWgvQ','Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','7429785SKzmjB','31137980zPRTpz','29071pTDWRG','6AIPRsD','110OolNkc','2856ZLXOAx','3918084ZoICEi'];a79_0x2c58=function(){return _0xfc9108;};return a79_0x2c58();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x207878){const _0x5ec084=await buildSchemaPayload();return{'ok':!![],'data':_0x5ec084};}export const schemaDefinition={'service':a79_0x39cd41(0x120),'command':a79_0x39cd41(0x11a),'description':a79_0x39cd41(0x11f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a79_0x39cd41(0x11c),'flags':[],'execute':execute};
1
+ function a92_0x3aa3(){const _0x56bfd0=['12945slVADz','2625912hAZDGr','588JtVyMA','62MAhzXq','read','6577109MXRBLF','27bdaqkV','export','857115jYQRQe','2017224hZoAkW','24020100XNotZq','2280DYPAdW','Export\x20machine-readable\x20command\x20schema\x20(JSON)'];a92_0x3aa3=function(){return _0x56bfd0;};return a92_0x3aa3();}function a92_0x516e(_0x4f302b,_0x4e851b){_0x4f302b=_0x4f302b-0xd1;const _0x3aa36f=a92_0x3aa3();let _0x516e84=_0x3aa36f[_0x4f302b];return _0x516e84;}const a92_0xacebdf=a92_0x516e;(function(_0x58317a,_0x49154b){const _0x4ed44e=a92_0x516e,_0x2f72e2=_0x58317a();while(!![]){try{const _0x467804=-parseInt(_0x4ed44e(0xd6))/0x1*(-parseInt(_0x4ed44e(0xd9))/0x2)+parseInt(_0x4ed44e(0xd1))/0x3+-parseInt(_0x4ed44e(0xd2))/0x4+parseInt(_0x4ed44e(0xd4))/0x5*(-parseInt(_0x4ed44e(0xd8))/0x6)+-parseInt(_0x4ed44e(0xdb))/0x7+-parseInt(_0x4ed44e(0xd7))/0x8*(parseInt(_0x4ed44e(0xdc))/0x9)+parseInt(_0x4ed44e(0xd3))/0xa;if(_0x467804===_0x49154b)break;else _0x2f72e2['push'](_0x2f72e2['shift']());}catch(_0x59c525){_0x2f72e2['push'](_0x2f72e2['shift']());}}}(a92_0x3aa3,0x96520));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x32b646){const _0x113cb3=await buildSchemaPayload();return{'ok':!![],'data':_0x113cb3};}export const schemaDefinition={'service':'schema','command':a92_0xacebdf(0xdd),'description':a92_0xacebdf(0xd5),'risk':a92_0xacebdf(0xda),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a80_0x93aff=a80_0x2952;(function(_0x243b81,_0x47c95d){const _0x277968=a80_0x2952,_0x37b021=_0x243b81();while(!![]){try{const _0x1e6c9c=-parseInt(_0x277968(0x1c5))/0x1*(-parseInt(_0x277968(0x1ba))/0x2)+parseInt(_0x277968(0x1b8))/0x3*(-parseInt(_0x277968(0x1c4))/0x4)+-parseInt(_0x277968(0x1c7))/0x5+-parseInt(_0x277968(0x1c9))/0x6+parseInt(_0x277968(0x1b4))/0x7+parseInt(_0x277968(0x1bd))/0x8*(-parseInt(_0x277968(0x1b6))/0x9)+parseInt(_0x277968(0x1c1))/0xa;if(_0x1e6c9c===_0x47c95d)break;else _0x37b021['push'](_0x37b021['shift']());}catch(_0x3b01ba){_0x37b021['push'](_0x37b021['shift']());}}}(a80_0x22b7,0xec538));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a80_0x2952(_0x3c4920,_0x4b1592){_0x3c4920=_0x3c4920-0x1b0;const _0x22b79c=a80_0x22b7();let _0x29523b=_0x22b79c[_0x3c4920];return _0x29523b;}function a80_0x22b7(){const _0x1326aa=['apiError','6858453KjhrGU','setLogPath','27vslUah','\x20skill\x20installed','3GVPvgq','log','2687900syTMRG','install','nonInteractive','3016472nsNOrA','../../skills/npx-skills-add.js','inherit','pipe','49669680TctjJM','npx\x20skills\x20add\x20failed:\x20','write','5828728CnArgZ','1izOtzt','skill-install','9341990rcvhaz','unknown','11195688HjVPWd','info','cwd','skill','skipped','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.'];a80_0x22b7=function(){return _0x1326aa;};return a80_0x22b7();}export const skillDefinitions=[{'service':a80_0x93aff(0x1cc),'command':a80_0x93aff(0x1bb),'description':'Install\x20developer\x20skill\x20package','risk':a80_0x93aff(0x1c3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4fa18f){const _0x4f834b=a80_0x93aff;logger[_0x4f834b(0x1b5)](process[_0x4f834b(0x1cb)]()),logger[_0x4f834b(0x1ca)](_0x4f834b(0x1c6),'执行安装技能包命令(委托给\x20npx\x20skills\x20--global)');const {runNpxSkillsAddGlobal:_0x1edca5}=await import(_0x4f834b(0x1be)),_0x358b05=_0x4fa18f[_0x4f834b(0x1bc)]?_0x4f834b(0x1c0):_0x4f834b(0x1bf);console[_0x4f834b(0x1b9)](_0x4f834b(0x1b1));const _0x342f2b=_0x1edca5(process[_0x4f834b(0x1cb)](),'lovrabet/rabetbase',{'stdio':_0x358b05});if(_0x342f2b[_0x4f834b(0x1b0)])console[_0x4f834b(0x1b9)](_0x4f834b(0x1b2));else{if(_0x342f2b['ok'])console[_0x4f834b(0x1b9)](CLI_BIN_NAME+_0x4f834b(0x1b7));else throw CliErrors[_0x4f834b(0x1b3)](_0x4f834b(0x1c2)+(_0x342f2b['error']||_0x4f834b(0x1c8)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}}];
1
+ function a93_0x2d13(_0x4d3372,_0x5856e){_0x4d3372=_0x4d3372-0x1ab;const _0x34d974=a93_0x34d9();let _0x2d13f5=_0x34d974[_0x4d3372];return _0x2d13f5;}const a93_0x5129e3=a93_0x2d13;(function(_0x1ae2c1,_0x3086ee){const _0x2e0584=a93_0x2d13,_0x2498a4=_0x1ae2c1();while(!![]){try{const _0x2e560f=-parseInt(_0x2e0584(0x1b0))/0x1+parseInt(_0x2e0584(0x1bc))/0x2*(-parseInt(_0x2e0584(0x1b5))/0x3)+-parseInt(_0x2e0584(0x1c4))/0x4*(-parseInt(_0x2e0584(0x1be))/0x5)+-parseInt(_0x2e0584(0x1b8))/0x6+parseInt(_0x2e0584(0x1c1))/0x7*(-parseInt(_0x2e0584(0x1b4))/0x8)+parseInt(_0x2e0584(0x1b9))/0x9*(-parseInt(_0x2e0584(0x1ba))/0xa)+-parseInt(_0x2e0584(0x1bb))/0xb*(-parseInt(_0x2e0584(0x1c0))/0xc);if(_0x2e560f===_0x3086ee)break;else _0x2498a4['push'](_0x2498a4['shift']());}catch(_0xbe82b6){_0x2498a4['push'](_0x2498a4['shift']());}}}(a93_0x34d9,0xbcc8a));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':'skill','command':a93_0x5129e3(0x1b3),'description':'Install\x20developer\x20skill\x20package','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2728a6){const _0x1aa973=a93_0x5129e3;logger[_0x1aa973(0x1b6)](process[_0x1aa973(0x1c5)]()),logger[_0x1aa973(0x1ab)](_0x1aa973(0x1b2),_0x1aa973(0x1ae));const {runNpxSkillsAddGlobal:_0x51d811}=await import(_0x1aa973(0x1c2)),_0x39469e=_0x2728a6[_0x1aa973(0x1ac)]?'pipe':'inherit';console[_0x1aa973(0x1c3)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...');const _0x578e8a=_0x51d811(process[_0x1aa973(0x1c5)](),'lovrabet/rabetbase',{'stdio':_0x39469e});if(_0x578e8a[_0x1aa973(0x1bd)])console[_0x1aa973(0x1c3)](_0x1aa973(0x1bf));else{if(_0x578e8a['ok'])console[_0x1aa973(0x1c3)](CLI_BIN_NAME+_0x1aa973(0x1b7));else throw CliErrors[_0x1aa973(0x1b1)]('npx\x20skills\x20add\x20failed:\x20'+(_0x578e8a['error']||_0x1aa973(0x1ad)),_0x1aa973(0x1af));}return{'ok':!![]};}}];function a93_0x34d9(){const _0x464265=['install','1522336znhLEA','1470FlSPBJ','setLogPath','\x20skill\x20installed','6218250wFhqrT','13746141ryszce','10iHjggd','11IYGUer','5382KKgWME','skipped','411695MIKidy','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','75053868RaSIWp','28YElYqi','../../skills/npx-skills-add.js','log','4zNKiIA','cwd','info','nonInteractive','unknown','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','Check\x20network\x20connectivity\x20and\x20try\x20again.','920088vpqYAh','apiError','skill-install'];a93_0x34d9=function(){return _0x464265;};return a93_0x34d9();}
@@ -1 +1 @@
1
- const a81_0x2ee90e=a81_0x2a40;(function(_0x51d6bd,_0x3ff790){const _0x3a164f=a81_0x2a40,_0x15e469=_0x51d6bd();while(!![]){try{const _0x4c3028=-parseInt(_0x3a164f(0x149))/0x1*(parseInt(_0x3a164f(0x133))/0x2)+parseInt(_0x3a164f(0x137))/0x3*(-parseInt(_0x3a164f(0x146))/0x4)+-parseInt(_0x3a164f(0x131))/0x5+-parseInt(_0x3a164f(0x134))/0x6*(parseInt(_0x3a164f(0x13e))/0x7)+-parseInt(_0x3a164f(0x145))/0x8*(parseInt(_0x3a164f(0x140))/0x9)+parseInt(_0x3a164f(0x13c))/0xa*(parseInt(_0x3a164f(0x139))/0xb)+parseInt(_0x3a164f(0x147))/0xc;if(_0x4c3028===_0x3ff790)break;else _0x15e469['push'](_0x15e469['shift']());}catch(_0x41f5d9){_0x15e469['push'](_0x15e469['shift']());}}}(a81_0x4515,0x8aada));function a81_0x4515(){const _0x2ee3e6=['35427372sGEFft','appCode','1pdVUQb','boolean','4329005FYGZsS','Return\x20full\x20raw\x20SQL\x20query\x20object','643638jDLyrz','6031686znScMv','sqlCode','sql','29433GYjTXK','read','2182895GhhiiG','bool','description','20eLfoYQ','sqlcode','7yogQuZ','dbId','837ARQuHq','detail','verbose','sqlName','str','4184PhdzoK','220RjghPw'];a81_0x4515=function(){return _0x2ee3e6;};return a81_0x4515();}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a81_0x2a40(_0x8f0a40,_0x17cfaa){_0x8f0a40=_0x8f0a40-0x131;const _0x451520=a81_0x4515();let _0x2a4010=_0x451520[_0x8f0a40];return _0x2a4010;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a81_0x2ee90e(0x136),'command':a81_0x2ee90e(0x141),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a81_0x2ee90e(0x138),'flags':[SQLCODE_FLAG,{'name':'verbose','type':a81_0x2ee90e(0x14a),'description':a81_0x2ee90e(0x132)}],async 'execute'(_0x503c46){const _0x514cbc=a81_0x2ee90e,_0x260316=await getSqlQueryInfo(_0x503c46[_0x514cbc(0x148)],_0x503c46[_0x514cbc(0x144)](_0x514cbc(0x13d))),_0x562b0a=_0x503c46[_0x514cbc(0x13a)](_0x514cbc(0x142));if(_0x562b0a)return{'ok':!![],'data':_0x260316};const _0x571343=_0x260316[_0x514cbc(0x13f)]?await getDbName(_0x503c46[_0x514cbc(0x148)],_0x260316[_0x514cbc(0x13f)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x260316[_0x514cbc(0x135)],'sqlName':_0x260316[_0x514cbc(0x143)],'db':_0x571343?_0x571343+'\x20('+_0x260316['dbId']+')':_0x260316[_0x514cbc(0x13f)]??'','description':_0x260316[_0x514cbc(0x13b)]??'','sqlContent':_0x260316['sqlContent']??''}};}};
1
+ const a94_0x256bfb=a94_0x2e1b;(function(_0x3a6ce7,_0x3bb31d){const _0xa59d7f=a94_0x2e1b,_0x3184bf=_0x3a6ce7();while(!![]){try{const _0x3f3170=-parseInt(_0xa59d7f(0x68))/0x1*(-parseInt(_0xa59d7f(0x67))/0x2)+parseInt(_0xa59d7f(0x75))/0x3*(parseInt(_0xa59d7f(0x77))/0x4)+-parseInt(_0xa59d7f(0x7b))/0x5*(-parseInt(_0xa59d7f(0x74))/0x6)+parseInt(_0xa59d7f(0x78))/0x7+parseInt(_0xa59d7f(0x7a))/0x8+-parseInt(_0xa59d7f(0x6d))/0x9*(-parseInt(_0xa59d7f(0x79))/0xa)+-parseInt(_0xa59d7f(0x71))/0xb;if(_0x3f3170===_0x3bb31d)break;else _0x3184bf['push'](_0x3184bf['shift']());}catch(_0x4b5d64){_0x3184bf['push'](_0x3184bf['shift']());}}}(a94_0x455a,0x70a3c));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a94_0x2e1b(_0x49e072,_0x50669d){_0x49e072=_0x49e072-0x67;const _0x455ad5=a94_0x455a();let _0x2e1b28=_0x455ad5[_0x49e072];return _0x2e1b28;}function a94_0x455a(){const _0x31f314=['4AdqAoW','5201028XGrpGb','573470LiidmD','1302568PLvdEg','35FLMJbv','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','detail','10cUJUAr','120473mvMxxE','verbose','sqlContent','dbId','description','9NhvVOi','sqlcode','appCode','Return\x20full\x20raw\x20SQL\x20query\x20object','23062490NybRnn','sql','str','109062vhZaza','2595558eXUJgf','sqlCode'];a94_0x455a=function(){return _0x31f314;};return a94_0x455a();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a94_0x256bfb(0x72),'command':a94_0x256bfb(0x7d),'description':a94_0x256bfb(0x7c),'risk':'read','flags':[SQLCODE_FLAG,{'name':'verbose','type':'boolean','description':a94_0x256bfb(0x70)}],async 'execute'(_0x6a97bc){const _0x54245c=a94_0x256bfb,_0x521cf4=await getSqlQueryInfo(_0x6a97bc[_0x54245c(0x6f)],_0x6a97bc[_0x54245c(0x73)](_0x54245c(0x6e))),_0xf75e50=_0x6a97bc['bool'](_0x54245c(0x69));if(_0xf75e50)return{'ok':!![],'data':_0x521cf4};const _0x30e4f4=_0x521cf4[_0x54245c(0x6b)]?await getDbName(_0x6a97bc[_0x54245c(0x6f)],_0x521cf4[_0x54245c(0x6b)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x521cf4[_0x54245c(0x76)],'sqlName':_0x521cf4['sqlName'],'db':_0x30e4f4?_0x30e4f4+'\x20('+_0x521cf4[_0x54245c(0x6b)]+')':_0x521cf4[_0x54245c(0x6b)]??'','description':_0x521cf4[_0x54245c(0x6c)]??'','sqlContent':_0x521cf4[_0x54245c(0x6a)]??''}};}};
@@ -1 +1 @@
1
- const a82_0x18d5bd=a82_0x3511;(function(_0x318024,_0x60070d){const _0x2772bc=a82_0x3511,_0xe14857=_0x318024();while(!![]){try{const _0x4f4b7b=parseInt(_0x2772bc(0x1dd))/0x1*(-parseInt(_0x2772bc(0x1d9))/0x2)+parseInt(_0x2772bc(0x1e6))/0x3*(-parseInt(_0x2772bc(0x1d2))/0x4)+parseInt(_0x2772bc(0x1d3))/0x5*(-parseInt(_0x2772bc(0x1e5))/0x6)+parseInt(_0x2772bc(0x1e3))/0x7*(parseInt(_0x2772bc(0x1e8))/0x8)+parseInt(_0x2772bc(0x1ea))/0x9*(parseInt(_0x2772bc(0x1f0))/0xa)+-parseInt(_0x2772bc(0x1eb))/0xb*(-parseInt(_0x2772bc(0x1da))/0xc)+parseInt(_0x2772bc(0x1e7))/0xd*(parseInt(_0x2772bc(0x1ed))/0xe);if(_0x4f4b7b===_0x60070d)break;else _0xe14857['push'](_0xe14857['shift']());}catch(_0x7cb058){_0xe14857['push'](_0xe14857['shift']());}}}(a82_0xfcd4,0xc833e));import{executeSql}from'../../core/api-client.js';function a82_0xfcd4(){const _0x346676=['Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','99405XazgMG','22liFSyw','validation','42zsbxjW','execResult','now','1250sGQfVk','Returned\x20','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','params','3201172qlRwYW','983995rbAVEf','string','Invalid\x20JSON\x20for\x20--params:\x20','length','\x20row(s)\x20in\x20','str','298020pxoLgo','3299316CWkQNB','isArray','sql','11KszotW','execSuccess','read','exec','sqlcode','SQL\x20execution\x20failed','9083858FsNWtP','execError','6fSSQkZ','3Qqaupc','988117NQipjk','8skMaHz'];a82_0xfcd4=function(){return _0x346676;};return a82_0xfcd4();}import{CliErrors}from'../../errors.js';function a82_0x3511(_0x372a6b,_0x9a8100){_0x372a6b=_0x372a6b-0x1d0;const _0xfcd408=a82_0xfcd4();let _0x3511cc=_0xfcd408[_0x372a6b];return _0x3511cc;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlExec={'service':a82_0x18d5bd(0x1dc),'command':a82_0x18d5bd(0x1e0),'description':a82_0x18d5bd(0x1e9),'risk':a82_0x18d5bd(0x1df),'flags':[SQLCODE_FLAG,{'name':'params','type':a82_0x18d5bd(0x1d4),'description':a82_0x18d5bd(0x1d0)}],async 'execute'(_0x232630){const _0x3e7920=a82_0x18d5bd;let _0x325a9b;const _0x1bb723=_0x232630['str'](_0x3e7920(0x1d1));if(_0x1bb723)try{_0x325a9b=JSON['parse'](_0x1bb723);}catch{throw CliErrors[_0x3e7920(0x1ec)](_0x3e7920(0x1d5)+_0x1bb723);}const _0x537d0b=Date[_0x3e7920(0x1ef)](),_0x1b0cc9=await executeSql(_0x232630['appCode'],_0x232630[_0x3e7920(0x1d8)](_0x3e7920(0x1e1)),_0x325a9b),_0x2ab280=Date['now']()-_0x537d0b,_0x23b9c6=_0x1b0cc9?.[_0x3e7920(0x1ee)]??_0x1b0cc9,_0xdf434a=_0x1b0cc9?.[_0x3e7920(0x1de)]??!![];if(!_0xdf434a)return{'ok':![],'data':{'error':_0x1b0cc9?.[_0x3e7920(0x1e4)]||_0x3e7920(0x1e2),'elapsed':_0x2ab280},'message':_0x3e7920(0x1e2)};const _0x30e285=Array[_0x3e7920(0x1db)](_0x23b9c6)?_0x23b9c6:[];return{'ok':!![],'data':{'rows':_0x30e285,'rowCount':_0x30e285[_0x3e7920(0x1d6)],'elapsed':_0x2ab280},'message':_0x3e7920(0x1f1)+_0x30e285[_0x3e7920(0x1d6)]+_0x3e7920(0x1d7)+_0x2ab280+'ms'};}};
1
+ function a95_0x2d74(_0x21d865,_0x4372a2){_0x21d865=_0x21d865-0x76;const _0x23bdaa=a95_0x23bd();let _0x2d747b=_0x23bdaa[_0x21d865];return _0x2d747b;}const a95_0x2f19e5=a95_0x2d74;(function(_0x5acac0,_0x4d6dc9){const _0xd8e9df=a95_0x2d74,_0x301275=_0x5acac0();while(!![]){try{const _0x916bb3=-parseInt(_0xd8e9df(0x92))/0x1*(parseInt(_0xd8e9df(0x76))/0x2)+parseInt(_0xd8e9df(0x7a))/0x3+-parseInt(_0xd8e9df(0x84))/0x4*(parseInt(_0xd8e9df(0x82))/0x5)+-parseInt(_0xd8e9df(0x85))/0x6*(-parseInt(_0xd8e9df(0x94))/0x7)+-parseInt(_0xd8e9df(0x8c))/0x8+parseInt(_0xd8e9df(0x7b))/0x9*(parseInt(_0xd8e9df(0x81))/0xa)+parseInt(_0xd8e9df(0x8e))/0xb*(parseInt(_0xd8e9df(0x87))/0xc);if(_0x916bb3===_0x4d6dc9)break;else _0x301275['push'](_0x301275['shift']());}catch(_0x2168bb){_0x301275['push'](_0x301275['shift']());}}}(a95_0x23bd,0x5274b));function a95_0x23bd(){const _0x580d3c=['178077cAnjnO','1425555vHDhhH','SQL\x20execution\x20failed','isArray','string','sqlcode','now','30nSvdxG','6985RhFgPE','params','1036bzjrzE','24Bpdcyj','sql','12tdKGJP','execResult','execSuccess','parse','\x20row(s)\x20in\x20','3202552FaoMxR','validation','2575639UxCMlF','Returned\x20','execError','str','56976pVYMGf','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','878703pnVJof','6wwbCeJ','exec','Invalid\x20JSON\x20for\x20--params:\x20','length'];a95_0x23bd=function(){return _0x580d3c;};return a95_0x23bd();}import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlExec={'service':a95_0x2f19e5(0x86),'command':a95_0x2f19e5(0x77),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':'read','flags':[SQLCODE_FLAG,{'name':a95_0x2f19e5(0x83),'type':a95_0x2f19e5(0x7e),'description':a95_0x2f19e5(0x93)}],async 'execute'(_0x117105){const _0x7fc9fd=a95_0x2f19e5;let _0x356a6d;const _0x177b93=_0x117105['str'](_0x7fc9fd(0x83));if(_0x177b93)try{_0x356a6d=JSON[_0x7fc9fd(0x8a)](_0x177b93);}catch{throw CliErrors[_0x7fc9fd(0x8d)](_0x7fc9fd(0x78)+_0x177b93);}const _0x57c32f=Date[_0x7fc9fd(0x80)](),_0x4645a6=await executeSql(_0x117105['appCode'],_0x117105[_0x7fc9fd(0x91)](_0x7fc9fd(0x7f)),_0x356a6d),_0x16c5e1=Date[_0x7fc9fd(0x80)]()-_0x57c32f,_0x1c2097=_0x4645a6?.[_0x7fc9fd(0x88)]??_0x4645a6,_0x1b7e28=_0x4645a6?.[_0x7fc9fd(0x89)]??!![];if(!_0x1b7e28)return{'ok':![],'data':{'error':_0x4645a6?.[_0x7fc9fd(0x90)]||_0x7fc9fd(0x7c),'elapsed':_0x16c5e1},'message':'SQL\x20execution\x20failed'};const _0x160e81=Array[_0x7fc9fd(0x7d)](_0x1c2097)?_0x1c2097:[];return{'ok':!![],'data':{'rows':_0x160e81,'rowCount':_0x160e81[_0x7fc9fd(0x79)],'elapsed':_0x16c5e1},'message':_0x7fc9fd(0x8f)+_0x160e81['length']+_0x7fc9fd(0x8b)+_0x16c5e1+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x1db9ae,_0x2785dd){const _0x5995e7=a83_0x552d,_0x40d4c6=_0x1db9ae();while(!![]){try{const _0x392fa9=-parseInt(_0x5995e7(0xb3))/0x1+parseInt(_0x5995e7(0xb5))/0x2+parseInt(_0x5995e7(0xae))/0x3+parseInt(_0x5995e7(0xaf))/0x4+-parseInt(_0x5995e7(0xad))/0x5*(parseInt(_0x5995e7(0xb2))/0x6)+parseInt(_0x5995e7(0xb0))/0x7+parseInt(_0x5995e7(0xb1))/0x8*(parseInt(_0x5995e7(0xb4))/0x9);if(_0x392fa9===_0x2785dd)break;else _0x40d4c6['push'](_0x40d4c6['shift']());}catch(_0x10a73d){_0x40d4c6['push'](_0x40d4c6['shift']());}}}(a83_0x4ef4,0x9650c));import{sqlList}from'../../commands/sql/list.js';function a83_0x4ef4(){const _0xc1c26f=['8lqOohV','12PbGTyC','841111etEsbk','5384961xbQMSU','351988nNPfFo','2483335sqgBZF','752571uTGLin','3970280VIKags','3026709AoCUtA'];a83_0x4ef4=function(){return _0xc1c26f;};return a83_0x4ef4();}import{sqlDetail}from'../../commands/sql/detail.js';function a83_0x552d(_0x1ede7a,_0x3e80ae){_0x1ede7a=_0x1ede7a-0xad;const _0x4ef4f1=a83_0x4ef4();let _0x552daf=_0x4ef4f1[_0x1ede7a];return _0x552daf;}import{sqlValidate}from'../../commands/sql/validate.js';import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec,sqlPull];
1
+ (function(_0x46a909,_0x423be1){const _0x5c6459=a96_0x1dde,_0x3ba518=_0x46a909();while(!![]){try{const _0x277831=-parseInt(_0x5c6459(0x1ee))/0x1*(parseInt(_0x5c6459(0x1ed))/0x2)+parseInt(_0x5c6459(0x1f5))/0x3*(parseInt(_0x5c6459(0x1f8))/0x4)+-parseInt(_0x5c6459(0x1f4))/0x5*(parseInt(_0x5c6459(0x1ec))/0x6)+-parseInt(_0x5c6459(0x1f3))/0x7*(parseInt(_0x5c6459(0x1f1))/0x8)+parseInt(_0x5c6459(0x1ef))/0x9*(parseInt(_0x5c6459(0x1f2))/0xa)+-parseInt(_0x5c6459(0x1f9))/0xb*(parseInt(_0x5c6459(0x1f0))/0xc)+parseInt(_0x5c6459(0x1f6))/0xd*(parseInt(_0x5c6459(0x1f7))/0xe);if(_0x277831===_0x423be1)break;else _0x3ba518['push'](_0x3ba518['shift']());}catch(_0xdac9d0){_0x3ba518['push'](_0x3ba518['shift']());}}}(a96_0x18cd,0xa0676));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec,sqlPull];function a96_0x1dde(_0x51a0e8,_0x456209){_0x51a0e8=_0x51a0e8-0x1ec;const _0x18cdb5=a96_0x18cd();let _0x1dde3a=_0x18cdb5[_0x51a0e8];return _0x1dde3a;}function a96_0x18cd(){const _0x345b1b=['18WdLPMu','2HHZlqP','474711hqWWdD','9GfwfCU','108mmeMlQ','2922968nsOBgR','11918820dlrMCw','7irDksx','1827615tLtRFi','81NbNkJE','3991JEdDOH','62958fQwbQK','153932NvXjXL','1244023KvGQWA'];a96_0x18cd=function(){return _0x345b1b;};return a96_0x18cd();}
@@ -1 +1 @@
1
- function a84_0x3c76(_0xe94410,_0x1fb709){_0xe94410=_0xe94410-0x104;const _0x12c3e3=a84_0x12c3();let _0x3c766d=_0x12c3e3[_0xe94410];return _0x3c766d;}const a84_0x4fbaec=a84_0x3c76;(function(_0x4b56f8,_0x1f2e5d){const _0xd965a2=a84_0x3c76,_0x4d7963=_0x4b56f8();while(!![]){try{const _0x3bca64=-parseInt(_0xd965a2(0x115))/0x1+parseInt(_0xd965a2(0x123))/0x2*(parseInt(_0xd965a2(0x11e))/0x3)+-parseInt(_0xd965a2(0x116))/0x4+parseInt(_0xd965a2(0x125))/0x5+-parseInt(_0xd965a2(0x108))/0x6*(-parseInt(_0xd965a2(0x124))/0x7)+parseInt(_0xd965a2(0x121))/0x8+-parseInt(_0xd965a2(0x11c))/0x9;if(_0x3bca64===_0x1f2e5d)break;else _0x4d7963['push'](_0x4d7963['shift']());}catch(_0x22ac55){_0x4d7963['push'](_0x4d7963['shift']());}}}(a84_0x12c3,0xc976c));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a84_0x12c3(){const _0x3e4c4d=['3698055dtsUZT','Found\x20','length','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','description','List\x20custom\x20SQL\x20queries','pagesize','Page\x20size','78XnqphJ','dbId','Page\x20number','page','sqlName','map','boolean','verbose','name','totalCount','No\x20custom\x20SQL\x20queries\x20found.','string','sqlcode','722361JBpnHd','5982412aetCwV','paging','sql','\x20SQL\x20queries\x20(total:\x20','str','bool','7957764GcOKRY','num','1893711BcjjIq','read','number','9719784vQMzeB','Filter\x20by\x20SQL\x20name','2EKbium','722365WCdJpi'];a84_0x12c3=function(){return _0x3e4c4d;};return a84_0x12c3();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a84_0x4fbaec(0x118),'command':'list','description':a84_0x4fbaec(0x105),'risk':a84_0x4fbaec(0x11f),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a84_0x4fbaec(0x113),'description':a84_0x4fbaec(0x122)},{'name':a84_0x4fbaec(0x10b),'type':a84_0x4fbaec(0x120),'description':a84_0x4fbaec(0x10a),'default':0x1},{'name':a84_0x4fbaec(0x106),'type':a84_0x4fbaec(0x120),'description':a84_0x4fbaec(0x107)},{'name':'verbose','type':a84_0x4fbaec(0x10e),'description':a84_0x4fbaec(0x128)}],async 'execute'(_0x387458){const _0x4fc076=a84_0x4fbaec,_0x5e4f48=await listSqlQueries(_0x387458['appCode'],{'sqlCode':_0x387458[_0x4fc076(0x11a)](_0x4fc076(0x114))||undefined,'sqlName':_0x387458[_0x4fc076(0x11a)](_0x4fc076(0x110))||undefined,'currentPage':_0x387458[_0x4fc076(0x11d)](_0x4fc076(0x10b)),'pageSize':_0x387458['num'](_0x4fc076(0x106),0x32)}),_0x33ec08=_0x387458[_0x4fc076(0x11b)](_0x4fc076(0x10f)),_0x20470f=_0x5e4f48['tableData']??[],_0xc7ef31=_0x5e4f48[_0x4fc076(0x117)]?.[_0x4fc076(0x111)]??_0x20470f[_0x4fc076(0x127)];let _0x2be616;return _0x33ec08?_0x2be616=_0x20470f:_0x2be616=await Promise['all'](_0x20470f[_0x4fc076(0x10d)](async _0x4c689a=>{const _0x5731cc=_0x4fc076;let _0x1e732f;try{_0x1e732f=_0x4c689a['dbId']?await getDbName(_0x387458['appCode'],_0x4c689a[_0x5731cc(0x109)]):undefined;}catch{}return{'sqlCode':_0x4c689a['sqlCode'],'sqlName':_0x4c689a[_0x5731cc(0x10c)],'description':_0x4c689a[_0x5731cc(0x104)]??'','db':_0x1e732f?_0x1e732f+'\x20('+_0x4c689a[_0x5731cc(0x109)]+')':_0x4c689a[_0x5731cc(0x109)]??''};})),{'ok':!![],'data':_0x2be616,'message':_0x20470f[_0x4fc076(0x127)]===0x0?_0x4fc076(0x112):_0x4fc076(0x126)+_0x20470f[_0x4fc076(0x127)]+_0x4fc076(0x119)+_0xc7ef31+').'};}};
1
+ function a97_0x2944(){const _0x478511=['sqlCode','all','5832610NwaMYa','5229190jQOjfs','Found\x20','list','str','154AcPFah','7fHxOKm','read','11vYbcap','map','tableData','6nMsvTl','appCode','num','sqlName','description','boolean','\x20SQL\x20queries\x20(total:\x20','Page\x20size','15wDTSrJ','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','Page\x20number','verbose','paging','10374128XfWBva','5003sCMgtJ','totalCount','1810464NMhnCw','page','bool','6758739vbGeWd','number','length','642364UHRHrl','No\x20custom\x20SQL\x20queries\x20found.','sql','name','dbId','pagesize'];a97_0x2944=function(){return _0x478511;};return a97_0x2944();}const a97_0x2a2d89=a97_0xad83;function a97_0xad83(_0x4099fd,_0x3e16bf){_0x4099fd=_0x4099fd-0xe1;const _0x294473=a97_0x2944();let _0xad830=_0x294473[_0x4099fd];return _0xad830;}(function(_0x344a4e,_0x2eb499){const _0x25c269=a97_0xad83,_0x1b2f57=_0x344a4e();while(!![]){try{const _0x4e9c20=parseInt(_0x25c269(0xf6))/0x1*(-parseInt(_0x25c269(0xe2))/0x2)+-parseInt(_0x25c269(0xf0))/0x3*(-parseInt(_0x25c269(0xfe))/0x4)+parseInt(_0x25c269(0x107))/0x5*(-parseInt(_0x25c269(0xe8))/0x6)+parseInt(_0x25c269(0xe3))/0x7*(parseInt(_0x25c269(0xf5))/0x8)+-parseInt(_0x25c269(0xfb))/0x9+parseInt(_0x25c269(0x106))/0xa+-parseInt(_0x25c269(0xe5))/0xb*(-parseInt(_0x25c269(0xf8))/0xc);if(_0x4e9c20===_0x2eb499)break;else _0x1b2f57['push'](_0x1b2f57['shift']());}catch(_0x17381d){_0x1b2f57['push'](_0x1b2f57['shift']());}}}(a97_0x2944,0x9f226));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a97_0x2a2d89(0x100),'command':a97_0x2a2d89(0x109),'description':'List\x20custom\x20SQL\x20queries','risk':a97_0x2a2d89(0xe4),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a97_0x2a2d89(0x101),'type':'string','description':'Filter\x20by\x20SQL\x20name'},{'name':a97_0x2a2d89(0xf9),'type':a97_0x2a2d89(0xfc),'description':a97_0x2a2d89(0xf2),'default':0x1},{'name':a97_0x2a2d89(0x103),'type':'number','description':a97_0x2a2d89(0xef)},{'name':a97_0x2a2d89(0xf3),'type':a97_0x2a2d89(0xed),'description':a97_0x2a2d89(0xf1)}],async 'execute'(_0x36ea58){const _0x76c60d=a97_0x2a2d89,_0x52e752=await listSqlQueries(_0x36ea58[_0x76c60d(0xe9)],{'sqlCode':_0x36ea58[_0x76c60d(0xe1)]('sqlcode')||undefined,'sqlName':_0x36ea58[_0x76c60d(0xe1)](_0x76c60d(0x101))||undefined,'currentPage':_0x36ea58['num'](_0x76c60d(0xf9)),'pageSize':_0x36ea58[_0x76c60d(0xea)](_0x76c60d(0x103),0x32)}),_0x43f700=_0x36ea58[_0x76c60d(0xfa)](_0x76c60d(0xf3)),_0x275db3=_0x52e752[_0x76c60d(0xe7)]??[],_0x3e0687=_0x52e752[_0x76c60d(0xf4)]?.[_0x76c60d(0xf7)]??_0x275db3[_0x76c60d(0xfd)];let _0x175e9e;return _0x43f700?_0x175e9e=_0x275db3:_0x175e9e=await Promise[_0x76c60d(0x105)](_0x275db3[_0x76c60d(0xe6)](async _0xec32e3=>{const _0x4b3225=_0x76c60d;let _0x48ebac;try{_0x48ebac=_0xec32e3[_0x4b3225(0x102)]?await getDbName(_0x36ea58['appCode'],_0xec32e3[_0x4b3225(0x102)]):undefined;}catch{}return{'sqlCode':_0xec32e3[_0x4b3225(0x104)],'sqlName':_0xec32e3[_0x4b3225(0xeb)],'description':_0xec32e3[_0x4b3225(0xec)]??'','db':_0x48ebac?_0x48ebac+'\x20('+_0xec32e3['dbId']+')':_0xec32e3[_0x4b3225(0x102)]??''};})),{'ok':!![],'data':_0x175e9e,'message':_0x275db3[_0x76c60d(0xfd)]===0x0?_0x76c60d(0xff):_0x76c60d(0x108)+_0x275db3[_0x76c60d(0xfd)]+_0x76c60d(0xee)+_0x3e0687+').'};}};
@@ -1 +1 @@
1
- const a85_0x3e9a3a=a85_0x565e;(function(_0x136450,_0x31f0fa){const _0x3fb4a2=a85_0x565e,_0x4e8c3f=_0x136450();while(!![]){try{const _0x4f0597=-parseInt(_0x3fb4a2(0x1c7))/0x1+-parseInt(_0x3fb4a2(0x1ba))/0x2*(parseInt(_0x3fb4a2(0x1d1))/0x3)+parseInt(_0x3fb4a2(0x1b4))/0x4*(parseInt(_0x3fb4a2(0x1e6))/0x5)+-parseInt(_0x3fb4a2(0x1d5))/0x6+parseInt(_0x3fb4a2(0x1c5))/0x7*(parseInt(_0x3fb4a2(0x1c6))/0x8)+-parseInt(_0x3fb4a2(0x1d3))/0x9*(parseInt(_0x3fb4a2(0x1c1))/0xa)+parseInt(_0x3fb4a2(0x1c2))/0xb*(parseInt(_0x3fb4a2(0x1b2))/0xc);if(_0x4f0597===_0x31f0fa)break;else _0x4e8c3f['push'](_0x4e8c3f['shift']());}catch(_0x269d82){_0x4e8c3f['push'](_0x4e8c3f['shift']());}}}(a85_0x1486,0x2f0e3));function a85_0x1486(){const _0x4a30ac=['\x20failed','skipped','sqlcode','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20','sqlContent','430atpiYU','force','sqlCode','stderr','cancelled','Force\x20pull\x20cancelled.','toLowerCase','85070ZhpXjj','3806wYPXok','POST','question','7cCSBti','1676264LfCshS','151028qOQvFK','Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20(','appCode','totalCount','tableData','trim','Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote','sqlName','Would\x20pull\x20','\x20skipped,\x20','2280HZAWzJ','utf8','153TtAYgS','message','620730ZdVtMj','str','yes','write','push','Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)','length','unchanged','close','local\x20differs\x20from\x20remote','includes','string','would_pull','name','conflict','No\x20remote\x20SQL\x20queries\x20matched.','\x20SQL\x20file(s)\x20under\x20','96210WXKIsn','/smartapi/custom/queryUserCustomSqlList','8916mJjJrO','boolean','60HKcylA'];a85_0x1486=function(){return _0x4a30ac;};return a85_0x1486();}function a85_0x565e(_0x23911d,_0x2163ad){_0x23911d=_0x23911d-0x1b1;const _0x1486aa=a85_0x1486();let _0x565e53=_0x1486aa[_0x23911d];return _0x565e53;}import{createInterface}from'node:readline';import{readFile,writeFile}from'node:fs/promises';import{join}from'node:path';import{getSqlQueryInfo,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{findProjectRootDirectory}from'../../context.js';import{assignSqlFileNames,buildPulledSqlFileContent,resolveSqlLocalDir}from'../../commands/sql/shared.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x2676d0,_0xcca800){const _0x3a3411=a85_0x565e,_0x4f3eaf=[];let _0x504455=0x1;while(!![]){const _0x1b2511=await listSqlQueries(_0x2676d0,{'currentPage':_0x504455,'pageSize':PAGE_SIZE,'sqlCode':_0xcca800[_0x3a3411(0x1bc)],'sqlName':_0xcca800[_0x3a3411(0x1ce)]}),_0x2839f3=_0x1b2511[_0x3a3411(0x1cb)]??[];_0x4f3eaf[_0x3a3411(0x1d9)](..._0x2839f3);if(_0x2839f3[_0x3a3411(0x1db)]===0x0)break;const _0x249ea4=_0x1b2511['paging']?.[_0x3a3411(0x1ca)];if(_0x249ea4!=null?_0x4f3eaf[_0x3a3411(0x1db)]>=_0x249ea4:_0x2839f3[_0x3a3411(0x1db)]<PAGE_SIZE)break;_0x504455++;}return _0x4f3eaf;}async function ensureSqlContent(_0xdd54a4,_0x5be29a){const _0x270bbd=a85_0x565e;if(_0x5be29a[_0x270bbd(0x1b9)]!=null&&String(_0x5be29a['sqlContent'])['length']>0x0)return _0x5be29a;return getSqlQueryInfo(_0xdd54a4,_0x5be29a[_0x270bbd(0x1bc)]);}export const sqlPull={'service':'sql','command':'pull','description':'Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/','risk':a85_0x3e9a3a(0x1d8),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a85_0x3e9a3a(0x1e0),'description':a85_0x3e9a3a(0x1da)},{'name':a85_0x3e9a3a(0x1bb),'type':a85_0x3e9a3a(0x1b3),'description':a85_0x3e9a3a(0x1cd)}],async 'dryRun'(_0x4339b9){const _0x350943=a85_0x3e9a3a,_0x2ac2c6=findProjectRootDirectory(),_0x878df6=resolveSqlLocalDir(_0x2ac2c6),_0x293255=_0x4339b9[_0x350943(0x1d6)](_0x350943(0x1b7))||undefined,_0x2a3515=_0x4339b9[_0x350943(0x1d6)](_0x350943(0x1e2))||undefined,_0x3fd527=await fetchAllSqlQueries(_0x4339b9[_0x350943(0x1c9)],{'sqlCode':_0x293255,'sqlName':_0x2a3515}),_0x55ecdb=[],_0x1f89eb=[];for(const _0x3e3737 of _0x3fd527){try{_0x55ecdb[_0x350943(0x1d9)](await ensureSqlContent(_0x4339b9[_0x350943(0x1c9)],_0x3e3737));}catch(_0x1fc3aa){_0x1f89eb[_0x350943(0x1d9)]({'sqlCode':_0x3e3737['sqlCode'],'error':_0x1fc3aa instanceof Error?_0x1fc3aa[_0x350943(0x1d4)]:String(_0x1fc3aa)});}}const _0x2cc2e3=assignSqlFileNames(_0x55ecdb),_0x4345e5=[];for(const [_0x49eed7,_0x2df274]of _0x2cc2e3){const _0x1c70ea=join(_0x878df6,_0x49eed7),_0x234fdc=buildPulledSqlFileContent(_0x2df274);let _0x3f15e2=_0x350943(0x1e1),_0x32a679;if(await fileExists(_0x1c70ea)){const _0x4dbacf=await readFile(_0x1c70ea,_0x350943(0x1d2));_0x4dbacf===_0x234fdc?(_0x3f15e2=_0x350943(0x1b6),_0x32a679=_0x350943(0x1dc)):(_0x3f15e2=_0x350943(0x1e3),_0x32a679='local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)');}_0x4345e5[_0x350943(0x1d9)]({'sqlCode':_0x2df274[_0x350943(0x1bc)],'sqlName':_0x2df274['sqlName'],'filePath':_0x1c70ea,'status':_0x3f15e2,'reason':_0x32a679});}return{'method':_0x350943(0x1c3),'url':_0x350943(0x1b1),'body':{'appCode':_0x4339b9[_0x350943(0x1c9)],'sqlCode':_0x293255??null,'sqlName':_0x2a3515??null,'loadErrors':_0x1f89eb,'files':_0x4345e5},'description':_0x350943(0x1cf)+_0x4345e5[_0x350943(0x1db)]+_0x350943(0x1e5)+_0x878df6};},async 'execute'(_0x19739f){const _0xd6f087=a85_0x3e9a3a,_0x170b2b=findProjectRootDirectory(),_0x14147a=resolveSqlLocalDir(_0x170b2b),_0xe1e9d0=_0x19739f[_0xd6f087(0x1d6)](_0xd6f087(0x1b7))||undefined,_0x1b5f36=_0x19739f['str'](_0xd6f087(0x1e2))||undefined,_0x4149af=_0x19739f['bool'](_0xd6f087(0x1bb)),_0x4de1ff=await fetchAllSqlQueries(_0x19739f[_0xd6f087(0x1c9)],{'sqlCode':_0xe1e9d0,'sqlName':_0x1b5f36});if(_0x4de1ff[_0xd6f087(0x1db)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0xd6f087(0x1e4)};const _0x1a2e15=[],_0x5744bb=[];for(const _0x350b86 of _0x4de1ff){try{_0x1a2e15[_0xd6f087(0x1d9)](await ensureSqlContent(_0x19739f[_0xd6f087(0x1c9)],_0x350b86));}catch(_0x20c9b7){_0x5744bb[_0xd6f087(0x1d9)]({'sqlCode':_0x350b86[_0xd6f087(0x1bc)],'error':_0x20c9b7 instanceof Error?_0x20c9b7[_0xd6f087(0x1d4)]:String(_0x20c9b7)});}}if(_0x1a2e15[_0xd6f087(0x1db)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x5744bb},'message':_0xd6f087(0x1c8)+_0x5744bb[_0xd6f087(0x1db)]+'\x20error(s)).'};const _0x5ca796=assignSqlFileNames(_0x1a2e15);if(_0x4149af&&!_0x19739f['nonInteractive']){let _0xa1dc02=![];for(const [_0x302e9c,_0x5a2fc5]of _0x5ca796){const _0xb3fbc=join(_0x14147a,_0x302e9c),_0x2386f3=buildPulledSqlFileContent(_0x5a2fc5);if(await fileExists(_0xb3fbc)){const _0x20850f=await readFile(_0xb3fbc,_0xd6f087(0x1d2));if(_0x20850f!==_0x2386f3){_0xa1dc02=!![];break;}}}if(_0xa1dc02){const _0x26e06d=await confirmForce();if(!_0x26e06d)throw CliErrors[_0xd6f087(0x1be)](_0xd6f087(0x1bf));}}const _0x540738=[],_0x2d2ef7=[];for(const [_0x3fc092,_0x268836]of _0x5ca796){const _0x363e1f=join(_0x14147a,_0x3fc092),_0x4277ff=buildPulledSqlFileContent(_0x268836);try{if(await fileExists(_0x363e1f)){const _0x2252b1=await readFile(_0x363e1f,_0xd6f087(0x1d2));if(_0x2252b1===_0x4277ff){_0x2d2ef7[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'reason':_0xd6f087(0x1dc)});continue;}if(!_0x4149af){_0x2d2ef7[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'reason':_0xd6f087(0x1de)});continue;}}await ensureParentDirectory(_0x363e1f),await writeFile(_0x363e1f,_0x4277ff,_0xd6f087(0x1d2)),_0x540738[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'filePath':_0x363e1f});}catch(_0x4c8236){_0x5744bb[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'error':_0x4c8236 instanceof Error?_0x4c8236['message']:String(_0x4c8236)});}}const _0x3e3835=_0x5744bb[_0xd6f087(0x1db)]===0x0;return{'ok':_0x3e3835,'data':{'pulled':_0x540738,'skipped':_0x2d2ef7,'failed':_0x5744bb},'message':'Pull\x20complete:\x20'+_0x540738[_0xd6f087(0x1db)]+'\x20written,\x20'+_0x2d2ef7[_0xd6f087(0x1db)]+_0xd6f087(0x1d0)+_0x5744bb[_0xd6f087(0x1db)]+_0xd6f087(0x1b5)};}};async function confirmForce(){const _0x272698=a85_0x3e9a3a,_0x452ad1=createInterface({'input':process['stdin'],'output':process[_0x272698(0x1bd)]}),_0x1bd49f=await new Promise(_0x41ff4a=>{const _0x49a815=_0x272698;_0x452ad1[_0x49a815(0x1c4)](_0x49a815(0x1b8),_0x41ff4a);});return _0x452ad1[_0x272698(0x1dd)](),['y',_0x272698(0x1d7)][_0x272698(0x1df)](_0x1bd49f[_0x272698(0x1cc)]()[_0x272698(0x1c0)]());}
1
+ const a98_0x4fe761=a98_0xeb5c;(function(_0x497aca,_0xa78ca2){const _0x5849f4=a98_0xeb5c,_0x19e347=_0x497aca();while(!![]){try{const _0x3fc2b8=-parseInt(_0x5849f4(0x149))/0x1*(-parseInt(_0x5849f4(0x13d))/0x2)+parseInt(_0x5849f4(0x12e))/0x3+parseInt(_0x5849f4(0x125))/0x4*(parseInt(_0x5849f4(0x147))/0x5)+-parseInt(_0x5849f4(0x146))/0x6*(-parseInt(_0x5849f4(0x141))/0x7)+-parseInt(_0x5849f4(0x150))/0x8*(parseInt(_0x5849f4(0x142))/0x9)+parseInt(_0x5849f4(0x13a))/0xa+-parseInt(_0x5849f4(0x128))/0xb;if(_0x3fc2b8===_0xa78ca2)break;else _0x19e347['push'](_0x19e347['shift']());}catch(_0x3a1896){_0x19e347['push'](_0x19e347['shift']());}}}(a98_0x18e8,0xcda1c));import{createInterface}from'node:readline';import{readFile,writeFile}from'node:fs/promises';function a98_0x18e8(){const _0x58325a=['includes','Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/','boolean','No\x20remote\x20SQL\x20queries\x20matched.','18960XacKXE','length','yes','sqlName','conflict','would_pull','bool','close','sqlContent','2536760TQbvvb','force','\x20skipped,\x20','42463190ETPaEV','utf8','totalCount','name','unchanged','Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)','2372169zQKhkq','nonInteractive','sql','paging','sqlCode','appCode','str','\x20failed','string','sqlcode','Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20(','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20','16527950MuLAdd','write','/smartapi/custom/queryUserCustomSqlList','2740988LvhDlt','stdin','toLowerCase','cancelled','1056503HarviX','3735sialyr','stderr','\x20error(s)).','push','24HKqnmS','10XDghFN','message','1YAfIwc','trim','skipped'];a98_0x18e8=function(){return _0x58325a;};return a98_0x18e8();}import{join}from'node:path';import{getSqlQueryInfo,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{findProjectRootDirectory}from'../../context.js';import{assignSqlFileNames,buildPulledSqlFileContent,resolveSqlLocalDir}from'../../commands/sql/shared.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x583b60,_0x571bfa){const _0x1c881c=a98_0xeb5c,_0x290d76=[];let _0xed75ad=0x1;while(!![]){const _0x588d87=await listSqlQueries(_0x583b60,{'currentPage':_0xed75ad,'pageSize':PAGE_SIZE,'sqlCode':_0x571bfa['sqlCode'],'sqlName':_0x571bfa[_0x1c881c(0x153)]}),_0x1b82e1=_0x588d87['tableData']??[];_0x290d76[_0x1c881c(0x145)](..._0x1b82e1);if(_0x1b82e1[_0x1c881c(0x151)]===0x0)break;const _0x537af5=_0x588d87[_0x1c881c(0x131)]?.[_0x1c881c(0x12a)];if(_0x537af5!=null?_0x290d76[_0x1c881c(0x151)]>=_0x537af5:_0x1b82e1[_0x1c881c(0x151)]<PAGE_SIZE)break;_0xed75ad++;}return _0x290d76;}async function ensureSqlContent(_0x44c935,_0x5981ac){const _0x230945=a98_0xeb5c;if(_0x5981ac[_0x230945(0x124)]!=null&&String(_0x5981ac[_0x230945(0x124)])[_0x230945(0x151)]>0x0)return _0x5981ac;return getSqlQueryInfo(_0x44c935,_0x5981ac[_0x230945(0x132)]);}function a98_0xeb5c(_0x48504a,_0x4a7396){_0x48504a=_0x48504a-0x123;const _0x18e8e2=a98_0x18e8();let _0xeb5ced=_0x18e8e2[_0x48504a];return _0xeb5ced;}export const sqlPull={'service':a98_0x4fe761(0x130),'command':'pull','description':a98_0x4fe761(0x14d),'risk':a98_0x4fe761(0x13b),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a98_0x4fe761(0x12b),'type':a98_0x4fe761(0x136),'description':a98_0x4fe761(0x12d)},{'name':a98_0x4fe761(0x126),'type':a98_0x4fe761(0x14e),'description':'Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote'}],async 'dryRun'(_0x546f2b){const _0xdb96f5=a98_0x4fe761,_0xa58ed9=findProjectRootDirectory(),_0x23eaa5=resolveSqlLocalDir(_0xa58ed9),_0x7824e4=_0x546f2b[_0xdb96f5(0x134)](_0xdb96f5(0x137))||undefined,_0x1a5f9f=_0x546f2b[_0xdb96f5(0x134)]('name')||undefined,_0x5abc31=await fetchAllSqlQueries(_0x546f2b[_0xdb96f5(0x133)],{'sqlCode':_0x7824e4,'sqlName':_0x1a5f9f}),_0x1743eb=[],_0x4df210=[];for(const _0xd419f7 of _0x5abc31){try{_0x1743eb[_0xdb96f5(0x145)](await ensureSqlContent(_0x546f2b[_0xdb96f5(0x133)],_0xd419f7));}catch(_0x3ba109){_0x4df210['push']({'sqlCode':_0xd419f7[_0xdb96f5(0x132)],'error':_0x3ba109 instanceof Error?_0x3ba109[_0xdb96f5(0x148)]:String(_0x3ba109)});}}const _0x252db0=assignSqlFileNames(_0x1743eb),_0x1c3d55=[];for(const [_0x1a46d2,_0x532676]of _0x252db0){const _0xadf02f=join(_0x23eaa5,_0x1a46d2),_0x3457af=buildPulledSqlFileContent(_0x532676);let _0x1f4699=_0xdb96f5(0x155),_0x58223b;if(await fileExists(_0xadf02f)){const _0x1a70ff=await readFile(_0xadf02f,_0xdb96f5(0x129));_0x1a70ff===_0x3457af?(_0x1f4699=_0xdb96f5(0x14b),_0x58223b=_0xdb96f5(0x12c)):(_0x1f4699=_0xdb96f5(0x154),_0x58223b='local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)');}_0x1c3d55[_0xdb96f5(0x145)]({'sqlCode':_0x532676[_0xdb96f5(0x132)],'sqlName':_0x532676['sqlName'],'filePath':_0xadf02f,'status':_0x1f4699,'reason':_0x58223b});}return{'method':'POST','url':_0xdb96f5(0x13c),'body':{'appCode':_0x546f2b['appCode'],'sqlCode':_0x7824e4??null,'sqlName':_0x1a5f9f??null,'loadErrors':_0x4df210,'files':_0x1c3d55},'description':'Would\x20pull\x20'+_0x1c3d55[_0xdb96f5(0x151)]+'\x20SQL\x20file(s)\x20under\x20'+_0x23eaa5};},async 'execute'(_0x3aebaa){const _0x474ee8=a98_0x4fe761,_0xb1d85a=findProjectRootDirectory(),_0x5fc1f7=resolveSqlLocalDir(_0xb1d85a),_0x2a86f4=_0x3aebaa[_0x474ee8(0x134)]('sqlcode')||undefined,_0x1221cb=_0x3aebaa[_0x474ee8(0x134)](_0x474ee8(0x12b))||undefined,_0x19ebef=_0x3aebaa[_0x474ee8(0x156)](_0x474ee8(0x126)),_0x4919=await fetchAllSqlQueries(_0x3aebaa['appCode'],{'sqlCode':_0x2a86f4,'sqlName':_0x1221cb});if(_0x4919['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x474ee8(0x14f)};const _0xb81af7=[],_0x145b02=[];for(const _0x5a408c of _0x4919){try{_0xb81af7[_0x474ee8(0x145)](await ensureSqlContent(_0x3aebaa[_0x474ee8(0x133)],_0x5a408c));}catch(_0x327ac7){_0x145b02[_0x474ee8(0x145)]({'sqlCode':_0x5a408c[_0x474ee8(0x132)],'error':_0x327ac7 instanceof Error?_0x327ac7['message']:String(_0x327ac7)});}}if(_0xb81af7[_0x474ee8(0x151)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x145b02},'message':_0x474ee8(0x138)+_0x145b02[_0x474ee8(0x151)]+_0x474ee8(0x144)};const _0x531719=assignSqlFileNames(_0xb81af7);if(_0x19ebef&&!_0x3aebaa[_0x474ee8(0x12f)]){let _0x40e7be=![];for(const [_0x520029,_0x3e5c24]of _0x531719){const _0xc641e=join(_0x5fc1f7,_0x520029),_0x3ac909=buildPulledSqlFileContent(_0x3e5c24);if(await fileExists(_0xc641e)){const _0xe1c70=await readFile(_0xc641e,_0x474ee8(0x129));if(_0xe1c70!==_0x3ac909){_0x40e7be=!![];break;}}}if(_0x40e7be){const _0x277cfc=await confirmForce();if(!_0x277cfc)throw CliErrors[_0x474ee8(0x140)]('Force\x20pull\x20cancelled.');}}const _0x3c54ad=[],_0x1bbd88=[];for(const [_0x7d54f6,_0x64b60e]of _0x531719){const _0x3d38fe=join(_0x5fc1f7,_0x7d54f6),_0x556e54=buildPulledSqlFileContent(_0x64b60e);try{if(await fileExists(_0x3d38fe)){const _0xc30c75=await readFile(_0x3d38fe,_0x474ee8(0x129));if(_0xc30c75===_0x556e54){_0x1bbd88[_0x474ee8(0x145)]({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'reason':_0x474ee8(0x12c)});continue;}if(!_0x19ebef){_0x1bbd88['push']({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'reason':'local\x20differs\x20from\x20remote'});continue;}}await ensureParentDirectory(_0x3d38fe),await writeFile(_0x3d38fe,_0x556e54,_0x474ee8(0x129)),_0x3c54ad[_0x474ee8(0x145)]({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'filePath':_0x3d38fe});}catch(_0x5a6aef){_0x145b02[_0x474ee8(0x145)]({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'error':_0x5a6aef instanceof Error?_0x5a6aef[_0x474ee8(0x148)]:String(_0x5a6aef)});}}const _0x2529fb=_0x145b02[_0x474ee8(0x151)]===0x0;return{'ok':_0x2529fb,'data':{'pulled':_0x3c54ad,'skipped':_0x1bbd88,'failed':_0x145b02},'message':'Pull\x20complete:\x20'+_0x3c54ad[_0x474ee8(0x151)]+'\x20written,\x20'+_0x1bbd88[_0x474ee8(0x151)]+_0x474ee8(0x127)+_0x145b02[_0x474ee8(0x151)]+_0x474ee8(0x135)};}};async function confirmForce(){const _0x1789b9=a98_0x4fe761,_0x1764f8=createInterface({'input':process[_0x1789b9(0x13e)],'output':process[_0x1789b9(0x143)]}),_0x13bdc4=await new Promise(_0x816e5b=>{const _0x38eaed=_0x1789b9;_0x1764f8['question'](_0x38eaed(0x139),_0x816e5b);});return _0x1764f8[_0x1789b9(0x123)](),['y',_0x1789b9(0x152)][_0x1789b9(0x14c)](_0x13bdc4[_0x1789b9(0x14a)]()[_0x1789b9(0x13f)]());}
@@ -1 +1 @@
1
- const a86_0x3eaa40=a86_0x57e2;(function(_0x49197f,_0x56eb6b){const _0x54400f=a86_0x57e2,_0x3c6358=_0x49197f();while(!![]){try{const _0x4ccd39=-parseInt(_0x54400f(0x1dc))/0x1+-parseInt(_0x54400f(0x1cd))/0x2+parseInt(_0x54400f(0x1bf))/0x3*(parseInt(_0x54400f(0x1d3))/0x4)+parseInt(_0x54400f(0x1c4))/0x5+parseInt(_0x54400f(0x1e0))/0x6+-parseInt(_0x54400f(0x1d9))/0x7+parseInt(_0x54400f(0x1d6))/0x8;if(_0x4ccd39===_0x56eb6b)break;else _0x3c6358['push'](_0x3c6358['shift']());}catch(_0xa2e16){_0x3c6358['push'](_0x3c6358['shift']());}}}(a86_0x5c7e,0xc4f59));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';function a86_0x5c7e(){const _0x1da76c=['sqlcode','join','str','length','24pVwjaB','Path\x20to\x20the\x20SQL\x20file','sql','10003032rlbFjd','Updated','file','2084971pGKnql','none','\x20successfully','1400219ouBzLr','sqlName','sqlname','cwd','2230776dRUxHA','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','sqlType','\x20chars)','save','description','message','sqlCode','dbId','string','write','\x20|\x20Params:\x20','POST','action','Validation:\x20','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','created','745428BaVIRN','appCode','tables','Created','utf-8','3777175ZKFDai','Conflict\x20detected','N/A','parameters','blocked','type','\x20|\x20Tables:\x20','validation','dbName','2727298DFaJwZ','SQL\x20validation\x20failed:\x20'];a86_0x5c7e=function(){return _0x1da76c;};return a86_0x5c7e();}import{resolveOneDb}from'../../core/db-resolver.js';import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';function a86_0x57e2(_0x2b4101,_0x532b6c){_0x2b4101=_0x2b4101-0x1b8;const _0x5c7e19=a86_0x5c7e();let _0x57e2ca=_0x5c7e19[_0x2b4101];return _0x57e2ca;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a86_0x3eaa40(0x1d5),'command':a86_0x3eaa40(0x1e4),'description':a86_0x3eaa40(0x1bd),'risk':a86_0x3eaa40(0x1b8),'flags':[{'name':a86_0x3eaa40(0x1d8),'type':a86_0x3eaa40(0x1e9),'required':!![],'description':a86_0x3eaa40(0x1d4)},SQLCODE_FLAG_OPTIONAL,{'name':a86_0x3eaa40(0x1de),'type':a86_0x3eaa40(0x1e9),'description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a86_0x3eaa40(0x1e9),'description':a86_0x3eaa40(0x1e1)},{'name':a86_0x3eaa40(0x1e5),'type':a86_0x3eaa40(0x1e9),'description':'SQL\x20query\x20description'}],async 'validate'(_0x3868ce){const _0x42d8cf=a86_0x3eaa40,_0xf7c2d4=resolve(process[_0x42d8cf(0x1df)](),_0x3868ce[_0x42d8cf(0x1d1)](_0x42d8cf(0x1d8)));if(!existsSync(_0xf7c2d4))throw CliErrors[_0x42d8cf(0x1cb)]('File\x20not\x20found:\x20'+_0xf7c2d4);const _0x245d3a=readFileSync(_0xf7c2d4,'utf-8'),_0x1b5b98=validateSql(_0x245d3a);if(!_0x1b5b98['valid'])throw CliErrors['validation'](_0x42d8cf(0x1ce)+_0x1b5b98[_0x42d8cf(0x1e6)]);},async 'dryRun'(_0x40d3c4){const _0x579f5b=a86_0x3eaa40,_0x428bb0=resolve(process[_0x579f5b(0x1df)](),_0x40d3c4[_0x579f5b(0x1d1)](_0x579f5b(0x1d8))),_0x308d66=readFileSync(_0x428bb0,'utf-8'),_0x322d4c=validateSql(_0x308d66),_0x108d02=_0x40d3c4[_0x579f5b(0x1d1)]('db')||undefined,{db:_0x4633d6,error:_0x34aeb9}=await resolveOneDb(_0x40d3c4['appCode'],_0x108d02);return{'method':_0x579f5b(0x1ba),'url':'/api/node-toolbox/sql/save','body':{'appCode':_0x40d3c4[_0x579f5b(0x1c0)],'sqlContent':'('+_0x308d66[_0x579f5b(0x1d2)]+_0x579f5b(0x1e3),'sqlCode':_0x40d3c4[_0x579f5b(0x1d1)]('sqlcode')||undefined,'sqlName':_0x40d3c4[_0x579f5b(0x1d1)](_0x579f5b(0x1de))||undefined,'db':_0x4633d6?_0x4633d6[_0x579f5b(0x1cc)]+'\x20('+_0x4633d6[_0x579f5b(0x1e8)]+')':_0x34aeb9},'description':['Save\x20SQL\x20query\x20from\x20'+_0x40d3c4[_0x579f5b(0x1d1)]('file'),_0x579f5b(0x1bc)+_0x322d4c[_0x579f5b(0x1e6)],'Type:\x20'+_0x322d4c[_0x579f5b(0x1e2)][_0x579f5b(0x1c9)]+_0x579f5b(0x1ca)+(_0x322d4c[_0x579f5b(0x1c1)][_0x579f5b(0x1d0)](',\x20')||_0x579f5b(0x1c6))+_0x579f5b(0x1b9)+(_0x322d4c[_0x579f5b(0x1c7)][_0x579f5b(0x1d0)](',\x20')||_0x579f5b(0x1da))]['join']('\x0a')};},async 'execute'(_0x24d420){const _0x5a474c=a86_0x3eaa40,_0x47b687=resolve(process[_0x5a474c(0x1df)](),_0x24d420[_0x5a474c(0x1d1)](_0x5a474c(0x1d8))),_0x23675b=readFileSync(_0x47b687,_0x5a474c(0x1c3)),_0x26a12d=_0x24d420[_0x5a474c(0x1d1)]('db')||undefined,{db:_0x24afa1,error:_0x3fcb86}=await resolveOneDb(_0x24d420[_0x5a474c(0x1c0)],_0x26a12d);if(_0x3fcb86)throw CliErrors[_0x5a474c(0x1cb)](_0x3fcb86);const _0x38c73e=await saveSqlQuery({'appCode':_0x24d420[_0x5a474c(0x1c0)],'sqlContent':_0x23675b,'sqlCode':_0x24d420['str'](_0x5a474c(0x1cf))||undefined,'sqlName':_0x24d420['str'](_0x5a474c(0x1de))||undefined,'dbId':_0x24afa1[_0x5a474c(0x1e8)],'description':_0x24d420[_0x5a474c(0x1d1)](_0x5a474c(0x1e5))||undefined});if(_0x38c73e[_0x5a474c(0x1c8)])return{'ok':![],'data':_0x38c73e,'message':_0x38c73e[_0x5a474c(0x1e6)]||_0x5a474c(0x1c5)};return{'ok':!![],'data':{'sqlCode':_0x38c73e[_0x5a474c(0x1e7)],'sqlName':_0x38c73e[_0x5a474c(0x1dd)],'action':_0x38c73e[_0x5a474c(0x1bb)]},'message':(_0x38c73e['action']===_0x5a474c(0x1be)?_0x5a474c(0x1c2):_0x5a474c(0x1d7))+_0x5a474c(0x1db)+(_0x38c73e['sqlCode']?'\x20('+_0x38c73e[_0x5a474c(0x1e7)]+')':'')};}};
1
+ const a99_0x593524=a99_0x3b25;(function(_0x370e1d,_0x998393){const _0x13271e=a99_0x3b25,_0x346ec2=_0x370e1d();while(!![]){try{const _0x4d8a26=-parseInt(_0x13271e(0x129))/0x1*(-parseInt(_0x13271e(0x144))/0x2)+-parseInt(_0x13271e(0x14e))/0x3+-parseInt(_0x13271e(0x138))/0x4*(parseInt(_0x13271e(0x14f))/0x5)+-parseInt(_0x13271e(0x141))/0x6*(-parseInt(_0x13271e(0x12a))/0x7)+-parseInt(_0x13271e(0x151))/0x8+parseInt(_0x13271e(0x12c))/0x9+-parseInt(_0x13271e(0x13d))/0xa;if(_0x4d8a26===_0x998393)break;else _0x346ec2['push'](_0x346ec2['shift']());}catch(_0xdfde71){_0x346ec2['push'](_0x346ec2['shift']());}}}(a99_0x444d,0xf2503));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';import{resolveOneDb}from'../../core/db-resolver.js';import{validateSql}from'../../core/sql-validator.js';function a99_0x444d(){const _0x17cc14=['18MTySXz','sqlname','write','sqlName','Created','POST','sql','\x20|\x20Tables:\x20','sqlCode','Conflict\x20detected','1047951BWKEjM','5mGQqQY','join','8825688SCfWIn','dbId','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','cwd','\x20chars)','\x20successfully','blocked','N/A','tables','/api/node-toolbox/sql/save','description','Save\x20SQL\x20query\x20from\x20','action','16405ckNUUd','1379liaTGP','save','11287035eZDJbo','Validation:\x20','valid','appCode','sqlcode','file','message','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','File\x20not\x20found:\x20','SQL\x20query\x20description','str','utf-8','1135308ziSbSe','\x20|\x20Params:\x20','length','type','Updated','4886390zSSFjs','string','Type:\x20','validation','55302PUZECL','created','SQL\x20query\x20display\x20name'];a99_0x444d=function(){return _0x17cc14;};return a99_0x444d();}import{CliErrors}from'../../errors.js';function a99_0x3b25(_0x1199f0,_0x28583f){_0x1199f0=_0x1199f0-0x124;const _0x444d5e=a99_0x444d();let _0x3b2560=_0x444d5e[_0x1199f0];return _0x3b2560;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a99_0x593524(0x14a),'command':a99_0x593524(0x12b),'description':a99_0x593524(0x133),'risk':a99_0x593524(0x146),'flags':[{'name':a99_0x593524(0x131),'type':'string','required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':a99_0x593524(0x145),'type':a99_0x593524(0x13e),'description':a99_0x593524(0x143)},{'name':'db','type':a99_0x593524(0x13e),'description':a99_0x593524(0x153)},{'name':a99_0x593524(0x126),'type':a99_0x593524(0x13e),'description':a99_0x593524(0x135)}],async 'validate'(_0xbf919e){const _0x10960e=a99_0x593524,_0xee0cea=resolve(process[_0x10960e(0x154)](),_0xbf919e[_0x10960e(0x136)](_0x10960e(0x131)));if(!existsSync(_0xee0cea))throw CliErrors['validation'](_0x10960e(0x134)+_0xee0cea);const _0x331741=readFileSync(_0xee0cea,'utf-8'),_0x503ea3=validateSql(_0x331741);if(!_0x503ea3[_0x10960e(0x12e)])throw CliErrors[_0x10960e(0x140)]('SQL\x20validation\x20failed:\x20'+_0x503ea3['message']);},async 'dryRun'(_0x35f94d){const _0x12719e=a99_0x593524,_0x24f585=resolve(process['cwd'](),_0x35f94d[_0x12719e(0x136)](_0x12719e(0x131))),_0x65849a=readFileSync(_0x24f585,'utf-8'),_0x1cd8c2=validateSql(_0x65849a),_0x4ba517=_0x35f94d['str']('db')||undefined,{db:_0x4c89d0,error:_0x5e78a2}=await resolveOneDb(_0x35f94d[_0x12719e(0x12f)],_0x4ba517);return{'method':_0x12719e(0x149),'url':_0x12719e(0x125),'body':{'appCode':_0x35f94d['appCode'],'sqlContent':'('+_0x65849a[_0x12719e(0x13a)]+_0x12719e(0x155),'sqlCode':_0x35f94d[_0x12719e(0x136)](_0x12719e(0x130))||undefined,'sqlName':_0x35f94d[_0x12719e(0x136)]('sqlname')||undefined,'db':_0x4c89d0?_0x4c89d0['dbName']+'\x20('+_0x4c89d0['dbId']+')':_0x5e78a2},'description':[_0x12719e(0x127)+_0x35f94d[_0x12719e(0x136)]('file'),_0x12719e(0x12d)+_0x1cd8c2[_0x12719e(0x132)],_0x12719e(0x13f)+_0x1cd8c2['sqlType'][_0x12719e(0x13b)]+_0x12719e(0x14b)+(_0x1cd8c2[_0x12719e(0x124)][_0x12719e(0x150)](',\x20')||_0x12719e(0x158))+_0x12719e(0x139)+(_0x1cd8c2['parameters'][_0x12719e(0x150)](',\x20')||'none')][_0x12719e(0x150)]('\x0a')};},async 'execute'(_0x353286){const _0x387d71=a99_0x593524,_0x35c877=resolve(process[_0x387d71(0x154)](),_0x353286[_0x387d71(0x136)]('file')),_0x4fd2ef=readFileSync(_0x35c877,_0x387d71(0x137)),_0x51aee5=_0x353286[_0x387d71(0x136)]('db')||undefined,{db:_0x4470b2,error:_0x65ca84}=await resolveOneDb(_0x353286[_0x387d71(0x12f)],_0x51aee5);if(_0x65ca84)throw CliErrors[_0x387d71(0x140)](_0x65ca84);const _0x280c4c=await saveSqlQuery({'appCode':_0x353286['appCode'],'sqlContent':_0x4fd2ef,'sqlCode':_0x353286[_0x387d71(0x136)](_0x387d71(0x130))||undefined,'sqlName':_0x353286[_0x387d71(0x136)](_0x387d71(0x145))||undefined,'dbId':_0x4470b2[_0x387d71(0x152)],'description':_0x353286[_0x387d71(0x136)](_0x387d71(0x126))||undefined});if(_0x280c4c[_0x387d71(0x157)])return{'ok':![],'data':_0x280c4c,'message':_0x280c4c[_0x387d71(0x132)]||_0x387d71(0x14d)};return{'ok':!![],'data':{'sqlCode':_0x280c4c[_0x387d71(0x14c)],'sqlName':_0x280c4c[_0x387d71(0x147)],'action':_0x280c4c[_0x387d71(0x128)]},'message':(_0x280c4c['action']===_0x387d71(0x142)?_0x387d71(0x148):_0x387d71(0x13c))+_0x387d71(0x156)+(_0x280c4c[_0x387d71(0x14c)]?'\x20('+_0x280c4c['sqlCode']+')':'')};}};
@@ -1 +1 @@
1
- const a87_0x5928f9=a87_0xde12;(function(_0x5661f6,_0x502cb8){const _0xe62155=a87_0xde12,_0x453c81=_0x5661f6();while(!![]){try{const _0x16411d=parseInt(_0xe62155(0xd0))/0x1*(-parseInt(_0xe62155(0xc3))/0x2)+-parseInt(_0xe62155(0xc1))/0x3*(-parseInt(_0xe62155(0xc4))/0x4)+-parseInt(_0xe62155(0xc2))/0x5+-parseInt(_0xe62155(0xc5))/0x6+-parseInt(_0xe62155(0xc7))/0x7+-parseInt(_0xe62155(0xcf))/0x8*(parseInt(_0xe62155(0xd6))/0x9)+-parseInt(_0xe62155(0xcb))/0xa*(-parseInt(_0xe62155(0xd4))/0xb);if(_0x16411d===_0x502cb8)break;else _0x453c81['push'](_0x453c81['shift']());}catch(_0x3c45a8){_0x453c81['push'](_0x453c81['shift']());}}}(a87_0x355a,0xb6082));import{join}from'node:path';export const SQL_LOCAL_REL_DIR=a87_0x5928f9(0xc9);function a87_0x355a(){const _0x15be4b=['sqlContent','7402857CrCscU','--\x20@lovrabet.sqlCode:\x20','.rabetbase/sql','--\x20@lovrabet.description:','10SxFSiv','has','set','join','176584ikSTft','5287qKtRYu','sqlName','.sql','endsWith','48533221bgPhKK','trimEnd','333eVxBDv','replace','unnamed','78XnMlkP','5462385DrioaL','162RAAcKU','119348WZAors','6283770AFxsrE'];a87_0x355a=function(){return _0x15be4b;};return a87_0x355a();}export function resolveSqlLocalDir(_0x1b113c){return join(_0x1b113c,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x7b6b2c){const _0x110a1f=a87_0x5928f9,_0x51c304=_0x7b6b2c['trim']()||_0x110a1f(0xc0),_0x21a069=_0x51c304[_0x110a1f(0xd7)](/[/\\?%*:|"<>]/g,'_')[_0x110a1f(0xd7)](/\s+/g,'_')[_0x110a1f(0xd7)](/_+/g,'_');return _0x21a069||'unnamed';}export function assignSqlFileNames(_0x5d4424){const _0x45cbf3=a87_0x5928f9,_0xb01f78=new Map();for(const _0x5ec0cc of _0x5d4424){const _0x38ffa4=safeSqlFileBaseName(_0x5ec0cc[_0x45cbf3(0xd1)]??_0x45cbf3(0xc0));let _0x3b7a66=_0x38ffa4+_0x45cbf3(0xd2);if(_0xb01f78[_0x45cbf3(0xcc)](_0x3b7a66)){const _0x4aaecb=(_0x5ec0cc['sqlCode']??'unknown')[_0x45cbf3(0xd7)](/-/g,'');_0x3b7a66=_0x38ffa4+'__'+_0x4aaecb+_0x45cbf3(0xd2);}let _0x4f81b4=0x0,_0xc9a3d3=_0x3b7a66;while(_0xb01f78['has'](_0xc9a3d3)){_0x4f81b4++,_0xc9a3d3=_0x38ffa4+'__'+_0x4f81b4+'.sql';}_0xb01f78[_0x45cbf3(0xcd)](_0xc9a3d3,_0x5ec0cc);}return _0xb01f78;}function a87_0xde12(_0xfcc341,_0x56cecd){_0xfcc341=_0xfcc341-0xc0;const _0x355a5b=a87_0x355a();let _0xde1280=_0x355a5b[_0xfcc341];return _0xde1280;}export function buildPulledSqlFileContent(_0x313c88){const _0x11e479=a87_0x5928f9,_0x511481=_0x313c88[_0x11e479(0xd1)]??_0x11e479(0xc0),_0x1846b1=_0x313c88['sqlCode']??'',_0x387cc8=(_0x313c88['description']??'')[_0x11e479(0xd7)](/\r?\n/g,'\x20')['trim'](),_0x45ca05=_0x313c88[_0x11e479(0xc6)]??'',_0x46caa0=['--\x20@lovrabet.sqlName:\x20'+_0x511481,_0x11e479(0xc8)+_0x1846b1,_0x11e479(0xca)+(_0x387cc8?'\x20'+_0x387cc8:''),'',_0x45ca05[_0x11e479(0xd5)]()],_0x32b4b8=_0x46caa0[_0x11e479(0xce)]('\x0a');return _0x32b4b8[_0x11e479(0xd3)]('\x0a')?_0x32b4b8:_0x32b4b8+'\x0a';}
1
+ function a100_0x5629(){const _0x400c65=['sqlName','556870ytVTBN','3WZNCoo','12891033gHZuAS','trimEnd','.rabetbase/sql','109824jpyGiW','endsWith','unknown','trim','6fyGINK','922434KEPGyA','102712FWFpcv','join','unnamed','2692108lnZKMq','set','sqlCode','replace','has','sqlContent','5125183UemlZK','.sql','--\x20@lovrabet.description:'];a100_0x5629=function(){return _0x400c65;};return a100_0x5629();}function a100_0x1b16(_0x3cf782,_0x397215){_0x3cf782=_0x3cf782-0x1cc;const _0x562921=a100_0x5629();let _0x1b166=_0x562921[_0x3cf782];return _0x1b166;}const a100_0x329916=a100_0x1b16;(function(_0x1d419a,_0x59dd49){const _0x5db92b=a100_0x1b16,_0x5d08ed=_0x1d419a();while(!![]){try{const _0x407f19=parseInt(_0x5db92b(0x1e0))/0x1+parseInt(_0x5db92b(0x1cd))/0x2+-parseInt(_0x5db92b(0x1dc))/0x3*(-parseInt(_0x5db92b(0x1d1))/0x4)+parseInt(_0x5db92b(0x1db))/0x5+parseInt(_0x5db92b(0x1cc))/0x6*(parseInt(_0x5db92b(0x1d7))/0x7)+-parseInt(_0x5db92b(0x1ce))/0x8+-parseInt(_0x5db92b(0x1dd))/0x9;if(_0x407f19===_0x59dd49)break;else _0x5d08ed['push'](_0x5d08ed['shift']());}catch(_0x589c0e){_0x5d08ed['push'](_0x5d08ed['shift']());}}}(a100_0x5629,0x9cd83));import{join}from'node:path';export const SQL_LOCAL_REL_DIR=a100_0x329916(0x1df);export function resolveSqlLocalDir(_0x3aa194){return join(_0x3aa194,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x9673fc){const _0x3cc2a2=a100_0x329916,_0xf75e4c=_0x9673fc['trim']()||'unnamed',_0x46c12a=_0xf75e4c[_0x3cc2a2(0x1d4)](/[/\\?%*:|"<>]/g,'_')[_0x3cc2a2(0x1d4)](/\s+/g,'_')['replace'](/_+/g,'_');return _0x46c12a||_0x3cc2a2(0x1d0);}export function assignSqlFileNames(_0x35ab39){const _0x4ee352=a100_0x329916,_0x5061f4=new Map();for(const _0x184197 of _0x35ab39){const _0xb78ec7=safeSqlFileBaseName(_0x184197['sqlName']??_0x4ee352(0x1d0));let _0x376704=_0xb78ec7+_0x4ee352(0x1d8);if(_0x5061f4['has'](_0x376704)){const _0x1831f2=(_0x184197[_0x4ee352(0x1d3)]??_0x4ee352(0x1e2))[_0x4ee352(0x1d4)](/-/g,'');_0x376704=_0xb78ec7+'__'+_0x1831f2+_0x4ee352(0x1d8);}let _0x1395a0=0x0,_0x2e7375=_0x376704;while(_0x5061f4[_0x4ee352(0x1d5)](_0x2e7375)){_0x1395a0++,_0x2e7375=_0xb78ec7+'__'+_0x1395a0+_0x4ee352(0x1d8);}_0x5061f4[_0x4ee352(0x1d2)](_0x2e7375,_0x184197);}return _0x5061f4;}export function buildPulledSqlFileContent(_0x3cc9fb){const _0x2508ed=a100_0x329916,_0x1f7895=_0x3cc9fb[_0x2508ed(0x1da)]??'unnamed',_0x2397fb=_0x3cc9fb[_0x2508ed(0x1d3)]??'',_0x52c323=(_0x3cc9fb['description']??'')[_0x2508ed(0x1d4)](/\r?\n/g,'\x20')[_0x2508ed(0x1e3)](),_0x848133=_0x3cc9fb[_0x2508ed(0x1d6)]??'',_0xd073ab=['--\x20@lovrabet.sqlName:\x20'+_0x1f7895,'--\x20@lovrabet.sqlCode:\x20'+_0x2397fb,_0x2508ed(0x1d9)+(_0x52c323?'\x20'+_0x52c323:''),'',_0x848133[_0x2508ed(0x1de)]()],_0x2f6e7f=_0xd073ab[_0x2508ed(0x1cf)]('\x0a');return _0x2f6e7f[_0x2508ed(0x1e1)]('\x0a')?_0x2f6e7f:_0x2f6e7f+'\x0a';}
@@ -1 +1 @@
1
- const a88_0x4dc15f=a88_0xe021;(function(_0x3daa50,_0x5db372){const _0x3c1669=a88_0xe021,_0x53e713=_0x3daa50();while(!![]){try{const _0x55a40f=-parseInt(_0x3c1669(0x89))/0x1+parseInt(_0x3c1669(0xa1))/0x2+parseInt(_0x3c1669(0x87))/0x3+parseInt(_0x3c1669(0xa4))/0x4*(parseInt(_0x3c1669(0x8e))/0x5)+-parseInt(_0x3c1669(0x94))/0x6*(parseInt(_0x3c1669(0x8b))/0x7)+parseInt(_0x3c1669(0xa2))/0x8+-parseInt(_0x3c1669(0x8c))/0x9;if(_0x55a40f===_0x5db372)break;else _0x53e713['push'](_0x53e713['shift']());}catch(_0x3099b5){_0x53e713['push'](_0x53e713['shift']());}}}(a88_0x586f,0x321a5));import{readFileSync,existsSync}from'node:fs';function a88_0x586f(){const _0x442a82=['\x22\x20not\x20found\x20in\x20any\x20dataset','type','sql','parameters','str','\x22\x20not\x20found\x20or\x20not\x20accessible','name','598410OZjcdL','986280vGQMjY','file','20SGHMSs','string','validation','map','Provide\x20--file\x20or\x20--sql','message','push','read','File\x20not\x20found:\x20','schemaWarnings','cwd','sqlType','dbtableConfig','isDangerous','schema:','utf-8','Dataset\x20\x22','tableName','1026678OKXupM','isSelectOnly','251775HeZgcI','trim','7TiHQtW','3441600hbIpHL','reason','162665AeskGn','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','schemas','valid','size','filter','527910UZBNBS','Table\x20\x22','fields','tables','toLowerCase','get'];a88_0x586f=function(){return _0x442a82;};return a88_0x586f();}import{resolve}from'node:path';function a88_0xe021(_0xe66a7a,_0x1c4bd9){_0xe66a7a=_0xe66a7a-0x85;const _0x586f23=a88_0x586f();let _0xe0215=_0x586f23[_0xe66a7a];return _0xe0215;}import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a88_0x4dc15f(0x9c),'command':'validate','description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a88_0x4dc15f(0xab),'flags':[{'name':'file','type':a88_0x4dc15f(0xa5),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a88_0x4dc15f(0x9c),'type':a88_0x4dc15f(0xa5),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a88_0x4dc15f(0x90),'type':a88_0x4dc15f(0xa5),'description':a88_0x4dc15f(0x8f)}],async 'execute'(_0x18d5f5){const _0x3086e3=a88_0x4dc15f,_0x3c3e28=_0x18d5f5[_0x3086e3(0x9e)](_0x3086e3(0xa3)),_0x4c0a6a=_0x18d5f5['str'](_0x3086e3(0x9c));if(!_0x3c3e28&&!_0x4c0a6a)throw CliErrors['flagMissing']('file',_0x3086e3(0xa8));let _0xd36945;if(_0x3c3e28){const _0x507d41=resolve(process[_0x3086e3(0xae)](),_0x3c3e28);if(!existsSync(_0x507d41))throw CliErrors[_0x3086e3(0xa6)](_0x3086e3(0xac)+_0x507d41);_0xd36945=readFileSync(_0x507d41,_0x3086e3(0xb3));}else _0xd36945=_0x4c0a6a;const _0x208ad1=validateSql(_0xd36945),_0x3993a6={'valid':_0x208ad1[_0x3086e3(0x91)],'sqlType':_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x9b)],'isSelectOnly':_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x88)],'isDangerous':_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0xb1)],'tables':_0x208ad1[_0x3086e3(0x97)],'parameters':_0x208ad1[_0x3086e3(0x9d)],'message':_0x208ad1[_0x3086e3(0xa9)]};_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x8d)]&&(_0x3993a6[_0x3086e3(0x8d)]=_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x8d)]);const _0x55b519=_0x18d5f5[_0x3086e3(0x9e)](_0x3086e3(0x90));if(_0x55b519&&_0x208ad1[_0x3086e3(0x91)]){const _0x182e48=_0x55b519['split'](',')[_0x3086e3(0xa7)](_0x4e7ef8=>_0x4e7ef8[_0x3086e3(0x8a)]())[_0x3086e3(0x93)](Boolean),_0x135710=[],_0x263d57=await listDatasets(_0x18d5f5['appCode']),_0x152f37=new Map(_0x263d57[_0x3086e3(0xa7)](_0x4d9922=>[_0x4d9922[_0x3086e3(0xb0)]?.[_0x3086e3(0x86)]?.[_0x3086e3(0x98)](),_0x4d9922]));for(const _0x521202 of _0x208ad1['tables']){const _0x389f10=_0x152f37[_0x3086e3(0x99)](_0x521202['toLowerCase']());!_0x389f10&&_0x135710[_0x3086e3(0xaa)](_0x3086e3(0x95)+_0x521202+_0x3086e3(0x9a));}for(const _0x5cfcf0 of _0x182e48){try{const _0xe30687=await getDatasetDetail(_0x5cfcf0),_0x5749f6=Array['isArray'](_0xe30687['fields'])?_0xe30687[_0x3086e3(0x96)]:[],_0x5aa196=new Set(_0x5749f6[_0x3086e3(0xa7)](_0x2a26ed=>_0x2a26ed[_0x3086e3(0xa0)]?.[_0x3086e3(0x98)]())),_0x33a363=_0xe30687[_0x3086e3(0xb0)]?.['tableName']||_0xe30687['tableName']||_0x5cfcf0;_0x3993a6[_0x3086e3(0xb2)+_0x33a363]={'code':_0x5cfcf0,'tableName':_0x33a363,'fieldCount':_0x5aa196[_0x3086e3(0x92)],'fields':Array['from'](_0x5aa196)};}catch{_0x135710[_0x3086e3(0xaa)](_0x3086e3(0x85)+_0x5cfcf0+_0x3086e3(0x9f));}}_0x135710['length']>0x0&&(_0x3993a6[_0x3086e3(0xad)]=_0x135710);}return{'ok':_0x208ad1['valid'],'data':_0x3993a6,'message':_0x208ad1[_0x3086e3(0xa9)]};}};
1
+ function a101_0x4540(_0x28b5d6,_0x37ad5b){_0x28b5d6=_0x28b5d6-0x8e;const _0x44cc8a=a101_0x44cc();let _0x45408f=_0x44cc8a[_0x28b5d6];return _0x45408f;}const a101_0x2d0895=a101_0x4540;(function(_0x56f503,_0x2105e1){const _0x332920=a101_0x4540,_0xdd03a6=_0x56f503();while(!![]){try{const _0x247a49=parseInt(_0x332920(0xaa))/0x1*(-parseInt(_0x332920(0xa6))/0x2)+parseInt(_0x332920(0xae))/0x3*(parseInt(_0x332920(0xb6))/0x4)+-parseInt(_0x332920(0x90))/0x5*(parseInt(_0x332920(0xb7))/0x6)+parseInt(_0x332920(0xad))/0x7+-parseInt(_0x332920(0xbb))/0x8+-parseInt(_0x332920(0x9a))/0x9+parseInt(_0x332920(0xb1))/0xa*(parseInt(_0x332920(0xac))/0xb);if(_0x247a49===_0x2105e1)break;else _0xdd03a6['push'](_0xdd03a6['shift']());}catch(_0x4f405d){_0xdd03a6['push'](_0xdd03a6['shift']());}}}(a101_0x44cc,0x8f41a));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a101_0x44cc(){const _0x1c57c1=['sqlType','flagMissing','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','reason','tableName','type','1210cVYFiU','isSelectOnly','\x22\x20not\x20found\x20in\x20any\x20dataset','validate','name','fields','push','utf-8','get','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','9169596EKqdEm','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','isArray','Table\x20\x22','File\x20not\x20found:\x20','appCode','dbtableConfig','message','schemaWarnings','validation','toLowerCase','trim','2BhVxiA','cwd','read','file','287932BLHIbS','map','15465098ghQDzH','5082798KAMuRY','297jFPTUn','string','\x22\x20not\x20found\x20or\x20not\x20accessible','10NqrhUC','Dataset\x20\x22','schemas','valid','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','33188leDqUH','9042SvgQhA','split','schema:','str','5561496msVUpK','sql'];a101_0x44cc=function(){return _0x1c57c1;};return a101_0x44cc();}import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a101_0x2d0895(0xbc),'command':a101_0x2d0895(0x93),'description':a101_0x2d0895(0xb5),'risk':a101_0x2d0895(0xa8),'flags':[{'name':'file','type':a101_0x2d0895(0xaf),'description':a101_0x2d0895(0xbf)},{'name':a101_0x2d0895(0xbc),'type':a101_0x2d0895(0xaf),'description':a101_0x2d0895(0x99)},{'name':a101_0x2d0895(0xb3),'type':a101_0x2d0895(0xaf),'description':a101_0x2d0895(0x9b)}],async 'execute'(_0x1f198c){const _0x141b4c=a101_0x2d0895,_0x50aea1=_0x1f198c[_0x141b4c(0xba)](_0x141b4c(0xa9)),_0x15e611=_0x1f198c[_0x141b4c(0xba)]('sql');if(!_0x50aea1&&!_0x15e611)throw CliErrors[_0x141b4c(0xbe)](_0x141b4c(0xa9),'Provide\x20--file\x20or\x20--sql');let _0x261488;if(_0x50aea1){const _0x73d966=resolve(process[_0x141b4c(0xa7)](),_0x50aea1);if(!existsSync(_0x73d966))throw CliErrors[_0x141b4c(0xa3)](_0x141b4c(0x9e)+_0x73d966);_0x261488=readFileSync(_0x73d966,_0x141b4c(0x97));}else _0x261488=_0x15e611;const _0x4a4b8d=validateSql(_0x261488),_0x4a1e56={'valid':_0x4a4b8d[_0x141b4c(0xb4)],'sqlType':_0x4a4b8d[_0x141b4c(0xbd)][_0x141b4c(0x8f)],'isSelectOnly':_0x4a4b8d[_0x141b4c(0xbd)][_0x141b4c(0x91)],'isDangerous':_0x4a4b8d[_0x141b4c(0xbd)]['isDangerous'],'tables':_0x4a4b8d['tables'],'parameters':_0x4a4b8d['parameters'],'message':_0x4a4b8d[_0x141b4c(0xa1)]};_0x4a4b8d[_0x141b4c(0xbd)]['reason']&&(_0x4a1e56[_0x141b4c(0xc0)]=_0x4a4b8d[_0x141b4c(0xbd)][_0x141b4c(0xc0)]);const _0x40ee74=_0x1f198c['str'](_0x141b4c(0xb3));if(_0x40ee74&&_0x4a4b8d[_0x141b4c(0xb4)]){const _0x47af50=_0x40ee74[_0x141b4c(0xb8)](',')['map'](_0x3b856b=>_0x3b856b[_0x141b4c(0xa5)]())['filter'](Boolean),_0x3f19bd=[],_0x587148=await listDatasets(_0x1f198c[_0x141b4c(0x9f)]),_0x1d6074=new Map(_0x587148[_0x141b4c(0xab)](_0x2da96e=>[_0x2da96e[_0x141b4c(0xa0)]?.[_0x141b4c(0x8e)]?.[_0x141b4c(0xa4)](),_0x2da96e]));for(const _0x29cbdb of _0x4a4b8d['tables']){const _0x568ea6=_0x1d6074[_0x141b4c(0x98)](_0x29cbdb[_0x141b4c(0xa4)]());!_0x568ea6&&_0x3f19bd['push'](_0x141b4c(0x9d)+_0x29cbdb+_0x141b4c(0x92));}for(const _0x5154e4 of _0x47af50){try{const _0x4864e2=await getDatasetDetail(_0x5154e4),_0x574420=Array[_0x141b4c(0x9c)](_0x4864e2[_0x141b4c(0x95)])?_0x4864e2[_0x141b4c(0x95)]:[],_0xfdc81f=new Set(_0x574420[_0x141b4c(0xab)](_0x304989=>_0x304989[_0x141b4c(0x94)]?.[_0x141b4c(0xa4)]())),_0x42ad97=_0x4864e2[_0x141b4c(0xa0)]?.[_0x141b4c(0x8e)]||_0x4864e2[_0x141b4c(0x8e)]||_0x5154e4;_0x4a1e56[_0x141b4c(0xb9)+_0x42ad97]={'code':_0x5154e4,'tableName':_0x42ad97,'fieldCount':_0xfdc81f['size'],'fields':Array['from'](_0xfdc81f)};}catch{_0x3f19bd[_0x141b4c(0x96)](_0x141b4c(0xb2)+_0x5154e4+_0x141b4c(0xb0));}}_0x3f19bd['length']>0x0&&(_0x4a1e56[_0x141b4c(0xa2)]=_0x3f19bd);}return{'ok':_0x4a4b8d[_0x141b4c(0xb4)],'data':_0x4a1e56,'message':_0x4a4b8d[_0x141b4c(0xa1)]};}};
@@ -1 +1 @@
1
- const a89_0x5b8f6b=a89_0x1b81;(function(_0x33fcce,_0x2386df){const _0x2b08df=a89_0x1b81,_0x309f8f=_0x33fcce();while(!![]){try{const _0x1bf3eb=parseInt(_0x2b08df(0x219))/0x1*(parseInt(_0x2b08df(0x20b))/0x2)+-parseInt(_0x2b08df(0x1da))/0x3*(-parseInt(_0x2b08df(0x1e9))/0x4)+parseInt(_0x2b08df(0x1e1))/0x5+-parseInt(_0x2b08df(0x21f))/0x6+parseInt(_0x2b08df(0x22e))/0x7*(-parseInt(_0x2b08df(0x1e8))/0x8)+parseInt(_0x2b08df(0x1ec))/0x9*(-parseInt(_0x2b08df(0x210))/0xa)+parseInt(_0x2b08df(0x1dd))/0xb;if(_0x1bf3eb===_0x2386df)break;else _0x309f8f['push'](_0x309f8f['shift']());}catch(_0xd5b49c){_0x309f8f['push'](_0x309f8f['shift']());}}}(a89_0x39c8,0xba21a));export const CLI_BIN_NAME='rabetbase';function a89_0x1b81(_0x461c48,_0x151d2a){_0x461c48=_0x461c48-0x1d4;const _0x39c8df=a89_0x39c8();let _0x1b8178=_0x39c8df[_0x461c48];return _0x1b8178;}export const CLI_DISPLAY_NAME=a89_0x5b8f6b(0x21a);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';function a89_0x39c8(){const _0x4281e8=['sqlname','Override\x20appcode','pagesize','sql','Watch\x20mode','Skip\x20confirmation\x20for\x20high-risk\x20writes','sqlcode','page','Function\x20node','project','Description','Environment','force','<expr>','code','dryRun','JSON\x20params','target','2CjQwPe','nonInteractive','Type\x20filter','env','Alias\x20for\x20--non-interactive','731740fkZgkx','Skip\x20import\x20generation','skip-imports','Preview\x20operation\x20without\x20executing','Force\x20overwrite','boolean','file','name','fromEntries','817442VSywVf','Rabetbase\x20CLI','<name>','app','Record\x20ID','verbose','3709098AhHzTA','help','Clear','<code>','operation-type','Enable\x20BFF\x20save','Apply\x20to\x20all','keyword','datasetcode','schemas','string','map','Target\x20path','global','all','2678207hpSkZQ','Config\x20value','Dataset\x20code','Use\x20global\x20config\x20scope','SQL\x20code','description','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','File\x20path','format','Operation\x20type','Show\x20help','dry-run','5079ukkhzx','Config\x20key','yes','9915576OfCDsX','type','non-interactive','Force\x20non-interactive\x20mode\x20(CI)','4350450sPcEpN','output','Output\x20format','Use\x20remote','key','enableBffSave','Page\x20number','16SkUCnm','1892vICPcl','Use\x20project\x20config\x20scope','dbid','153heRPFZ','Code\x20filter','value','clear','Output\x20path','enable-bff-save','watch','params','functionNode','meowKey','Select\x20app\x20profile\x20by\x20name','Schemas','Verbose\x20output'];a89_0x39c8=function(){return _0x4281e8;};return a89_0x39c8();}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':'string','description':a89_0x5b8f6b(0x1fa),'hint':a89_0x5b8f6b(0x222)},{'name':a89_0x5b8f6b(0x21c),'meowKey':'app','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1f6),'hint':a89_0x5b8f6b(0x21b)},{'name':a89_0x5b8f6b(0x20e),'meowKey':a89_0x5b8f6b(0x20e),'type':'string','description':a89_0x5b8f6b(0x204),'hint':'production\x20|\x20daily'},{'name':a89_0x5b8f6b(0x1d6),'meowKey':'format','type':'string','description':a89_0x5b8f6b(0x1e3),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1d4),'hint':a89_0x5b8f6b(0x206)},{'name':a89_0x5b8f6b(0x1d9),'meowKey':a89_0x5b8f6b(0x208),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x213)},{'name':a89_0x5b8f6b(0x1dc),'meowKey':a89_0x5b8f6b(0x1dc),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1fe)},{'name':a89_0x5b8f6b(0x1df),'meowKey':a89_0x5b8f6b(0x20c),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1e0)},{'name':a89_0x5b8f6b(0x22c),'meowKey':a89_0x5b8f6b(0x22c),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x231)},{'name':a89_0x5b8f6b(0x202),'meowKey':a89_0x5b8f6b(0x202),'type':'boolean','description':a89_0x5b8f6b(0x1ea)},{'name':'ci','meowKey':'ci','type':'boolean','description':a89_0x5b8f6b(0x20f),'hidden':!![]},{'name':a89_0x5b8f6b(0x220),'meowKey':a89_0x5b8f6b(0x220),'type':'boolean','description':a89_0x5b8f6b(0x1d8)},{'name':a89_0x5b8f6b(0x217),'meowKey':'name','type':a89_0x5b8f6b(0x229),'description':'Name','hidden':!![]},{'name':a89_0x5b8f6b(0x1ef),'meowKey':'clear','type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x221),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f2),'meowKey':a89_0x5b8f6b(0x1f2),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1fd),'hidden':!![]},{'name':a89_0x5b8f6b(0x1e2),'meowKey':'output','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1f0),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f3),'meowKey':'params','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x209),'hidden':!![]},{'name':'datasetcode','meowKey':a89_0x5b8f6b(0x227),'type':'string','description':a89_0x5b8f6b(0x230),'hidden':!![]},{'name':a89_0x5b8f6b(0x22d),'meowKey':a89_0x5b8f6b(0x22d),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x225),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f1),'meowKey':a89_0x5b8f6b(0x1e6),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x224),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a89_0x5b8f6b(0x21d),'hidden':!![]},{'name':a89_0x5b8f6b(0x1de),'meowKey':a89_0x5b8f6b(0x1de),'type':'string','description':a89_0x5b8f6b(0x20d),'hidden':!![]},{'name':a89_0x5b8f6b(0x216),'meowKey':a89_0x5b8f6b(0x216),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1d5),'hidden':!![]},{'name':'sqlcode','meowKey':a89_0x5b8f6b(0x1ff),'type':'string','description':a89_0x5b8f6b(0x232),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f9),'meowKey':a89_0x5b8f6b(0x1f9),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':'dbid','meowKey':a89_0x5b8f6b(0x1eb),'type':'string','description':'DB\x20ID','hidden':!![]},{'name':a89_0x5b8f6b(0x233),'meowKey':a89_0x5b8f6b(0x233),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x203),'hidden':!![]},{'name':a89_0x5b8f6b(0x200),'meowKey':'page','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1e7),'hidden':!![]},{'name':a89_0x5b8f6b(0x1fb),'meowKey':'pagesize','type':a89_0x5b8f6b(0x229),'description':'Page\x20size','hidden':!![]},{'name':a89_0x5b8f6b(0x226),'meowKey':a89_0x5b8f6b(0x226),'type':a89_0x5b8f6b(0x229),'description':'Keyword\x20filter','hidden':!![]},{'name':a89_0x5b8f6b(0x207),'meowKey':a89_0x5b8f6b(0x207),'type':'string','description':a89_0x5b8f6b(0x1ed),'hidden':!![]},{'name':a89_0x5b8f6b(0x1fc),'meowKey':a89_0x5b8f6b(0x1fc),'type':a89_0x5b8f6b(0x229),'description':'SQL\x20string','hidden':!![]},{'name':a89_0x5b8f6b(0x228),'meowKey':a89_0x5b8f6b(0x228),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1f7),'hidden':!![]},{'name':'operation','meowKey':'operation','type':'string','description':'Operation\x20type','hidden':!![]},{'name':'target','meowKey':a89_0x5b8f6b(0x20a),'type':'string','description':a89_0x5b8f6b(0x22b),'hidden':!![]},{'name':a89_0x5b8f6b(0x212),'meowKey':'skipImports','type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x211),'hidden':!![]},{'name':a89_0x5b8f6b(0x1e5),'meowKey':a89_0x5b8f6b(0x1e5),'type':'string','description':a89_0x5b8f6b(0x1db),'hidden':!![]},{'name':a89_0x5b8f6b(0x1ee),'meowKey':a89_0x5b8f6b(0x1ee),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x22f),'hidden':!![]},{'name':a89_0x5b8f6b(0x205),'meowKey':a89_0x5b8f6b(0x205),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x214),'hidden':!![]},{'name':'remote','meowKey':'remote','type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1e4),'hidden':!![]},{'name':'verbose','meowKey':a89_0x5b8f6b(0x21e),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1f8),'hidden':!![]},{'name':a89_0x5b8f6b(0x223),'meowKey':'operationType','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1d7),'hidden':!![]},{'name':'function-node','meowKey':a89_0x5b8f6b(0x1f4),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x201),'hidden':!![]}];export function buildMeowFlags(){const _0x4a1b84=a89_0x5b8f6b;return Object[_0x4a1b84(0x218)](GLOBAL_FLAGS[_0x4a1b84(0x22a)](_0x2f861c=>[_0x2f861c[_0x4a1b84(0x1f5)],{'type':_0x2f861c[_0x4a1b84(0x1de)]}]));}
1
+ const a102_0x2adf76=a102_0x3081;function a102_0x3d1c(){const _0x503c2b=['rabetbase','value','Use\x20project\x20config\x20scope','dryRun','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','259861xFfvAn','sqlcode','Watch\x20mode','Force\x20non-interactive\x20mode\x20(CI)','description','Skip\x20confirmation\x20for\x20high-risk\x20writes','3EtikNq','watch','SQL\x20code','Dataset\x20code','string','format','45457LpDlTc','schemas','<name>','skipImports','clear','env','operation-type','meowKey','code','Use\x20global\x20config\x20scope','2206980tKaByQ','DB\x20ID','operation','type','datasetcode','yes','JSON\x20params','Function\x20node','pagesize','keyword','Environment','help','operationType','5vctXlk','nonInteractive','@lovrabet/rabetbase-cli','page','enableBffSave','Force\x20overwrite','Verbose\x20output','function-node','1104234ffLQbH','SQL\x20name','non-interactive','map','params','name','Name','Override\x20appcode','Description','Skip\x20import\x20generation','3058590jYASCz','Config\x20value','Show\x20help','2185296yTAnCW','appcode','File\x20path','Enable\x20BFF\x20save','project','verbose','Keyword\x20filter','Record\x20ID','key','Use\x20remote','Code\x20filter','production\x20|\x20daily','Preview\x20operation\x20without\x20executing','3033208HDslHy','11yvATUI','sqlname','Operation\x20type','dbid','skip-imports','Rabetbase\x20CLI','9MLgrUv','force','Output\x20format','functionNode','<expr>','sql','boolean','Type\x20filter','output','remote','file','enable-bff-save','SQL\x20string','Clear','app','global','all','Page\x20number','json\x20|\x20pretty\x20|\x20compress','Alias\x20for\x20--non-interactive'];a102_0x3d1c=function(){return _0x503c2b;};return a102_0x3d1c();}(function(_0x358998,_0x5931a9){const _0x4c6d0f=a102_0x3081,_0x3e60bb=_0x358998();while(!![]){try{const _0x275e01=parseInt(_0x4c6d0f(0x1d2))/0x1+parseInt(_0x4c6d0f(0x1f1))/0x2*(parseInt(_0x4c6d0f(0x1cc))/0x3)+-parseInt(_0x4c6d0f(0x1dc))/0x4*(parseInt(_0x4c6d0f(0x1e9))/0x5)+parseInt(_0x4c6d0f(0x1fe))/0x6+-parseInt(_0x4c6d0f(0x1c6))/0x7+parseInt(_0x4c6d0f(0x1a6))/0x8*(-parseInt(_0x4c6d0f(0x1ad))/0x9)+parseInt(_0x4c6d0f(0x1fb))/0xa*(parseInt(_0x4c6d0f(0x1a7))/0xb);if(_0x275e01===_0x5931a9)break;else _0x3e60bb['push'](_0x3e60bb['shift']());}catch(_0x245ff5){_0x3e60bb['push'](_0x3e60bb['shift']());}}}(a102_0x3d1c,0x4926e));function a102_0x3081(_0x370324,_0x2418ae){_0x370324=_0x370324-0x1a1;const _0x3d1c9a=a102_0x3d1c();let _0x308165=_0x3d1c9a[_0x370324];return _0x308165;}export const CLI_BIN_NAME=a102_0x2adf76(0x1c1);export const CLI_DISPLAY_NAME=a102_0x2adf76(0x1ac);export const NPM_PACKAGE_NAME=a102_0x2adf76(0x1eb);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a102_0x2adf76(0x1ff),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f8),'hint':'<code>'},{'name':a102_0x2adf76(0x1bb),'meowKey':a102_0x2adf76(0x1bb),'type':a102_0x2adf76(0x1d0),'description':'Select\x20app\x20profile\x20by\x20name','hint':a102_0x2adf76(0x1d4)},{'name':'env','meowKey':a102_0x2adf76(0x1d7),'type':'string','description':a102_0x2adf76(0x1e6),'hint':a102_0x2adf76(0x1a4)},{'name':'format','meowKey':a102_0x2adf76(0x1d1),'type':'string','description':a102_0x2adf76(0x1af),'hint':a102_0x2adf76(0x1bf)},{'name':'jq','meowKey':'jq','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1c5),'hint':a102_0x2adf76(0x1b1)},{'name':'dry-run','meowKey':a102_0x2adf76(0x1c4),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1a5)},{'name':a102_0x2adf76(0x1e1),'meowKey':a102_0x2adf76(0x1e1),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1cb)},{'name':a102_0x2adf76(0x1f3),'meowKey':a102_0x2adf76(0x1ea),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1c9)},{'name':a102_0x2adf76(0x1bc),'meowKey':a102_0x2adf76(0x1bc),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1db)},{'name':a102_0x2adf76(0x202),'meowKey':'project','type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1c3)},{'name':'ci','meowKey':'ci','type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1c0),'hidden':!![]},{'name':'help','meowKey':a102_0x2adf76(0x1e7),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1fd)},{'name':a102_0x2adf76(0x1f6),'meowKey':a102_0x2adf76(0x1f6),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f7),'hidden':!![]},{'name':'clear','meowKey':a102_0x2adf76(0x1d6),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1ba),'hidden':!![]},{'name':a102_0x2adf76(0x1cd),'meowKey':a102_0x2adf76(0x1cd),'type':'boolean','description':a102_0x2adf76(0x1c8),'hidden':!![]},{'name':a102_0x2adf76(0x1b5),'meowKey':a102_0x2adf76(0x1b5),'type':'string','description':'Output\x20path','hidden':!![]},{'name':a102_0x2adf76(0x1f5),'meowKey':'params','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1e2),'hidden':!![]},{'name':a102_0x2adf76(0x1e0),'meowKey':'datasetcode','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1cf),'hidden':!![]},{'name':a102_0x2adf76(0x1bd),'meowKey':'all','type':a102_0x2adf76(0x1b3),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a102_0x2adf76(0x1b8),'meowKey':a102_0x2adf76(0x1ed),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x201),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a102_0x2adf76(0x205),'hidden':!![]},{'name':'type','meowKey':a102_0x2adf76(0x1df),'type':'string','description':a102_0x2adf76(0x1b4),'hidden':!![]},{'name':a102_0x2adf76(0x1b7),'meowKey':a102_0x2adf76(0x1b7),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x200),'hidden':!![]},{'name':'sqlcode','meowKey':a102_0x2adf76(0x1c7),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1ce),'hidden':!![]},{'name':a102_0x2adf76(0x1a8),'meowKey':'sqlname','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f2),'hidden':!![]},{'name':'dbid','meowKey':a102_0x2adf76(0x1aa),'type':'string','description':a102_0x2adf76(0x1dd),'hidden':!![]},{'name':a102_0x2adf76(0x1ca),'meowKey':a102_0x2adf76(0x1ca),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f9),'hidden':!![]},{'name':'page','meowKey':a102_0x2adf76(0x1ec),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1be),'hidden':!![]},{'name':a102_0x2adf76(0x1e4),'meowKey':'pagesize','type':a102_0x2adf76(0x1d0),'description':'Page\x20size','hidden':!![]},{'name':'keyword','meowKey':a102_0x2adf76(0x1e5),'type':'string','description':a102_0x2adf76(0x204),'hidden':!![]},{'name':a102_0x2adf76(0x1da),'meowKey':'code','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1a3),'hidden':!![]},{'name':a102_0x2adf76(0x1b2),'meowKey':a102_0x2adf76(0x1b2),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1b9),'hidden':!![]},{'name':a102_0x2adf76(0x1d3),'meowKey':a102_0x2adf76(0x1d3),'type':a102_0x2adf76(0x1d0),'description':'Schemas','hidden':!![]},{'name':a102_0x2adf76(0x1de),'meowKey':a102_0x2adf76(0x1de),'type':'string','description':'Operation\x20type','hidden':!![]},{'name':'target','meowKey':'target','type':a102_0x2adf76(0x1d0),'description':'Target\x20path','hidden':!![]},{'name':a102_0x2adf76(0x1ab),'meowKey':a102_0x2adf76(0x1d5),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1fa),'hidden':!![]},{'name':a102_0x2adf76(0x1a1),'meowKey':a102_0x2adf76(0x1a1),'type':a102_0x2adf76(0x1d0),'description':'Config\x20key','hidden':!![]},{'name':'value','meowKey':a102_0x2adf76(0x1c2),'type':'string','description':a102_0x2adf76(0x1fc),'hidden':!![]},{'name':'force','meowKey':a102_0x2adf76(0x1ae),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1ee),'hidden':!![]},{'name':'remote','meowKey':a102_0x2adf76(0x1b6),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1a2),'hidden':!![]},{'name':a102_0x2adf76(0x203),'meowKey':'verbose','type':'boolean','description':a102_0x2adf76(0x1ef),'hidden':!![]},{'name':a102_0x2adf76(0x1d8),'meowKey':a102_0x2adf76(0x1e8),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1a9),'hidden':!![]},{'name':a102_0x2adf76(0x1f0),'meowKey':a102_0x2adf76(0x1b0),'type':'string','description':a102_0x2adf76(0x1e3),'hidden':!![]}];export function buildMeowFlags(){const _0x40cbff=a102_0x2adf76;return Object['fromEntries'](GLOBAL_FLAGS[_0x40cbff(0x1f4)](_0xaaf651=>[_0xaaf651[_0x40cbff(0x1d9)],{'type':_0xaaf651[_0x40cbff(0x1df)]}]));}
@@ -1 +1 @@
1
- function a90_0x39be(){const _0x2c60a0=['https://daily-runtime.lovrabet.com','3049950yfaoWU','12Glyxke','userDomain','6ZOQhgr','https://user.lovrabet.com','11kQsUOt','runtimeDomain','production','637990icwkNa','53088NBveEv','2sdZAdM','123168WPOhzU','https://user-daily.lovrabet.com','17960UpLfXo','12DGaiCR','234451EoEmaj','https://runtime.lovrabet.com','https://api.lovrabet.com','4546568LnQdEa','261czEMJJ'];a90_0x39be=function(){return _0x2c60a0;};return a90_0x39be();}const a90_0xc73a4a=a90_0x412a;(function(_0xd31063,_0x10abee){const _0x4a675e=a90_0x412a,_0x56b4f2=_0xd31063();while(!![]){try{const _0x1e3965=-parseInt(_0x4a675e(0xe7))/0x1+parseInt(_0x4a675e(0xe8))/0x2*(-parseInt(_0x4a675e(0xe9))/0x3)+parseInt(_0x4a675e(0xdf))/0x4*(-parseInt(_0x4a675e(0xe6))/0x5)+parseInt(_0x4a675e(0xe1))/0x6*(-parseInt(_0x4a675e(0xd8))/0x7)+parseInt(_0x4a675e(0xd6))/0x8*(parseInt(_0x4a675e(0xdc))/0x9)+-parseInt(_0x4a675e(0xde))/0xa*(-parseInt(_0x4a675e(0xe3))/0xb)+parseInt(_0x4a675e(0xd7))/0xc*(parseInt(_0x4a675e(0xdb))/0xd);if(_0x1e3965===_0x10abee)break;else _0x56b4f2['push'](_0x56b4f2['shift']());}catch(_0x3e30d0){_0x56b4f2['push'](_0x56b4f2['shift']());}}}(a90_0x39be,0x331fd));import{getEnv}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x3b72ea){const _0x22bc8b=a90_0x412a;customApiDomain=_0x3b72ea?.['apiDomain'],customUserDomain=_0x3b72ea?.[_0x22bc8b(0xe0)],customRuntimeDomain=_0x3b72ea?.[_0x22bc8b(0xe4)];}export const getUserDomain=()=>customUserDomain||(getEnv()===a90_0xc73a4a(0xe5)?a90_0xc73a4a(0xe2):a90_0xc73a4a(0xea));function a90_0x412a(_0x4be483,_0x4a1ff3){_0x4be483=_0x4be483-0xd6;const _0x39bed2=a90_0x39be();let _0x412a0f=_0x39bed2[_0x4be483];return _0x412a0f;}export const getApiDomain=()=>customApiDomain||(getEnv()===a90_0xc73a4a(0xe5)?a90_0xc73a4a(0xda):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()===a90_0xc73a4a(0xe5)?a90_0xc73a4a(0xd9):a90_0xc73a4a(0xdd));
1
+ const a103_0x43a754=a103_0x95ae;function a103_0x2672(){const _0x90fe08=['17BXmYcl','9202275xTeLGV','74456ccrKnm','https://daily-runtime.lovrabet.com','userDomain','315RdWYkk','https://user-daily.lovrabet.com','24486110JoGfSz','https://user.lovrabet.com','2358ZYaNMY','34270NbYnCX','apiDomain','2611257vkwOEt','runtimeDomain','324768jFzkDv','https://daily-api.lovrabet.com','4xkBjHg','776256fwdJvR'];a103_0x2672=function(){return _0x90fe08;};return a103_0x2672();}(function(_0x36b27e,_0x5e0400){const _0x596042=a103_0x95ae,_0x208690=_0x36b27e();while(!![]){try{const _0x25d621=-parseInt(_0x596042(0xb3))/0x1*(-parseInt(_0x596042(0xb5))/0x2)+parseInt(_0x596042(0xad))/0x3*(-parseInt(_0x596042(0xb1))/0x4)+parseInt(_0x596042(0xb4))/0x5+-parseInt(_0x596042(0xb2))/0x6+-parseInt(_0x596042(0xb8))/0x7*(parseInt(_0x596042(0xaf))/0x8)+parseInt(_0x596042(0xaa))/0x9*(-parseInt(_0x596042(0xab))/0xa)+parseInt(_0x596042(0xba))/0xb;if(_0x25d621===_0x5e0400)break;else _0x208690['push'](_0x208690['shift']());}catch(_0xa44e90){_0x208690['push'](_0x208690['shift']());}}}(a103_0x2672,0xee004));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x8c9af4){const _0x15d55f=a103_0x95ae;customApiDomain=_0x8c9af4?.[_0x15d55f(0xac)],customUserDomain=_0x8c9af4?.[_0x15d55f(0xb7)],customRuntimeDomain=_0x8c9af4?.[_0x15d55f(0xae)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a103_0x43a754(0xa9):a103_0x43a754(0xb9));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a103_0x43a754(0xb0));function a103_0x95ae(_0x571640,_0x177d56){_0x571640=_0x571640-0xa9;const _0x267255=a103_0x2672();let _0x95aee6=_0x267255[_0x571640];return _0x95aee6;}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a103_0x43a754(0xb6));
@@ -1 +1 @@
1
- const a91_0x31883b=a91_0x2a47;(function(_0x3ca48b,_0x220220){const _0x38372c=a91_0x2a47,_0x158837=_0x3ca48b();while(!![]){try{const _0x1842e8=-parseInt(_0x38372c(0xf0))/0x1*(-parseInt(_0x38372c(0xf7))/0x2)+parseInt(_0x38372c(0xf8))/0x3+parseInt(_0x38372c(0xf1))/0x4*(-parseInt(_0x38372c(0xfa))/0x5)+-parseInt(_0x38372c(0xf9))/0x6+-parseInt(_0x38372c(0xf3))/0x7+parseInt(_0x38372c(0xfc))/0x8*(-parseInt(_0x38372c(0xfb))/0x9)+-parseInt(_0x38372c(0xf6))/0xa*(-parseInt(_0x38372c(0xf2))/0xb);if(_0x1842e8===_0x220220)break;else _0x158837['push'](_0x158837['shift']());}catch(_0x14f800){_0x158837['push'](_0x158837['shift']());}}}(a91_0x4f9c,0xd13f8));function a91_0x2a47(_0x1e4e01,_0x4fa83a){_0x1e4e01=_0x1e4e01-0xf0;const _0x4f9c44=a91_0x4f9c();let _0x2a4723=_0x4f9c44[_0x1e4e01];return _0x2a4723;}export function normalizeEnv(_0x3cad43){const _0x4f47ea=a91_0x2a47;return _0x3cad43===_0x4f47ea(0xf4)?'production':_0x3cad43;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a91_0x31883b(0xf5));function a91_0x4f9c(){const _0x536205=['4207530DwaTju','9498696WaVIXc','1555LDnRpX','6372207jfZolp','8yzSJIF','1JcSimH','8776HoRxxP','239756XmOGVm','5713862SqyjLo','online','production','1140REZAoD','1519130nYDwCr'];a91_0x4f9c=function(){return _0x536205;};return a91_0x4f9c();}export function getEnv(){return env;}export function initEnv(_0x3dead3){env=normalizeEnv(_0x3dead3);}
1
+ function a104_0x3b49(){const _0x56f3f1=['3uHjeqr','660EIyIzK','495uponRc','14735dWlSSr','online','production','development','2UpUXzO','218728TMWrpY','2519844sTHWMX','99HDpMCW','3638124EeCXSy','6966140tvmOCJ','38768BxJiPf','924767FCJSfI','daily'];a104_0x3b49=function(){return _0x56f3f1;};return a104_0x3b49();}(function(_0x257a7f,_0x5a662b){const _0x218977=a104_0x4355,_0x444d91=_0x257a7f();while(!![]){try{const _0x1e1a0=-parseInt(_0x218977(0x1f5))/0x1*(parseInt(_0x218977(0x1ee))/0x2)+parseInt(_0x218977(0x1f7))/0x3*(parseInt(_0x218977(0x1ef))/0x4)+parseInt(_0x218977(0x1fa))/0x5*(-parseInt(_0x218977(0x1f8))/0x6)+-parseInt(_0x218977(0x1f2))/0x7+-parseInt(_0x218977(0x1f4))/0x8*(parseInt(_0x218977(0x1f9))/0x9)+parseInt(_0x218977(0x1f3))/0xa+parseInt(_0x218977(0x1f1))/0xb*(parseInt(_0x218977(0x1f0))/0xc);if(_0x1e1a0===_0x5a662b)break;else _0x444d91['push'](_0x444d91['shift']());}catch(_0x34275d){_0x444d91['push'](_0x444d91['shift']());}}}(a104_0x3b49,0x93f1c));export function normalizeEnv(_0x56b5b5){const _0x3b8167=a104_0x4355;return _0x56b5b5===_0x3b8167(0x1fb)?_0x3b8167(0x1fc):_0x56b5b5;}export function isProduction(_0x2b43c3){const _0x21be0a=a104_0x4355;return normalizeEnv(_0x2b43c3)===_0x21be0a(0x1fc);}export function isDaily(_0x160c4b){const _0x1f94ac=a104_0x4355;return normalizeEnv(_0x160c4b)===_0x1f94ac(0x1f6);}export function isDev(_0x4afd63){const _0x14e6e2=a104_0x4355,_0x47ebf1=normalizeEnv(_0x4afd63);return _0x47ebf1===_0x14e6e2(0x1fd)||_0x47ebf1==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');function a104_0x4355(_0x55fdc8,_0x5ed945){_0x55fdc8=_0x55fdc8-0x1ee;const _0x3b49cb=a104_0x3b49();let _0x4355a9=_0x3b49cb[_0x55fdc8];return _0x4355a9;}export function getEnv(){return env;}export function initEnv(_0x8aacf0){env=normalizeEnv(_0x8aacf0);}
@@ -1 +1 @@
1
- const a92_0x1cf5bf=a92_0x47bb;function a92_0x47bb(_0x5a15b5,_0x9ff7bf){_0x5a15b5=_0x5a15b5-0x84;const _0x184c27=a92_0x184c();let _0x47bbaa=_0x184c27[_0x5a15b5];return _0x47bbaa;}(function(_0x5208fd,_0x581d67){const _0x20f7e9=a92_0x47bb,_0x1551c9=_0x5208fd();while(!![]){try{const _0x4f6bf8=-parseInt(_0x20f7e9(0x8c))/0x1+parseInt(_0x20f7e9(0x8f))/0x2*(-parseInt(_0x20f7e9(0x84))/0x3)+parseInt(_0x20f7e9(0x8d))/0x4+-parseInt(_0x20f7e9(0x87))/0x5+-parseInt(_0x20f7e9(0x85))/0x6*(-parseInt(_0x20f7e9(0x86))/0x7)+parseInt(_0x20f7e9(0x8a))/0x8*(-parseInt(_0x20f7e9(0x8b))/0x9)+-parseInt(_0x20f7e9(0x88))/0xa*(-parseInt(_0x20f7e9(0x8e))/0xb);if(_0x4f6bf8===_0x581d67)break;else _0x1551c9['push'](_0x1551c9['shift']());}catch(_0x1f5b40){_0x1551c9['push'](_0x1551c9['shift']());}}}(a92_0x184c,0xcf501));function a92_0x184c(){const _0x10759f=['940uyfjPx','./src/api','200mlcifW','344412wNpALN','1627693UKNekC','75996UilbnM','542817eOnXdg','1717158XbIxdU','3WsPFuG','108oyMajZ','311759sFPtBL','5835790RAhLjr'];a92_0x184c=function(){return _0x10759f;};return a92_0x184c();}export const DEFAULT_API_DIR=a92_0x1cf5bf(0x89);
1
+ const a105_0x37cb47=a105_0x28dc;function a105_0x28dc(_0x1732ec,_0x589d2d){_0x1732ec=_0x1732ec-0x1c7;const _0x43262d=a105_0x4326();let _0x28dc86=_0x43262d[_0x1732ec];return _0x28dc86;}function a105_0x4326(){const _0x2cb16b=['7jhiiJT','9SenBtw','136OCBBNS','./src/api','9117546UoidTL','12gRYeuf','4857625bWYeTe','648909rNOIfu','8182394EzHigQ','2vICJEW','238982LSWPLe','16582190KTDhQl','685484OAGOIR'];a105_0x4326=function(){return _0x2cb16b;};return a105_0x4326();}(function(_0x336493,_0x406743){const _0x35fdf4=a105_0x28dc,_0x7b8f66=_0x336493();while(!![]){try{const _0xc65a64=-parseInt(_0x35fdf4(0x1c8))/0x1*(-parseInt(_0x35fdf4(0x1c9))/0x2)+-parseInt(_0x35fdf4(0x1cd))/0x3*(parseInt(_0x35fdf4(0x1cb))/0x4)+-parseInt(_0x35fdf4(0x1d2))/0x5+parseInt(_0x35fdf4(0x1d0))/0x6*(-parseInt(_0x35fdf4(0x1cc))/0x7)+parseInt(_0x35fdf4(0x1ce))/0x8*(parseInt(_0x35fdf4(0x1d3))/0x9)+parseInt(_0x35fdf4(0x1ca))/0xa+parseInt(_0x35fdf4(0x1c7))/0xb*(parseInt(_0x35fdf4(0x1d1))/0xc);if(_0xc65a64===_0x406743)break;else _0x7b8f66['push'](_0x7b8f66['shift']());}catch(_0x261d2a){_0x7b8f66['push'](_0x7b8f66['shift']());}}}(a105_0x4326,0xd2567));export const DEFAULT_API_DIR=a105_0x37cb47(0x1cf);