@lovrabet/rabetbase-cli 2.0.13 → 2.1.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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_0x4b1ab2=a90_0x35b4;(function(_0x4d9a82,_0x264ee2){const _0x5d20af=a90_0x35b4,_0x1cc8a4=_0x4d9a82();while(!![]){try{const _0xc6f197=parseInt(_0x5d20af(0x1d3))/0x1+-parseInt(_0x5d20af(0x1d1))/0x2*(-parseInt(_0x5d20af(0x1de))/0x3)+parseInt(_0x5d20af(0x1cf))/0x4*(parseInt(_0x5d20af(0x1d4))/0x5)+-parseInt(_0x5d20af(0x1c7))/0x6*(parseInt(_0x5d20af(0x1ca))/0x7)+-parseInt(_0x5d20af(0x1e5))/0x8+-parseInt(_0x5d20af(0x1ec))/0x9+parseInt(_0x5d20af(0x1d9))/0xa;if(_0xc6f197===_0x264ee2)break;else _0x1cc8a4['push'](_0x1cc8a4['shift']());}catch(_0x573fc1){_0x1cc8a4['push'](_0x1cc8a4['shift']());}}}(a90_0x3734,0x8bd71));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';function a90_0x3734(){const _0x527799=['logout','Configuration','\x20\x20[high-risk-write]','5238162dYojhG','command','Skills','defaultCommand','Menu','length','login','Run\x20any\x20package.json\x20script','project','show','map','preview','Project','isSingleCommand','commands','4271742LHuQrk','start','run','7ykpOPx','API','skill','values','Authentication','1913636GSRQhB','push','7114oItwLC','wildcardDef','31673UpyrXD','10HVNWzZ','Diagnostics','Logs','install','BFF\x20Scripts','7800780RLoLmT','has','description','build','Database\x20Connections','381NIcPwc','get','create','Self\x20Update','Schema','SQL\x20Queries','service','2828384HknlqL','write','set','Quick\x20Start'];a90_0x3734=function(){return _0x527799;};return a90_0x3734();}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';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';function a90_0x35b4(_0x3b81bb,_0x10e6ee){_0x3b81bb=_0x3b81bb-0x1c7;const _0x373454=a90_0x3734();let _0x35b478=_0x373454[_0x3b81bb];return _0x35b478;}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x59964f){const _0x1d1858=a90_0x35b4;for(const _0x155129 of _0x59964f){definitions[_0x1d1858(0x1e7)](_0x155129[_0x1d1858(0x1e4)]+':'+_0x155129[_0x1d1858(0x1ed)],_0x155129);let _0xdf4eca=serviceGroups[_0x1d1858(0x1df)](_0x155129[_0x1d1858(0x1e4)]);!_0xdf4eca&&(_0xdf4eca=[],serviceGroups[_0x1d1858(0x1e7)](_0x155129[_0x1d1858(0x1e4)],_0xdf4eca)),_0xdf4eca[_0x1d1858(0x1d0)](_0x155129);}}function registerDeclarativeService(_0x406915,_0x21fc46,_0x3535e3){const _0x8f190f=a90_0x35b4;registerDefinitions(_0x21fc46);_0x3535e3?.[_0x8f190f(0x1d2)]&&registerDefinitions([_0x3535e3[_0x8f190f(0x1d2)]]);const _0x25015c=_0x14580a=>_0x14580a==='read'?'':_0x14580a===_0x8f190f(0x1e6)?'\x20\x20[write]':_0x8f190f(0x1eb),_0xf9e56={'service':_0x21fc46[0x0][_0x8f190f(0x1e4)],'label':_0x406915,'commands':_0x21fc46[_0x8f190f(0x1f6)](_0x5b86bc=>({'command':_0x5b86bc['command'],'description':_0x5b86bc[_0x8f190f(0x1db)],'tag':_0x25015c(_0x5b86bc['risk'])})),'declarative':!![],'defaultCommand':_0x3535e3?.[_0x8f190f(0x1ef)]??(_0x3535e3?.[_0x8f190f(0x1f9)]?_0x21fc46[0x0]['command']:undefined),'wildcardDef':_0x3535e3?.['wildcardDef'],'isSingleCommand':_0x3535e3?.[_0x8f190f(0x1f9)]};serviceRegistry[_0x8f190f(0x1d0)](_0xf9e56),serviceByName[_0x8f190f(0x1e7)](_0xf9e56[_0x8f190f(0x1e4)],_0xf9e56);}registerDeclarativeService(a90_0x4b1ab2(0x1e8),initDefinitions,{'defaultCommand':a90_0x4b1ab2(0x1c9),'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1f8),projectDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a90_0x4b1ab2(0x1f1)]-0x1];last[a90_0x4b1ab2(0x1fa)]=[{'command':'<script>','description':a90_0x4b1ab2(0x1f3),'tag':''}];}registerDeclarativeService(a90_0x4b1ab2(0x1ce),authDefinitions,{'defaultCommand':a90_0x4b1ab2(0x1f2)}),registerDeclarativeService(a90_0x4b1ab2(0x1e1),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1d5),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1e2),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1ea),configDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1cb),apiDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1f0),menuDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1dd),dbDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1d8),bffDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1e3),sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1ee),skillDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1d6),logsDefinitions,{'defaultCommand':a90_0x4b1ab2(0x1f5)});export const deprecatedAliases={'create':{'service':a90_0x4b1ab2(0x1f4),'command':a90_0x4b1ab2(0x1e0)},'start':{'service':a90_0x4b1ab2(0x1c9),'command':a90_0x4b1ab2(0x1c8)},'build':{'service':a90_0x4b1ab2(0x1c9),'command':a90_0x4b1ab2(0x1dc)},'preview':{'service':'run','command':a90_0x4b1ab2(0x1f7)},'logout':{'service':'auth','command':a90_0x4b1ab2(0x1e9)},'skills':{'service':a90_0x4b1ab2(0x1cc),'command':a90_0x4b1ab2(0x1d7)}};export function findDefinition(_0x56594c,_0x41947d){const _0x31b47b=a90_0x4b1ab2;return definitions[_0x31b47b(0x1df)](_0x56594c+':'+_0x41947d);}export function isKnownService(_0x32ce03){const _0x156a0c=a90_0x4b1ab2;return serviceByName[_0x156a0c(0x1da)](_0x32ce03);}export function isDeclarativeService(_0x436bae){const _0x59b70b=a90_0x4b1ab2;return serviceGroups[_0x59b70b(0x1da)](_0x436bae)||serviceByName[_0x59b70b(0x1df)](_0x436bae)?.[_0x59b70b(0x1d2)]!==undefined;}export function getServiceEntry(_0x268eef){const _0x467e9b=a90_0x4b1ab2;return serviceByName[_0x467e9b(0x1df)](_0x268eef);}export function getLegacyHandler(_0x45ef7b,_0x50ec9b){return undefined;}export function getAllDefinitions(){const _0x141e89=a90_0x4b1ab2;return Array['from'](definitions[_0x141e89(0x1cd)]());}
@@ -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_0xa1cd89=a91_0x2fe5;(function(_0x3ba1d7,_0x33ebc1){const _0x22e7ba=a91_0x2fe5,_0x850661=_0x3ba1d7();while(!![]){try{const _0x24df20=parseInt(_0x22e7ba(0x1a6))/0x1+-parseInt(_0x22e7ba(0x1b2))/0x2+parseInt(_0x22e7ba(0x1b1))/0x3+-parseInt(_0x22e7ba(0x193))/0x4+parseInt(_0x22e7ba(0x19b))/0x5*(-parseInt(_0x22e7ba(0x1a4))/0x6)+parseInt(_0x22e7ba(0x1b0))/0x7*(parseInt(_0x22e7ba(0x1c2))/0x8)+parseInt(_0x22e7ba(0x1a9))/0x9;if(_0x24df20===_0x33ebc1)break;else _0x850661['push'](_0x850661['shift']());}catch(_0x5a0a99){_0x850661['push'](_0x850661['shift']());}}}(a91_0x5168,0x70d0b));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';function a91_0x5168(){const _0x5a3b4b=['\x22\x20not\x20found\x20in\x20package.json.','Script\x20\x22','inherit','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','padEnd','error','push','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','cwd','40OpBODe','utf-8','Script\x20name\x20defined\x20in\x20package.json','run','\x20\x20\x20\x20','\x20run\x20start','needsUpgrade','Available:\x20','\x20run\x20<script>\x0a','yarn','\x20\x20EXAMPLES','No\x20scripts\x20defined\x20in\x20package.json.','scripts','yarn.lock','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','script','bun.lock','1167500KIjXkd','npm','\x20run\x20build','start','vite','read','.bin','args','19455SKfbab','node_modules','\x0a\x20\x20Available\x20scripts:\x0a','\x20run\x20','has','keys','boolean','entries','(none)','1266REdzNI','pnpm-lock.yaml','722698NfnDIu','close','validation','4390272RVIfuS','vite\x20preview\x20exited\x20with\x20code\x20','bun','build','bool','join','log','938581zTSmXO','324441RjCGwM','828202kfKkDm','\x20exited\x20with\x20code\x20','watch','length','all','parse','map'];a91_0x5168=function(){return _0x5a3b4b;};return a91_0x5168();}import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a91_0xa1cd89(0x196),'dev']);function readPackageScripts(_0x3359fa){const _0x15b6b4=a91_0xa1cd89,_0x1925d6=resolve(_0x3359fa,'package.json');if(!existsSync(_0x1925d6))return null;try{const _0x58cd33=JSON[_0x15b6b4(0x1b7)](readFileSync(_0x1925d6,_0x15b6b4(0x1c3)));return _0x58cd33[_0x15b6b4(0x1ce)]??{};}catch{return null;}}function detectPackageManager(_0x482a77){const _0x17b352=a91_0xa1cd89;if(existsSync(resolve(_0x482a77,'bun.lockb'))||existsSync(resolve(_0x482a77,_0x17b352(0x192))))return _0x17b352(0x1ab);if(existsSync(resolve(_0x482a77,_0x17b352(0x1a5))))return'pnpm';if(existsSync(resolve(_0x482a77,_0x17b352(0x1cf))))return _0x17b352(0x1cb);return _0x17b352(0x194);}async function versionCheck(_0x397b97){const _0x578700=a91_0xa1cd89,_0x1a6024=await checkCliVersion();if(_0x1a6024['needsUpgrade'])printCliUpgradeWarning(_0x1a6024);const _0x9f4067=await checkSdkVersion(_0x397b97);if(_0x9f4067[_0x578700(0x1c8)])printSdkUpgradeWarning(_0x9f4067);}function spawnScript(_0xb44cca,_0x4bc794,_0x578524,_0xe60223){return new Promise((_0x292a28,_0xc83dc)=>{const _0x481f58=a91_0x2fe5,_0x596d6f=[_0x481f58(0x1c5),_0x4bc794,..._0x578524],_0x2ae2da=spawn(_0xb44cca,_0x596d6f,{'cwd':_0xe60223,'stdio':_0x481f58(0x1bb),'shell':!![],'env':{...process.env,'PATH':''+join(_0xe60223,_0x481f58(0x19c),'.bin')+delimiter+process.env.PATH}});_0x2ae2da['on'](_0x481f58(0x1a7),_0x142521=>{const _0x43ecf4=_0x481f58;if(_0x142521===0x0||_0x142521===null)_0x292a28();else _0xc83dc(new Error(_0xb44cca+_0x43ecf4(0x19e)+_0x4bc794+_0x43ecf4(0x1b3)+_0x142521));}),_0x2ae2da['on'](_0x481f58(0x1be),_0xc83dc);});}function a91_0x2fe5(_0x1b876f,_0x469c74){_0x1b876f=_0x1b876f-0x191;const _0x516858=a91_0x5168();let _0x2fe59c=_0x516858[_0x1b876f];return _0x2fe59c;}function spawnViteBuildWatch(_0x411b2e){return new Promise((_0x3e556b,_0x15b5ed)=>{const _0x3b3575=a91_0x2fe5,_0x1c753f=spawn(_0x3b3575(0x197),[_0x3b3575(0x1ac),'--watch'],{'cwd':_0x411b2e,'stdio':_0x3b3575(0x1bb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x411b2e,_0x3b3575(0x19c),_0x3b3575(0x199))+delimiter+process.env.PATH}});_0x1c753f['on']('close',_0xd459dd=>{const _0x44263d=_0x3b3575;if(_0xd459dd===0x0||_0xd459dd===null)_0x3e556b();else _0x15b5ed(new Error(_0x44263d(0x1c0)+_0xd459dd));}),_0x1c753f['on'](_0x3b3575(0x1be),_0x15b5ed);});}function spawnVitePreview(_0x1e1c05){return new Promise((_0x37f737,_0x5b7d2d)=>{const _0xd4877f=a91_0x2fe5,_0x20dd6c=spawn(_0xd4877f(0x197),['preview'],{'cwd':_0x1e1c05,'stdio':_0xd4877f(0x1bb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x1e1c05,_0xd4877f(0x19c),_0xd4877f(0x199))+delimiter+process.env.PATH}});_0x20dd6c['on']('close',_0x5ddc07=>{const _0x5d2346=_0xd4877f;if(_0x5ddc07===0x0||_0x5ddc07===null)_0x37f737();else _0x5b7d2d(new Error(_0x5d2346(0x1aa)+_0x5ddc07));}),_0x20dd6c['on'](_0xd4877f(0x1be),_0x5b7d2d);});}const runFlags=[{'name':a91_0xa1cd89(0x1b4),'type':a91_0xa1cd89(0x1a1),'description':'Enable\x20watch\x20mode\x20for\x20preview','default':![]}];export const runDefinition={'service':'run','command':a91_0xa1cd89(0x1c5),'description':'Run\x20a\x20package.json\x20script','risk':a91_0xa1cd89(0x198),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a91_0xa1cd89(0x191),'description':a91_0xa1cd89(0x1c4),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3f0723=a91_0xa1cd89,_0x52c50d=readPackageScripts(process[_0x3f0723(0x1c1)]()),_0x57295e=[];if(_0x52c50d&&Object[_0x3f0723(0x1a0)](_0x52c50d)[_0x3f0723(0x1b5)]>0x0){const _0x2eefae=Object[_0x3f0723(0x1a0)](_0x52c50d),_0x3d93b6=Math['max'](..._0x2eefae[_0x3f0723(0x1b8)](_0x122c2a=>_0x122c2a[_0x3f0723(0x1b5)]));_0x57295e[_0x3f0723(0x1bf)](_0x3f0723(0x1bc));for(const [_0x15885d,_0x1e9ec2]of Object[_0x3f0723(0x1a2)](_0x52c50d)){_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x19e)+_0x15885d[_0x3f0723(0x1bd)](_0x3d93b6+0x2)+'#\x20'+_0x1e9ec2);}}else _0x57295e[_0x3f0723(0x1bf)](_0x3f0723(0x1cc)),_0x57295e[_0x3f0723(0x1bf)](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x1c7)),_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x195)),_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+'\x20run\x20preview'),_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x1d0));return _0x57295e[_0x3f0723(0x1ae)]('\x0a');},async 'execute'(_0x590f49){const _0xa62464=a91_0xa1cd89,_0x35dff6=process[_0xa62464(0x1c1)](),_0xcc7dc8=_0x590f49['args'][0x0],_0x1584cf=_0x590f49[_0xa62464(0x19a)]['slice'](0x1),_0x3fef4a=readPackageScripts(_0x35dff6);if(!_0x3fef4a)throw CliErrors[_0xa62464(0x1a8)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0xcc7dc8){const _0xd3811d=Object[_0xa62464(0x1a0)](_0x3fef4a);if(_0xd3811d[_0xa62464(0x1b5)]===0x0)console[_0xa62464(0x1af)](_0xa62464(0x1cd));else{console[_0xa62464(0x1af)](_0xa62464(0x19d));const _0x1c2fc6=Math['max'](..._0xd3811d[_0xa62464(0x1b8)](_0x5847c8=>_0x5847c8[_0xa62464(0x1b5)]));for(const [_0x249604,_0x2ba7fa]of Object[_0xa62464(0x1a2)](_0x3fef4a)){console['log']('\x20\x20\x20\x20'+_0x249604[_0xa62464(0x1bd)](_0x1c2fc6+0x2)+_0x2ba7fa);}console[_0xa62464(0x1af)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0xa62464(0x1ca));}return{'ok':!![]};}if(!_0x3fef4a[_0xcc7dc8])throw CliErrors[_0xa62464(0x1a8)](_0xa62464(0x1ba)+_0xcc7dc8+_0xa62464(0x1b9),_0xa62464(0x1c9)+(Object[_0xa62464(0x1a0)](_0x3fef4a)[_0xa62464(0x1ae)](',\x20')||_0xa62464(0x1a3)));const _0x20c07=detectPackageManager(_0x35dff6);VERSION_CHECK_SCRIPTS[_0xa62464(0x19f)](_0xcc7dc8)&&await versionCheck(_0x35dff6);if(_0xcc7dc8==='preview'&&_0x590f49[_0xa62464(0x1ad)](_0xa62464(0x1b4)))return await Promise[_0xa62464(0x1b6)]([spawnViteBuildWatch(_0x35dff6),spawnVitePreview(_0x35dff6)]),{'ok':!![]};return await spawnScript(_0x20c07,_0xcc7dc8,_0x1584cf,_0x35dff6),{'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_0x39f6(_0x38cc16,_0x5dd1cc){_0x38cc16=_0x38cc16-0xfc;const _0x2dbee6=a92_0x2dbe();let _0x39f6c5=_0x2dbee6[_0x38cc16];return _0x39f6c5;}function a92_0x2dbe(){const _0x340c33=['14018TvjuQL','39942amAvjk','read','Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','4033854QUAjtI','24515vpKuVJ','654789lfDWCI','309594nXmCQq','378eqEEKy','896008ZZrjzM','180TWsNxd'];a92_0x2dbe=function(){return _0x340c33;};return a92_0x2dbe();}const a92_0x515f5e=a92_0x39f6;(function(_0x14af31,_0x100cff){const _0x3a186b=a92_0x39f6,_0x248b8a=_0x14af31();while(!![]){try{const _0x31e0b6=-parseInt(_0x3a186b(0x103))/0x1+parseInt(_0x3a186b(0xfc))/0x2+parseInt(_0x3a186b(0x104))/0x3+-parseInt(_0x3a186b(0x107))/0x4*(-parseInt(_0x3a186b(0x102))/0x5)+parseInt(_0x3a186b(0xfd))/0x6*(parseInt(_0x3a186b(0x105))/0x7)+parseInt(_0x3a186b(0x106))/0x8+parseInt(_0x3a186b(0x101))/0x9;if(_0x31e0b6===_0x100cff)break;else _0x248b8a['push'](_0x248b8a['shift']());}catch(_0x762b47){_0x248b8a['push'](_0x248b8a['shift']());}}}(a92_0x2dbe,0x9171a));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x3096a9){const _0x10b882=await buildSchemaPayload();return{'ok':!![],'data':_0x10b882};}export const schemaDefinition={'service':a92_0x515f5e(0x100),'command':'export','description':a92_0x515f5e(0xff),'risk':a92_0x515f5e(0xfe),'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_0x4c75(_0x572d6d,_0xb54fd8){_0x572d6d=_0x572d6d-0x10d;const _0x35d8b2=a93_0x35d8();let _0x4c75ef=_0x35d8b2[_0x572d6d];return _0x4c75ef;}const a93_0x301098=a93_0x4c75;(function(_0x4714ed,_0x2a969b){const _0x3e8c66=a93_0x4c75,_0x35a87b=_0x4714ed();while(!![]){try{const _0x50ecd8=parseInt(_0x3e8c66(0x11c))/0x1*(-parseInt(_0x3e8c66(0x119))/0x2)+parseInt(_0x3e8c66(0x115))/0x3*(-parseInt(_0x3e8c66(0x126))/0x4)+-parseInt(_0x3e8c66(0x117))/0x5*(parseInt(_0x3e8c66(0x10e))/0x6)+parseInt(_0x3e8c66(0x123))/0x7*(-parseInt(_0x3e8c66(0x111))/0x8)+parseInt(_0x3e8c66(0x122))/0x9*(parseInt(_0x3e8c66(0x10f))/0xa)+parseInt(_0x3e8c66(0x11a))/0xb+parseInt(_0x3e8c66(0x11e))/0xc;if(_0x50ecd8===_0x2a969b)break;else _0x35a87b['push'](_0x35a87b['shift']());}catch(_0x56ca32){_0x35a87b['push'](_0x35a87b['shift']());}}}(a93_0x35d8,0xb49ed));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a93_0x35d8(){const _0x177c0c=['unknown','19724184tYQYUU','lovrabet/rabetbase','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','Install\x20developer\x20skill\x20package','737946YnsyZp','2996lupjvd','skill','Check\x20network\x20connectivity\x20and\x20try\x20again.','3412kXNFth','\x20skill\x20installed','log','5579448LgHuWB','30LvPevA','install','17904FqkLEB','cwd','error','pipe','9WHMGee','skill-install','5uqdtQn','skipped','6bfSecX','13260731nsfnCn','../../skills/npx-skills-add.js','155011zBirUx'];a93_0x35d8=function(){return _0x177c0c;};return a93_0x35d8();}import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a93_0x301098(0x124),'command':a93_0x301098(0x110),'description':a93_0x301098(0x121),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x49c5c9){const _0x2d2a97=a93_0x301098;logger['setLogPath'](process[_0x2d2a97(0x112)]()),logger['info'](_0x2d2a97(0x116),'执行安装技能包命令(委托给\x20npx\x20skills\x20--global)');const {runNpxSkillsAddGlobal:_0x5cd1a3}=await import(_0x2d2a97(0x11b)),_0x255eb5=_0x49c5c9['nonInteractive']?_0x2d2a97(0x114):'inherit';console[_0x2d2a97(0x10d)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...');const _0x553810=_0x5cd1a3(process['cwd'](),_0x2d2a97(0x11f),{'stdio':_0x255eb5});if(_0x553810[_0x2d2a97(0x118)])console[_0x2d2a97(0x10d)](_0x2d2a97(0x120));else{if(_0x553810['ok'])console[_0x2d2a97(0x10d)](CLI_BIN_NAME+_0x2d2a97(0x127));else throw CliErrors['apiError']('npx\x20skills\x20add\x20failed:\x20'+(_0x553810[_0x2d2a97(0x113)]||_0x2d2a97(0x11d)),_0x2d2a97(0x125));}return{'ok':!![]};}}];
@@ -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
+ function a94_0x26bd(_0x936f7f,_0x3d9de8){_0x936f7f=_0x936f7f-0x1e1;const _0x227846=a94_0x2278();let _0x26bd48=_0x227846[_0x936f7f];return _0x26bd48;}const a94_0x1da972=a94_0x26bd;(function(_0x176ca8,_0x1f3f4b){const _0x1b43f1=a94_0x26bd,_0xab966=_0x176ca8();while(!![]){try{const _0x49676d=-parseInt(_0x1b43f1(0x1ec))/0x1*(parseInt(_0x1b43f1(0x1e9))/0x2)+parseInt(_0x1b43f1(0x1f1))/0x3+parseInt(_0x1b43f1(0x1f2))/0x4*(parseInt(_0x1b43f1(0x1f4))/0x5)+-parseInt(_0x1b43f1(0x1e7))/0x6*(parseInt(_0x1b43f1(0x1f5))/0x7)+parseInt(_0x1b43f1(0x1e3))/0x8+-parseInt(_0x1b43f1(0x1e5))/0x9*(-parseInt(_0x1b43f1(0x1e6))/0xa)+parseInt(_0x1b43f1(0x1f7))/0xb;if(_0x49676d===_0x1f3f4b)break;else _0xab966['push'](_0xab966['shift']());}catch(_0x4e36ee){_0xab966['push'](_0xab966['shift']());}}}(a94_0x2278,0xd135b));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a94_0x2278(){const _0x1d7dac=['read','bool','659BOYGOA','sqlName','boolean','verbose','str','2514162XPJSaS','1916hugNvs','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','1115KfUYAq','202916LptLeW','dbId','135432TbRfda','sqlContent','appCode','sql','5881304uyoBFe','description','5783634LBiQHJ','10YJUxvs','66JwHqII','sqlCode','3518KHyWMo'];a94_0x2278=function(){return _0x1d7dac;};return a94_0x2278();}export const sqlDetail={'service':a94_0x1da972(0x1e2),'command':'detail','description':a94_0x1da972(0x1f3),'risk':a94_0x1da972(0x1ea),'flags':[SQLCODE_FLAG,{'name':a94_0x1da972(0x1ef),'type':a94_0x1da972(0x1ee),'description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x1f441b){const _0x4bcd95=a94_0x1da972,_0x43eb54=await getSqlQueryInfo(_0x1f441b[_0x4bcd95(0x1e1)],_0x1f441b[_0x4bcd95(0x1f0)]('sqlcode')),_0x22328d=_0x1f441b[_0x4bcd95(0x1eb)]('verbose');if(_0x22328d)return{'ok':!![],'data':_0x43eb54};const _0x396ba1=_0x43eb54['dbId']?await getDbName(_0x1f441b[_0x4bcd95(0x1e1)],_0x43eb54[_0x4bcd95(0x1f6)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x43eb54[_0x4bcd95(0x1e8)],'sqlName':_0x43eb54[_0x4bcd95(0x1ed)],'db':_0x396ba1?_0x396ba1+'\x20('+_0x43eb54[_0x4bcd95(0x1f6)]+')':_0x43eb54['dbId']??'','description':_0x43eb54[_0x4bcd95(0x1e4)]??'','sqlContent':_0x43eb54[_0x4bcd95(0x1f8)]??''}};}};
@@ -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_0x1104(){const _0x30e98a=['\x20row(s)\x20in\x20','12323707fMfXat','4111390gLiiqu','validation','str','params','sqlcode','execResult','9cRkILZ','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','1853675RJryoJ','66XiJpxE','read','Returned\x20','3725634sfPcAk','14184WJxrIO','now','execSuccess','1472360YCUocG','1TNkJLb','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','length','SQL\x20execution\x20failed','1897rqBkpq','exec','Invalid\x20JSON\x20for\x20--params:\x20','string','118004LUWwiW','isArray'];a95_0x1104=function(){return _0x30e98a;};return a95_0x1104();}const a95_0x3fc7f5=a95_0x258d;(function(_0x478fd4,_0x32c3ed){const _0xcfb78b=a95_0x258d,_0x3e37b=_0x478fd4();while(!![]){try{const _0xd863c8=-parseInt(_0xcfb78b(0xa0))/0x1*(-parseInt(_0xcfb78b(0x9f))/0x2)+parseInt(_0xcfb78b(0xb5))/0x3*(parseInt(_0xcfb78b(0xa8))/0x4)+-parseInt(_0xcfb78b(0xb4))/0x5+parseInt(_0xcfb78b(0x9b))/0x6+-parseInt(_0xcfb78b(0xa4))/0x7*(parseInt(_0xcfb78b(0x9c))/0x8)+parseInt(_0xcfb78b(0xb2))/0x9*(parseInt(_0xcfb78b(0xac))/0xa)+-parseInt(_0xcfb78b(0xab))/0xb;if(_0xd863c8===_0x32c3ed)break;else _0x3e37b['push'](_0x3e37b['shift']());}catch(_0x5d6aad){_0x3e37b['push'](_0x3e37b['shift']());}}}(a95_0x1104,0x6cd1d));import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a95_0x258d(_0x121351,_0x215f20){_0x121351=_0x121351-0x99;const _0x110418=a95_0x1104();let _0x258d0a=_0x110418[_0x121351];return _0x258d0a;}export const sqlExec={'service':'sql','command':a95_0x3fc7f5(0xa5),'description':a95_0x3fc7f5(0xa1),'risk':a95_0x3fc7f5(0x99),'flags':[SQLCODE_FLAG,{'name':'params','type':a95_0x3fc7f5(0xa7),'description':a95_0x3fc7f5(0xb3)}],async 'execute'(_0x2bab28){const _0x5701b2=a95_0x3fc7f5;let _0x4417c2;const _0xed554d=_0x2bab28[_0x5701b2(0xae)](_0x5701b2(0xaf));if(_0xed554d)try{_0x4417c2=JSON['parse'](_0xed554d);}catch{throw CliErrors[_0x5701b2(0xad)](_0x5701b2(0xa6)+_0xed554d);}const _0x245f38=Date[_0x5701b2(0x9d)](),_0xaa5d8=await executeSql(_0x2bab28['appCode'],_0x2bab28['str'](_0x5701b2(0xb0)),_0x4417c2),_0x2574d3=Date['now']()-_0x245f38,_0x21af17=_0xaa5d8?.[_0x5701b2(0xb1)]??_0xaa5d8,_0x3f6a81=_0xaa5d8?.[_0x5701b2(0x9e)]??!![];if(!_0x3f6a81)return{'ok':![],'data':{'error':_0xaa5d8?.['execError']||_0x5701b2(0xa3),'elapsed':_0x2574d3},'message':_0x5701b2(0xa3)};const _0x2ec914=Array[_0x5701b2(0xa9)](_0x21af17)?_0x21af17:[];return{'ok':!![],'data':{'rows':_0x2ec914,'rowCount':_0x2ec914[_0x5701b2(0xa2)],'elapsed':_0x2574d3},'message':_0x5701b2(0x9a)+_0x2ec914[_0x5701b2(0xa2)]+_0x5701b2(0xaa)+_0x2574d3+'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(_0x1966ed,_0x27fa14){const _0x15cbdb=a96_0xb6b5,_0x433caf=_0x1966ed();while(!![]){try{const _0x26a9ee=-parseInt(_0x15cbdb(0xc0))/0x1+parseInt(_0x15cbdb(0xbf))/0x2+-parseInt(_0x15cbdb(0xc5))/0x3+parseInt(_0x15cbdb(0xc4))/0x4*(parseInt(_0x15cbdb(0xc1))/0x5)+parseInt(_0x15cbdb(0xc6))/0x6+-parseInt(_0x15cbdb(0xc2))/0x7+parseInt(_0x15cbdb(0xc3))/0x8;if(_0x26a9ee===_0x27fa14)break;else _0x433caf['push'](_0x433caf['shift']());}catch(_0x5b2474){_0x433caf['push'](_0x433caf['shift']());}}}(a96_0x45c8,0x9d313));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';function a96_0xb6b5(_0x41d2b3,_0x2f89ff){_0x41d2b3=_0x41d2b3-0xbf;const _0x45c88a=a96_0x45c8();let _0xb6b508=_0x45c88a[_0x41d2b3];return _0xb6b508;}import{sqlPull}from'../../commands/sql/pull.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec,sqlPull];function a96_0x45c8(){const _0x17900e=['1792406ULgQzV','573674NAhCeW','195ZdWJti','7997234zLdnhz','2285952niTwer','115084tQNbvu','938220sYwgrl','2212314KXkUog'];a96_0x45c8=function(){return _0x17900e;};return a96_0x45c8();}
@@ -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_0x1c03(_0x5d72ac,_0x4b1f5c){_0x5d72ac=_0x5d72ac-0x100;const _0x48a05d=a97_0x48a0();let _0x1c0387=_0x48a05d[_0x5d72ac];return _0x1c0387;}const a97_0x809ae6=a97_0x1c03;function a97_0x48a0(){const _0xfc7666=['read','list','all','3342402uVAzBK','108yCpflx','365018IXynoC','Found\x20','appCode','sqlcode','pagesize','map','length','\x20SQL\x20queries\x20(total:\x20','bool','Page\x20number','page','235470cNqHhu','List\x20custom\x20SQL\x20queries','Page\x20size','name','str','num','260748geTWsK','boolean','dbId','216uJeTMX','number','totalCount','sqlCode','string','310891eCOfAq','7erjGbO','4951296HgbfEJ','4012045BlyBkV','No\x20custom\x20SQL\x20queries\x20found.'];a97_0x48a0=function(){return _0xfc7666;};return a97_0x48a0();}(function(_0x282b4c,_0x1e70e4){const _0x42efa3=a97_0x1c03,_0x1dd8dc=_0x282b4c();while(!![]){try{const _0xb88571=parseInt(_0x42efa3(0x102))/0x1*(-parseInt(_0x42efa3(0x10b))/0x2)+parseInt(_0x42efa3(0x103))/0x3+parseInt(_0x42efa3(0x11c))/0x4+parseInt(_0x42efa3(0x104))/0x5+parseInt(_0x42efa3(0x109))/0x6+parseInt(_0x42efa3(0x101))/0x7*(-parseInt(_0x42efa3(0x11f))/0x8)+parseInt(_0x42efa3(0x10a))/0x9*(parseInt(_0x42efa3(0x116))/0xa);if(_0xb88571===_0x1e70e4)break;else _0x1dd8dc['push'](_0x1dd8dc['shift']());}catch(_0x1b710f){_0x1dd8dc['push'](_0x1dd8dc['shift']());}}}(a97_0x48a0,0xd7131));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':'sql','command':a97_0x809ae6(0x107),'description':a97_0x809ae6(0x117),'risk':a97_0x809ae6(0x106),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a97_0x809ae6(0x119),'type':a97_0x809ae6(0x100),'description':'Filter\x20by\x20SQL\x20name'},{'name':a97_0x809ae6(0x115),'type':a97_0x809ae6(0x120),'description':a97_0x809ae6(0x114),'default':0x1},{'name':a97_0x809ae6(0x10f),'type':a97_0x809ae6(0x120),'description':a97_0x809ae6(0x118)},{'name':'verbose','type':a97_0x809ae6(0x11d),'description':'Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content'}],async 'execute'(_0x358662){const _0x1b4e12=a97_0x809ae6,_0x2c0505=await listSqlQueries(_0x358662[_0x1b4e12(0x10d)],{'sqlCode':_0x358662['str'](_0x1b4e12(0x10e))||undefined,'sqlName':_0x358662[_0x1b4e12(0x11a)]('name')||undefined,'currentPage':_0x358662[_0x1b4e12(0x11b)](_0x1b4e12(0x115)),'pageSize':_0x358662[_0x1b4e12(0x11b)](_0x1b4e12(0x10f),0x32)}),_0x325da7=_0x358662[_0x1b4e12(0x113)]('verbose'),_0x2aaa12=_0x2c0505['tableData']??[],_0x17b433=_0x2c0505['paging']?.[_0x1b4e12(0x121)]??_0x2aaa12['length'];let _0x27ab18;return _0x325da7?_0x27ab18=_0x2aaa12:_0x27ab18=await Promise[_0x1b4e12(0x108)](_0x2aaa12[_0x1b4e12(0x110)](async _0x46bfe9=>{const _0x173248=_0x1b4e12;let _0x621853;try{_0x621853=_0x46bfe9[_0x173248(0x11e)]?await getDbName(_0x358662['appCode'],_0x46bfe9[_0x173248(0x11e)]):undefined;}catch{}return{'sqlCode':_0x46bfe9[_0x173248(0x122)],'sqlName':_0x46bfe9['sqlName'],'description':_0x46bfe9['description']??'','db':_0x621853?_0x621853+'\x20('+_0x46bfe9['dbId']+')':_0x46bfe9['dbId']??''};})),{'ok':!![],'data':_0x27ab18,'message':_0x2aaa12[_0x1b4e12(0x111)]===0x0?_0x1b4e12(0x105):_0x1b4e12(0x10c)+_0x2aaa12[_0x1b4e12(0x111)]+_0x1b4e12(0x112)+_0x17b433+').'};}};
@@ -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_0x1e53eb=a98_0x2fe6;(function(_0x2767bf,_0x5a1003){const _0x455bb8=a98_0x2fe6,_0x5125df=_0x2767bf();while(!![]){try{const _0x2f5bbf=parseInt(_0x455bb8(0x94))/0x1*(parseInt(_0x455bb8(0x77))/0x2)+parseInt(_0x455bb8(0xa4))/0x3*(-parseInt(_0x455bb8(0x75))/0x4)+parseInt(_0x455bb8(0x81))/0x5+parseInt(_0x455bb8(0x98))/0x6+-parseInt(_0x455bb8(0x74))/0x7*(-parseInt(_0x455bb8(0x80))/0x8)+parseInt(_0x455bb8(0x79))/0x9+-parseInt(_0x455bb8(0xa3))/0xa;if(_0x2f5bbf===_0x5a1003)break;else _0x5125df['push'](_0x5125df['shift']());}catch(_0x12c344){_0x5125df['push'](_0x5125df['shift']());}}}(a98_0x103c,0x567af));import{createInterface}from'node:readline';import{readFile,writeFile}from'node:fs/promises';function a98_0x103c(){const _0x205480=['stdin','totalCount','3126582WzPSkM','stderr','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20','push','yes','No\x20remote\x20SQL\x20queries\x20matched.','sqlcode','str','Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)','sqlContent','tableData','6973380hndsid','3OffxfT','length','unchanged','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','bool','\x20SQL\x20file(s)\x20under\x20','530726srqFNY','2388972MbAUQE','\x20written,\x20','81850TQAajM','name','2637306pQhVoY','pull','\x20error(s)).','message','boolean','utf8','sqlCode','48JviVPA','57200dhYEMy','includes','skipped','string','toLowerCase','cancelled','conflict','Would\x20pull\x20','close','local\x20differs\x20from\x20remote','Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20(','force','nonInteractive','Pull\x20complete:\x20','would_pull','POST','question','sqlName','appCode','9mptLka','/smartapi/custom/queryUserCustomSqlList'];a98_0x103c=function(){return _0x205480;};return a98_0x103c();}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';function a98_0x2fe6(_0x19e590,_0x57c9d1){_0x19e590=_0x19e590-0x73;const _0x103c0e=a98_0x103c();let _0x2fe6da=_0x103c0e[_0x19e590];return _0x2fe6da;}const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x3fcce9,_0x46b035){const _0x1cdd27=a98_0x2fe6,_0x43930c=[];let _0x130cd3=0x1;while(!![]){const _0x501cec=await listSqlQueries(_0x3fcce9,{'currentPage':_0x130cd3,'pageSize':PAGE_SIZE,'sqlCode':_0x46b035[_0x1cdd27(0x7f)],'sqlName':_0x46b035[_0x1cdd27(0x92)]}),_0x474a9c=_0x501cec[_0x1cdd27(0xa2)]??[];_0x43930c['push'](..._0x474a9c);if(_0x474a9c[_0x1cdd27(0xa5)]===0x0)break;const _0x10619c=_0x501cec['paging']?.[_0x1cdd27(0x97)];if(_0x10619c!=null?_0x43930c['length']>=_0x10619c:_0x474a9c['length']<PAGE_SIZE)break;_0x130cd3++;}return _0x43930c;}async function ensureSqlContent(_0x12f517,_0x96f4c7){const _0x4e076e=a98_0x2fe6;if(_0x96f4c7[_0x4e076e(0xa1)]!=null&&String(_0x96f4c7[_0x4e076e(0xa1)])['length']>0x0)return _0x96f4c7;return getSqlQueryInfo(_0x12f517,_0x96f4c7['sqlCode']);}export const sqlPull={'service':'sql','command':a98_0x1e53eb(0x7a),'description':'Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/','risk':'write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a98_0x1e53eb(0x84),'description':a98_0x1e53eb(0xa0)},{'name':a98_0x1e53eb(0x8c),'type':a98_0x1e53eb(0x7d),'description':'Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote'}],async 'dryRun'(_0x384bc4){const _0x3b3abb=a98_0x1e53eb,_0x25a3bd=findProjectRootDirectory(),_0x30f01d=resolveSqlLocalDir(_0x25a3bd),_0x2fd59f=_0x384bc4[_0x3b3abb(0x9f)](_0x3b3abb(0x9e))||undefined,_0x476bbf=_0x384bc4[_0x3b3abb(0x9f)](_0x3b3abb(0x78))||undefined,_0x160f29=await fetchAllSqlQueries(_0x384bc4[_0x3b3abb(0x93)],{'sqlCode':_0x2fd59f,'sqlName':_0x476bbf}),_0x1b2d74=[],_0x57d1ea=[];for(const _0x869770 of _0x160f29){try{_0x1b2d74[_0x3b3abb(0x9b)](await ensureSqlContent(_0x384bc4[_0x3b3abb(0x93)],_0x869770));}catch(_0x1f0072){_0x57d1ea[_0x3b3abb(0x9b)]({'sqlCode':_0x869770[_0x3b3abb(0x7f)],'error':_0x1f0072 instanceof Error?_0x1f0072['message']:String(_0x1f0072)});}}const _0x17ecd8=assignSqlFileNames(_0x1b2d74),_0x88113c=[];for(const [_0x48700d,_0x2f07e7]of _0x17ecd8){const _0x50daf2=join(_0x30f01d,_0x48700d),_0x197be4=buildPulledSqlFileContent(_0x2f07e7);let _0x26e0d2=_0x3b3abb(0x8f),_0x37217d;if(await fileExists(_0x50daf2)){const _0x2a0b1a=await readFile(_0x50daf2,_0x3b3abb(0x7e));_0x2a0b1a===_0x197be4?(_0x26e0d2=_0x3b3abb(0x83),_0x37217d=_0x3b3abb(0xa6)):(_0x26e0d2=_0x3b3abb(0x87),_0x37217d=_0x3b3abb(0xa7));}_0x88113c['push']({'sqlCode':_0x2f07e7[_0x3b3abb(0x7f)],'sqlName':_0x2f07e7['sqlName'],'filePath':_0x50daf2,'status':_0x26e0d2,'reason':_0x37217d});}return{'method':_0x3b3abb(0x90),'url':_0x3b3abb(0x95),'body':{'appCode':_0x384bc4[_0x3b3abb(0x93)],'sqlCode':_0x2fd59f??null,'sqlName':_0x476bbf??null,'loadErrors':_0x57d1ea,'files':_0x88113c},'description':_0x3b3abb(0x88)+_0x88113c[_0x3b3abb(0xa5)]+_0x3b3abb(0x73)+_0x30f01d};},async 'execute'(_0x170821){const _0x1a9520=a98_0x1e53eb,_0x256b51=findProjectRootDirectory(),_0x2f26c5=resolveSqlLocalDir(_0x256b51),_0x1a71cd=_0x170821[_0x1a9520(0x9f)]('sqlcode')||undefined,_0x33dc87=_0x170821[_0x1a9520(0x9f)]('name')||undefined,_0x52a7d3=_0x170821[_0x1a9520(0xa8)](_0x1a9520(0x8c)),_0x590b83=await fetchAllSqlQueries(_0x170821['appCode'],{'sqlCode':_0x1a71cd,'sqlName':_0x33dc87});if(_0x590b83[_0x1a9520(0xa5)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1a9520(0x9d)};const _0x4e07e4=[],_0x4ef0c2=[];for(const _0x1e2f9f of _0x590b83){try{_0x4e07e4[_0x1a9520(0x9b)](await ensureSqlContent(_0x170821[_0x1a9520(0x93)],_0x1e2f9f));}catch(_0x1a6690){_0x4ef0c2['push']({'sqlCode':_0x1e2f9f[_0x1a9520(0x7f)],'error':_0x1a6690 instanceof Error?_0x1a6690[_0x1a9520(0x7c)]:String(_0x1a6690)});}}if(_0x4e07e4[_0x1a9520(0xa5)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x4ef0c2},'message':_0x1a9520(0x8b)+_0x4ef0c2[_0x1a9520(0xa5)]+_0x1a9520(0x7b)};const _0x6ae284=assignSqlFileNames(_0x4e07e4);if(_0x52a7d3&&!_0x170821[_0x1a9520(0x8d)]){let _0x4c14e4=![];for(const [_0x595b8b,_0x5a43ca]of _0x6ae284){const _0x3e4055=join(_0x2f26c5,_0x595b8b),_0x35d6c8=buildPulledSqlFileContent(_0x5a43ca);if(await fileExists(_0x3e4055)){const _0x4266f2=await readFile(_0x3e4055,_0x1a9520(0x7e));if(_0x4266f2!==_0x35d6c8){_0x4c14e4=!![];break;}}}if(_0x4c14e4){const _0x489d21=await confirmForce();if(!_0x489d21)throw CliErrors[_0x1a9520(0x86)]('Force\x20pull\x20cancelled.');}}const _0x1ced77=[],_0x26eb8b=[];for(const [_0x50e9d3,_0x283837]of _0x6ae284){const _0x2b6b3e=join(_0x2f26c5,_0x50e9d3),_0x4228a6=buildPulledSqlFileContent(_0x283837);try{if(await fileExists(_0x2b6b3e)){const _0x53fcac=await readFile(_0x2b6b3e,_0x1a9520(0x7e));if(_0x53fcac===_0x4228a6){_0x26eb8b[_0x1a9520(0x9b)]({'sqlCode':_0x283837[_0x1a9520(0x7f)],'reason':_0x1a9520(0xa6)});continue;}if(!_0x52a7d3){_0x26eb8b[_0x1a9520(0x9b)]({'sqlCode':_0x283837['sqlCode'],'reason':_0x1a9520(0x8a)});continue;}}await ensureParentDirectory(_0x2b6b3e),await writeFile(_0x2b6b3e,_0x4228a6,_0x1a9520(0x7e)),_0x1ced77[_0x1a9520(0x9b)]({'sqlCode':_0x283837[_0x1a9520(0x7f)],'filePath':_0x2b6b3e});}catch(_0x492f3d){_0x4ef0c2[_0x1a9520(0x9b)]({'sqlCode':_0x283837[_0x1a9520(0x7f)],'error':_0x492f3d instanceof Error?_0x492f3d[_0x1a9520(0x7c)]:String(_0x492f3d)});}}const _0x5c894c=_0x4ef0c2[_0x1a9520(0xa5)]===0x0;return{'ok':_0x5c894c,'data':{'pulled':_0x1ced77,'skipped':_0x26eb8b,'failed':_0x4ef0c2},'message':_0x1a9520(0x8e)+_0x1ced77[_0x1a9520(0xa5)]+_0x1a9520(0x76)+_0x26eb8b[_0x1a9520(0xa5)]+'\x20skipped,\x20'+_0x4ef0c2[_0x1a9520(0xa5)]+'\x20failed'};}};async function confirmForce(){const _0x13c003=a98_0x1e53eb,_0x58a906=createInterface({'input':process[_0x13c003(0x96)],'output':process[_0x13c003(0x99)]}),_0x1da952=await new Promise(_0x263b94=>{const _0x352d36=_0x13c003;_0x58a906[_0x352d36(0x91)](_0x352d36(0x9a),_0x263b94);});return _0x58a906[_0x13c003(0x89)](),['y',_0x13c003(0x9c)][_0x13c003(0x82)](_0x1da952['trim']()[_0x13c003(0x85)]());}
@@ -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_0x217d19=a99_0x190a;(function(_0x58ed87,_0x31348a){const _0x388edb=a99_0x190a,_0x5ac41f=_0x58ed87();while(!![]){try{const _0x4fd4ec=-parseInt(_0x388edb(0x1a3))/0x1+parseInt(_0x388edb(0x1aa))/0x2+parseInt(_0x388edb(0x1c0))/0x3*(parseInt(_0x388edb(0x1c1))/0x4)+parseInt(_0x388edb(0x1af))/0x5+parseInt(_0x388edb(0x1b4))/0x6*(-parseInt(_0x388edb(0x1bf))/0x7)+-parseInt(_0x388edb(0x1c2))/0x8+parseInt(_0x388edb(0x19f))/0x9*(parseInt(_0x388edb(0x1b5))/0xa);if(_0x4fd4ec===_0x31348a)break;else _0x5ac41f['push'](_0x5ac41f['shift']());}catch(_0xdb9674){_0x5ac41f['push'](_0x5ac41f['shift']());}}}(a99_0x1765,0x27dc1));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';function a99_0x190a(_0x7b9082,_0x280347){_0x7b9082=_0x7b9082-0x19b;const _0x176544=a99_0x1765();let _0x190a28=_0x176544[_0x7b9082];return _0x190a28;}import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a99_0x217d19(0x1bd),'command':a99_0x217d19(0x1b0),'description':a99_0x217d19(0x1a9),'risk':a99_0x217d19(0x1c5),'flags':[{'name':a99_0x217d19(0x1a6),'type':'string','required':!![],'description':a99_0x217d19(0x1b7)},SQLCODE_FLAG_OPTIONAL,{'name':'sqlname','type':a99_0x217d19(0x19c),'description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a99_0x217d19(0x19c),'description':a99_0x217d19(0x1bb)},{'name':a99_0x217d19(0x1a4),'type':a99_0x217d19(0x19c),'description':a99_0x217d19(0x1a8)}],async 'validate'(_0x58607a){const _0x355a78=a99_0x217d19,_0x5749da=resolve(process['cwd'](),_0x58607a[_0x355a78(0x1ce)](_0x355a78(0x1a6)));if(!existsSync(_0x5749da))throw CliErrors[_0x355a78(0x1ab)]('File\x20not\x20found:\x20'+_0x5749da);const _0x46b723=readFileSync(_0x5749da,'utf-8'),_0x7be365=validateSql(_0x46b723);if(!_0x7be365[_0x355a78(0x1ca)])throw CliErrors[_0x355a78(0x1ab)](_0x355a78(0x1a2)+_0x7be365['message']);},async 'dryRun'(_0x2c8829){const _0x211500=a99_0x217d19,_0x42a0bc=resolve(process[_0x211500(0x1b9)](),_0x2c8829['str'](_0x211500(0x1a6))),_0x4963d7=readFileSync(_0x42a0bc,_0x211500(0x1c3)),_0xa4f37e=validateSql(_0x4963d7),_0x29167c=_0x2c8829[_0x211500(0x1ce)]('db')||undefined,{db:_0xc17656,error:_0x3d8c30}=await resolveOneDb(_0x2c8829[_0x211500(0x1a7)],_0x29167c);return{'method':'POST','url':_0x211500(0x1b8),'body':{'appCode':_0x2c8829[_0x211500(0x1a7)],'sqlContent':'('+_0x4963d7[_0x211500(0x1be)]+_0x211500(0x1c7),'sqlCode':_0x2c8829[_0x211500(0x1ce)](_0x211500(0x19e))||undefined,'sqlName':_0x2c8829['str']('sqlname')||undefined,'db':_0xc17656?_0xc17656[_0x211500(0x1bc)]+'\x20('+_0xc17656[_0x211500(0x1a5)]+')':_0x3d8c30},'description':[_0x211500(0x1a1)+_0x2c8829[_0x211500(0x1ce)](_0x211500(0x1a6)),_0x211500(0x1cd)+_0xa4f37e['message'],'Type:\x20'+_0xa4f37e[_0x211500(0x1b6)][_0x211500(0x1b3)]+_0x211500(0x1c6)+(_0xa4f37e['tables']['join'](',\x20')||_0x211500(0x1cb))+_0x211500(0x1ba)+(_0xa4f37e['parameters'][_0x211500(0x1c9)](',\x20')||_0x211500(0x1c8))][_0x211500(0x1c9)]('\x0a')};},async 'execute'(_0x5e479c){const _0x384d9c=a99_0x217d19,_0x2d0a36=resolve(process[_0x384d9c(0x1b9)](),_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x1a6))),_0xdf147c=readFileSync(_0x2d0a36,'utf-8'),_0x44e375=_0x5e479c[_0x384d9c(0x1ce)]('db')||undefined,{db:_0x480928,error:_0x165a7f}=await resolveOneDb(_0x5e479c[_0x384d9c(0x1a7)],_0x44e375);if(_0x165a7f)throw CliErrors['validation'](_0x165a7f);const _0x1e45a6=await saveSqlQuery({'appCode':_0x5e479c['appCode'],'sqlContent':_0xdf147c,'sqlCode':_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x19e))||undefined,'sqlName':_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x1ad))||undefined,'dbId':_0x480928[_0x384d9c(0x1a5)],'description':_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x1a4))||undefined});if(_0x1e45a6[_0x384d9c(0x1a0)])return{'ok':![],'data':_0x1e45a6,'message':_0x1e45a6[_0x384d9c(0x1ae)]||_0x384d9c(0x19d)};return{'ok':!![],'data':{'sqlCode':_0x1e45a6[_0x384d9c(0x1b1)],'sqlName':_0x1e45a6[_0x384d9c(0x19b)],'action':_0x1e45a6[_0x384d9c(0x1cc)]},'message':(_0x1e45a6[_0x384d9c(0x1cc)]===_0x384d9c(0x1ac)?_0x384d9c(0x1b2):'Updated')+_0x384d9c(0x1c4)+(_0x1e45a6[_0x384d9c(0x1b1)]?'\x20('+_0x1e45a6['sqlCode']+')':'')};}};function a99_0x1765(){const _0x2f8817=['Path\x20to\x20the\x20SQL\x20file','/api/node-toolbox/sql/save','cwd','\x20|\x20Params:\x20','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','dbName','sql','length','1631aNWyCq','96grYWXD','13036STgTgn','1442496itfdWD','utf-8','\x20successfully','write','\x20|\x20Tables:\x20','\x20chars)','none','join','valid','N/A','action','Validation:\x20','str','sqlName','string','Conflict\x20detected','sqlcode','118620ZxTPld','blocked','Save\x20SQL\x20query\x20from\x20','SQL\x20validation\x20failed:\x20','292472bnFnSc','description','dbId','file','appCode','SQL\x20query\x20description','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','341216wbTbWv','validation','created','sqlname','message','4255gdnQwy','save','sqlCode','Created','type','5316kZiQaM','430vnzWub','sqlType'];a99_0x1765=function(){return _0x2f8817;};return a99_0x1765();}
@@ -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
+ const a100_0x3f5e5b=a100_0x305a;(function(_0x3770eb,_0x255452){const _0x11d0ca=a100_0x305a,_0x56591e=_0x3770eb();while(!![]){try{const _0x45834a=-parseInt(_0x11d0ca(0x210))/0x1*(parseInt(_0x11d0ca(0x1fa))/0x2)+parseInt(_0x11d0ca(0x20d))/0x3*(-parseInt(_0x11d0ca(0x204))/0x4)+parseInt(_0x11d0ca(0x201))/0x5*(-parseInt(_0x11d0ca(0x20b))/0x6)+parseInt(_0x11d0ca(0x1f9))/0x7+parseInt(_0x11d0ca(0x211))/0x8*(parseInt(_0x11d0ca(0x1f8))/0x9)+parseInt(_0x11d0ca(0x1fe))/0xa+-parseInt(_0x11d0ca(0x209))/0xb*(-parseInt(_0x11d0ca(0x1f7))/0xc);if(_0x45834a===_0x255452)break;else _0x56591e['push'](_0x56591e['shift']());}catch(_0x3b0bdc){_0x56591e['push'](_0x56591e['shift']());}}}(a100_0x5473,0xd296e));import{join}from'node:path';function a100_0x5473(){const _0x931290=['set','.sql','sqlCode','--\x20@lovrabet.description:','11SueFsR','.rabetbase/sql','6UZNVSZ','unnamed','6375CihNUV','unknown','has','509437QXCRmg','8PriKQR','--\x20@lovrabet.sqlCode:\x20','replace','endsWith','20761104qqRdUd','893259zcfUEE','9291961RMqJzU','2CprFJB','trimEnd','--\x20@lovrabet.sqlName:\x20','sqlName','1677710mfBJJu','description','join','8115755nXKrTx','trim','sqlContent','620PgtwZD'];a100_0x5473=function(){return _0x931290;};return a100_0x5473();}function a100_0x305a(_0xa4d4cc,_0x6bef6b){_0xa4d4cc=_0xa4d4cc-0x1f4;const _0x547326=a100_0x5473();let _0x305a37=_0x547326[_0xa4d4cc];return _0x305a37;}export const SQL_LOCAL_REL_DIR=a100_0x3f5e5b(0x20a);export function resolveSqlLocalDir(_0x3631d8){return join(_0x3631d8,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x53e2ac){const _0x36c20e=a100_0x3f5e5b,_0x64a28b=_0x53e2ac[_0x36c20e(0x202)]()||'unnamed',_0x37675c=_0x64a28b[_0x36c20e(0x1f5)](/[/\\?%*:|"<>]/g,'_')[_0x36c20e(0x1f5)](/\s+/g,'_')[_0x36c20e(0x1f5)](/_+/g,'_');return _0x37675c||_0x36c20e(0x20c);}export function assignSqlFileNames(_0x453688){const _0x152bd7=a100_0x3f5e5b,_0x4e3f27=new Map();for(const _0x352e70 of _0x453688){const _0x4251f=safeSqlFileBaseName(_0x352e70[_0x152bd7(0x1fd)]??'unnamed');let _0x2e3d12=_0x4251f+_0x152bd7(0x206);if(_0x4e3f27['has'](_0x2e3d12)){const _0x15f749=(_0x352e70[_0x152bd7(0x207)]??_0x152bd7(0x20e))[_0x152bd7(0x1f5)](/-/g,'');_0x2e3d12=_0x4251f+'__'+_0x15f749+'.sql';}let _0x15065e=0x0,_0x2b741e=_0x2e3d12;while(_0x4e3f27[_0x152bd7(0x20f)](_0x2b741e)){_0x15065e++,_0x2b741e=_0x4251f+'__'+_0x15065e+_0x152bd7(0x206);}_0x4e3f27[_0x152bd7(0x205)](_0x2b741e,_0x352e70);}return _0x4e3f27;}export function buildPulledSqlFileContent(_0xcaca2c){const _0x468da0=a100_0x3f5e5b,_0x5602bb=_0xcaca2c[_0x468da0(0x1fd)]??_0x468da0(0x20c),_0x26a021=_0xcaca2c[_0x468da0(0x207)]??'',_0x402282=(_0xcaca2c[_0x468da0(0x1ff)]??'')[_0x468da0(0x1f5)](/\r?\n/g,'\x20')[_0x468da0(0x202)](),_0xf38979=_0xcaca2c[_0x468da0(0x203)]??'',_0x1d4bf9=[_0x468da0(0x1fc)+_0x5602bb,_0x468da0(0x1f4)+_0x26a021,_0x468da0(0x208)+(_0x402282?'\x20'+_0x402282:''),'',_0xf38979[_0x468da0(0x1fb)]()],_0x300bf0=_0x1d4bf9[_0x468da0(0x200)]('\x0a');return _0x300bf0[_0x468da0(0x1f6)]('\x0a')?_0x300bf0:_0x300bf0+'\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_0x49b3(){const _0x54a205=['sqlType','schema:','map','length','2288892JoMlml','file','valid','filter','string','message','from','834297fgdTot','str','push','\x22\x20not\x20found\x20or\x20not\x20accessible','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','cwd','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','toLowerCase','fields','1663834asNNcZ','isArray','size','trim','reason','Dataset\x20\x22','2589921zifWrH','tableName','dbtableConfig','schemas','validation','sql','tables','Provide\x20--file\x20or\x20--sql','1229380CaYhLE','type','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','238DAYdnr','32952uVgrnl','2677216FTcUiG','appCode','schemaWarnings','utf-8','read'];a101_0x49b3=function(){return _0x54a205;};return a101_0x49b3();}const a101_0x217620=a101_0x12c1;function a101_0x12c1(_0x2b7cb3,_0x3173fa){_0x2b7cb3=_0x2b7cb3-0x10b;const _0x49b3ed=a101_0x49b3();let _0x12c17e=_0x49b3ed[_0x2b7cb3];return _0x12c17e;}(function(_0x106a0e,_0x3c8ddf){const _0x5c269e=a101_0x12c1,_0x3e79c5=_0x106a0e();while(!![]){try{const _0x42a3ae=-parseInt(_0x5c269e(0x12a))/0x1+-parseInt(_0x5c269e(0x133))/0x2+parseInt(_0x5c269e(0x10d))/0x3+parseInt(_0x5c269e(0x123))/0x4+parseInt(_0x5c269e(0x115))/0x5+-parseInt(_0x5c269e(0x119))/0x6*(-parseInt(_0x5c269e(0x118))/0x7)+parseInt(_0x5c269e(0x11a))/0x8;if(_0x42a3ae===_0x3c8ddf)break;else _0x3e79c5['push'](_0x3e79c5['shift']());}catch(_0x450dc4){_0x3e79c5['push'](_0x3e79c5['shift']());}}}(a101_0x49b3,0x82ffc));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';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_0x217620(0x112),'command':'validate','description':a101_0x217620(0x117),'risk':a101_0x217620(0x11e),'flags':[{'name':'file','type':a101_0x217620(0x127),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':'sql','type':'string','description':a101_0x217620(0x130)},{'name':a101_0x217620(0x110),'type':a101_0x217620(0x127),'description':a101_0x217620(0x12e)}],async 'execute'(_0x3b8ec8){const _0x354c7c=a101_0x217620,_0x6bc274=_0x3b8ec8[_0x354c7c(0x12b)](_0x354c7c(0x124)),_0x2c898a=_0x3b8ec8[_0x354c7c(0x12b)]('sql');if(!_0x6bc274&&!_0x2c898a)throw CliErrors['flagMissing']('file',_0x354c7c(0x114));let _0x114f2c;if(_0x6bc274){const _0x8a7db7=resolve(process[_0x354c7c(0x12f)](),_0x6bc274);if(!existsSync(_0x8a7db7))throw CliErrors[_0x354c7c(0x111)]('File\x20not\x20found:\x20'+_0x8a7db7);_0x114f2c=readFileSync(_0x8a7db7,_0x354c7c(0x11d));}else _0x114f2c=_0x2c898a;const _0x2ab644=validateSql(_0x114f2c),_0x354574={'valid':_0x2ab644[_0x354c7c(0x125)],'sqlType':_0x2ab644[_0x354c7c(0x11f)][_0x354c7c(0x116)],'isSelectOnly':_0x2ab644['sqlType']['isSelectOnly'],'isDangerous':_0x2ab644[_0x354c7c(0x11f)]['isDangerous'],'tables':_0x2ab644[_0x354c7c(0x113)],'parameters':_0x2ab644['parameters'],'message':_0x2ab644[_0x354c7c(0x128)]};_0x2ab644['sqlType'][_0x354c7c(0x10b)]&&(_0x354574[_0x354c7c(0x10b)]=_0x2ab644[_0x354c7c(0x11f)][_0x354c7c(0x10b)]);const _0x346e52=_0x3b8ec8[_0x354c7c(0x12b)](_0x354c7c(0x110));if(_0x346e52&&_0x2ab644[_0x354c7c(0x125)]){const _0x113723=_0x346e52['split'](',')['map'](_0x2db8d8=>_0x2db8d8[_0x354c7c(0x136)]())[_0x354c7c(0x126)](Boolean),_0x3f3308=[],_0x31e394=await listDatasets(_0x3b8ec8[_0x354c7c(0x11b)]),_0x129d76=new Map(_0x31e394[_0x354c7c(0x121)](_0x4f9460=>[_0x4f9460['dbtableConfig']?.['tableName']?.[_0x354c7c(0x131)](),_0x4f9460]));for(const _0x13be61 of _0x2ab644[_0x354c7c(0x113)]){const _0x300850=_0x129d76['get'](_0x13be61['toLowerCase']());!_0x300850&&_0x3f3308[_0x354c7c(0x12c)]('Table\x20\x22'+_0x13be61+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x5dafa6 of _0x113723){try{const _0x4885b4=await getDatasetDetail(_0x5dafa6),_0x16f8c9=Array[_0x354c7c(0x134)](_0x4885b4[_0x354c7c(0x132)])?_0x4885b4['fields']:[],_0x25f116=new Set(_0x16f8c9[_0x354c7c(0x121)](_0x493964=>_0x493964['name']?.['toLowerCase']())),_0x5ecead=_0x4885b4[_0x354c7c(0x10f)]?.[_0x354c7c(0x10e)]||_0x4885b4['tableName']||_0x5dafa6;_0x354574[_0x354c7c(0x120)+_0x5ecead]={'code':_0x5dafa6,'tableName':_0x5ecead,'fieldCount':_0x25f116[_0x354c7c(0x135)],'fields':Array[_0x354c7c(0x129)](_0x25f116)};}catch{_0x3f3308[_0x354c7c(0x12c)](_0x354c7c(0x10c)+_0x5dafa6+_0x354c7c(0x12d));}}_0x3f3308[_0x354c7c(0x122)]>0x0&&(_0x354574[_0x354c7c(0x11c)]=_0x3f3308);}return{'ok':_0x2ab644[_0x354c7c(0x125)],'data':_0x354574,'message':_0x2ab644['message']};}};
@@ -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_0x47eeb6=a102_0x3099;(function(_0x40b235,_0x58dd7a){const _0x367fd8=a102_0x3099,_0x5eb90f=_0x40b235();while(!![]){try{const _0x229ebd=-parseInt(_0x367fd8(0xe4))/0x1+-parseInt(_0x367fd8(0xd0))/0x2*(parseInt(_0x367fd8(0xd2))/0x3)+-parseInt(_0x367fd8(0xc8))/0x4+-parseInt(_0x367fd8(0x99))/0x5+parseInt(_0x367fd8(0x9a))/0x6*(parseInt(_0x367fd8(0xbd))/0x7)+parseInt(_0x367fd8(0x9f))/0x8*(parseInt(_0x367fd8(0x8f))/0x9)+parseInt(_0x367fd8(0xd5))/0xa;if(_0x229ebd===_0x58dd7a)break;else _0x5eb90f['push'](_0x5eb90f['shift']());}catch(_0x5e2eb0){_0x5eb90f['push'](_0x5eb90f['shift']());}}}(a102_0x2a1e,0x397ee));export const CLI_BIN_NAME=a102_0x47eeb6(0xa8);export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';function a102_0x3099(_0x254406,_0x984eeb){_0x254406=_0x254406-0x86;const _0x2a1e61=a102_0x2a1e();let _0x3099c2=_0x2a1e61[_0x254406];return _0x3099c2;}export const NPM_PACKAGE_NAME=a102_0x47eeb6(0xb3);export const GLOBAL_FLAGS=[{'name':a102_0x47eeb6(0xba),'meowKey':'appcode','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcb),'hint':a102_0x47eeb6(0xbc)},{'name':a102_0x47eeb6(0xa3),'meowKey':'app','type':'string','description':a102_0x47eeb6(0x96),'hint':a102_0x47eeb6(0xd7)},{'name':a102_0x47eeb6(0xb0),'meowKey':'env','type':a102_0x47eeb6(0x8d),'description':'Environment','hint':'production\x20|\x20daily'},{'name':a102_0x47eeb6(0xda),'meowKey':a102_0x47eeb6(0xda),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0x87),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xd3),'hint':a102_0x47eeb6(0xd8)},{'name':a102_0x47eeb6(0xb2),'meowKey':a102_0x47eeb6(0xca),'type':'boolean','description':a102_0x47eeb6(0xc4)},{'name':'yes','meowKey':'yes','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xbf)},{'name':a102_0x47eeb6(0x92),'meowKey':'nonInteractive','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0x94)},{'name':'global','meowKey':a102_0x47eeb6(0xe3),'type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0x91)},{'name':a102_0x47eeb6(0xc2),'meowKey':a102_0x47eeb6(0xc2),'type':'boolean','description':a102_0x47eeb6(0xdd)},{'name':'ci','meowKey':'ci','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xbe),'hidden':!![]},{'name':'help','meowKey':'help','type':'boolean','description':a102_0x47eeb6(0xc7)},{'name':'name','meowKey':a102_0x47eeb6(0x8b),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xab),'hidden':!![]},{'name':a102_0x47eeb6(0xb9),'meowKey':a102_0x47eeb6(0xb9),'type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xd6),'hidden':!![]},{'name':a102_0x47eeb6(0x86),'meowKey':'watch','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xde),'hidden':!![]},{'name':a102_0x47eeb6(0xaa),'meowKey':'output','type':a102_0x47eeb6(0x8d),'description':'Output\x20path','hidden':!![]},{'name':a102_0x47eeb6(0xb8),'meowKey':a102_0x47eeb6(0xb8),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc9),'hidden':!![]},{'name':a102_0x47eeb6(0xc3),'meowKey':'datasetcode','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0x9d),'hidden':!![]},{'name':'all','meowKey':a102_0x47eeb6(0x89),'type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xdc),'hidden':!![]},{'name':a102_0x47eeb6(0xe2),'meowKey':'enableBffSave','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xae),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a102_0x47eeb6(0xc6),'hidden':!![]},{'name':a102_0x47eeb6(0xcc),'meowKey':a102_0x47eeb6(0xcc),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc1),'hidden':!![]},{'name':a102_0x47eeb6(0xd4),'meowKey':'file','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc0),'hidden':!![]},{'name':a102_0x47eeb6(0xdf),'meowKey':'sqlcode','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xce),'hidden':!![]},{'name':a102_0x47eeb6(0x97),'meowKey':a102_0x47eeb6(0x97),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc5),'hidden':!![]},{'name':a102_0x47eeb6(0x98),'meowKey':a102_0x47eeb6(0x98),'type':a102_0x47eeb6(0x8d),'description':'DB\x20ID','hidden':!![]},{'name':a102_0x47eeb6(0xa4),'meowKey':'description','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xad),'hidden':!![]},{'name':'page','meowKey':a102_0x47eeb6(0xb4),'type':a102_0x47eeb6(0x8d),'description':'Page\x20number','hidden':!![]},{'name':a102_0x47eeb6(0x8e),'meowKey':a102_0x47eeb6(0x8e),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xb1),'hidden':!![]},{'name':a102_0x47eeb6(0x8a),'meowKey':a102_0x47eeb6(0x8a),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcf),'hidden':!![]},{'name':'code','meowKey':a102_0x47eeb6(0x93),'type':'string','description':a102_0x47eeb6(0xd1),'hidden':!![]},{'name':a102_0x47eeb6(0xac),'meowKey':a102_0x47eeb6(0xac),'type':'string','description':a102_0x47eeb6(0x8c),'hidden':!![]},{'name':a102_0x47eeb6(0xa6),'meowKey':a102_0x47eeb6(0xa6),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xa1),'hidden':!![]},{'name':a102_0x47eeb6(0xa2),'meowKey':'operation','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcd),'hidden':!![]},{'name':a102_0x47eeb6(0xb7),'meowKey':a102_0x47eeb6(0xb7),'type':'string','description':a102_0x47eeb6(0xa9),'hidden':!![]},{'name':a102_0x47eeb6(0xbb),'meowKey':a102_0x47eeb6(0xe0),'type':a102_0x47eeb6(0x9b),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a102_0x47eeb6(0xd9),'meowKey':'key','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0x9e),'hidden':!![]},{'name':a102_0x47eeb6(0xdb),'meowKey':a102_0x47eeb6(0xdb),'type':a102_0x47eeb6(0x8d),'description':'Config\x20value','hidden':!![]},{'name':a102_0x47eeb6(0x90),'meowKey':a102_0x47eeb6(0x90),'type':'boolean','description':a102_0x47eeb6(0x95),'hidden':!![]},{'name':a102_0x47eeb6(0xb5),'meowKey':'remote','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xe1),'hidden':!![]},{'name':a102_0x47eeb6(0xa5),'meowKey':'verbose','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xaf),'hidden':!![]},{'name':a102_0x47eeb6(0xa7),'meowKey':'operationType','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcd),'hidden':!![]},{'name':a102_0x47eeb6(0x9c),'meowKey':a102_0x47eeb6(0xb6),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xa0),'hidden':!![]}];function a102_0x2a1e(){const _0x53ef01=['output','Name','sql','Description','Enable\x20BFF\x20save','Verbose\x20output','env','Page\x20size','dry-run','@lovrabet/rabetbase-cli','page','remote','functionNode','target','params','clear','appcode','skip-imports','<code>','214151cixfXe','Alias\x20for\x20--non-interactive','Skip\x20confirmation\x20for\x20high-risk\x20writes','File\x20path','Type\x20filter','project','datasetcode','Preview\x20operation\x20without\x20executing','SQL\x20name','Record\x20ID','Show\x20help','1504136brAZJI','JSON\x20params','dryRun','Override\x20appcode','type','Operation\x20type','SQL\x20code','Keyword\x20filter','40382IcIOHU','Code\x20filter','3yDVOsu','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','file','8586540qjbzNn','Clear','<name>','<expr>','key','format','value','Apply\x20to\x20all','Use\x20project\x20config\x20scope','Watch\x20mode','sqlcode','skipImports','Use\x20remote','enable-bff-save','global','178070JeTyiA','watch','Output\x20format','meowKey','all','keyword','name','SQL\x20string','string','pagesize','497997EOTwUg','force','Use\x20global\x20config\x20scope','non-interactive','code','Force\x20non-interactive\x20mode\x20(CI)','Force\x20overwrite','Select\x20app\x20profile\x20by\x20name','sqlname','dbid','673915sPwwee','6JvspkN','boolean','function-node','Dataset\x20code','Config\x20key','8hJcRVQ','Function\x20node','Schemas','operation','app','description','verbose','schemas','operation-type','rabetbase','Target\x20path'];a102_0x2a1e=function(){return _0x53ef01;};return a102_0x2a1e();}export function buildMeowFlags(){const _0x13dd17=a102_0x47eeb6;return Object['fromEntries'](GLOBAL_FLAGS['map'](_0x3f19da=>[_0x3f19da[_0x13dd17(0x88)],{'type':_0x3f19da['type']}]));}
@@ -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
+ function a103_0x4f5d(){const _0x7a833a=['2427805kLpnwq','8bZiPnY','https://daily-runtime.lovrabet.com','7659281VNIHTI','2rsSISz','2893GHQEeD','6684576hXJLkb','https://daily-api.lovrabet.com','userDomain','https://user.lovrabet.com','6NCJQIp','https://user-daily.lovrabet.com','63620LhsHTP','1051200jhUbDw','https://api.lovrabet.com','10431000rKyEyn','948254MTPJUb'];a103_0x4f5d=function(){return _0x7a833a;};return a103_0x4f5d();}const a103_0x14ae0c=a103_0x42b0;(function(_0x562264,_0x537fcb){const _0x332125=a103_0x42b0,_0x21e44e=_0x562264();while(!![]){try{const _0x1b44ec=parseInt(_0x332125(0xee))/0x1*(parseInt(_0x332125(0xf3))/0x2)+parseInt(_0x332125(0xeb))/0x3*(-parseInt(_0x332125(0xf0))/0x4)+-parseInt(_0x332125(0xef))/0x5+-parseInt(_0x332125(0xe8))/0x6*(parseInt(_0x332125(0xf2))/0x7)+-parseInt(_0x332125(0xf5))/0x8+parseInt(_0x332125(0xed))/0x9+-parseInt(_0x332125(0xea))/0xa*(-parseInt(_0x332125(0xf4))/0xb);if(_0x1b44ec===_0x537fcb)break;else _0x21e44e['push'](_0x21e44e['shift']());}catch(_0x5df476){_0x21e44e['push'](_0x21e44e['shift']());}}}(a103_0x4f5d,0xa2318));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2d2385){const _0x17f858=a103_0x42b0;customApiDomain=_0x2d2385?.['apiDomain'],customUserDomain=_0x2d2385?.[_0x17f858(0xf7)],customRuntimeDomain=_0x2d2385?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a103_0x14ae0c(0xe7):a103_0x14ae0c(0xe9));function a103_0x42b0(_0x45d8e5,_0x5752a6){_0x45d8e5=_0x45d8e5-0xe7;const _0x4f5d6a=a103_0x4f5d();let _0x42b079=_0x4f5d6a[_0x45d8e5];return _0x42b079;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a103_0x14ae0c(0xec):a103_0x14ae0c(0xf6));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a103_0x14ae0c(0xf1));
@@ -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_0x548b(_0x37bcab,_0x286b55){_0x37bcab=_0x37bcab-0x14e;const _0x2b80b7=a104_0x2b80();let _0x548bc3=_0x2b80b7[_0x37bcab];return _0x548bc3;}const a104_0x17d00a=a104_0x548b;(function(_0x22f742,_0x295441){const _0x760b73=a104_0x548b,_0xccf654=_0x22f742();while(!![]){try{const _0x4b8dd2=-parseInt(_0x760b73(0x155))/0x1*(-parseInt(_0x760b73(0x14f))/0x2)+-parseInt(_0x760b73(0x158))/0x3*(parseInt(_0x760b73(0x154))/0x4)+-parseInt(_0x760b73(0x15c))/0x5+-parseInt(_0x760b73(0x157))/0x6*(-parseInt(_0x760b73(0x156))/0x7)+parseInt(_0x760b73(0x152))/0x8+-parseInt(_0x760b73(0x159))/0x9+parseInt(_0x760b73(0x14e))/0xa;if(_0x4b8dd2===_0x295441)break;else _0xccf654['push'](_0xccf654['shift']());}catch(_0x18b4c9){_0xccf654['push'](_0xccf654['shift']());}}}(a104_0x2b80,0xc623d));export function normalizeEnv(_0x5cd3e1){const _0x3c7577=a104_0x548b;return _0x5cd3e1===_0x3c7577(0x153)?_0x3c7577(0x15a):_0x5cd3e1;}export function isProduction(_0x5a371a){const _0x2bf22d=a104_0x548b;return normalizeEnv(_0x5a371a)===_0x2bf22d(0x15a);}export function isDaily(_0x192f14){const _0x1da93d=a104_0x548b;return normalizeEnv(_0x192f14)===_0x1da93d(0x150);}export function isDev(_0x42079b){const _0x58f3df=a104_0x548b,_0x1f10df=normalizeEnv(_0x42079b);return _0x1f10df===_0x58f3df(0x151)||_0x1f10df===_0x58f3df(0x15b);}function a104_0x2b80(){const _0x393004=['2811472FzguJf','online','4jKOpuv','31643DPQFII','28GFIjnt','661116HUeqJU','3328734QuiGTG','11920347AaxOOo','production','dev','946095GJPztF','12820340FYeppm','86hRZOdw','daily','development'];a104_0x2b80=function(){return _0x393004;};return a104_0x2b80();}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a104_0x17d00a(0x15a));export function getEnv(){return env;}export function initEnv(_0x255b15){env=normalizeEnv(_0x255b15);}
@@ -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_0x31794b=a105_0x22af;(function(_0x1d1aa7,_0x2b1d4e){const _0x463eb3=a105_0x22af,_0x338891=_0x1d1aa7();while(!![]){try{const _0x25644a=-parseInt(_0x463eb3(0xa4))/0x1*(parseInt(_0x463eb3(0xab))/0x2)+-parseInt(_0x463eb3(0xa9))/0x3*(parseInt(_0x463eb3(0xa8))/0x4)+parseInt(_0x463eb3(0xa7))/0x5+parseInt(_0x463eb3(0xac))/0x6*(-parseInt(_0x463eb3(0xae))/0x7)+parseInt(_0x463eb3(0xaa))/0x8+parseInt(_0x463eb3(0xb0))/0x9*(parseInt(_0x463eb3(0xaf))/0xa)+-parseInt(_0x463eb3(0xa5))/0xb*(-parseInt(_0x463eb3(0xad))/0xc);if(_0x25644a===_0x2b1d4e)break;else _0x338891['push'](_0x338891['shift']());}catch(_0x579814){_0x338891['push'](_0x338891['shift']());}}}(a105_0x3ccb,0xe2a5c));function a105_0x22af(_0x45d11d,_0x35c7fc){_0x45d11d=_0x45d11d-0xa4;const _0x3ccb26=a105_0x3ccb();let _0x22afc5=_0x3ccb26[_0x45d11d];return _0x22afc5;}export const DEFAULT_API_DIR=a105_0x31794b(0xa6);function a105_0x3ccb(){const _0x4238e1=['1936DGHQHt','./src/api','6521785ugpLpl','4kuMrtV','1169667LFKtrG','2943032EGAnct','31718PrHvaa','100692GQcKED','167244syGFtt','763MAkshl','30WHVnON','2205297oqeGxl','108xfclmh'];a105_0x3ccb=function(){return _0x4238e1;};return a105_0x3ccb();}