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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/README.md +1 -1
  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/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.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/members-list.js +1 -0
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/init.js +1 -1
  163. package/lib/commands/project/upgrade.js +1 -1
  164. package/lib/commands/registry.js +1 -1
  165. package/lib/commands/role/create.js +1 -1
  166. package/lib/commands/role/delete.js +1 -1
  167. package/lib/commands/role/detail.js +1 -1
  168. package/lib/commands/role/index.js +1 -1
  169. package/lib/commands/role/list.js +1 -1
  170. package/lib/commands/role/shared.js +1 -1
  171. package/lib/commands/role/update.js +1 -1
  172. package/lib/commands/role/user-add.js +1 -1
  173. package/lib/commands/role/user-remove.js +1 -1
  174. package/lib/commands/role/user-resolve.js +1 -1
  175. package/lib/commands/run/index.js +1 -1
  176. package/lib/commands/schema.js +1 -1
  177. package/lib/commands/sql/create.js +1 -1
  178. package/lib/commands/sql/delete.js +1 -1
  179. package/lib/commands/sql/detail.js +1 -1
  180. package/lib/commands/sql/exec.js +1 -1
  181. package/lib/commands/sql/index.js +1 -1
  182. package/lib/commands/sql/list.js +1 -1
  183. package/lib/commands/sql/pull.js +1 -1
  184. package/lib/commands/sql/push.js +1 -1
  185. package/lib/commands/sql/save.js +1 -1
  186. package/lib/commands/sql/shared.js +1 -1
  187. package/lib/commands/sql/status.js +1 -1
  188. package/lib/commands/sql/validate.js +1 -1
  189. package/lib/commands/task/index.js +1 -1
  190. package/lib/commands/task/status.js +1 -1
  191. package/lib/commands/tenant/index.js +1 -0
  192. package/lib/commands/tenant/members-list.js +1 -0
  193. package/lib/commands/tenant/shared.js +1 -0
  194. package/lib/commands/workspace/add.js +1 -1
  195. package/lib/commands/workspace/index.js +1 -1
  196. package/lib/commands/workspace/remove.js +1 -1
  197. package/lib/config/schema.js +1 -1
  198. package/lib/constant/cdn.js +1 -1
  199. package/lib/constant/cli.js +1 -1
  200. package/lib/constant/defaults.js +1 -1
  201. package/lib/constant/domain.js +1 -1
  202. package/lib/constant/env.js +1 -1
  203. package/lib/constant/output.js +1 -1
  204. package/lib/constant/paths.js +1 -1
  205. package/lib/constant/risk.js +1 -1
  206. package/lib/context/app-resolver.js +1 -1
  207. package/lib/context/auth-resolver.js +1 -1
  208. package/lib/context/config-loader.js +1 -1
  209. package/lib/context.js +1 -1
  210. package/lib/core/alias-resolver.js +1 -1
  211. package/lib/core/api-client.js +1 -1
  212. package/lib/core/bff/config.js +1 -1
  213. package/lib/core/bff/file-system.js +1 -1
  214. package/lib/core/bff/hash.js +1 -1
  215. package/lib/core/bff/lock.js +1 -1
  216. package/lib/core/bff/utils.js +1 -1
  217. package/lib/core/db-resolver.js +1 -1
  218. package/lib/core/page/file-system.js +1 -1
  219. package/lib/core/page/hash.js +1 -1
  220. package/lib/core/page/lock.js +1 -1
  221. package/lib/core/sql-index-auditor.js +1 -1
  222. package/lib/core/sql-sync/config.js +1 -1
  223. package/lib/core/sql-sync/file-system.js +1 -1
  224. package/lib/core/sql-sync/hash.js +1 -1
  225. package/lib/core/sql-sync/lock.js +1 -1
  226. package/lib/core/sql-sync/utils.js +1 -1
  227. package/lib/core/sql-validator.js +1 -1
  228. package/lib/errors.js +1 -1
  229. package/lib/framework/build-all-flags.js +1 -1
  230. package/lib/framework/error-output.js +1 -1
  231. package/lib/framework/explicit-yes.js +1 -1
  232. package/lib/framework/flags.js +1 -1
  233. package/lib/framework/help.js +1 -1
  234. package/lib/framework/index.js +1 -1
  235. package/lib/framework/output.js +1 -1
  236. package/lib/framework/response.js +1 -1
  237. package/lib/framework/runner-alias.js +1 -1
  238. package/lib/framework/runner.js +1 -1
  239. package/lib/framework/schema-export.js +1 -1
  240. package/lib/framework/types.js +1 -1
  241. package/lib/generated/build-info.js +1 -1
  242. package/lib/help.js +1 -1
  243. package/lib/skills/main.js +1 -1
  244. package/lib/skills/npx-skills-add.js +1 -1
  245. package/lib/skills/skill-presence.js +1 -1
  246. package/lib/telemetry/cli-command-trace.js +1 -1
  247. package/lib/telemetry/cli-help-trace.js +1 -1
  248. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  249. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  250. package/lib/telemetry/send-cli-trace-log.js +1 -1
  251. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  252. package/lib/utils/ai_config.js +1 -1
  253. package/lib/utils/apply-jq-filter.js +1 -1
  254. package/lib/utils/cdn-config.js +1 -1
  255. package/lib/utils/check-sdk-version.js +1 -1
  256. package/lib/utils/cli-version-check.js +1 -1
  257. package/lib/utils/cli-version-policy.js +1 -1
  258. package/lib/utils/config.js +1 -1
  259. package/lib/utils/copy-directory.js +1 -1
  260. package/lib/utils/entity-with-id.js +1 -1
  261. package/lib/utils/file-utils.js +1 -1
  262. package/lib/utils/guides-cdn.js +1 -1
  263. package/lib/utils/http-client.js +1 -1
  264. package/lib/utils/is-non-interactive.js +1 -1
  265. package/lib/utils/logger.js +1 -1
  266. package/lib/utils/params.js +1 -1
  267. package/lib/utils/platform.js +1 -1
  268. package/lib/utils/rules-cdn.js +1 -1
  269. package/lib/utils/sleep.js +1 -1
  270. package/lib/utils/template-replacer.js +1 -1
  271. package/lib/utils/update-notice.js +1 -1
  272. package/lib/utils/version.js +1 -1
  273. package/lib/utils/with-active-cookie.js +1 -1
  274. package/lib/utils/write-cli-side-channel.js +1 -1
  275. package/package.json +2 -2
  276. package/lib/commands/app/add.js +0 -1
  277. package/lib/commands/app/remove.js +0 -1
@@ -1 +1 @@
1
- const a184_0x502892=a184_0xe019;(function(_0x42a8dd,_0x44f4bf){const _0x456345=a184_0xe019,_0x19f44f=_0x42a8dd();while(!![]){try{const _0x337af1=-parseInt(_0x456345(0x13f))/0x1*(parseInt(_0x456345(0x15b))/0x2)+-parseInt(_0x456345(0x169))/0x3+parseInt(_0x456345(0x141))/0x4*(parseInt(_0x456345(0x136))/0x5)+parseInt(_0x456345(0x165))/0x6*(parseInt(_0x456345(0x14e))/0x7)+parseInt(_0x456345(0x150))/0x8+parseInt(_0x456345(0x16b))/0x9+parseInt(_0x456345(0x13d))/0xa*(parseInt(_0x456345(0x163))/0xb);if(_0x337af1===_0x44f4bf)break;else _0x19f44f['push'](_0x19f44f['shift']());}catch(_0x21fbac){_0x19f44f['push'](_0x19f44f['shift']());}}}(a184_0x377d,0xb475b));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';function a184_0x377d(){const _0x438a0a=['set','90PQGnuB','utf8','1tUNomb','version','19640ZrSyaF','sqlName','relativePath','unchanged','path','validation','trashDir','length','dbName','Would\x20push\x20','sqlRootDir','dbId','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','27447GMWLqo','str','3315408lsBwrQ','sqls','entries','bool','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','Local\x20directory\x20\x22','replace','sqlRoot','sqlConfig','startsWith','lockFilePath','2878882zVLYzF','isFinite','high-risk-write','toISOString','filter','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','force','sqlcode','1092718UdJGtT','filePath','996sQaUFC','catch','No\x20database\x20matches\x20local\x20directory\x20\x22','sqlCode','4187397WOQoiZ','\x20skipped,\x20','3974031WNCazk','hash','dbDirectory','Push\x20local\x20SQL\x20files\x20to\x20remote','Push\x20complete:\x20','sql','\x20pushed,\x20','Local\x20SQL\x20not\x20found:\x20','push','1195EjNGcl','boolean','mode','has','appCode','map'];a184_0x377d=function(){return _0x438a0a;};return a184_0x377d();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x1d41a4,_0x5ca07a,_0x39eb8a){const _0x508aff=a184_0xe019,_0xe2e459=await scanLocalSqlQueries(_0x1d41a4),_0x37da4b=new Map();for(const _0x57d711 of _0xe2e459){if(_0x39eb8a&&_0x57d711[_0x508aff(0x168)]!==_0x39eb8a)continue;const _0x83369c=_0x37da4b['get'](_0x57d711['sqlCode'])??[];_0x83369c['push'](_0x57d711),_0x37da4b[_0x508aff(0x13c)](_0x57d711[_0x508aff(0x168)],_0x83369c);}if(_0x39eb8a&&!_0x37da4b[_0x508aff(0x139)](_0x39eb8a))throw CliErrors[_0x508aff(0x146)](_0x508aff(0x134)+_0x39eb8a);const _0x211f1b=[];for(const [_0x5d9383,_0x2fc5fc]of _0x37da4b[_0x508aff(0x152)]()){if(_0x2fc5fc['length']===0x1){_0x211f1b['push'](_0x2fc5fc[0x0]);continue;}const _0x563c52=_0x5ca07a[_0x508aff(0x151)][_0x5d9383],_0x290143=_0x563c52?.[_0x508aff(0x145)],_0x1f764f=_0x290143?_0x2fc5fc['filter'](_0x81db15=>_0x81db15['relativePath']!==_0x290143):_0x2fc5fc;if(_0x563c52&&_0x1f764f['length']===0x1){_0x211f1b['push'](_0x1f764f[0x0]);continue;}throw CliErrors[_0x508aff(0x146)](_0x508aff(0x14d)+_0x5d9383+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x211f1b;}export const sqlPush={'service':a184_0x502892(0x170),'command':a184_0x502892(0x135),'description':a184_0x502892(0x16e),'risk':a184_0x502892(0x15d),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':a184_0x502892(0x137),'description':a184_0x502892(0x160)}],async 'dryRun'(_0x208c13){const _0x32a182=a184_0x502892,_0x479469=loadSqlProjectConfig(_0x208c13['appCode']),_0x243adf=await readSqlLockFile(_0x479469[_0x32a182(0x15a)]),{appLock:_0x6dcda6}=ensureSqlLockScope(_0x243adf??createEmptySqlLock(),_0x208c13['appCode'],_0x479469[_0x32a182(0x157)],_0x32a182(0x135)),_0x581a63=await getTargetSqlQueries(_0x479469,_0x6dcda6,_0x208c13[_0x32a182(0x14f)](_0x32a182(0x162))||undefined),_0x217820=[];for(const _0x2641a6 of _0x581a63){const _0x1db95b=await computeSqlFileHash(_0x2641a6[_0x32a182(0x164)]),_0xe79b6=_0x6dcda6[_0x32a182(0x151)][_0x2641a6[_0x32a182(0x168)]],_0x1f18c7=!!_0xe79b6&&(_0xe79b6[_0x32a182(0x145)]!==_0x2641a6[_0x32a182(0x143)]||!!_0x2641a6[_0x32a182(0x142)]&&_0xe79b6['sqlName']!==_0x2641a6[_0x32a182(0x142)]);if(!_0x208c13['bool'](_0x32a182(0x161))&&_0xe79b6&&_0xe79b6[_0x32a182(0x16c)]===_0x1db95b&&!_0x1f18c7)continue;_0x217820['push'](_0x2641a6[_0x32a182(0x168)]);}return{'method':'POST','url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x217820,'appCode':_0x208c13[_0x32a182(0x13a)]},'description':_0x32a182(0x14a)+_0x217820['length']+'\x20SQL\x20file(s)'};},async 'execute'(_0x322b6f){const _0x2ab60c=a184_0x502892,_0x241abc=loadSqlProjectConfig(_0x322b6f[_0x2ab60c(0x13a)]),_0x20e0e2=await readSqlLockFile(_0x241abc[_0x2ab60c(0x15a)]),{lockData:_0xa78c83,appLock:_0xffffd0}=ensureSqlLockScope(_0x20e0e2??createEmptySqlLock(),_0x322b6f['appCode'],_0x241abc[_0x2ab60c(0x157)],'push'),_0x4eaa11=await getTargetSqlQueries(_0x241abc,_0xffffd0,_0x322b6f['str'](_0x2ab60c(0x162))||undefined);if(_0x4eaa11['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':'No\x20local\x20SQL\x20files\x20found.'};const _0x2130e1=[],_0x10eb0c=[],_0x2894ec=[];for(const _0x1815e1 of _0x4eaa11){const _0x292bbf=_0xffffd0[_0x2ab60c(0x151)][_0x1815e1['sqlCode']];if(!_0x292bbf){_0x2894ec[_0x2ab60c(0x135)]({'sqlCode':_0x1815e1[_0x2ab60c(0x168)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x5da0d5=await computeSqlFileHash(_0x1815e1['filePath']),_0x1cc1ca=_0x292bbf[_0x2ab60c(0x145)]!==_0x1815e1[_0x2ab60c(0x143)]||!!_0x1815e1[_0x2ab60c(0x142)]&&_0x292bbf[_0x2ab60c(0x142)]!==_0x1815e1[_0x2ab60c(0x142)];if(!_0x322b6f[_0x2ab60c(0x153)](_0x2ab60c(0x161))&&_0x292bbf[_0x2ab60c(0x16c)]===_0x5da0d5&&!_0x1cc1ca){_0x10eb0c[_0x2ab60c(0x135)]({'sqlCode':_0x1815e1[_0x2ab60c(0x168)],'reason':_0x2ab60c(0x144)});continue;}if(_0x292bbf[_0x2ab60c(0x140)]==null){_0x2894ec['push']({'sqlCode':_0x1815e1[_0x2ab60c(0x168)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x2beafb=await readFile(_0x1815e1[_0x2ab60c(0x164)],_0x2ab60c(0x13e)),_0x2dcbff=stripLocalSqlMetadata(_0x2beafb,_0x1815e1[_0x2ab60c(0x138)]),_0x4badcb=_0x1815e1[_0x2ab60c(0x142)]||_0x292bbf[_0x2ab60c(0x142)],_0x149a80=await resolveTargetDbBinding(_0x322b6f[_0x2ab60c(0x13a)],_0x1815e1,_0x292bbf),_0x3bc8bb=await updateSqlQuery({'id':_0x292bbf['remoteId'],'appCode':_0x322b6f[_0x2ab60c(0x13a)],'sqlCode':_0x1815e1[_0x2ab60c(0x168)],'sqlName':_0x4badcb,'dbId':_0x149a80[_0x2ab60c(0x14c)],'version':_0x292bbf[_0x2ab60c(0x140)],'sqlContent':_0x2dcbff,'sqlConfig':_0x292bbf[_0x2ab60c(0x158)]??undefined}),_0x3b1b2d=_0x3bc8bb[_0x2ab60c(0x14c)]?await getDbName(_0x322b6f[_0x2ab60c(0x13a)],Number(_0x3bc8bb[_0x2ab60c(0x14c)]))[_0x2ab60c(0x166)](()=>_0x149a80[_0x2ab60c(0x149)]):_0x149a80['dbName'];_0xffffd0[_0x2ab60c(0x151)][_0x1815e1[_0x2ab60c(0x168)]]={...buildSqlLockEntry(_0x3bc8bb,_0x2dcbff,_0x5da0d5,{'dbName':_0x3b1b2d}),'path':_0x1815e1['relativePath'],'mode':_0x292bbf[_0x2ab60c(0x138)]},await archivePreviousSqlFileIfNeeded(_0x241abc,_0x292bbf['path'],_0x1815e1[_0x2ab60c(0x143)]),_0x2130e1[_0x2ab60c(0x135)]({'sqlCode':_0x1815e1[_0x2ab60c(0x168)],'remoteId':_0x292bbf['remoteId']});}catch(_0x23edb9){_0x2894ec[_0x2ab60c(0x135)]({'sqlCode':_0x1815e1['sqlCode'],'error':_0x23edb9 instanceof Error?_0x23edb9['message']:String(_0x23edb9)});}}return _0xffffd0['lastSync']=new Date()['toISOString'](),await writeSqlLockFile(_0x241abc[_0x2ab60c(0x15a)],_0xa78c83),{'ok':_0x2894ec['length']===0x0,'data':{'pushed':_0x2130e1,'skipped':_0x10eb0c,'failed':_0x2894ec},'message':_0x2ab60c(0x16f)+_0x2130e1['length']+_0x2ab60c(0x171)+_0x10eb0c[_0x2ab60c(0x148)]+_0x2ab60c(0x16a)+_0x2894ec['length']+'\x20failed'};}};function a184_0xe019(_0x3cf575,_0x29c16e){_0x3cf575=_0x3cf575-0x134;const _0x377d01=a184_0x377d();let _0xe01981=_0x377d01[_0x3cf575];return _0xe01981;}async function archivePreviousSqlFileIfNeeded(_0x510636,_0x5024c6,_0x5b1752){const _0x344995=a184_0x502892;if(!_0x5024c6||_0x5024c6===_0x5b1752)return;const _0x45d083=join(_0x510636[_0x344995(0x14b)],_0x5024c6);if(!await fileExists(_0x45d083))return;const _0x54020b=await moveToTrash(_0x510636['projectRoot'],_0x510636[_0x344995(0x147)],_0x45d083);await cleanupEmptyDirectories(dirname(_0x45d083),_0x510636[_0x344995(0x14b)]),void _0x54020b;}async function moveToTrash(_0x1274fb,_0x116c8c,_0x1cf68b){const _0x3732d2=a184_0x502892,_0x955e8f=new Date()[_0x3732d2(0x15e)]()[_0x3732d2(0x156)](/[:.]/g,'-'),_0xf8b02=relative(_0x1274fb,_0x1cf68b),_0x5fd1b2=join(_0x116c8c,_0x955e8f,_0xf8b02);return await mkdir(dirname(_0x5fd1b2),{'recursive':!![]}),await rename(_0x1cf68b,_0x5fd1b2),_0x5fd1b2;}async function cleanupEmptyDirectories(_0x538d20,_0x4274e5){const _0x4d6201=a184_0x502892;let _0x30ea9d=resolve(_0x538d20);const _0x3976f5=resolve(_0x4274e5);while(_0x30ea9d[_0x4d6201(0x159)](''+_0x3976f5+sep)||_0x30ea9d===_0x3976f5){if(_0x30ea9d===_0x3976f5)return;try{const _0x1c0f07=await readdir(_0x30ea9d);if(_0x1c0f07[_0x4d6201(0x148)]>0x0)return;await rmdir(_0x30ea9d);}catch{return;}_0x30ea9d=dirname(_0x30ea9d);}}async function resolveTargetDbBinding(_0x4f3f1f,_0x4f75d0,_0x196372){const _0x20be9d=a184_0x502892,_0x1f539c=_0x4f75d0[_0x20be9d(0x16d)];if(!_0x1f539c)return{'dbId':_0x196372[_0x20be9d(0x14c)],'dbName':_0x196372['dbName']};const _0x1a7132=buildDbDirectoryName(_0x196372[_0x20be9d(0x149)],_0x196372['dbId']);if(_0x1f539c===_0x1a7132)return{'dbId':_0x196372[_0x20be9d(0x14c)],'dbName':_0x196372['dbName']};const _0x2b0c71=parseExplicitDbDirectory(_0x1f539c);if(_0x2b0c71!=null)return{'dbId':_0x2b0c71,'dbName':await getDbName(_0x4f3f1f,_0x2b0c71)['catch'](()=>undefined)};const _0x50d659=await listDatabases(_0x4f3f1f),_0x2988bd=_0x50d659[_0x20be9d(0x15f)](_0x2c7d32=>buildDbDirectoryName(_0x2c7d32[_0x20be9d(0x149)],_0x2c7d32[_0x20be9d(0x14c)])===_0x1f539c);if(_0x2988bd[_0x20be9d(0x148)]===0x1)return{'dbId':_0x2988bd[0x0][_0x20be9d(0x14c)],'dbName':_0x2988bd[0x0][_0x20be9d(0x149)]};if(_0x2988bd[_0x20be9d(0x148)]===0x0)throw CliErrors[_0x20be9d(0x146)](_0x20be9d(0x167)+_0x1f539c+'\x22\x20for\x20sqlCode\x20'+_0x4f75d0[_0x20be9d(0x168)]+'.');const _0x520279=_0x2988bd[_0x20be9d(0x13b)](_0x7cdebe=>_0x7cdebe[_0x20be9d(0x149)]+'\x20('+_0x7cdebe[_0x20be9d(0x14c)]+')')['join'](',\x20');throw CliErrors[_0x20be9d(0x146)](_0x20be9d(0x155)+_0x1f539c+_0x20be9d(0x154)+_0x4f75d0[_0x20be9d(0x168)]+':\x20'+_0x520279);}function parseExplicitDbDirectory(_0x5d78e2){const _0x3758d4=a184_0x502892,_0x2feb1e=/^db-(\d+)$/['exec'](_0x5d78e2);if(!_0x2feb1e)return null;const _0x3b44d0=Number(_0x2feb1e[0x1]);return Number[_0x3758d4(0x15c)](_0x3b44d0)&&_0x3b44d0>0x0?_0x3b44d0:null;}
1
+ const a183_0x223c65=a183_0x16c1;(function(_0x3f1bfe,_0x52bbad){const _0x1fe06d=a183_0x16c1,_0x4d182e=_0x3f1bfe();while(!![]){try{const _0x1d4af2=-parseInt(_0x1fe06d(0x108))/0x1+parseInt(_0x1fe06d(0xe4))/0x2+parseInt(_0x1fe06d(0xf9))/0x3+-parseInt(_0x1fe06d(0x118))/0x4*(parseInt(_0x1fe06d(0xe9))/0x5)+-parseInt(_0x1fe06d(0x104))/0x6+parseInt(_0x1fe06d(0xfa))/0x7*(-parseInt(_0x1fe06d(0x101))/0x8)+-parseInt(_0x1fe06d(0xef))/0x9*(-parseInt(_0x1fe06d(0x100))/0xa);if(_0x1d4af2===_0x52bbad)break;else _0x4d182e['push'](_0x4d182e['shift']());}catch(_0x4c2eea){_0x4d182e['push'](_0x4d182e['shift']());}}}(a183_0xb7b4,0xf37cd));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x30193e,_0x752546,_0x382c37){const _0x10a070=a183_0x16c1,_0x2205e1=await scanLocalSqlQueries(_0x30193e),_0x2b1797=new Map();for(const _0x5d736e of _0x2205e1){if(_0x382c37&&_0x5d736e[_0x10a070(0x10c)]!==_0x382c37)continue;const _0x5b1f85=_0x2b1797[_0x10a070(0x115)](_0x5d736e[_0x10a070(0x10c)])??[];_0x5b1f85['push'](_0x5d736e),_0x2b1797[_0x10a070(0x110)](_0x5d736e[_0x10a070(0x10c)],_0x5b1f85);}if(_0x382c37&&!_0x2b1797[_0x10a070(0x102)](_0x382c37))throw CliErrors[_0x10a070(0x11c)](_0x10a070(0x124)+_0x382c37);const _0x4ae6a3=[];for(const [_0x191907,_0x41ab68]of _0x2b1797[_0x10a070(0xee)]()){if(_0x41ab68[_0x10a070(0x11b)]===0x1){_0x4ae6a3[_0x10a070(0xf0)](_0x41ab68[0x0]);continue;}const _0x8fcb24=_0x752546[_0x10a070(0x10d)][_0x191907],_0x22aca3=_0x8fcb24?.[_0x10a070(0xfe)],_0x303c84=_0x22aca3?_0x41ab68['filter'](_0x142a68=>_0x142a68['relativePath']!==_0x22aca3):_0x41ab68;if(_0x8fcb24&&_0x303c84[_0x10a070(0x11b)]===0x1){_0x4ae6a3[_0x10a070(0xf0)](_0x303c84[0x0]);continue;}throw CliErrors['validation']('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x191907+_0x10a070(0x10e));}return _0x4ae6a3;}function a183_0x16c1(_0x4849ad,_0x308a59){_0x4849ad=_0x4849ad-0xe3;const _0xb7b4b0=a183_0xb7b4();let _0x16c1a5=_0xb7b4b0[_0x4849ad];return _0x16c1a5;}export const sqlPush={'service':'sql','command':a183_0x223c65(0xf0),'description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a183_0x223c65(0xfb),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a183_0x223c65(0x116),'type':a183_0x223c65(0x126),'description':a183_0x223c65(0x121)}],async 'dryRun'(_0x4e9eee){const _0x2264c3=a183_0x223c65,_0x1a65cf=loadSqlProjectConfig(_0x4e9eee[_0x2264c3(0xfc)]),_0xc8e2cc=await readSqlLockFile(_0x1a65cf[_0x2264c3(0x11f)]),{appLock:_0x4de70d}=ensureSqlLockScope(_0xc8e2cc??createEmptySqlLock(),_0x4e9eee[_0x2264c3(0xfc)],_0x1a65cf[_0x2264c3(0x120)],_0x2264c3(0xf0)),_0x3b9455=await getTargetSqlQueries(_0x1a65cf,_0x4de70d,_0x4e9eee[_0x2264c3(0xf7)](_0x2264c3(0xeb))||undefined),_0x5bfa9c=[];for(const _0x5af6d2 of _0x3b9455){const _0xefda3f=await computeSqlFileHash(_0x5af6d2[_0x2264c3(0x107)]),_0x1facf8=_0x4de70d['sqls'][_0x5af6d2[_0x2264c3(0x10c)]],_0xc9058a=!!_0x1facf8&&(_0x1facf8[_0x2264c3(0xfe)]!==_0x5af6d2[_0x2264c3(0x119)]||!!_0x5af6d2['sqlName']&&_0x1facf8[_0x2264c3(0xf6)]!==_0x5af6d2[_0x2264c3(0xf6)]);if(!_0x4e9eee[_0x2264c3(0x10f)]('force')&&_0x1facf8&&_0x1facf8[_0x2264c3(0xf2)]===_0xefda3f&&!_0xc9058a)continue;_0x5bfa9c[_0x2264c3(0xf0)](_0x5af6d2[_0x2264c3(0x10c)]);}return{'method':_0x2264c3(0x112),'url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x5bfa9c,'appCode':_0x4e9eee['appCode']},'description':_0x2264c3(0x122)+_0x5bfa9c[_0x2264c3(0x11b)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x4b482b){const _0x2dcd27=a183_0x223c65,_0xdb1ff0=loadSqlProjectConfig(_0x4b482b[_0x2dcd27(0xfc)]),_0x24d3a7=await readSqlLockFile(_0xdb1ff0['lockFilePath']),{lockData:_0x5d5023,appLock:_0x449c64}=ensureSqlLockScope(_0x24d3a7??createEmptySqlLock(),_0x4b482b['appCode'],_0xdb1ff0['sqlRoot'],_0x2dcd27(0xf0)),_0x4f3a26=await getTargetSqlQueries(_0xdb1ff0,_0x449c64,_0x4b482b[_0x2dcd27(0xf7)]('sqlcode')||undefined);if(_0x4f3a26['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x2dcd27(0xe3)};const _0x3ee9a7=[],_0x5152ba=[],_0x3749a8=[];for(const _0x258f71 of _0x4f3a26){const _0x18304e=_0x449c64[_0x2dcd27(0x10d)][_0x258f71[_0x2dcd27(0x10c)]];if(!_0x18304e){_0x3749a8[_0x2dcd27(0xf0)]({'sqlCode':_0x258f71['sqlCode'],'error':_0x2dcd27(0x11d)});continue;}try{const _0x15925d=await computeSqlFileHash(_0x258f71[_0x2dcd27(0x107)]),_0x57fb22=_0x18304e[_0x2dcd27(0xfe)]!==_0x258f71[_0x2dcd27(0x119)]||!!_0x258f71[_0x2dcd27(0xf6)]&&_0x18304e['sqlName']!==_0x258f71['sqlName'];if(!_0x4b482b[_0x2dcd27(0x10f)](_0x2dcd27(0x116))&&_0x18304e[_0x2dcd27(0xf2)]===_0x15925d&&!_0x57fb22){_0x5152ba[_0x2dcd27(0xf0)]({'sqlCode':_0x258f71['sqlCode'],'reason':_0x2dcd27(0x114)});continue;}if(_0x18304e[_0x2dcd27(0x105)]==null){_0x3749a8[_0x2dcd27(0xf0)]({'sqlCode':_0x258f71[_0x2dcd27(0x10c)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x3fd1a7=await readFile(_0x258f71[_0x2dcd27(0x107)],_0x2dcd27(0x117)),_0x28c075=stripLocalSqlMetadata(_0x3fd1a7,_0x258f71[_0x2dcd27(0xf4)]),_0x4479de=_0x258f71['sqlName']||_0x18304e[_0x2dcd27(0xf6)],_0x1ec530=await resolveTargetDbBinding(_0x4b482b[_0x2dcd27(0xfc)],_0x258f71,_0x18304e),_0x386d93=await updateSqlQuery({'id':_0x18304e[_0x2dcd27(0x111)],'appCode':_0x4b482b[_0x2dcd27(0xfc)],'sqlCode':_0x258f71[_0x2dcd27(0x10c)],'sqlName':_0x4479de,'dbId':_0x1ec530['dbId'],'version':_0x18304e['version'],'sqlContent':_0x28c075,'sqlConfig':_0x18304e[_0x2dcd27(0xf3)]??undefined}),_0x4e3db4=_0x386d93[_0x2dcd27(0xed)]?await getDbName(_0x4b482b[_0x2dcd27(0xfc)],Number(_0x386d93['dbId']))[_0x2dcd27(0xfd)](()=>_0x1ec530[_0x2dcd27(0x11a)]):_0x1ec530[_0x2dcd27(0x11a)];_0x449c64[_0x2dcd27(0x10d)][_0x258f71['sqlCode']]={...buildSqlLockEntry(_0x386d93,_0x28c075,_0x15925d,{'dbName':_0x4e3db4}),'path':_0x258f71[_0x2dcd27(0x119)],'mode':_0x18304e[_0x2dcd27(0xf4)]},await archivePreviousSqlFileIfNeeded(_0xdb1ff0,_0x18304e[_0x2dcd27(0xfe)],_0x258f71['relativePath']),_0x3ee9a7[_0x2dcd27(0xf0)]({'sqlCode':_0x258f71['sqlCode'],'remoteId':_0x18304e[_0x2dcd27(0x111)]});}catch(_0x4e557e){_0x3749a8[_0x2dcd27(0xf0)]({'sqlCode':_0x258f71['sqlCode'],'error':_0x4e557e instanceof Error?_0x4e557e[_0x2dcd27(0xea)]:String(_0x4e557e)});}}return _0x449c64[_0x2dcd27(0xec)]=new Date()[_0x2dcd27(0x10a)](),await writeSqlLockFile(_0xdb1ff0[_0x2dcd27(0x11f)],_0x5d5023),{'ok':_0x3749a8[_0x2dcd27(0x11b)]===0x0,'data':{'pushed':_0x3ee9a7,'skipped':_0x5152ba,'failed':_0x3749a8},'message':_0x2dcd27(0x123)+_0x3ee9a7[_0x2dcd27(0x11b)]+_0x2dcd27(0x109)+_0x5152ba['length']+_0x2dcd27(0x125)+_0x3749a8[_0x2dcd27(0x11b)]+'\x20failed'};}};function a183_0xb7b4(){const _0x5ab0ee=['map','lockFilePath','sqlRoot','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','Would\x20push\x20','Push\x20complete:\x20','Local\x20SQL\x20not\x20found:\x20','\x20skipped,\x20','boolean','No\x20local\x20SQL\x20files\x20found.','1364026LYdQLW','filter','isFinite','No\x20database\x20matches\x20local\x20directory\x20\x22','startsWith','5TrNOVT','message','sqlcode','lastSync','dbId','entries','4329mcppGv','push','projectRoot','hash','sqlConfig','mode','exec','sqlName','str','join','975732YRYcAQ','7nrLdry','high-risk-write','appCode','catch','path','\x22\x20for\x20sqlCode\x20','98030QEUMFQ','14438016atwcMw','has','Local\x20directory\x20\x22','10358472wbVHJA','version','replace','filePath','394668mdJSER','\x20pushed,\x20','toISOString','sqlRootDir','sqlCode','sqls','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','bool','set','remoteId','POST','dbDirectory','unchanged','get','force','utf8','3197372SUyhfZ','relativePath','dbName','length','validation','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'];a183_0xb7b4=function(){return _0x5ab0ee;};return a183_0xb7b4();}async function archivePreviousSqlFileIfNeeded(_0x2289c3,_0x5eed2e,_0x3d8b92){const _0x41573d=a183_0x223c65;if(!_0x5eed2e||_0x5eed2e===_0x3d8b92)return;const _0x4f2dac=join(_0x2289c3[_0x41573d(0x10b)],_0x5eed2e);if(!await fileExists(_0x4f2dac))return;const _0x313b9d=await moveToTrash(_0x2289c3[_0x41573d(0xf1)],_0x2289c3['trashDir'],_0x4f2dac);await cleanupEmptyDirectories(dirname(_0x4f2dac),_0x2289c3['sqlRootDir']),void _0x313b9d;}async function moveToTrash(_0x315ecf,_0x1bf949,_0x2f173f){const _0x5324d7=a183_0x223c65,_0x1920b4=new Date()[_0x5324d7(0x10a)]()[_0x5324d7(0x106)](/[:.]/g,'-'),_0x518b73=relative(_0x315ecf,_0x2f173f),_0x4eff58=join(_0x1bf949,_0x1920b4,_0x518b73);return await mkdir(dirname(_0x4eff58),{'recursive':!![]}),await rename(_0x2f173f,_0x4eff58),_0x4eff58;}async function cleanupEmptyDirectories(_0x2c7f12,_0x3bf290){const _0x2a86d4=a183_0x223c65;let _0x5f1314=resolve(_0x2c7f12);const _0x46eaed=resolve(_0x3bf290);while(_0x5f1314[_0x2a86d4(0xe8)](''+_0x46eaed+sep)||_0x5f1314===_0x46eaed){if(_0x5f1314===_0x46eaed)return;try{const _0x2f0ef2=await readdir(_0x5f1314);if(_0x2f0ef2[_0x2a86d4(0x11b)]>0x0)return;await rmdir(_0x5f1314);}catch{return;}_0x5f1314=dirname(_0x5f1314);}}async function resolveTargetDbBinding(_0x2b72a2,_0x5988d4,_0x5ecd9c){const _0x4af97e=a183_0x223c65,_0x142887=_0x5988d4[_0x4af97e(0x113)];if(!_0x142887)return{'dbId':_0x5ecd9c[_0x4af97e(0xed)],'dbName':_0x5ecd9c[_0x4af97e(0x11a)]};const _0x5d8d41=buildDbDirectoryName(_0x5ecd9c['dbName'],_0x5ecd9c[_0x4af97e(0xed)]);if(_0x142887===_0x5d8d41)return{'dbId':_0x5ecd9c['dbId'],'dbName':_0x5ecd9c[_0x4af97e(0x11a)]};const _0x13702b=parseExplicitDbDirectory(_0x142887);if(_0x13702b!=null)return{'dbId':_0x13702b,'dbName':await getDbName(_0x2b72a2,_0x13702b)[_0x4af97e(0xfd)](()=>undefined)};const _0x55cfdc=await listDatabases(_0x2b72a2),_0x241a3b=_0x55cfdc[_0x4af97e(0xe5)](_0x1cef29=>buildDbDirectoryName(_0x1cef29['dbName'],_0x1cef29[_0x4af97e(0xed)])===_0x142887);if(_0x241a3b[_0x4af97e(0x11b)]===0x1)return{'dbId':_0x241a3b[0x0][_0x4af97e(0xed)],'dbName':_0x241a3b[0x0][_0x4af97e(0x11a)]};if(_0x241a3b[_0x4af97e(0x11b)]===0x0)throw CliErrors[_0x4af97e(0x11c)](_0x4af97e(0xe7)+_0x142887+_0x4af97e(0xff)+_0x5988d4[_0x4af97e(0x10c)]+'.');const _0x1e4c0a=_0x241a3b[_0x4af97e(0x11e)](_0x39c439=>_0x39c439[_0x4af97e(0x11a)]+'\x20('+_0x39c439[_0x4af97e(0xed)]+')')[_0x4af97e(0xf8)](',\x20');throw CliErrors['validation'](_0x4af97e(0x103)+_0x142887+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x5988d4[_0x4af97e(0x10c)]+':\x20'+_0x1e4c0a);}function parseExplicitDbDirectory(_0x12535e){const _0x317f72=a183_0x223c65,_0x3dd418=/^db-(\d+)$/[_0x317f72(0xf5)](_0x12535e);if(!_0x3dd418)return null;const _0x597aba=Number(_0x3dd418[0x1]);return Number[_0x317f72(0xe6)](_0x597aba)&&_0x597aba>0x0?_0x597aba:null;}
@@ -1 +1 @@
1
- function a185_0x41d5(_0x2c9099,_0x34067c){_0x2c9099=_0x2c9099-0x101;const _0x38ccea=a185_0x38cc();let _0x41d598=_0x38ccea[_0x2c9099];return _0x41d598;}function a185_0x38cc(){const _0x2b7829=['file','502131QWcRaz','36RIaBlh','608839MyeoTz','76628oFKKZv','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','sql','sqlname','Query\x20description','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','40xzmebv','3180176pQfDGk','40TOzXfc','Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','write','5mlAEeW','75RBAruC','SQL\x20query\x20display\x20name','Path\x20to\x20the\x20SQL\x20file','1566324uyuQzS','1561909bUyHTO','7330086gvRZOB','string','validation'];a185_0x38cc=function(){return _0x2b7829;};return a185_0x38cc();}const a185_0x26927e=a185_0x41d5;(function(_0x354487,_0x9f3eb9){const _0x4f6a85=a185_0x41d5,_0x292589=_0x354487();while(!![]){try{const _0x6f803=-parseInt(_0x4f6a85(0x10c))/0x1+-parseInt(_0x4f6a85(0x114))/0x2*(-parseInt(_0x4f6a85(0x108))/0x3)+-parseInt(_0x4f6a85(0x103))/0x4*(-parseInt(_0x4f6a85(0x107))/0x5)+parseInt(_0x4f6a85(0x10d))/0x6+-parseInt(_0x4f6a85(0x111))/0x7*(-parseInt(_0x4f6a85(0x102))/0x8)+parseInt(_0x4f6a85(0x10b))/0x9*(-parseInt(_0x4f6a85(0x104))/0xa)+-parseInt(_0x4f6a85(0x113))/0xb*(parseInt(_0x4f6a85(0x112))/0xc);if(_0x6f803===_0x9f3eb9)break;else _0x292589['push'](_0x292589['shift']());}catch(_0x83b207){_0x292589['push'](_0x292589['shift']());}}}(a185_0x38cc,0xddf54));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a185_0x26927e(0x101),a185_0x26927e(0x115),a185_0x26927e(0x105)]['join']('\x0a');export const sqlSave={'service':a185_0x26927e(0x117),'command':'save','description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':a185_0x26927e(0x106),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a185_0x26927e(0x110),'type':a185_0x26927e(0x10e),'required':!![],'description':a185_0x26927e(0x10a)},SQLCODE_FLAG_OPTIONAL,{'name':a185_0x26927e(0x118),'type':a185_0x26927e(0x10e),'description':a185_0x26927e(0x109)},{'name':'db','type':a185_0x26927e(0x10e),'description':a185_0x26927e(0x116)},{'name':'description','type':'string','description':a185_0x26927e(0x119)}],async 'validate'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x3dba4b=a185_0x26927e;throw CliErrors[_0x3dba4b(0x10f)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ const a184_0x92c3a8=a184_0x1016;(function(_0x1165ee,_0x3e8c6f){const _0xa26156=a184_0x1016,_0x3461e1=_0x1165ee();while(!![]){try{const _0x55d123=parseInt(_0xa26156(0x80))/0x1+parseInt(_0xa26156(0x72))/0x2+-parseInt(_0xa26156(0x83))/0x3+-parseInt(_0xa26156(0x76))/0x4+-parseInt(_0xa26156(0x85))/0x5*(-parseInt(_0xa26156(0x74))/0x6)+-parseInt(_0xa26156(0x7d))/0x7+parseInt(_0xa26156(0x73))/0x8;if(_0x55d123===_0x3e8c6f)break;else _0x3461e1['push'](_0x3461e1['shift']());}catch(_0x368d6d){_0x3461e1['push'](_0x3461e1['shift']());}}}(a184_0x13a6,0xd026f));import{CliErrors}from'../../errors.js';function a184_0x13a6(){const _0x323f3a=['Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','1541064ADZIMc','10052128SnANOI','6qmQfPo','SQL\x20query\x20display\x20name','1568464LFbVNW','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','sqlname','string','validation','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','7426832BeMNtk','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','sql','1274396Xqzzrh','join','description','2987997EhRcow','write','1190lzbdBQ','Path\x20to\x20the\x20SQL\x20file','file'];a184_0x13a6=function(){return _0x323f3a;};return a184_0x13a6();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a184_0x92c3a8(0x77),a184_0x92c3a8(0x7e),a184_0x92c3a8(0x7c)][a184_0x92c3a8(0x81)]('\x0a');function a184_0x1016(_0xe8bf5b,_0x2f92b8){_0xe8bf5b=_0xe8bf5b-0x70;const _0x13a6cf=a184_0x13a6();let _0x1016db=_0x13a6cf[_0xe8bf5b];return _0x1016db;}export const sqlSave={'service':a184_0x92c3a8(0x7f),'command':'save','description':a184_0x92c3a8(0x7b),'risk':a184_0x92c3a8(0x84),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a184_0x92c3a8(0x70),'type':'string','required':!![],'description':a184_0x92c3a8(0x86)},SQLCODE_FLAG_OPTIONAL,{'name':a184_0x92c3a8(0x78),'type':a184_0x92c3a8(0x79),'description':a184_0x92c3a8(0x75)},{'name':'db','type':a184_0x92c3a8(0x79),'description':a184_0x92c3a8(0x71)},{'name':a184_0x92c3a8(0x82),'type':'string','description':'Query\x20description'}],async 'validate'(){const _0x4c6d1d=a184_0x92c3a8;throw CliErrors[_0x4c6d1d(0x7a)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x38058c=a184_0x92c3a8;throw CliErrors[_0x38058c(0x7a)](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- function a186_0xb1ab(_0x28f7cb,_0x4f8ffc){_0x28f7cb=_0x28f7cb-0x14d;const _0xc90161=a186_0xc901();let _0xb1abe0=_0xc90161[_0x28f7cb];return _0xb1abe0;}(function(_0x308275,_0x798ac2){const _0x5e65be=a186_0xb1ab,_0x3ad640=_0x308275();while(!![]){try{const _0x36687c=-parseInt(_0x5e65be(0x158))/0x1+parseInt(_0x5e65be(0x16a))/0x2+-parseInt(_0x5e65be(0x168))/0x3+parseInt(_0x5e65be(0x15b))/0x4+parseInt(_0x5e65be(0x165))/0x5*(-parseInt(_0x5e65be(0x16c))/0x6)+parseInt(_0x5e65be(0x155))/0x7*(parseInt(_0x5e65be(0x170))/0x8)+parseInt(_0x5e65be(0x16f))/0x9;if(_0x36687c===_0x798ac2)break;else _0x3ad640['push'](_0x3ad640['shift']());}catch(_0xb15133){_0x3ad640['push'](_0x3ad640['shift']());}}}(a186_0xc901,0x2bd50));import{createInterface}from'node:readline';function a186_0xc901(){const _0x2628b0=['question','fromEntries','join','yes','sqlConfig','mode','description','filter','dbId','test','sqlName','7315DQEYND','split','includes','50910RWzDBE','lastSync','sqlCode','1078260FgeZzv','map','<!--\x20@lovrabet.','version','mybatisXml','dbName','apps','length','stderr','toLowerCase','1152815TmZXMj','sqlContent','push','860388Yzldph','\x20[y/N]\x20','24926TRvaxZ','close','6ZTKwMA','syncedAt','trim','3317328ibDegz','744YaqgRT','sqlRoot'];a186_0xc901=function(){return _0x2628b0;};return a186_0xc901();}import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function buildSqlLockEntry(_0x4f5889,_0x4cd577,_0x1dda70,_0x3b85bc){const _0x287614=a186_0xb1ab,_0x310d8f=detectSqlMode(_0x4cd577);return{'path':buildSqlRelativePath(_0x4f5889[_0x287614(0x15a)],_0x4f5889['sqlName'],_0x3b85bc?.[_0x287614(0x160)],_0x310d8f,_0x4f5889['dbId']),'hash':_0x1dda70,'remoteId':_0x4f5889['id'],'version':_0x4f5889[_0x287614(0x15e)],'dbId':Number(_0x4f5889[_0x287614(0x152)]),'dbName':_0x3b85bc?.['dbName'],'sqlName':_0x4f5889[_0x287614(0x154)],'sqlConfig':_0x4f5889[_0x287614(0x14e)]??undefined,'mode':_0x310d8f};}export function cloneSqlLockData(_0x11e5af){const _0x218af2=a186_0xb1ab;return{'apps':Object[_0x218af2(0x173)](Object['entries'](_0x11e5af[_0x218af2(0x161)])['map'](([_0x2a8273,_0x45cf20])=>[_0x2a8273,{'sqlRoot':_0x45cf20[_0x218af2(0x171)],'lastSync':_0x45cf20[_0x218af2(0x159)],'sqls':{..._0x45cf20['sqls']}}]))};}export function ensureRemoteSqlContent(_0x477d6c){const _0x16f01f=a186_0xb1ab;return _0x477d6c[_0x16f01f(0x166)]??'';}export function buildLocalSqlFileContent(_0x4918c8,_0x4b087a,_0xf4741){const _0x12bf1b=a186_0xb1ab,_0x36793d=_0xf4741?.['mode']??detectSqlMode(_0x4b087a),_0x37a6b3=stripLocalSqlMetadata(_0x4b087a,_0x36793d)[_0x12bf1b(0x16e)](),_0x3e2043=[...buildMetadataHeaderLines({'sqlCode':_0x4918c8[_0x12bf1b(0x15a)],'sqlName':_0x4918c8[_0x12bf1b(0x154)],'dbId':_0x4918c8[_0x12bf1b(0x152)],'dbName':_0xf4741?.['dbName'],'mode':_0x36793d,'syncedAt':_0xf4741?.[_0x12bf1b(0x16d)],'description':_0xf4741?.['description']},_0x36793d),'',_0x37a6b3],_0x4ff192=_0x3e2043[_0x12bf1b(0x174)]('\x0a');return _0x4ff192['endsWith']('\x0a')?_0x4ff192:_0x4ff192+'\x0a';}export function stripLocalSqlMetadata(_0x3bad0f,_0x476451){const _0x547472=a186_0xb1ab,_0x3ac4fd=_0x3bad0f['replace'](/\r\n/g,'\x0a')[_0x547472(0x156)]('\x0a'),_0x4cfb60=[];let _0x387040=0x0;if(_0x476451===_0x547472(0x15f))while(_0x387040<_0x3ac4fd[_0x547472(0x162)]){const _0x31b659=_0x3ac4fd[_0x387040]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x31b659)){_0x387040++;continue;}if(_0x31b659[_0x547472(0x16e)]()===''&&_0x387040>0x0){_0x387040++;continue;}break;}else while(_0x387040<_0x3ac4fd[_0x547472(0x162)]){const _0x307d95=_0x3ac4fd[_0x387040]??'';if(/^\s*--\s*@lovrabet\./[_0x547472(0x153)](_0x307d95)){_0x387040++;continue;}if(_0x307d95[_0x547472(0x16e)]()===''&&_0x387040>0x0){_0x387040++;continue;}break;}for(;_0x387040<_0x3ac4fd['length'];_0x387040++){_0x4cfb60[_0x547472(0x167)](_0x3ac4fd[_0x387040]);}return _0x4cfb60[_0x547472(0x174)]('\x0a')['trimStart']();}export function resolveSqlMode(_0x1d41b6,_0xce699c){const _0x5684d7=a186_0xb1ab;if(_0xce699c?.[_0x5684d7(0x14f)])return _0xce699c[_0x5684d7(0x14f)];return detectSqlMode(_0x1d41b6);}export function resolveSqlFileName(_0x287ab0,_0x25f850,_0x4fb0d6){const _0x4203f2=a186_0xb1ab;if(_0x4fb0d6?.['path'])return _0x4fb0d6['path'];if(_0x4fb0d6?.[_0x4203f2(0x154)]||_0x4fb0d6?.[_0x4203f2(0x160)])return buildSqlRelativePath(_0x287ab0,_0x4fb0d6?.[_0x4203f2(0x154)],_0x4fb0d6?.[_0x4203f2(0x160)],resolveSqlMode(_0x25f850,_0x4fb0d6),_0x4fb0d6?.[_0x4203f2(0x152)]);return buildDefaultSqlFileName(_0x287ab0,resolveSqlMode(_0x25f850,_0x4fb0d6));}export function resolveSqlLocalDir(_0x433089,_0x3439cd){return join(_0x433089,SQL_LOCAL_REL_DIR,_0x3439cd);}export async function confirmForceOverwrite(_0x52091d){const _0xf13577=a186_0xb1ab,_0x15d735=createInterface({'input':process['stdin'],'output':process[_0xf13577(0x163)]}),_0x1c9301=await new Promise(_0x3dcb99=>{const _0xe8f2f0=_0xf13577;_0x15d735[_0xe8f2f0(0x172)](_0x52091d+_0xe8f2f0(0x169),_0x3dcb99);});return _0x15d735[_0xf13577(0x16b)](),['y',_0xf13577(0x14d)][_0xf13577(0x157)](_0x1c9301[_0xf13577(0x16e)]()[_0xf13577(0x164)]());}export function findSqlLockScope(_0x13927a,_0xaa965d){const _0x50a5e5=a186_0xb1ab;return _0x13927a[_0x50a5e5(0x161)][_0xaa965d];}function buildMetadataHeaderLines(_0x6218c9,_0x28fe3b){const _0x579f44=a186_0xb1ab,_0x120f70=[['sqlCode',_0x6218c9[_0x579f44(0x15a)]],[_0x579f44(0x154),_0x6218c9[_0x579f44(0x154)]],[_0x579f44(0x152),_0x6218c9[_0x579f44(0x152)]],[_0x579f44(0x160),_0x6218c9[_0x579f44(0x160)]],['mode',_0x6218c9[_0x579f44(0x14f)]],['syncedAt',_0x6218c9[_0x579f44(0x16d)]],['description',_0x6218c9[_0x579f44(0x150)]]];if(_0x28fe3b===_0x579f44(0x15f))return _0x120f70[_0x579f44(0x151)](([,_0x4d4c13])=>_0x4d4c13!==undefined&&_0x4d4c13!==null&&String(_0x4d4c13)['trim']()!=='')['map'](([_0x56c335,_0x37f914])=>_0x579f44(0x15d)+_0x56c335+':\x20'+String(_0x37f914)+'\x20-->');return _0x120f70['filter'](([,_0x56cc8e])=>_0x56cc8e!==undefined&&_0x56cc8e!==null&&String(_0x56cc8e)[_0x579f44(0x16e)]()!=='')[_0x579f44(0x15c)](([_0x314c41,_0x4f4a9b])=>'--\x20@lovrabet.'+_0x314c41+':\x20'+String(_0x4f4a9b));}
1
+ (function(_0x4e92d2,_0xeaf26b){const _0x2cd4d5=a185_0x4a7b,_0x4896a0=_0x4e92d2();while(!![]){try{const _0x12ef98=parseInt(_0x2cd4d5(0x1df))/0x1*(parseInt(_0x2cd4d5(0x1f3))/0x2)+-parseInt(_0x2cd4d5(0x1ce))/0x3*(-parseInt(_0x2cd4d5(0x1dd))/0x4)+parseInt(_0x2cd4d5(0x1e0))/0x5+parseInt(_0x2cd4d5(0x1d2))/0x6*(-parseInt(_0x2cd4d5(0x1ec))/0x7)+-parseInt(_0x2cd4d5(0x1d0))/0x8+-parseInt(_0x2cd4d5(0x1e7))/0x9*(-parseInt(_0x2cd4d5(0x1db))/0xa)+parseInt(_0x2cd4d5(0x1ef))/0xb*(-parseInt(_0x2cd4d5(0x1e6))/0xc);if(_0x12ef98===_0xeaf26b)break;else _0x4896a0['push'](_0x4896a0['shift']());}catch(_0x442336){_0x4896a0['push'](_0x4896a0['shift']());}}}(a185_0x212d,0x925e9));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';function a185_0x212d(){const _0x39c6d9=['replace','2722896JItURT','trimStart','114654EePzKB','includes','mode','description','toLowerCase','join','apps','close','dbId','70bmvvze','stdin','1761244fsBfHg','lastSync','1067942PUGDml','1768030quAzbD','path','question','mybatisXml','<!--\x20@lovrabet.','sqlConfig','132UXkyir','760167VHMste','entries','fromEntries','test','version','259SRcwwY','length','sqlName','1246487KEgImq','split','dbName','map','2zCnMEf','trim','sqlCode','--\x20@lovrabet.','endsWith','\x20[y/N]\x20','syncedAt','6kctORR'];a185_0x212d=function(){return _0x39c6d9;};return a185_0x212d();}export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function buildSqlLockEntry(_0x117e89,_0x492a06,_0x53931b,_0x2f6765){const _0x383060=a185_0x4a7b,_0x484ad5=detectSqlMode(_0x492a06);return{'path':buildSqlRelativePath(_0x117e89[_0x383060(0x1f5)],_0x117e89[_0x383060(0x1ee)],_0x2f6765?.['dbName'],_0x484ad5,_0x117e89[_0x383060(0x1da)]),'hash':_0x53931b,'remoteId':_0x117e89['id'],'version':_0x117e89[_0x383060(0x1eb)],'dbId':Number(_0x117e89[_0x383060(0x1da)]),'dbName':_0x2f6765?.['dbName'],'sqlName':_0x117e89[_0x383060(0x1ee)],'sqlConfig':_0x117e89[_0x383060(0x1e5)]??undefined,'mode':_0x484ad5};}export function cloneSqlLockData(_0x39865b){const _0x4c2eb3=a185_0x4a7b;return{'apps':Object[_0x4c2eb3(0x1e9)](Object[_0x4c2eb3(0x1e8)](_0x39865b['apps'])[_0x4c2eb3(0x1f2)](([_0x875781,_0x4215b5])=>[_0x875781,{'sqlRoot':_0x4215b5['sqlRoot'],'lastSync':_0x4215b5[_0x4c2eb3(0x1de)],'sqls':{..._0x4215b5['sqls']}}]))};}export function ensureRemoteSqlContent(_0x256d22){return _0x256d22['sqlContent']??'';}export function buildLocalSqlFileContent(_0x123fdb,_0x296f0e,_0x1a83c6){const _0x35be81=a185_0x4a7b,_0x49ea3b=_0x1a83c6?.['mode']??detectSqlMode(_0x296f0e),_0x23eff5=stripLocalSqlMetadata(_0x296f0e,_0x49ea3b)[_0x35be81(0x1f4)](),_0x18e33a=[...buildMetadataHeaderLines({'sqlCode':_0x123fdb['sqlCode'],'sqlName':_0x123fdb[_0x35be81(0x1ee)],'dbId':_0x123fdb[_0x35be81(0x1da)],'dbName':_0x1a83c6?.[_0x35be81(0x1f1)],'mode':_0x49ea3b,'syncedAt':_0x1a83c6?.['syncedAt'],'description':_0x1a83c6?.[_0x35be81(0x1d5)]},_0x49ea3b),'',_0x23eff5],_0x4f36e1=_0x18e33a[_0x35be81(0x1d7)]('\x0a');return _0x4f36e1[_0x35be81(0x1f7)]('\x0a')?_0x4f36e1:_0x4f36e1+'\x0a';}function a185_0x4a7b(_0x325e53,_0x4529b2){_0x325e53=_0x325e53-0x1cd;const _0x212d53=a185_0x212d();let _0x4a7b44=_0x212d53[_0x325e53];return _0x4a7b44;}export function stripLocalSqlMetadata(_0x42c156,_0x46935f){const _0x1820cc=a185_0x4a7b,_0x19e7b2=_0x42c156[_0x1820cc(0x1cf)](/\r\n/g,'\x0a')[_0x1820cc(0x1f0)]('\x0a'),_0x5b2c73=[];let _0xed9ccd=0x0;if(_0x46935f===_0x1820cc(0x1e3))while(_0xed9ccd<_0x19e7b2[_0x1820cc(0x1ed)]){const _0x3b9fc5=_0x19e7b2[_0xed9ccd]??'';if(/^\s*<!--\s*@lovrabet\./[_0x1820cc(0x1ea)](_0x3b9fc5)){_0xed9ccd++;continue;}if(_0x3b9fc5[_0x1820cc(0x1f4)]()===''&&_0xed9ccd>0x0){_0xed9ccd++;continue;}break;}else while(_0xed9ccd<_0x19e7b2['length']){const _0x73f04=_0x19e7b2[_0xed9ccd]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x73f04)){_0xed9ccd++;continue;}if(_0x73f04[_0x1820cc(0x1f4)]()===''&&_0xed9ccd>0x0){_0xed9ccd++;continue;}break;}for(;_0xed9ccd<_0x19e7b2[_0x1820cc(0x1ed)];_0xed9ccd++){_0x5b2c73['push'](_0x19e7b2[_0xed9ccd]);}return _0x5b2c73['join']('\x0a')[_0x1820cc(0x1d1)]();}export function resolveSqlMode(_0x5c21dd,_0x487e1a){const _0x4f7450=a185_0x4a7b;if(_0x487e1a?.[_0x4f7450(0x1d4)])return _0x487e1a[_0x4f7450(0x1d4)];return detectSqlMode(_0x5c21dd);}export function resolveSqlFileName(_0x3bd88c,_0x1ccad8,_0x406f9e){const _0x3eb9d0=a185_0x4a7b;if(_0x406f9e?.[_0x3eb9d0(0x1e1)])return _0x406f9e[_0x3eb9d0(0x1e1)];if(_0x406f9e?.[_0x3eb9d0(0x1ee)]||_0x406f9e?.['dbName'])return buildSqlRelativePath(_0x3bd88c,_0x406f9e?.['sqlName'],_0x406f9e?.[_0x3eb9d0(0x1f1)],resolveSqlMode(_0x1ccad8,_0x406f9e),_0x406f9e?.['dbId']);return buildDefaultSqlFileName(_0x3bd88c,resolveSqlMode(_0x1ccad8,_0x406f9e));}export function resolveSqlLocalDir(_0x53a71e,_0x5b3f60){return join(_0x53a71e,SQL_LOCAL_REL_DIR,_0x5b3f60);}export async function confirmForceOverwrite(_0x43342e){const _0x4727cd=a185_0x4a7b,_0x1cc83c=createInterface({'input':process[_0x4727cd(0x1dc)],'output':process['stderr']}),_0x4330f4=await new Promise(_0x1cf2bd=>{const _0x182fc4=_0x4727cd;_0x1cc83c[_0x182fc4(0x1e2)](_0x43342e+_0x182fc4(0x1f8),_0x1cf2bd);});return _0x1cc83c[_0x4727cd(0x1d9)](),['y','yes'][_0x4727cd(0x1d3)](_0x4330f4[_0x4727cd(0x1f4)]()[_0x4727cd(0x1d6)]());}export function findSqlLockScope(_0xb4ab26,_0x6a181f){const _0x288130=a185_0x4a7b;return _0xb4ab26[_0x288130(0x1d8)][_0x6a181f];}function buildMetadataHeaderLines(_0x4e0f29,_0x3dab0a){const _0x160b56=a185_0x4a7b,_0xcc9b8b=[[_0x160b56(0x1f5),_0x4e0f29[_0x160b56(0x1f5)]],['sqlName',_0x4e0f29[_0x160b56(0x1ee)]],[_0x160b56(0x1da),_0x4e0f29[_0x160b56(0x1da)]],['dbName',_0x4e0f29[_0x160b56(0x1f1)]],['mode',_0x4e0f29[_0x160b56(0x1d4)]],[_0x160b56(0x1cd),_0x4e0f29[_0x160b56(0x1cd)]],[_0x160b56(0x1d5),_0x4e0f29[_0x160b56(0x1d5)]]];if(_0x3dab0a===_0x160b56(0x1e3))return _0xcc9b8b['filter'](([,_0x5c52bd])=>_0x5c52bd!==undefined&&_0x5c52bd!==null&&String(_0x5c52bd)[_0x160b56(0x1f4)]()!=='')['map'](([_0x184d0f,_0x575068])=>_0x160b56(0x1e4)+_0x184d0f+':\x20'+String(_0x575068)+'\x20-->');return _0xcc9b8b['filter'](([,_0x195bb1])=>_0x195bb1!==undefined&&_0x195bb1!==null&&String(_0x195bb1)[_0x160b56(0x1f4)]()!=='')[_0x160b56(0x1f2)](([_0x49b80b,_0x2eb65c])=>_0x160b56(0x1f6)+_0x49b80b+':\x20'+String(_0x2eb65c));}
@@ -1 +1 @@
1
- const a187_0x1ced66=a187_0x1d44;(function(_0x17683e,_0x1c63c5){const _0x41b231=a187_0x1d44,_0x4dc5e3=_0x17683e();while(!![]){try{const _0x181eb5=-parseInt(_0x41b231(0xc8))/0x1*(parseInt(_0x41b231(0xcf))/0x2)+-parseInt(_0x41b231(0xcd))/0x3*(-parseInt(_0x41b231(0xe1))/0x4)+-parseInt(_0x41b231(0xde))/0x5*(-parseInt(_0x41b231(0xc6))/0x6)+-parseInt(_0x41b231(0xe3))/0x7*(-parseInt(_0x41b231(0xd1))/0x8)+parseInt(_0x41b231(0xca))/0x9+parseInt(_0x41b231(0xd0))/0xa*(parseInt(_0x41b231(0xc4))/0xb)+parseInt(_0x41b231(0xc5))/0xc*(-parseInt(_0x41b231(0xd2))/0xd);if(_0x181eb5===_0x1c63c5)break;else _0x4dc5e3['push'](_0x4dc5e3['shift']());}catch(_0x291e0d){_0x4dc5e3['push'](_0x4dc5e3['shift']());}}}(a187_0x7085,0x4c011));function a187_0x7085(){const _0x549a99=['sqlCode','has','sqls','sqlRoot','2887247Rhxyjx','2568Mhhkzq','6iBPnkz','lockFilePath','1mehFyw','appCode','2772135xwgZyO','length','paging','1770621BTDfTU','\x20missing,\x20','58468uQgPev','10TyXFOg','156888CaHjUY','79066XjhOjj','read','tableData','keys','relativePath','push','sqlName','boolean','status','path','lockKey','map','1524485ZukQTw','sql','\x20unchanged','4xyLpma','remote','63ZHernA','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','filePath'];a187_0x7085=function(){return _0x549a99;};return a187_0x7085();}import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a187_0x1d44(_0x11258a,_0x562db0){_0x11258a=_0x11258a-0xbe;const _0x70857c=a187_0x7085();let _0x1d4474=_0x70857c[_0x11258a];return _0x1d4474;}import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x3ae2a6){const _0x2b755e=a187_0x1d44,_0xd24479=[];let _0x5d2579=0x1;while(!![]){const _0x2233da=await listSqlQueries(_0x3ae2a6,{'currentPage':_0x5d2579,'pageSize':PAGE_SIZE}),_0x3d5bc0=_0x2233da[_0x2b755e(0xd4)]??[];_0xd24479[_0x2b755e(0xd7)](..._0x3d5bc0['map'](_0x32867f=>_0x32867f[_0x2b755e(0xc0)]));if(_0x3d5bc0['length']===0x0)break;const _0x10ee35=_0x2233da[_0x2b755e(0xcc)]?.['totalCount'];if(_0x10ee35!=null?_0xd24479['length']>=_0x10ee35:_0x3d5bc0[_0x2b755e(0xcb)]<PAGE_SIZE)break;_0x5d2579++;}return _0xd24479;}export const sqlStatus={'service':a187_0x1ced66(0xdf),'command':a187_0x1ced66(0xda),'description':a187_0x1ced66(0xbe),'risk':a187_0x1ced66(0xd3),'flags':[{'name':'remote','type':a187_0x1ced66(0xd9),'description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x57e1db){const _0x2e8a51=a187_0x1ced66,_0x2166e9=loadSqlProjectConfig(_0x57e1db[_0x2e8a51(0xc9)]),_0x6224ef=await readSqlLockFile(_0x2166e9[_0x2e8a51(0xc7)]),{appLock:_0x163125}=ensureSqlLockScope(_0x6224ef??createEmptySqlLock(),_0x2166e9[_0x2e8a51(0xc9)],_0x2166e9[_0x2e8a51(0xc3)],_0x2e8a51(0xda)),_0x35c279=await scanLocalSqlQueries(_0x2166e9),_0x337f47=[],_0x3c3fb7=[],_0x1637bf=[],_0x58c5a6=[],_0x35cda8=new Set(_0x35c279[_0x2e8a51(0xdd)](_0x333f1d=>_0x333f1d[_0x2e8a51(0xdc)]));for(const _0x453cbc of _0x35c279){const _0x1378ec=await computeSqlFileHash(_0x453cbc[_0x2e8a51(0xbf)]),_0x44a5e8=_0x163125[_0x2e8a51(0xc2)][_0x453cbc['lockKey']],_0x2b12a9=!!_0x44a5e8&&_0x44a5e8[_0x2e8a51(0xdb)]!==_0x453cbc[_0x2e8a51(0xd6)],_0x59ad79=!!_0x44a5e8&&!!_0x453cbc[_0x2e8a51(0xd8)]&&_0x44a5e8['sqlName']!==_0x453cbc[_0x2e8a51(0xd8)];if(!_0x44a5e8)_0x337f47['push'](_0x453cbc[_0x2e8a51(0xdc)]);else _0x44a5e8['hash']!==_0x1378ec||_0x2b12a9||_0x59ad79?_0x3c3fb7[_0x2e8a51(0xd7)](_0x453cbc['lockKey']):_0x1637bf[_0x2e8a51(0xd7)](_0x453cbc[_0x2e8a51(0xdc)]);}for(const _0x5f3295 of Object[_0x2e8a51(0xd5)](_0x163125[_0x2e8a51(0xc2)])){!_0x35cda8['has'](_0x5f3295)&&_0x58c5a6[_0x2e8a51(0xd7)](_0x5f3295);}const _0x22e8b3=[];if(_0x57e1db['bool'](_0x2e8a51(0xe2))){const _0x4642ac=await fetchAllSqlCodes(_0x57e1db[_0x2e8a51(0xc9)]);for(const _0x241d45 of _0x4642ac){!_0x35cda8[_0x2e8a51(0xc1)](_0x241d45)&&!_0x163125['sqls'][_0x241d45]&&_0x22e8b3[_0x2e8a51(0xd7)](_0x241d45);}}const _0xf049e=_0x337f47['length']===0x0&&_0x3c3fb7['length']===0x0&&_0x58c5a6[_0x2e8a51(0xcb)]===0x0&&_0x22e8b3[_0x2e8a51(0xcb)]===0x0;return{'ok':!![],'data':{'added':_0x337f47,'modified':_0x3c3fb7,'missing':_0x58c5a6,'unchanged':_0x1637bf,'remoteOnly':_0x22e8b3},'message':_0xf049e?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x337f47[_0x2e8a51(0xcb)]+'\x20added,\x20'+_0x3c3fb7['length']+'\x20modified,\x20'+_0x58c5a6['length']+_0x2e8a51(0xce)+_0x1637bf['length']+_0x2e8a51(0xe0)+(_0x22e8b3[_0x2e8a51(0xcb)]>0x0?',\x20'+_0x22e8b3[_0x2e8a51(0xcb)]+'\x20remote-only':'')};}};
1
+ const a186_0x55e749=a186_0xfa0c;(function(_0x448cc1,_0x22a5c2){const _0x1cc192=a186_0xfa0c,_0x58477d=_0x448cc1();while(!![]){try{const _0x466028=parseInt(_0x1cc192(0x106))/0x1*(-parseInt(_0x1cc192(0xfa))/0x2)+-parseInt(_0x1cc192(0x10d))/0x3*(parseInt(_0x1cc192(0x107))/0x4)+-parseInt(_0x1cc192(0x119))/0x5*(parseInt(_0x1cc192(0x101))/0x6)+-parseInt(_0x1cc192(0x111))/0x7*(parseInt(_0x1cc192(0x100))/0x8)+parseInt(_0x1cc192(0x10b))/0x9+parseInt(_0x1cc192(0x10f))/0xa+parseInt(_0x1cc192(0x113))/0xb;if(_0x466028===_0x22a5c2)break;else _0x58477d['push'](_0x58477d['shift']());}catch(_0x45b4ed){_0x58477d['push'](_0x58477d['shift']());}}}(a186_0x46ab,0xa66db));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a186_0x46ab(){const _0x595825=['filePath','remote','lockKey','683Hmirzp','50308BdgBit','map','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','\x20unchanged','8118468mXzAiG','sql','87chdfJu','\x20missing,\x20','284500HgmeVQ','hash','625709toaRcv','sqlCode','32446051uKpTfm','relativePath','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','\x20modified,\x20','length','has','244880oDdNEn','status','sqlName','boolean','sqlRoot','totalCount','sqls','3124juifKZ','appCode','lockFilePath','push','read','\x20added,\x20','88asQhsk','96GKMTwm','tableData'];a186_0x46ab=function(){return _0x595825;};return a186_0x46ab();}const PAGE_SIZE=0x64;function a186_0xfa0c(_0x225df9,_0x5a217b){_0x225df9=_0x225df9-0xf9;const _0x46ab45=a186_0x46ab();let _0xfa0c0f=_0x46ab45[_0x225df9];return _0xfa0c0f;}async function fetchAllSqlCodes(_0x3ae48a){const _0x13fdbe=a186_0xfa0c,_0x39c788=[];let _0x28c7f6=0x1;while(!![]){const _0x4994ad=await listSqlQueries(_0x3ae48a,{'currentPage':_0x28c7f6,'pageSize':PAGE_SIZE}),_0x5e47e8=_0x4994ad[_0x13fdbe(0x102)]??[];_0x39c788[_0x13fdbe(0xfd)](..._0x5e47e8[_0x13fdbe(0x108)](_0x19c17a=>_0x19c17a[_0x13fdbe(0x112)]));if(_0x5e47e8[_0x13fdbe(0x117)]===0x0)break;const _0x3ccf66=_0x4994ad['paging']?.[_0x13fdbe(0x11e)];if(_0x3ccf66!=null?_0x39c788['length']>=_0x3ccf66:_0x5e47e8['length']<PAGE_SIZE)break;_0x28c7f6++;}return _0x39c788;}export const sqlStatus={'service':a186_0x55e749(0x10c),'command':a186_0x55e749(0x11a),'description':a186_0x55e749(0x115),'risk':a186_0x55e749(0xfe),'flags':[{'name':a186_0x55e749(0x104),'type':a186_0x55e749(0x11c),'description':a186_0x55e749(0x109)}],async 'execute'(_0x1ce451){const _0xd8e4ee=a186_0x55e749,_0x330b63=loadSqlProjectConfig(_0x1ce451[_0xd8e4ee(0xfb)]),_0x3b1df7=await readSqlLockFile(_0x330b63[_0xd8e4ee(0xfc)]),{appLock:_0x5dc3ca}=ensureSqlLockScope(_0x3b1df7??createEmptySqlLock(),_0x330b63[_0xd8e4ee(0xfb)],_0x330b63[_0xd8e4ee(0x11d)],_0xd8e4ee(0x11a)),_0x35492c=await scanLocalSqlQueries(_0x330b63),_0x521637=[],_0x6df125=[],_0x5d0953=[],_0x3ca7f2=[],_0x2719b3=new Set(_0x35492c[_0xd8e4ee(0x108)](_0x36ba47=>_0x36ba47[_0xd8e4ee(0x105)]));for(const _0x50e715 of _0x35492c){const _0x3d4c0a=await computeSqlFileHash(_0x50e715[_0xd8e4ee(0x103)]),_0x148eb5=_0x5dc3ca['sqls'][_0x50e715[_0xd8e4ee(0x105)]],_0x1a9ec6=!!_0x148eb5&&_0x148eb5['path']!==_0x50e715[_0xd8e4ee(0x114)],_0x2eadac=!!_0x148eb5&&!!_0x50e715[_0xd8e4ee(0x11b)]&&_0x148eb5['sqlName']!==_0x50e715[_0xd8e4ee(0x11b)];if(!_0x148eb5)_0x521637[_0xd8e4ee(0xfd)](_0x50e715['lockKey']);else _0x148eb5[_0xd8e4ee(0x110)]!==_0x3d4c0a||_0x1a9ec6||_0x2eadac?_0x6df125[_0xd8e4ee(0xfd)](_0x50e715[_0xd8e4ee(0x105)]):_0x5d0953[_0xd8e4ee(0xfd)](_0x50e715[_0xd8e4ee(0x105)]);}for(const _0x4cca01 of Object['keys'](_0x5dc3ca[_0xd8e4ee(0xf9)])){!_0x2719b3[_0xd8e4ee(0x118)](_0x4cca01)&&_0x3ca7f2[_0xd8e4ee(0xfd)](_0x4cca01);}const _0x59f065=[];if(_0x1ce451['bool']('remote')){const _0x4d6540=await fetchAllSqlCodes(_0x1ce451['appCode']);for(const _0x5ce3e7 of _0x4d6540){!_0x2719b3['has'](_0x5ce3e7)&&!_0x5dc3ca[_0xd8e4ee(0xf9)][_0x5ce3e7]&&_0x59f065[_0xd8e4ee(0xfd)](_0x5ce3e7);}}const _0x456fd4=_0x521637['length']===0x0&&_0x6df125[_0xd8e4ee(0x117)]===0x0&&_0x3ca7f2[_0xd8e4ee(0x117)]===0x0&&_0x59f065[_0xd8e4ee(0x117)]===0x0;return{'ok':!![],'data':{'added':_0x521637,'modified':_0x6df125,'missing':_0x3ca7f2,'unchanged':_0x5d0953,'remoteOnly':_0x59f065},'message':_0x456fd4?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x521637[_0xd8e4ee(0x117)]+_0xd8e4ee(0xff)+_0x6df125[_0xd8e4ee(0x117)]+_0xd8e4ee(0x116)+_0x3ca7f2[_0xd8e4ee(0x117)]+_0xd8e4ee(0x10e)+_0x5d0953[_0xd8e4ee(0x117)]+_0xd8e4ee(0x10a)+(_0x59f065[_0xd8e4ee(0x117)]>0x0?',\x20'+_0x59f065['length']+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a188_0x14ede3=a188_0x3066;(function(_0x243b9d,_0x189d1f){const _0x3b8ae9=a188_0x3066,_0x4e55f2=_0x243b9d();while(!![]){try{const _0xbcbd67=-parseInt(_0x3b8ae9(0xff))/0x1*(-parseInt(_0x3b8ae9(0x135))/0x2)+parseInt(_0x3b8ae9(0x112))/0x3+parseInt(_0x3b8ae9(0x126))/0x4+-parseInt(_0x3b8ae9(0x11b))/0x5+-parseInt(_0x3b8ae9(0x137))/0x6*(-parseInt(_0x3b8ae9(0x11a))/0x7)+parseInt(_0x3b8ae9(0x134))/0x8*(parseInt(_0x3b8ae9(0x101))/0x9)+-parseInt(_0x3b8ae9(0x10b))/0xa;if(_0xbcbd67===_0x189d1f)break;else _0x4e55f2['push'](_0x4e55f2['shift']());}catch(_0x26c969){_0x4e55f2['push'](_0x4e55f2['shift']());}}}(a188_0x2fdd,0x25dee));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a188_0x2fdd(){const _0x3a10=['2549799zkUghX','columns','schema:','flagMissing','pkField','Dataset\x20\x22','split','dbtableConfig','map','name','4851730aurUUe','Provide\x20--file\x20or\x20--sql','primary','schemaWarnings','push','unshift','toLowerCase','793488OoKRDV','find','type','str','length','check-indexes','sql','get','7klhBci','1372935baYCdz','fields','appCode','bool','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','valid','filter','Table\x20\x22','indexName','utf-8','message','1111492aizQWW','trim','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','file','index_columns','string','cwd','columnNames','parameters','schemas','read','isArray','reason','File\x20not\x20found:\x20','8ERMrWY','2mCXmoY','validate','327282YySrOa','flatMap','--check-indexes\x20requires\x20--schemas.','tables','validation','sqlType','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','index_type','tableName','indexes','isDangerous','34651VvLeQD','SQL\x20schema\x20validation'];a188_0x2fdd=function(){return _0x3a10;};return a188_0x2fdd();}import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a188_0x3066(_0x28dd54,_0x33458d){_0x28dd54=_0x28dd54-0xfe;const _0x2fdd84=a188_0x2fdd();let _0x3066f5=_0x2fdd84[_0x28dd54];return _0x3066f5;}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a188_0x14ede3(0x118),'command':a188_0x14ede3(0x136),'description':a188_0x14ede3(0x13d),'risk':a188_0x14ede3(0x130),'flags':[{'name':a188_0x14ede3(0x129),'type':a188_0x14ede3(0x12b),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a188_0x14ede3(0x118),'type':a188_0x14ede3(0x12b),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a188_0x14ede3(0x12f),'type':'string','description':a188_0x14ede3(0x11f)},{'name':a188_0x14ede3(0x117),'type':'boolean','description':a188_0x14ede3(0x128)}],async 'execute'(_0x299795){const _0x29d3fc=a188_0x14ede3,_0x1bbb1d=_0x299795['str'](_0x29d3fc(0x129)),_0x3fe9b0=_0x299795[_0x29d3fc(0x115)](_0x29d3fc(0x118)),_0x57771b=_0x299795[_0x29d3fc(0x115)]('schemas'),_0x4c61b3=_0x299795[_0x29d3fc(0x11e)]('check-indexes');if(!_0x1bbb1d&&!_0x3fe9b0)throw CliErrors[_0x29d3fc(0x104)](_0x29d3fc(0x129),_0x29d3fc(0x10c));if(_0x4c61b3&&!_0x57771b)throw CliErrors[_0x29d3fc(0x13b)](_0x29d3fc(0x139));let _0x43a001;if(_0x1bbb1d){const _0x4e0fa5=resolve(process[_0x29d3fc(0x12c)](),_0x1bbb1d);if(!existsSync(_0x4e0fa5))throw CliErrors[_0x29d3fc(0x13b)](_0x29d3fc(0x133)+_0x4e0fa5);_0x43a001=readFileSync(_0x4e0fa5,_0x29d3fc(0x124));}else _0x43a001=_0x3fe9b0;const _0x3024da=validateSql(_0x43a001),_0x13968e={'valid':_0x3024da[_0x29d3fc(0x120)],'sqlType':_0x3024da[_0x29d3fc(0x13c)][_0x29d3fc(0x114)],'isSelectOnly':_0x3024da[_0x29d3fc(0x13c)]['isSelectOnly'],'isDangerous':_0x3024da[_0x29d3fc(0x13c)][_0x29d3fc(0xfe)],'tables':_0x3024da[_0x29d3fc(0x13a)],'parameters':_0x3024da[_0x29d3fc(0x12e)],'message':_0x3024da[_0x29d3fc(0x125)]};_0x3024da[_0x29d3fc(0x13c)][_0x29d3fc(0x132)]&&(_0x13968e[_0x29d3fc(0x132)]=_0x3024da[_0x29d3fc(0x13c)][_0x29d3fc(0x132)]);if(_0x57771b&&_0x3024da[_0x29d3fc(0x120)]){const _0x4f1a7a=_0x57771b[_0x29d3fc(0x107)](',')['map'](_0x5b4ad5=>_0x5b4ad5[_0x29d3fc(0x127)]())[_0x29d3fc(0x121)](Boolean),_0x1359d2=[],_0x1a832d=[],_0x2957bd=filterDbTableBackedDatasets(await listDatasets(_0x299795[_0x29d3fc(0x11d)])),_0x23f218=new Map(_0x2957bd[_0x29d3fc(0x109)](_0x32969a=>[_0x32969a['dbtableConfig']?.[_0x29d3fc(0x13f)]?.[_0x29d3fc(0x111)](),_0x32969a]));for(const _0x19b117 of _0x3024da[_0x29d3fc(0x13a)]){const _0x34eca4=_0x23f218[_0x29d3fc(0x119)](_0x19b117[_0x29d3fc(0x111)]());!_0x34eca4&&_0x1359d2[_0x29d3fc(0x10f)](_0x29d3fc(0x122)+_0x19b117+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0xcef791 of _0x4f1a7a){let _0x392acf;try{_0x392acf=await getDatasetDetail(_0xcef791);}catch{_0x1359d2[_0x29d3fc(0x10f)](_0x29d3fc(0x106)+_0xcef791+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x392acf,_0x29d3fc(0x100));const _0x587d9d=Array[_0x29d3fc(0x131)](_0x392acf[_0x29d3fc(0x11c)])?_0x392acf[_0x29d3fc(0x11c)]:[],_0xadf58=new Set(_0x587d9d[_0x29d3fc(0x109)](_0x362c97=>_0x362c97[_0x29d3fc(0x10a)]?.[_0x29d3fc(0x111)]())),_0x1f92a5=_0x392acf[_0x29d3fc(0x108)]?.['tableName']||_0x392acf[_0x29d3fc(0x13f)]||_0xcef791;_0x13968e[_0x29d3fc(0x103)+_0x1f92a5]={'code':_0xcef791,'tableName':_0x1f92a5,'fieldCount':_0xadf58['size'],'fields':Array['from'](_0xadf58)};if(_0x4c61b3){const _0xcd14a3=normalizeDatasetIndexes(_0x392acf);_0x1a832d['push']({'tableName':_0x1f92a5,..._0xcd14a3});}}_0x1359d2[_0x29d3fc(0x116)]>0x0&&(_0x13968e[_0x29d3fc(0x10e)]=_0x1359d2),_0x4c61b3&&(_0x13968e['joinAudit']=auditSqlJoinIndexes(_0x43a001,_0x1a832d));}return{'ok':_0x3024da[_0x29d3fc(0x120)],'data':_0x13968e,'message':_0x3024da[_0x29d3fc(0x125)]};}};function normalizeDatasetIndexes(_0x2309c8){const _0x50b2af=a188_0x14ede3,_0x52b4ea=Array[_0x50b2af(0x131)](_0x2309c8?.['dataset']?.[_0x50b2af(0x140)])?_0x2309c8['dataset'][_0x50b2af(0x140)]:Array[_0x50b2af(0x131)](_0x2309c8?.[_0x50b2af(0x140)])?_0x2309c8[_0x50b2af(0x140)]:[],_0x29d177=_0x52b4ea[_0x50b2af(0x138)](_0x2abd33=>{const _0x1b59ce=_0x50b2af,_0xf59929=Array[_0x1b59ce(0x131)](_0x2abd33?.[_0x1b59ce(0x12a)])?_0x2abd33['index_columns']:Array[_0x1b59ce(0x131)](_0x2abd33?.['columnNames'])?_0x2abd33[_0x1b59ce(0x12d)]:Array[_0x1b59ce(0x131)](_0x2abd33?.[_0x1b59ce(0x102)])?_0x2abd33[_0x1b59ce(0x102)]:[],_0x1ce4cf=_0xf59929['filter'](_0x592024=>typeof _0x592024===_0x1b59ce(0x12b))['map'](_0x2bd65a=>_0x2bd65a[_0x1b59ce(0x127)]())[_0x1b59ce(0x121)](Boolean);if(_0x1ce4cf['length']===0x0)return[];const _0x5d0bf9=[_0x2abd33?.[_0x1b59ce(0x123)],_0x2abd33?.['index_name'],_0x2abd33?.[_0x1b59ce(0x10a)]][_0x1b59ce(0x113)](_0x34b9c4=>typeof _0x34b9c4===_0x1b59ce(0x12b)&&_0x34b9c4[_0x1b59ce(0x127)]()),_0x47420b=[_0x2abd33?.[_0x1b59ce(0x13e)],_0x2abd33?.[_0x1b59ce(0x114)]]['find'](_0x3f9efb=>typeof _0x3f9efb===_0x1b59ce(0x12b)&&_0x3f9efb[_0x1b59ce(0x127)]());return[{..._0x5d0bf9?{'name':_0x5d0bf9['trim']()}:{},..._0x47420b?{'type':_0x47420b[_0x1b59ce(0x127)]()}:{},'columns':_0x1ce4cf}];}),_0x5db000=[..._0x29d177],_0x39e547=typeof _0x2309c8?.[_0x50b2af(0x108)]?.[_0x50b2af(0x105)]===_0x50b2af(0x12b)?_0x2309c8[_0x50b2af(0x108)]['pkField'][_0x50b2af(0x107)](',')[_0x50b2af(0x109)](_0x1d6258=>_0x1d6258['trim']())[_0x50b2af(0x121)](Boolean):[];return _0x39e547[_0x50b2af(0x116)]>0x0&&_0x5db000[_0x50b2af(0x110)]({'type':_0x50b2af(0x10d),'columns':_0x39e547}),{'indexes':_0x5db000,'metadataAvailable':_0x29d177[_0x50b2af(0x116)]>0x0};}
1
+ const a187_0x43cdc5=a187_0x3f11;(function(_0x1ce6ee,_0x5a75f4){const _0x4ccab5=a187_0x3f11,_0x18e608=_0x1ce6ee();while(!![]){try{const _0x1861eb=-parseInt(_0x4ccab5(0xa8))/0x1+parseInt(_0x4ccab5(0x93))/0x2+-parseInt(_0x4ccab5(0xaf))/0x3+parseInt(_0x4ccab5(0x9b))/0x4*(-parseInt(_0x4ccab5(0x8e))/0x5)+-parseInt(_0x4ccab5(0xa2))/0x6*(-parseInt(_0x4ccab5(0xa3))/0x7)+parseInt(_0x4ccab5(0xa5))/0x8*(-parseInt(_0x4ccab5(0x99))/0x9)+parseInt(_0x4ccab5(0xb2))/0xa;if(_0x1861eb===_0x5a75f4)break;else _0x18e608['push'](_0x18e608['shift']());}catch(_0x21c747){_0x18e608['push'](_0x18e608['shift']());}}}(a187_0x2d0d,0x2a87a));function a187_0x3f11(_0x517415,_0x11e429){_0x517415=_0x517415-0x7b;const _0x2d0d65=a187_0x2d0d();let _0x3f114b=_0x2d0d65[_0x517415];return _0x3f114b;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a187_0x43cdc5(0xac),'command':'validate','description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a187_0x43cdc5(0x8d),'flags':[{'name':a187_0x43cdc5(0xb6),'type':a187_0x43cdc5(0xae),'description':a187_0x43cdc5(0x81)},{'name':a187_0x43cdc5(0xac),'type':'string','description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a187_0x43cdc5(0x83),'type':a187_0x43cdc5(0xae),'description':a187_0x43cdc5(0xbb)},{'name':a187_0x43cdc5(0xba),'type':a187_0x43cdc5(0x8b),'description':a187_0x43cdc5(0x91)}],async 'execute'(_0x7e8ce3){const _0x3402a2=a187_0x43cdc5,_0xd5d80a=_0x7e8ce3[_0x3402a2(0xad)](_0x3402a2(0xb6)),_0x43a244=_0x7e8ce3[_0x3402a2(0xad)](_0x3402a2(0xac)),_0x1a77f0=_0x7e8ce3['str'](_0x3402a2(0x83)),_0xaf537a=_0x7e8ce3[_0x3402a2(0x7c)](_0x3402a2(0xba));if(!_0xd5d80a&&!_0x43a244)throw CliErrors['flagMissing'](_0x3402a2(0xb6),_0x3402a2(0x7d));if(_0xaf537a&&!_0x1a77f0)throw CliErrors[_0x3402a2(0x82)](_0x3402a2(0xb0));let _0x5984af;if(_0xd5d80a){const _0x2f2a2c=resolve(process[_0x3402a2(0x8a)](),_0xd5d80a);if(!existsSync(_0x2f2a2c))throw CliErrors[_0x3402a2(0x82)](_0x3402a2(0x80)+_0x2f2a2c);_0x5984af=readFileSync(_0x2f2a2c,_0x3402a2(0xaa));}else _0x5984af=_0x43a244;const _0x5bcd15=validateSql(_0x5984af),_0x2516c3={'valid':_0x5bcd15[_0x3402a2(0x9a)],'sqlType':_0x5bcd15[_0x3402a2(0x84)][_0x3402a2(0x8c)],'isSelectOnly':_0x5bcd15[_0x3402a2(0x84)][_0x3402a2(0xa9)],'isDangerous':_0x5bcd15[_0x3402a2(0x84)][_0x3402a2(0xa6)],'tables':_0x5bcd15['tables'],'parameters':_0x5bcd15[_0x3402a2(0xbc)],'message':_0x5bcd15[_0x3402a2(0xb4)]};_0x5bcd15[_0x3402a2(0x84)]['reason']&&(_0x2516c3['reason']=_0x5bcd15[_0x3402a2(0x84)][_0x3402a2(0x94)]);if(_0x1a77f0&&_0x5bcd15[_0x3402a2(0x9a)]){const _0x5bd2cb=_0x1a77f0[_0x3402a2(0xa1)](',')[_0x3402a2(0x98)](_0x1e0cfd=>_0x1e0cfd[_0x3402a2(0xab)]())['filter'](Boolean),_0x10338a=[],_0x584982=[],_0x290dd8=filterDbTableBackedDatasets(await listDatasets(_0x7e8ce3[_0x3402a2(0x90)])),_0x1a9e7c=new Map(_0x290dd8[_0x3402a2(0x98)](_0x26b0ef=>[_0x26b0ef[_0x3402a2(0x7f)]?.[_0x3402a2(0x92)]?.['toLowerCase'](),_0x26b0ef]));for(const _0x39cdad of _0x5bcd15['tables']){const _0x2cfdb3=_0x1a9e7c[_0x3402a2(0x97)](_0x39cdad['toLowerCase']());!_0x2cfdb3&&_0x10338a[_0x3402a2(0xb1)](_0x3402a2(0x9d)+_0x39cdad+_0x3402a2(0x86));}for(const _0x54a98e of _0x5bd2cb){let _0x1e98cd;try{_0x1e98cd=await getDatasetDetail(_0x54a98e);}catch{_0x10338a[_0x3402a2(0xb1)](_0x3402a2(0x9c)+_0x54a98e+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x1e98cd,_0x3402a2(0x8f));const _0x1e1c73=Array[_0x3402a2(0xb3)](_0x1e98cd[_0x3402a2(0xa4)])?_0x1e98cd[_0x3402a2(0xa4)]:[],_0xb149b2=new Set(_0x1e1c73[_0x3402a2(0x98)](_0x40d888=>_0x40d888[_0x3402a2(0xb7)]?.['toLowerCase']())),_0x1e28c2=_0x1e98cd['dbtableConfig']?.['tableName']||_0x1e98cd[_0x3402a2(0x92)]||_0x54a98e;_0x2516c3[_0x3402a2(0xb5)+_0x1e28c2]={'code':_0x54a98e,'tableName':_0x1e28c2,'fieldCount':_0xb149b2[_0x3402a2(0xb8)],'fields':Array[_0x3402a2(0x95)](_0xb149b2)};if(_0xaf537a){const _0x4ae033=normalizeDatasetIndexes(_0x1e98cd);_0x584982[_0x3402a2(0xb1)]({'tableName':_0x1e28c2,..._0x4ae033});}}_0x10338a['length']>0x0&&(_0x2516c3['schemaWarnings']=_0x10338a),_0xaf537a&&(_0x2516c3[_0x3402a2(0xb9)]=auditSqlJoinIndexes(_0x5984af,_0x584982));}return{'ok':_0x5bcd15[_0x3402a2(0x9a)],'data':_0x2516c3,'message':_0x5bcd15['message']};}};function a187_0x2d0d(){const _0x209035=['Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','parameters','indexes','bool','Provide\x20--file\x20or\x20--sql','dataset','dbtableConfig','File\x20not\x20found:\x20','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','validation','schemas','sqlType','indexName','\x22\x20not\x20found\x20in\x20any\x20dataset','columns','filter','index_columns','cwd','boolean','type','read','215MmzdtS','SQL\x20schema\x20validation','appCode','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','tableName','499208CJsQaZ','reason','from','find','get','map','135dXgCrY','valid','31156FHLWHr','Dataset\x20\x22','Table\x20\x22','length','pkField','unshift','split','322914oPPoRs','21sWLIOM','fields','103504LgQqWR','isDangerous','flatMap','130335VUAiEL','isSelectOnly','utf-8','trim','sql','str','string','500121SEnKXN','--check-indexes\x20requires\x20--schemas.','push','5891800kYRuhQ','isArray','message','schema:','file','name','size','joinAudit','check-indexes'];a187_0x2d0d=function(){return _0x209035;};return a187_0x2d0d();}function normalizeDatasetIndexes(_0x45dc76){const _0x49687b=a187_0x43cdc5,_0x7c37ee=Array[_0x49687b(0xb3)](_0x45dc76?.[_0x49687b(0x7e)]?.[_0x49687b(0x7b)])?_0x45dc76[_0x49687b(0x7e)][_0x49687b(0x7b)]:Array[_0x49687b(0xb3)](_0x45dc76?.[_0x49687b(0x7b)])?_0x45dc76[_0x49687b(0x7b)]:[],_0x392668=_0x7c37ee[_0x49687b(0xa7)](_0x27e6b6=>{const _0x11069c=_0x49687b,_0x5aea1e=Array['isArray'](_0x27e6b6?.['index_columns'])?_0x27e6b6[_0x11069c(0x89)]:Array['isArray'](_0x27e6b6?.['columnNames'])?_0x27e6b6['columnNames']:Array[_0x11069c(0xb3)](_0x27e6b6?.[_0x11069c(0x87)])?_0x27e6b6[_0x11069c(0x87)]:[],_0x4ef4ab=_0x5aea1e[_0x11069c(0x88)](_0x57f34b=>typeof _0x57f34b===_0x11069c(0xae))[_0x11069c(0x98)](_0xbaabc4=>_0xbaabc4[_0x11069c(0xab)]())[_0x11069c(0x88)](Boolean);if(_0x4ef4ab[_0x11069c(0x9e)]===0x0)return[];const _0x17090a=[_0x27e6b6?.[_0x11069c(0x85)],_0x27e6b6?.['index_name'],_0x27e6b6?.[_0x11069c(0xb7)]][_0x11069c(0x96)](_0x24c14a=>typeof _0x24c14a===_0x11069c(0xae)&&_0x24c14a['trim']()),_0x360ceb=[_0x27e6b6?.['index_type'],_0x27e6b6?.[_0x11069c(0x8c)]]['find'](_0x4f451b=>typeof _0x4f451b===_0x11069c(0xae)&&_0x4f451b[_0x11069c(0xab)]());return[{..._0x17090a?{'name':_0x17090a[_0x11069c(0xab)]()}:{},..._0x360ceb?{'type':_0x360ceb['trim']()}:{},'columns':_0x4ef4ab}];}),_0x3d44cb=[..._0x392668],_0x926947=typeof _0x45dc76?.[_0x49687b(0x7f)]?.[_0x49687b(0x9f)]==='string'?_0x45dc76[_0x49687b(0x7f)][_0x49687b(0x9f)]['split'](',')[_0x49687b(0x98)](_0x50065c=>_0x50065c[_0x49687b(0xab)]())[_0x49687b(0x88)](Boolean):[];return _0x926947[_0x49687b(0x9e)]>0x0&&_0x3d44cb[_0x49687b(0xa0)]({'type':'primary','columns':_0x926947}),{'indexes':_0x3d44cb,'metadataAvailable':_0x392668[_0x49687b(0x9e)]>0x0};}
@@ -1 +1 @@
1
- function a189_0xe3b8(_0x2d2921,_0x2eeff1){_0x2d2921=_0x2d2921-0x144;const _0x36cdf9=a189_0x36cd();let _0xe3b8cc=_0x36cdf9[_0x2d2921];return _0xe3b8cc;}(function(_0x391a3c,_0x4990bb){const _0x3d22f4=a189_0xe3b8,_0x15f131=_0x391a3c();while(!![]){try{const _0x1cdf6e=parseInt(_0x3d22f4(0x14b))/0x1*(parseInt(_0x3d22f4(0x149))/0x2)+-parseInt(_0x3d22f4(0x144))/0x3+-parseInt(_0x3d22f4(0x14e))/0x4*(parseInt(_0x3d22f4(0x14c))/0x5)+-parseInt(_0x3d22f4(0x14d))/0x6*(parseInt(_0x3d22f4(0x145))/0x7)+-parseInt(_0x3d22f4(0x14a))/0x8+-parseInt(_0x3d22f4(0x147))/0x9+parseInt(_0x3d22f4(0x146))/0xa*(parseInt(_0x3d22f4(0x148))/0xb);if(_0x1cdf6e===_0x4990bb)break;else _0x15f131['push'](_0x15f131['shift']());}catch(_0x4766d9){_0x15f131['push'](_0x15f131['shift']());}}}(a189_0x36cd,0x4f500));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a189_0x36cd(){const _0x3e95b7=['436068WeXglS','11QpHveL','768VpkBVq','4884776HiRuon','1453MhGjpQ','14215JfLCLO','18JaJLyN','808VyTqwP','1176588hcuYrU','1111299zvuwAc','18687140dIsbNO'];a189_0x36cd=function(){return _0x3e95b7;};return a189_0x36cd();}
1
+ function a188_0x1144(){const _0x4d3f49=['136xsRUYT','494148pGrPpR','171054OVWxIB','4ogrLIM','1355761JOXhPp','10XPlHCN','14203gXsUYP','341495tkhLbJ','12IloCzm','38674pUojHe','12byZzpW','55629DCabfr'];a188_0x1144=function(){return _0x4d3f49;};return a188_0x1144();}function a188_0x2cf1(_0x1928b5,_0x4e5519){_0x1928b5=_0x1928b5-0x1c2;const _0x11444f=a188_0x1144();let _0x2cf122=_0x11444f[_0x1928b5];return _0x2cf122;}(function(_0x5c3cee,_0x42400a){const _0x32a40c=a188_0x2cf1,_0x1f0d11=_0x5c3cee();while(!![]){try{const _0x1e2f52=-parseInt(_0x32a40c(0x1c8))/0x1*(parseInt(_0x32a40c(0x1c2))/0x2)+parseInt(_0x32a40c(0x1cd))/0x3+parseInt(_0x32a40c(0x1cc))/0x4+-parseInt(_0x32a40c(0x1c6))/0x5*(-parseInt(_0x32a40c(0x1c7))/0x6)+-parseInt(_0x32a40c(0x1c5))/0x7*(-parseInt(_0x32a40c(0x1cb))/0x8)+parseInt(_0x32a40c(0x1ca))/0x9*(-parseInt(_0x32a40c(0x1c4))/0xa)+parseInt(_0x32a40c(0x1c3))/0xb*(-parseInt(_0x32a40c(0x1c9))/0xc);if(_0x1e2f52===_0x42400a)break;else _0x1f0d11['push'](_0x1f0d11['shift']());}catch(_0x356098){_0x1f0d11['push'](_0x1f0d11['shift']());}}}(a188_0x1144,0x235e2));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
@@ -1 +1 @@
1
- const a190_0x53dffc=a190_0x35bc;(function(_0xe9bc93,_0xa038f8){const _0x42e137=a190_0x35bc,_0xa2943d=_0xe9bc93();while(!![]){try{const _0x2e8bb1=parseInt(_0x42e137(0x193))/0x1+parseInt(_0x42e137(0x190))/0x2+parseInt(_0x42e137(0x194))/0x3+parseInt(_0x42e137(0x1a0))/0x4*(parseInt(_0x42e137(0x19d))/0x5)+-parseInt(_0x42e137(0x199))/0x6*(parseInt(_0x42e137(0x192))/0x7)+parseInt(_0x42e137(0x1a1))/0x8*(-parseInt(_0x42e137(0x18e))/0x9)+-parseInt(_0x42e137(0x19e))/0xa;if(_0x2e8bb1===_0xa038f8)break;else _0xa2943d['push'](_0xa2943d['shift']());}catch(_0x44dbc8){_0xa2943d['push'](_0xa2943d['shift']());}}}(a190_0xa8b0,0x62e04));function a190_0xa8b0(){const _0x17ccf7=['read','str','isTerminal','task-id','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','266499DiMmLH','cookie','442370oCGnCI','apiError','2993207oGEGNy','670205bwiSyT','2134359hQQOnA','trim','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','status',',\x20received\x20','6MypXbj','flagMissing','taskId','appCode','4965PgiLZS','6136120xlriEI','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','204sVHYAI','56jWtoJK'];a190_0xa8b0=function(){return _0x17ccf7;};return a190_0xa8b0();}function a190_0x35bc(_0x1ac37e,_0x4187bd){_0x1ac37e=_0x1ac37e-0x18a;const _0xa8b0fe=a190_0xa8b0();let _0x35bcb7=_0xa8b0fe[_0x1ac37e];return _0x35bcb7;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const taskStatus={'service':'task','command':a190_0x53dffc(0x197),'description':a190_0x53dffc(0x196),'risk':a190_0x53dffc(0x1a2),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':a190_0x53dffc(0x18c),'type':'string','required':!![],'description':a190_0x53dffc(0x19f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1d8419){const _0x137faa=a190_0x53dffc;if(!_0x1d8419[_0x137faa(0x18a)](_0x137faa(0x18c))['trim']())throw CliErrors[_0x137faa(0x19a)](_0x137faa(0x18c));},async 'execute'(_0x12f1ab){const _0x43047a=a190_0x53dffc,_0x4aa98d=_0x12f1ab[_0x43047a(0x18a)](_0x43047a(0x18c))[_0x43047a(0x195)](),_0x337c50=normalizeAsyncTask(await getAsyncTaskStatus(_0x4aa98d,_0x12f1ab['appCode'],_0x12f1ab[_0x43047a(0x18f)]));if(_0x337c50[_0x43047a(0x19b)]!==_0x4aa98d)throw CliErrors[_0x43047a(0x191)](_0x43047a(0x18d)+_0x4aa98d+_0x43047a(0x198)+_0x337c50['taskId']+'.');const _0x1185c2=buildAsyncTaskStatusCommand(_0x337c50[_0x43047a(0x19b)],_0x12f1ab[_0x43047a(0x19c)]);return{'ok':!![],'message':asyncTaskMessage(_0x337c50),'data':{'appCode':_0x12f1ab[_0x43047a(0x19c)],..._0x337c50,'query':_0x337c50[_0x43047a(0x18b)]?null:{'command':_0x1185c2}}};}};
1
+ const a189_0x5b7695=a189_0xe8b1;function a189_0xe8b1(_0x48e8a0,_0x29994f){_0x48e8a0=_0x48e8a0-0x1c7;const _0x5aa5b0=a189_0x5aa5();let _0xe8b18c=_0x5aa5b0[_0x48e8a0];return _0xe8b18c;}(function(_0x1763ba,_0x49efc0){const _0x1bd8e8=a189_0xe8b1,_0x569a58=_0x1763ba();while(!![]){try{const _0x182bcb=parseInt(_0x1bd8e8(0x1cc))/0x1*(parseInt(_0x1bd8e8(0x1da))/0x2)+parseInt(_0x1bd8e8(0x1d4))/0x3+-parseInt(_0x1bd8e8(0x1dc))/0x4*(parseInt(_0x1bd8e8(0x1cb))/0x5)+parseInt(_0x1bd8e8(0x1e0))/0x6*(parseInt(_0x1bd8e8(0x1ca))/0x7)+-parseInt(_0x1bd8e8(0x1c7))/0x8*(-parseInt(_0x1bd8e8(0x1d8))/0x9)+-parseInt(_0x1bd8e8(0x1d1))/0xa*(-parseInt(_0x1bd8e8(0x1c8))/0xb)+-parseInt(_0x1bd8e8(0x1d9))/0xc;if(_0x182bcb===_0x49efc0)break;else _0x569a58['push'](_0x569a58['shift']());}catch(_0x269c61){_0x569a58['push'](_0x569a58['shift']());}}}(a189_0x5aa5,0x75349));function a189_0x5aa5(){const _0x5658b0=['10AJqwCU','task','apiError','692514jkqbUC','appCode','string','str','4923dUOgxc','15347676SrVVJW','130TNaPQU','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','4KHtyRC','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','flagMissing','taskId','6nnrILJ','9784xdepji','5436871txnsuE','isTerminal','3155719yukhtB','913505plbfpp','1490fMnBHd','task-id','read','status','compress'];a189_0x5aa5=function(){return _0x5658b0;};return a189_0x5aa5();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const taskStatus={'service':a189_0x5b7695(0x1d2),'command':a189_0x5b7695(0x1cf),'description':a189_0x5b7695(0x1db),'risk':a189_0x5b7695(0x1ce),'defaultOutputFormat':a189_0x5b7695(0x1d0),'structuredErrors':!![],'flags':[{'name':'task-id','type':a189_0x5b7695(0x1d6),'required':!![],'description':a189_0x5b7695(0x1dd)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x166672){const _0x58d731=a189_0x5b7695;if(!_0x166672['str'](_0x58d731(0x1cd))['trim']())throw CliErrors[_0x58d731(0x1de)]('task-id');},async 'execute'(_0x2e7ebe){const _0x57962f=a189_0x5b7695,_0x4ce44d=_0x2e7ebe[_0x57962f(0x1d7)](_0x57962f(0x1cd))['trim'](),_0x132142=normalizeAsyncTask(await getAsyncTaskStatus(_0x4ce44d,_0x2e7ebe[_0x57962f(0x1d5)],_0x2e7ebe['cookie']));if(_0x132142[_0x57962f(0x1df)]!==_0x4ce44d)throw CliErrors[_0x57962f(0x1d3)]('Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20'+_0x4ce44d+',\x20received\x20'+_0x132142['taskId']+'.');const _0x5cb713=buildAsyncTaskStatusCommand(_0x132142['taskId'],_0x2e7ebe[_0x57962f(0x1d5)]);return{'ok':!![],'message':asyncTaskMessage(_0x132142),'data':{'appCode':_0x2e7ebe[_0x57962f(0x1d5)],..._0x132142,'query':_0x132142[_0x57962f(0x1c9)]?null:{'command':_0x5cb713}}};}};
@@ -0,0 +1 @@
1
+ (function(_0x5693b7,_0x5cf5c4){const _0x53f864=a190_0x52ca,_0x165b5f=_0x5693b7();while(!![]){try{const _0x57bfa3=parseInt(_0x53f864(0x7e))/0x1*(parseInt(_0x53f864(0x7b))/0x2)+-parseInt(_0x53f864(0x81))/0x3+parseInt(_0x53f864(0x80))/0x4+-parseInt(_0x53f864(0x83))/0x5*(-parseInt(_0x53f864(0x85))/0x6)+-parseInt(_0x53f864(0x7d))/0x7*(parseInt(_0x53f864(0x7f))/0x8)+-parseInt(_0x53f864(0x84))/0x9+-parseInt(_0x53f864(0x7c))/0xa*(parseInt(_0x53f864(0x82))/0xb);if(_0x57bfa3===_0x5cf5c4)break;else _0x165b5f['push'](_0x165b5f['shift']());}catch(_0x2b8105){_0x165b5f['push'](_0x165b5f['shift']());}}}(a190_0x5100,0xc4e3b));function a190_0x52ca(_0x23a112,_0x5d47c0){_0x23a112=_0x23a112-0x7b;const _0x510097=a190_0x5100();let _0x52cac4=_0x510097[_0x23a112];return _0x52cac4;}import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];function a190_0x5100(){const _0xa3e518=['2emkFsf','10ooisoI','17311jCROqh','1060601gFbQIF','2456dwrwIA','5450920tdIjhK','2077809jcrxKt','14591533PLJfpg','15GwFjOD','2162502vzKAcl','2803446TwREfN'];a190_0x5100=function(){return _0xa3e518;};return a190_0x5100();}
@@ -0,0 +1 @@
1
+ const a191_0x433801=a191_0x41fe;(function(_0xd00f32,_0x5bd4e9){const _0x235c3e=a191_0x41fe,_0x50cbd9=_0xd00f32();while(!![]){try{const _0x5ee298=-parseInt(_0x235c3e(0xfb))/0x1*(parseInt(_0x235c3e(0xfc))/0x2)+parseInt(_0x235c3e(0x104))/0x3*(-parseInt(_0x235c3e(0xf3))/0x4)+parseInt(_0x235c3e(0xf8))/0x5+parseInt(_0x235c3e(0xf5))/0x6+parseInt(_0x235c3e(0xf2))/0x7*(parseInt(_0x235c3e(0xf4))/0x8)+parseInt(_0x235c3e(0x103))/0x9*(parseInt(_0x235c3e(0x101))/0xa)+-parseInt(_0x235c3e(0x105))/0xb;if(_0x5ee298===_0x5bd4e9)break;else _0x50cbd9['push'](_0x50cbd9['shift']());}catch(_0x75c226){_0x50cbd9['push'](_0x50cbd9['shift']());}}}(a191_0x4b2d,0xa510a));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';function a191_0x41fe(_0x18697f,_0xc8bd9f){_0x18697f=_0x18697f-0xee;const _0x4b2d2d=a191_0x4b2d();let _0x41feeb=_0x4b2d2d[_0x18697f];return _0x41feeb;}export const tenantMembersListDefinition={'service':a191_0x433801(0xfd),'command':a191_0x433801(0x102),'description':a191_0x433801(0xf6),'risk':a191_0x433801(0xff),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a191_0x433801(0xf9),'type':a191_0x433801(0xf1),'required':!![],'description':a191_0x433801(0xfe)}],async 'validate'(_0xaa6a54){const _0x1abc47=a191_0x433801;if(!_0xaa6a54[_0x1abc47(0xfa)](_0x1abc47(0xf9))[_0x1abc47(0xf0)]())throw CliErrors[_0x1abc47(0xf7)]('tenant-code',_0x1abc47(0x100));},async 'execute'(_0x6cd6b8){const _0x21e0c7=a191_0x433801,_0x799d5e=_0x6cd6b8[_0x21e0c7(0xfa)](_0x21e0c7(0xf9))[_0x21e0c7(0xf0)](),_0x2de7ba=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x799d5e,_0x2de7ba);const _0x37311a=projectTenantMembers(await listTenantDirectoryMembers(_0x799d5e));return{'ok':!![],'data':{'tenantCode':_0x799d5e,'items':_0x37311a,'totalCount':_0x37311a[_0x21e0c7(0xef)]},'message':'Found\x20'+_0x37311a[_0x21e0c7(0xef)]+_0x21e0c7(0xee)};}};function a191_0x4b2d(){const _0x1c18f2=['16yxYaAf','9542752CDRfBr','877566YCPkJS','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','flagMissing','5248015YyHfzP','tenant-code','str','271161ippNRP','2rFHwXB','tenant','Exact\x20tenant\x20code','read','Pass\x20--tenant-code\x20<code>.','3707690YtXVJQ','members-list','9oXomEJ','589257sOmFCO','11291874YjeAGe','\x20tenant\x20member(s)','length','trim','string','7ZrMTTd'];a191_0x4b2d=function(){return _0x1c18f2;};return a191_0x4b2d();}
@@ -0,0 +1 @@
1
+ function a192_0x34a0(_0x22cf3d,_0x17cf77){_0x22cf3d=_0x22cf3d-0xf9;const _0xae0096=a192_0xae00();let _0x34a0d3=_0xae0096[_0x22cf3d];return _0x34a0d3;}(function(_0xc35030,_0x1fd2ff){const _0x3af5dc=a192_0x34a0,_0x56163=_0xc35030();while(!![]){try{const _0x367566=-parseInt(_0x3af5dc(0x109))/0x1*(parseInt(_0x3af5dc(0x114))/0x2)+-parseInt(_0x3af5dc(0x10a))/0x3+-parseInt(_0x3af5dc(0x10b))/0x4*(-parseInt(_0x3af5dc(0x110))/0x5)+-parseInt(_0x3af5dc(0xfd))/0x6+parseInt(_0x3af5dc(0x101))/0x7*(parseInt(_0x3af5dc(0x115))/0x8)+-parseInt(_0x3af5dc(0x104))/0x9+parseInt(_0x3af5dc(0x111))/0xa*(parseInt(_0x3af5dc(0xf9))/0xb);if(_0x367566===_0x1fd2ff)break;else _0x56163['push'](_0x56163['shift']());}catch(_0x4d0704){_0x56163['push'](_0x56163['shift']());}}}(a192_0xae00,0x52904));import{CliErrors}from'../../errors.js';function textOrNull(_0x238604){const _0x40acff=a192_0x34a0,_0x4a80c6=_0x238604?.[_0x40acff(0x10d)]();return _0x4a80c6?_0x4a80c6:null;}function a192_0xae00(){const _0x2d102a=['validation','17603SSGcFb','477975kaymGn','1817012tkbltH','ADMIN','trim','userId','Tenant\x20\x22','5ZSJdzy','4127510lQvjCQ','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','role','50pLKMpy','89600xfiVeV','22WRWnio','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','tenantCode','username','2182260YOMctN','adminFlag','set','isFinite','56ADmlBk','sort','status','612585gaiCue','get','nickname','displayName'];a192_0xae00=function(){return _0x2d102a;};return a192_0xae00();}export function projectTenantMembers(_0x5e8ca6){const _0x2484e3=a192_0x34a0,_0x4cc51f=new Map();for(const _0xcdeee0 of _0x5e8ca6){const _0x21e019=Number(_0xcdeee0[_0x2484e3(0x10e)]);if(!Number[_0x2484e3(0x100)](_0x21e019)||_0x21e019<=0x0)continue;const _0x29c2bf={'userId':_0x21e019,'username':textOrNull(_0xcdeee0[_0x2484e3(0xfc)]),'displayName':textOrNull(_0xcdeee0[_0x2484e3(0x106)]),'role':_0xcdeee0[_0x2484e3(0xfe)]===!![]?_0x2484e3(0x10c):'MEMBER','status':textOrNull(_0xcdeee0[_0x2484e3(0x103)])},_0x491588=_0x4cc51f[_0x2484e3(0x105)](_0x21e019);if(!_0x491588){_0x4cc51f[_0x2484e3(0xff)](_0x21e019,_0x29c2bf);continue;}_0x491588['username']??=_0x29c2bf[_0x2484e3(0xfc)],_0x491588[_0x2484e3(0x107)]??=_0x29c2bf['displayName'],_0x491588[_0x2484e3(0x103)]??=_0x29c2bf[_0x2484e3(0x103)];if(_0x29c2bf['role']===_0x2484e3(0x10c))_0x491588[_0x2484e3(0x113)]=_0x2484e3(0x10c);}return[..._0x4cc51f['values']()][_0x2484e3(0x102)]((_0x335bf0,_0x5c7499)=>_0x335bf0['userId']-_0x5c7499['userId']);}export function assertTenantAccessible(_0x5a891b,_0x28189f){const _0x414308=a192_0x34a0;if(_0x28189f['some'](_0xa1e9a6=>_0xa1e9a6[_0x414308(0xfb)]===_0x5a891b))return;throw CliErrors[_0x414308(0x108)](_0x414308(0x10f)+_0x5a891b+_0x414308(0x112),_0x414308(0xfa));}
@@ -1 +1 @@
1
- const a191_0x202a0e=a191_0x3a58;function a191_0x1e78(){const _0x3dc8bc=['12bUVYea','1577562kXwEYe','40772720MZjmSE','1039287lMHOim','workspace\x20add','4430232xVrPvr','name','write','6420540gbxIeL','579186sOjawB','1456530lyzWCk','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','9XeUprq'];a191_0x1e78=function(){return _0x3dc8bc;};return a191_0x1e78();}function a191_0x3a58(_0x52d96b,_0x3547d7){_0x52d96b=_0x52d96b-0x158;const _0x1e78a6=a191_0x1e78();let _0x3a584a=_0x1e78a6[_0x52d96b];return _0x3a584a;}(function(_0x5137f8,_0x510467){const _0x3456b4=a191_0x3a58,_0x15e6af=_0x5137f8();while(!![]){try{const _0x4df1b8=-parseInt(_0x3456b4(0x15d))/0x1+parseInt(_0x3456b4(0x158))/0x2+-parseInt(_0x3456b4(0x15f))/0x3*(parseInt(_0x3456b4(0x15c))/0x4)+-parseInt(_0x3456b4(0x159))/0x5+-parseInt(_0x3456b4(0x161))/0x6+-parseInt(_0x3456b4(0x164))/0x7+parseInt(_0x3456b4(0x15e))/0x8*(parseInt(_0x3456b4(0x15b))/0x9);if(_0x4df1b8===_0x510467)break;else _0x15e6af['push'](_0x15e6af['shift']());}catch(_0x715bf){_0x15e6af['push'](_0x15e6af['shift']());}}}(a191_0x1e78,0xc8ca4));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':'workspace','command':'add','description':a191_0x202a0e(0x15a),'risk':a191_0x202a0e(0x163),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a191_0x202a0e(0x162),'description':'App\x20profile\x20name','required':!![]}],'flags':buildAppAddFlags(),'validate':_0x735d7c=>validateAppName(_0x735d7c,'workspace\x20add'),'execute':_0x26ba25=>runAppAdd(_0x26ba25,a191_0x202a0e(0x160))};
1
+ const a193_0x5d3b1f=a193_0xca26;(function(_0x5707b5,_0x223e4a){const _0x3c4a83=a193_0xca26,_0x27784d=_0x5707b5();while(!![]){try{const _0x26f26f=parseInt(_0x3c4a83(0xea))/0x1+-parseInt(_0x3c4a83(0xf1))/0x2+-parseInt(_0x3c4a83(0xed))/0x3+parseInt(_0x3c4a83(0xf4))/0x4*(parseInt(_0x3c4a83(0xef))/0x5)+parseInt(_0x3c4a83(0xec))/0x6+-parseInt(_0x3c4a83(0xf5))/0x7+-parseInt(_0x3c4a83(0xf3))/0x8;if(_0x26f26f===_0x223e4a)break;else _0x27784d['push'](_0x27784d['shift']());}catch(_0x2393af){_0x27784d['push'](_0x27784d['shift']());}}}(a193_0x5870,0x1b6d3));function a193_0xca26(_0x42cb92,_0x8e2f1c){_0x42cb92=_0x42cb92-0xea;const _0x587077=a193_0x5870();let _0xca26fa=_0x587077[_0x42cb92];return _0xca26fa;}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a193_0x5d3b1f(0xf0),'command':'add','description':a193_0x5d3b1f(0xee),'risk':a193_0x5d3b1f(0xf2),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a193_0x5d3b1f(0xf6),'description':'App\x20profile\x20name','required':!![]}],'flags':buildAppAddFlags(),'validate':_0x2854a0=>validateAppName(_0x2854a0,a193_0x5d3b1f(0xeb)),'execute':_0x292ddd=>runAppAdd(_0x292ddd,a193_0x5d3b1f(0xeb))};function a193_0x5870(){const _0x5c2d1b=['100329cMSugP','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','30JodYYJ','workspace','102808iFZRkf','write','366616PXTpJZ','82556IZGqgu','887726oMHlsc','name','39916jFkxyk','workspace\x20add','1236486sfPVCp'];a193_0x5870=function(){return _0x5c2d1b;};return a193_0x5870();}
@@ -1 +1 @@
1
- const a192_0x4a19db=a192_0x24f2;(function(_0x984031,_0x5734db){const _0x25c2e6=a192_0x24f2,_0x30c445=_0x984031();while(!![]){try{const _0x41e7e8=parseInt(_0x25c2e6(0xbc))/0x1*(parseInt(_0x25c2e6(0x98))/0x2)+-parseInt(_0x25c2e6(0x9d))/0x3+parseInt(_0x25c2e6(0xa3))/0x4*(-parseInt(_0x25c2e6(0x96))/0x5)+parseInt(_0x25c2e6(0xb4))/0x6*(parseInt(_0x25c2e6(0xa2))/0x7)+parseInt(_0x25c2e6(0x93))/0x8+parseInt(_0x25c2e6(0xaf))/0x9*(-parseInt(_0x25c2e6(0xbd))/0xa)+parseInt(_0x25c2e6(0xba))/0xb;if(_0x41e7e8===_0x5734db)break;else _0x30c445['push'](_0x30c445['shift']());}catch(_0x2ca798){_0x30c445['push'](_0x30c445['shift']());}}}(a192_0xc2bd,0xe4b7b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+'\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]',SAFE_PROFILE_KEYS=[a192_0x4a19db(0xb1),a192_0x4a19db(0xa5),a192_0x4a19db(0x95),a192_0x4a19db(0x8e),a192_0x4a19db(0xae),a192_0x4a19db(0x9f),a192_0x4a19db(0xb5)],workspaceFlags=[{'name':a192_0x4a19db(0xa6),'type':a192_0x4a19db(0x99),'description':a192_0x4a19db(0xa7)},{'name':a192_0x4a19db(0xb1),'type':a192_0x4a19db(0x99),'description':a192_0x4a19db(0x97)},{'name':a192_0x4a19db(0xa5),'type':a192_0x4a19db(0x99),'description':a192_0x4a19db(0x94),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':'string','description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'defaultFormat','type':a192_0x4a19db(0x99),'description':a192_0x4a19db(0xc6),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a192_0x4a19db(0xae),'type':a192_0x4a19db(0xa0),'description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'riskLevel','type':'string','description':a192_0x4a19db(0xb7),'enum':[...RISK_LEVEL_VALUES]},{'name':a192_0x4a19db(0xb5),'type':a192_0x4a19db(0x99),'description':a192_0x4a19db(0x90)}];function isRecord(_0x3847c0){const _0x69bfbe=a192_0x4a19db;return!!_0x3847c0&&typeof _0x3847c0==='object'&&!Array[_0x69bfbe(0x9e)](_0x3847c0);}function a192_0x24f2(_0x5e451c,_0x2e1abf){_0x5e451c=_0x5e451c-0x8e;const _0xc2bdb=a192_0xc2bd();let _0x24f243=_0xc2bdb[_0x5e451c];return _0x24f243;}function assertValidAppcode(_0x2e2247){const _0x54333b=a192_0x4a19db,{valid:_0x1133a9,message:_0x5927d3}=validateAppcode(_0x2e2247);if(!_0x1133a9)throw CliErrors[_0x54333b(0xac)]('Invalid\x20appcode:\x20'+_0x2e2247,_0x5927d3);}function sanitizeProfile(_0x44de46){if(!isRecord(_0x44de46))return{};const _0x51e0d4={};for(const _0x87120a of SAFE_PROFILE_KEYS){if(_0x44de46[_0x87120a]!==undefined)_0x51e0d4[_0x87120a]=_0x44de46[_0x87120a];}return _0x51e0d4;}function cloneProfile(_0x49db0a){return isRecord(_0x49db0a)?{..._0x49db0a}:{};}function collectWorkspaceProfileOverrides(_0x2b2fe6){const _0x3e8390=a192_0x4a19db,_0x2ecc2a={},_0x32a75a=_0x2b2fe6[_0x3e8390(0xbe)]('env'),_0x230640=_0x2b2fe6['str'](_0x3e8390(0x95)),_0x10227e=_0x2b2fe6[_0x3e8390(0xbe)](_0x3e8390(0xbf)),_0x38b5b8=_0x2b2fe6[_0x3e8390(0x91)]('pageSize'),_0xc93a1b=_0x2b2fe6['str'](_0x3e8390(0x9f)),_0x3435e9=_0x2b2fe6[_0x3e8390(0xbe)]('locale');if(_0x32a75a)_0x2ecc2a[_0x3e8390(0xa5)]=_0x32a75a;if(_0x230640)_0x2ecc2a['apiDir']=_0x230640;if(_0x10227e)_0x2ecc2a['format']=_0x10227e;if(_0x38b5b8!==undefined&&_0x38b5b8!=='')_0x2ecc2a[_0x3e8390(0xae)]=Number(_0x38b5b8);if(_0xc93a1b)_0x2ecc2a[_0x3e8390(0x9f)]=_0xc93a1b;if(_0x3435e9)_0x2ecc2a[_0x3e8390(0xb5)]=_0x3435e9;return _0x2ecc2a;}async function validateWorkspaceArgs(_0x4bb04b){const _0x123883=a192_0x4a19db,_0x169d84=_0x4bb04b[_0x123883(0xbe)]('app')[_0x123883(0xc5)](),_0x12fa11=_0x4bb04b[_0x123883(0xbe)](_0x123883(0xb1))['trim']();if(!_0x169d84&&!_0x12fa11)throw CliErrors[_0x123883(0xac)](_0x123883(0x9b),'Use\x20`'+CLI_BIN_NAME+_0x123883(0x9c)+CLI_BIN_NAME+_0x123883(0xa4));if(_0x12fa11)assertValidAppcode(_0x12fa11);}function a192_0xc2bd(){const _0x25fa8f=['keys','\x20--appcode\x20<code>`.','use','trim','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','format','write','Locale\x20for\x20this\x20workspace\x20app\x20profile','flag','\x20workspace\x20','11953728IbPwAt','Target\x20environment','apiDir','7008740IjjzBA','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','4076PITmJo','string',').\x20Config:\x20','Missing\x20workspace\x20app\x20selector.','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','3252219SJEwrc','isArray','riskLevel','number','updated','33572yABQih','4JGVsVg','\x20workspace\x20use\x20--app\x20<name>`.','env','app','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','workspace','\x22\x20not\x20found.','apps','length','validation','Use\x20`','pageSize','432yPOJfq','workspace.','appcode','globalConfig','\x20(appcode:\x20','726wzsJhf','locale','App\x20\x22','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','Switch\x20the\x20current\x20workspace\x20app\x20binding','init','5225594kZcpYa','defaultApp','881lkDGtK','192170cVWzKi','str','defaultFormat','Initialize\x20the\x20current\x20workspace\x20app\x20binding','Workspace\x20'];a192_0xc2bd=function(){return _0x25fa8f;};return a192_0xc2bd();}function resolveKnownApps(){const _0x5e3165=a192_0x4a19db,{config:_0x36196c,layers:_0x514dd3}=readRawConfigWithLayers(),_0x450df7=isRecord(_0x36196c[_0x5e3165(0xaa)])?_0x36196c[_0x5e3165(0xaa)]:{},_0x1fc2f4=isRecord(_0x514dd3[_0x5e3165(0xb2)][_0x5e3165(0xaa)])?_0x514dd3[_0x5e3165(0xb2)][_0x5e3165(0xaa)]:{};return{..._0x1fc2f4,..._0x450df7};}async function configureWorkspace(_0x11ee0b,_0x17cc5b){const _0x311587=a192_0x4a19db,_0x783a99=_0x11ee0b[_0x311587(0xbe)]('app')[_0x311587(0xc5)](),_0x5eafa7=_0x11ee0b[_0x311587(0xbe)](_0x311587(0xb1))['trim'](),_0x14aec4=_0x783a99||_0x5eafa7;if(!_0x14aec4)throw CliErrors[_0x311587(0xac)]('Missing\x20workspace\x20app\x20selector.',_0x311587(0xad)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x5eafa7)assertValidAppcode(_0x5eafa7);const _0x3c6fcd=resolveWriteConfigPath('project'),_0x277b2c=readConfigFile(_0x3c6fcd),_0x327ada=resolveKnownApps(),_0x585e73=isRecord(_0x277b2c[_0x311587(0xaa)])?{..._0x277b2c[_0x311587(0xaa)]}:{},_0x84c149=cloneProfile(_0x585e73[_0x14aec4]),_0x7dda47=sanitizeProfile(_0x327ada[_0x14aec4]),_0x3d69b5=_0x5eafa7?{}:_0x7dda47,_0x43c050=_0x5eafa7||_0x3d69b5[_0x311587(0xb1)];if(!_0x43c050){const _0xc364ca=Object[_0x311587(0xc2)](_0x327ada),_0x3db5ab=_0xc364ca[_0x311587(0xab)]===0x0?_0x311587(0xad)+CLI_BIN_NAME+_0x311587(0x92)+_0x17cc5b+'\x20--app\x20'+_0x14aec4+_0x311587(0xc3):'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0xc364ca['join'](',\x20');throw CliErrors[_0x311587(0xac)](_0x311587(0xb6)+_0x14aec4+_0x311587(0xa9),_0x3db5ab);}assertValidAppcode(String(_0x43c050));const _0x5597de={..._0x3d69b5,..._0x84c149,'appcode':String(_0x43c050),...collectWorkspaceProfileOverrides(_0x11ee0b)};return _0x585e73[_0x14aec4]=_0x5597de,_0x277b2c[_0x311587(0xaa)]=_0x585e73,_0x277b2c[_0x311587(0xbb)]=_0x14aec4,delete _0x277b2c[_0x311587(0xb1)],delete _0x277b2c[_0x311587(0xa6)],_0x5597de[_0x311587(0xa5)]&&(_0x277b2c[_0x311587(0xa5)]=_0x5597de['env']),writeConfigFile(_0x3c6fcd,_0x277b2c),{'ok':!![],'message':_0x311587(0xc1)+(_0x17cc5b==='init'?'initialized':_0x311587(0xa1))+':\x20'+_0x14aec4+_0x311587(0xb3)+_0x5597de[_0x311587(0xb1)]+_0x311587(0x9a)+_0x3c6fcd+'.\x20Credentials:\x20not\x20written.','data':{'operation':_0x311587(0xb0)+_0x17cc5b,'configPath':_0x3c6fcd,'app':_0x14aec4,'appcode':_0x5597de[_0x311587(0xb1)],'env':_0x5597de[_0x311587(0xa5)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a192_0x4a19db(0xa8),'command':a192_0x4a19db(0xb9),'description':a192_0x4a19db(0xc0),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0xb2c100=>configureWorkspace(_0xb2c100,'init')},workspaceUseDefinition={'service':a192_0x4a19db(0xa8),'command':'use','description':a192_0x4a19db(0xb8),'risk':a192_0x4a19db(0x8f),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x5bb683=>configureWorkspace(_0x5bb683,a192_0x4a19db(0xc4))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a194_0x576554=a194_0x6d56;(function(_0x33c923,_0x36f0b3){const _0x143b70=a194_0x6d56,_0x408d55=_0x33c923();while(!![]){try{const _0x2fcdcb=parseInt(_0x143b70(0x13f))/0x1+parseInt(_0x143b70(0x13e))/0x2*(-parseInt(_0x143b70(0x14c))/0x3)+parseInt(_0x143b70(0x138))/0x4*(-parseInt(_0x143b70(0x12f))/0x5)+-parseInt(_0x143b70(0x119))/0x6*(-parseInt(_0x143b70(0x120))/0x7)+-parseInt(_0x143b70(0x124))/0x8+-parseInt(_0x143b70(0x11a))/0x9*(-parseInt(_0x143b70(0x123))/0xa)+-parseInt(_0x143b70(0x127))/0xb*(parseInt(_0x143b70(0x130))/0xc);if(_0x2fcdcb===_0x36f0b3)break;else _0x408d55['push'](_0x408d55['shift']());}catch(_0x3bb26b){_0x408d55['push'](_0x408d55['shift']());}}}(a194_0x1823,0x80d2d));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';function a194_0x1823(){const _0x293f19=['5TPNrNI','12qSiwZK','app','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','validation','init','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','App\x20\x22','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','385516YdGBrp','Workspace\x20','\x20workspace\x20use\x20--app\x20<name>`.','string','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','flag','20dVOpBm','35310XAnxAD','str','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','Switch\x20the\x20current\x20workspace\x20app\x20binding','write','pageSize','appcode','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','\x20workspace\x20','workspace.','Locale\x20for\x20this\x20workspace\x20app\x20profile','length','apps','146037GFMtwS','format','trim','riskLevel','\x20(appcode:\x20',').\x20Config:\x20','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','5158884lgeeLH','9haatvn','Invalid\x20appcode:\x20','number','project','updated','object','7cdMEiw','\x22\x20not\x20found.','use','9654050HfuiQH','3360000cfUkEM','workspace','Missing\x20workspace\x20app\x20selector.','3626689cLTCss','env','Use\x20`','Initialize\x20the\x20current\x20workspace\x20app\x20binding','apiDir','\x20--appcode\x20<code>`.','Target\x20environment','locale'];a194_0x1823=function(){return _0x293f19;};return a194_0x1823();}import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a194_0x576554(0x146),SAFE_PROFILE_KEYS=['appcode',a194_0x576554(0x128),a194_0x576554(0x12b),a194_0x576554(0x14d),'pageSize',a194_0x576554(0x14f),a194_0x576554(0x12e)],workspaceFlags=[{'name':a194_0x576554(0x131),'type':a194_0x576554(0x13b),'description':a194_0x576554(0x137)},{'name':'appcode','type':a194_0x576554(0x13b),'description':a194_0x576554(0x13c)},{'name':a194_0x576554(0x128),'type':a194_0x576554(0x13b),'description':a194_0x576554(0x12d),'enum':[...RABETBASE_ENV_VALUES]},{'name':a194_0x576554(0x12b),'type':a194_0x576554(0x13b),'description':a194_0x576554(0x152)},{'name':'defaultFormat','type':a194_0x576554(0x13b),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a194_0x576554(0x144),'type':a194_0x576554(0x11c),'description':a194_0x576554(0x135)},{'name':'riskLevel','type':a194_0x576554(0x13b),'description':a194_0x576554(0x132),'enum':[...RISK_LEVEL_VALUES]},{'name':a194_0x576554(0x12e),'type':a194_0x576554(0x13b),'description':a194_0x576554(0x149)}];function isRecord(_0x302068){const _0x10cb5d=a194_0x576554;return!!_0x302068&&typeof _0x302068===_0x10cb5d(0x11f)&&!Array['isArray'](_0x302068);}function assertValidAppcode(_0x4b8067){const _0x2aea8a=a194_0x576554,{valid:_0x376ec2,message:_0x39b2d7}=validateAppcode(_0x4b8067);if(!_0x376ec2)throw CliErrors['validation'](_0x2aea8a(0x11b)+_0x4b8067,_0x39b2d7);}function sanitizeProfile(_0x3f3de0){if(!isRecord(_0x3f3de0))return{};const _0x5c19c9={};for(const _0x51a99c of SAFE_PROFILE_KEYS){if(_0x3f3de0[_0x51a99c]!==undefined)_0x5c19c9[_0x51a99c]=_0x3f3de0[_0x51a99c];}return _0x5c19c9;}function cloneProfile(_0x33988e){return isRecord(_0x33988e)?{..._0x33988e}:{};}function collectWorkspaceProfileOverrides(_0xdb3429){const _0x1f3f48=a194_0x576554,_0x5890cb={},_0x364a7a=_0xdb3429[_0x1f3f48(0x140)](_0x1f3f48(0x128)),_0x3a6eb8=_0xdb3429[_0x1f3f48(0x140)](_0x1f3f48(0x12b)),_0x490d23=_0xdb3429[_0x1f3f48(0x140)]('defaultFormat'),_0x172f06=_0xdb3429[_0x1f3f48(0x13d)]('pageSize'),_0x4d8c9c=_0xdb3429[_0x1f3f48(0x140)]('riskLevel'),_0x563f60=_0xdb3429['str'](_0x1f3f48(0x12e));if(_0x364a7a)_0x5890cb[_0x1f3f48(0x128)]=_0x364a7a;if(_0x3a6eb8)_0x5890cb[_0x1f3f48(0x12b)]=_0x3a6eb8;if(_0x490d23)_0x5890cb[_0x1f3f48(0x14d)]=_0x490d23;if(_0x172f06!==undefined&&_0x172f06!=='')_0x5890cb[_0x1f3f48(0x144)]=Number(_0x172f06);if(_0x4d8c9c)_0x5890cb[_0x1f3f48(0x14f)]=_0x4d8c9c;if(_0x563f60)_0x5890cb[_0x1f3f48(0x12e)]=_0x563f60;return _0x5890cb;}function a194_0x6d56(_0x2b565f,_0x33898f){_0x2b565f=_0x2b565f-0x119;const _0x18234f=a194_0x1823();let _0x6d5606=_0x18234f[_0x2b565f];return _0x6d5606;}async function validateWorkspaceArgs(_0x3d39c7){const _0x2f76c9=a194_0x576554,_0x32d15f=_0x3d39c7[_0x2f76c9(0x140)](_0x2f76c9(0x131))['trim'](),_0x320ba0=_0x3d39c7[_0x2f76c9(0x140)](_0x2f76c9(0x145))[_0x2f76c9(0x14e)]();if(!_0x32d15f&&!_0x320ba0)throw CliErrors['validation'](_0x2f76c9(0x126),_0x2f76c9(0x129)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x2f76c9(0x13a));if(_0x320ba0)assertValidAppcode(_0x320ba0);}function resolveKnownApps(){const _0x413ede=a194_0x576554,{config:_0x4c239f,layers:_0x4c8522}=readRawConfigWithLayers(),_0x17eb69=isRecord(_0x4c239f[_0x413ede(0x14b)])?_0x4c239f[_0x413ede(0x14b)]:{},_0x36330f=isRecord(_0x4c8522['globalConfig'][_0x413ede(0x14b)])?_0x4c8522['globalConfig'][_0x413ede(0x14b)]:{};return{..._0x36330f,..._0x17eb69};}async function configureWorkspace(_0x5194ca,_0x1c8599){const _0x385c67=a194_0x576554,_0x34c8fc=_0x5194ca[_0x385c67(0x140)](_0x385c67(0x131))[_0x385c67(0x14e)](),_0x797e15=_0x5194ca[_0x385c67(0x140)]('appcode')[_0x385c67(0x14e)](),_0x392cbf=_0x34c8fc||_0x797e15;if(!_0x392cbf)throw CliErrors[_0x385c67(0x133)](_0x385c67(0x126),_0x385c67(0x129)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x385c67(0x13a));if(_0x797e15)assertValidAppcode(_0x797e15);const _0x5136e0=resolveWriteConfigPath(_0x385c67(0x11d)),_0x5d641f=readConfigFile(_0x5136e0),_0x388131=resolveKnownApps(),_0x36e167=isRecord(_0x5d641f[_0x385c67(0x14b)])?{..._0x5d641f[_0x385c67(0x14b)]}:{},_0x2e09cb=cloneProfile(_0x36e167[_0x392cbf]),_0x12fb71=sanitizeProfile(_0x388131[_0x392cbf]),_0x467798=_0x797e15?{}:_0x12fb71,_0xe20ce2=_0x797e15||_0x467798[_0x385c67(0x145)];if(!_0xe20ce2){const _0x585347=Object['keys'](_0x388131),_0x148c21=_0x585347[_0x385c67(0x14a)]===0x0?_0x385c67(0x129)+CLI_BIN_NAME+_0x385c67(0x147)+_0x1c8599+'\x20--app\x20'+_0x392cbf+_0x385c67(0x12c):_0x385c67(0x141)+_0x585347['join'](',\x20');throw CliErrors[_0x385c67(0x133)](_0x385c67(0x136)+_0x392cbf+_0x385c67(0x121),_0x148c21);}assertValidAppcode(String(_0xe20ce2));const _0x13b3b8={..._0x467798,..._0x2e09cb,'appcode':String(_0xe20ce2),...collectWorkspaceProfileOverrides(_0x5194ca)};return _0x36e167[_0x392cbf]=_0x13b3b8,_0x5d641f[_0x385c67(0x14b)]=_0x36e167,_0x5d641f['defaultApp']=_0x392cbf,delete _0x5d641f['appcode'],delete _0x5d641f[_0x385c67(0x131)],_0x13b3b8['env']&&(_0x5d641f[_0x385c67(0x128)]=_0x13b3b8['env']),writeConfigFile(_0x5136e0,_0x5d641f),{'ok':!![],'message':_0x385c67(0x139)+(_0x1c8599===_0x385c67(0x134)?'initialized':_0x385c67(0x11e))+':\x20'+_0x392cbf+_0x385c67(0x150)+_0x13b3b8['appcode']+_0x385c67(0x151)+_0x5136e0+'.\x20Credentials:\x20not\x20written.','data':{'operation':_0x385c67(0x148)+_0x1c8599,'configPath':_0x5136e0,'app':_0x392cbf,'appcode':_0x13b3b8[_0x385c67(0x145)],'env':_0x13b3b8[_0x385c67(0x128)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a194_0x576554(0x125),'command':a194_0x576554(0x134),'description':a194_0x576554(0x12a),'risk':a194_0x576554(0x143),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x2b73e2=>configureWorkspace(_0x2b73e2,a194_0x576554(0x134))},workspaceUseDefinition={'service':a194_0x576554(0x125),'command':a194_0x576554(0x122),'description':a194_0x576554(0x142),'risk':a194_0x576554(0x143),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x25ce11=>configureWorkspace(_0x25ce11,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a193_0x35d15d=a193_0x1fe8;function a193_0x209b(){const _0x44860b=['305418tQGOhk','208019dFIRQl','280FqwKUO','name','301108OzBCFa','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','workspace\x20remove','3EZiIhV','1363150IllQjv','2876292QKkdVq','workspace','11742039ifeSPr','remove','145OvogLH','43755950ZVoghF'];a193_0x209b=function(){return _0x44860b;};return a193_0x209b();}(function(_0x1b7ffa,_0x1bd61b){const _0x67ca70=a193_0x1fe8,_0x21a3ed=_0x1b7ffa();while(!![]){try{const _0x3b26f1=-parseInt(_0x67ca70(0x14a))/0x1+-parseInt(_0x67ca70(0x14b))/0x2+-parseInt(_0x67ca70(0x149))/0x3*(-parseInt(_0x67ca70(0x146))/0x4)+-parseInt(_0x67ca70(0x14f))/0x5*(-parseInt(_0x67ca70(0x151))/0x6)+-parseInt(_0x67ca70(0x143))/0x7*(parseInt(_0x67ca70(0x144))/0x8)+-parseInt(_0x67ca70(0x14d))/0x9+parseInt(_0x67ca70(0x150))/0xa;if(_0x3b26f1===_0x1bd61b)break;else _0x21a3ed['push'](_0x21a3ed['shift']());}catch(_0x314a38){_0x21a3ed['push'](_0x21a3ed['shift']());}}}(a193_0x209b,0xbeac5));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a193_0x1fe8(_0x41d6d1,_0x5c26fd){_0x41d6d1=_0x41d6d1-0x143;const _0x209b14=a193_0x209b();let _0x1fe8e5=_0x209b14[_0x41d6d1];return _0x1fe8e5;}export const workspaceRemoveDefinition={'service':a193_0x35d15d(0x14c),'command':a193_0x35d15d(0x14e),'description':a193_0x35d15d(0x147),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a193_0x35d15d(0x145),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x393af3=>validateAppName(_0x393af3,'workspace\x20remove'),'execute':_0x2ca895=>runAppRemove(_0x2ca895,a193_0x35d15d(0x148))};
1
+ const a195_0x25405c=a195_0x411c;(function(_0x74ad68,_0x10c892){const _0x1c0304=a195_0x411c,_0x360f91=_0x74ad68();while(!![]){try{const _0x38ac90=-parseInt(_0x1c0304(0x135))/0x1*(-parseInt(_0x1c0304(0x136))/0x2)+-parseInt(_0x1c0304(0x132))/0x3+-parseInt(_0x1c0304(0x12c))/0x4+parseInt(_0x1c0304(0x12a))/0x5*(-parseInt(_0x1c0304(0x12f))/0x6)+-parseInt(_0x1c0304(0x134))/0x7+parseInt(_0x1c0304(0x137))/0x8*(parseInt(_0x1c0304(0x13a))/0x9)+-parseInt(_0x1c0304(0x12b))/0xa*(-parseInt(_0x1c0304(0x139))/0xb);if(_0x38ac90===_0x10c892)break;else _0x360f91['push'](_0x360f91['shift']());}catch(_0x4d736d){_0x360f91['push'](_0x360f91['shift']());}}}(a195_0x3dd0,0xc8e45));function a195_0x411c(_0x1a80d7,_0x2b62ae){_0x1a80d7=_0x1a80d7-0x12a;const _0x3dd086=a195_0x3dd0();let _0x411c35=_0x3dd086[_0x1a80d7];return _0x411c35;}function a195_0x3dd0(){const _0x2b3997=['3385636rpMTLf','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','workspace','54QETcBy','remove','App\x20profile\x20name\x20to\x20remove','1351776sDEbMy','name','2773029UbnTFr','1yDruiI','728332MSfqis','8mBTQsI','high-risk-write','10556117nREKWh','11027529qYxQSN','workspace\x20remove','18385qffgTZ','10WDTFpA'];a195_0x3dd0=function(){return _0x2b3997;};return a195_0x3dd0();}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a195_0x25405c(0x12e),'command':a195_0x25405c(0x130),'description':a195_0x25405c(0x12d),'risk':a195_0x25405c(0x138),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a195_0x25405c(0x133),'description':a195_0x25405c(0x131),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x947597=>validateAppName(_0x947597,'workspace\x20remove'),'execute':_0x3400ef=>runAppRemove(_0x3400ef,a195_0x25405c(0x13b))};
@@ -1 +1 @@
1
- const a194_0x5db17b=a194_0x37ab;(function(_0x2b4c2b,_0x390623){const _0x73ecac=a194_0x37ab,_0x40119d=_0x2b4c2b();while(!![]){try{const _0x328014=parseInt(_0x73ecac(0x1d6))/0x1*(parseInt(_0x73ecac(0x1e5))/0x2)+-parseInt(_0x73ecac(0x1f0))/0x3*(-parseInt(_0x73ecac(0x1d5))/0x4)+parseInt(_0x73ecac(0x1ef))/0x5*(parseInt(_0x73ecac(0x1c9))/0x6)+parseInt(_0x73ecac(0x1ea))/0x7+parseInt(_0x73ecac(0x1d8))/0x8*(parseInt(_0x73ecac(0x1e3))/0x9)+parseInt(_0x73ecac(0x1de))/0xa+parseInt(_0x73ecac(0x1e1))/0xb*(-parseInt(_0x73ecac(0x1ed))/0xc);if(_0x328014===_0x390623)break;else _0x40119d['push'](_0x40119d['shift']());}catch(_0x493c65){_0x40119d['push'](_0x40119d['shift']());}}}(a194_0x522b,0x35f2f));function a194_0x522b(){const _0x409b0d=['entries','9rgPsVV','filter','346YdRfgk','join','defaultFormat','inherit','apps','885374aMxElH','Auth\x20cookie','accessKey','2064pydcgx','locale','15cWZlpE','396PlRQdP','Default\x20page\x20size','env','cookie','660798GdRaaA','number','trim','format','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','keys','apiDir','Access\x20key','riskLevel','app','pageSize','defaultApp','1464uFVrpd','1322wOXfxd','zh-CN','481672nHaDBF','has','toLowerCase','appcode','length','API\x20directory\x20path','2361270ptEFrt','en-US','string','51755hFAJVm'];a194_0x522b=function(){return _0x409b0d;};return a194_0x522b();}function a194_0x37ab(_0x4cd520,_0x244a53){_0x4cd520=_0x4cd520-0x1c9;const _0x522bed=a194_0x522b();let _0x37ab8e=_0x522bed[_0x4cd520];return _0x37ab8e;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a194_0x5db17b(0x1ec),a194_0x5db17b(0x1ee),a194_0x5db17b(0x1cc),a194_0x5db17b(0x1d1)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode',a194_0x5db17b(0x1f2),a194_0x5db17b(0x1ee),'format',a194_0x5db17b(0x1f3),'accessKey','apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x37e051){const _0x396197=a194_0x5db17b;return[..._0x37e051][_0x396197(0x1e6)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0xaade22){const _0x5bf3cc=a194_0x5db17b;return TOP_LEVEL_CONFIG_KEYS[_0x5bf3cc(0x1d9)](_0xaade22);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a194_0x5db17b(0x1f2),'apiDir':a194_0x5db17b(0x1cf),'cookie':a194_0x5db17b(0x1f3),'accessKey':a194_0x5db17b(0x1ec),'defaultFormat':a194_0x5db17b(0x1cc),'pageSize':a194_0x5db17b(0x1d3),'riskLevel':a194_0x5db17b(0x1d1),'locale':a194_0x5db17b(0x1ee)};export function getAppProfileFlagDefs(){const _0x134194=a194_0x5db17b;return[{'name':_0x134194(0x1f2),'type':'string','description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':_0x134194(0x1e0),'description':_0x134194(0x1dd)},{'name':_0x134194(0x1f3),'type':'string','description':_0x134194(0x1eb),'hidden':!![]},{'name':_0x134194(0x1ec),'type':_0x134194(0x1e0),'description':_0x134194(0x1d0),'hidden':!![]},{'name':_0x134194(0x1e7),'type':_0x134194(0x1e0),'description':_0x134194(0x1cd),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x134194(0x1d3),'type':_0x134194(0x1ca),'description':_0x134194(0x1f1)},{'name':_0x134194(0x1d1),'type':_0x134194(0x1e0),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x134194(0x1ee),'type':_0x134194(0x1e0),'description':'Locale'}];}export function collectAppProfileOverrides(_0x194664){const _0x7c9b84=a194_0x5db17b,_0x4a804b={};for(const [_0x1aad82,_0x2052b4]of Object[_0x7c9b84(0x1e2)](APP_PROFILE_FLAG_KEY_MAP)){const _0x520f27=_0x194664(_0x1aad82);if(!_0x520f27)continue;_0x4a804b[_0x2052b4]=_0x2052b4==='pageSize'?Number(_0x520f27):_0x520f27;}return _0x4a804b;}export function buildAppProfileListFields(_0x473178){const _0x52d05d=a194_0x5db17b;return{'env':_0x473178['env']??null,'apiDir':_0x473178[_0x52d05d(0x1cf)]??null,'hasCookie':!!_0x473178[_0x52d05d(0x1f3)],'hasAccessKey':!!_0x473178['accessKey'],'format':_0x473178[_0x52d05d(0x1cc)]??null,'pageSize':_0x473178['pageSize']??null,'riskLevel':_0x473178[_0x52d05d(0x1d1)]??null,'locale':_0x473178[_0x52d05d(0x1ee)]??null};}export function buildAppDoctorFields(_0x55dd45,_0x861df5){const _0x4d2016=a194_0x5db17b;return{'env':{'value':_0x55dd45[_0x4d2016(0x1f2)]||_0x861df5[_0x4d2016(0x1f2)],'source':_0x55dd45[_0x4d2016(0x1f2)]?'app':_0x4d2016(0x1e8)},'apiDir':{'value':_0x55dd45[_0x4d2016(0x1cf)]||_0x861df5[_0x4d2016(0x1cf)],'source':_0x55dd45[_0x4d2016(0x1cf)]?'app':_0x4d2016(0x1e8)},'cookie':{'value':_0x55dd45['cookie']||_0x861df5[_0x4d2016(0x1f3)],'source':_0x55dd45[_0x4d2016(0x1f3)]?_0x4d2016(0x1d2):_0x4d2016(0x1e8)},'accessKey':{'value':_0x55dd45[_0x4d2016(0x1ec)]||_0x861df5[_0x4d2016(0x1ec)],'source':_0x55dd45['accessKey']?_0x4d2016(0x1d2):_0x4d2016(0x1e8)}};}export function buildCanonicalAppConfig(_0x43bbd2,_0x449131){const _0x450e61=a194_0x5db17b,_0x36316c=_0x43bbd2['map'](_0x5d3b19=>String(_0x5d3b19||'')[_0x450e61(0x1cb)]())[_0x450e61(0x1e4)](Boolean);if(_0x36316c['length']===0x0)return{};const _0x21e3a6={};for(const _0x3ba578 of _0x36316c){_0x21e3a6[_0x3ba578]=_0x449131?{'appcode':_0x3ba578,'env':_0x449131}:{'appcode':_0x3ba578};}return{'apps':_0x21e3a6,'defaultApp':_0x36316c[0x0]};}export function buildCanonicalProjectConfig(_0x39f85f,_0x58b975){const _0x55d4e1=a194_0x5db17b,{appCodes:appCodes=[],env:_0xf7b8e7,metadata:_0xa9b2a2}=_0x58b975,_0x340f20={..._0x39f85f,..._0xa9b2a2||{}};delete _0x340f20[_0x55d4e1(0x1db)],delete _0x340f20[_0x55d4e1(0x1d2)];if(_0xf7b8e7)_0x340f20[_0x55d4e1(0x1f2)]=_0xf7b8e7;else!_0x340f20['env']&&(_0x340f20[_0x55d4e1(0x1f2)]=DEFAULT_CONFIG_VALUES[_0x55d4e1(0x1f2)]);const _0x1f9f93=buildCanonicalAppConfig(appCodes,_0x340f20[_0x55d4e1(0x1f2)]);return Object[_0x55d4e1(0x1ce)](_0x1f9f93)[_0x55d4e1(0x1dc)]>0x0&&(_0x340f20[_0x55d4e1(0x1e9)]=_0x1f9f93['apps'],_0x340f20[_0x55d4e1(0x1d4)]=_0x1f9f93[_0x55d4e1(0x1d4)]),_0x340f20;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':'zh-CN','zh_cn':a194_0x5db17b(0x1d7),'en':'en-US','en-us':a194_0x5db17b(0x1df),'en_us':a194_0x5db17b(0x1df)};export function normalizeLocale(_0x13bf9f){const _0x4dedac=a194_0x5db17b;if(!_0x13bf9f)return null;return LOCALE_MAP[_0x13bf9f[_0x4dedac(0x1da)]()]??null;}
1
+ const a196_0x2a6fce=a196_0x1351;(function(_0x751679,_0x54c26b){const _0xe94155=a196_0x1351,_0x140133=_0x751679();while(!![]){try{const _0x1a33d1=parseInt(_0xe94155(0x197))/0x1+-parseInt(_0xe94155(0x198))/0x2*(-parseInt(_0xe94155(0x194))/0x3)+-parseInt(_0xe94155(0x19b))/0x4+-parseInt(_0xe94155(0x1a4))/0x5+-parseInt(_0xe94155(0x196))/0x6+parseInt(_0xe94155(0x1a3))/0x7+-parseInt(_0xe94155(0x19c))/0x8*(-parseInt(_0xe94155(0x187))/0x9);if(_0x1a33d1===_0x54c26b)break;else _0x140133['push'](_0x140133['shift']());}catch(_0x2a64ad){_0x140133['push'](_0x140133['shift']());}}}(a196_0x404b,0xde53f));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a196_0x2a6fce(0x186),'accessKey',a196_0x2a6fce(0x19d),a196_0x2a6fce(0x18b),'riskLevel'];function a196_0x404b(){const _0x56c322=['API\x20directory\x20path','3475828aEQpqm','8BPZvEw','locale','en-US','Locale','env','number','entries','766262IlDSHN','5873400PTKrMt','Access\x20key','pageSize','apiDir','inherit','defaultFormat','zh-CN','accessKey','trim','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','cookie','13017177VkFOEP','length','appcode','defaultApp','format','join','Config\x20key\x20(','toLowerCase','string','Target\x20environment','map','Auth\x20cookie','app','7419LKKwzO','Risk\x20level','5027934yEPVKe','1304141jLyJAj','754bcgzvO','apps'];a196_0x404b=function(){return _0x56c322;};return a196_0x404b();}export const TOP_LEVEL_CONFIG_KEYS=new Set([a196_0x2a6fce(0x189),a196_0x2a6fce(0x1a0),a196_0x2a6fce(0x19d),a196_0x2a6fce(0x18b),a196_0x2a6fce(0x186),'accessKey',a196_0x2a6fce(0x17f)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x32748a){const _0x507e71=a196_0x2a6fce;return[..._0x32748a][_0x507e71(0x18c)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}function a196_0x1351(_0xdd59cd,_0x26c64a){_0xdd59cd=_0xdd59cd-0x17f;const _0x404b82=a196_0x404b();let _0x1351f5=_0x404b82[_0xdd59cd];return _0x1351f5;}export function isTopLevelConfigKey(_0x27d87d){return TOP_LEVEL_CONFIG_KEYS['has'](_0x27d87d);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x43af3e=a196_0x2a6fce;return _0x43af3e(0x18d)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a196_0x2a6fce(0x17f),'cookie':a196_0x2a6fce(0x186),'accessKey':'accessKey','defaultFormat':'format','pageSize':'pageSize','riskLevel':'riskLevel','locale':'locale'};export function getAppProfileFlagDefs(){const _0x44f0a2=a196_0x2a6fce;return[{'name':_0x44f0a2(0x1a0),'type':_0x44f0a2(0x18f),'description':_0x44f0a2(0x190),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x44f0a2(0x17f),'type':_0x44f0a2(0x18f),'description':_0x44f0a2(0x19a)},{'name':_0x44f0a2(0x186),'type':_0x44f0a2(0x18f),'description':_0x44f0a2(0x192),'hidden':!![]},{'name':_0x44f0a2(0x183),'type':_0x44f0a2(0x18f),'description':_0x44f0a2(0x1a5),'hidden':!![]},{'name':_0x44f0a2(0x181),'type':_0x44f0a2(0x18f),'description':_0x44f0a2(0x185),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x44f0a2(0x1a6),'type':_0x44f0a2(0x1a1),'description':'Default\x20page\x20size'},{'name':'riskLevel','type':_0x44f0a2(0x18f),'description':_0x44f0a2(0x195),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x44f0a2(0x19d),'type':_0x44f0a2(0x18f),'description':_0x44f0a2(0x19f)}];}export function collectAppProfileOverrides(_0x9b139e){const _0x3f4a31=a196_0x2a6fce,_0x3ca379={};for(const [_0x1d635b,_0x4bfd29]of Object[_0x3f4a31(0x1a2)](APP_PROFILE_FLAG_KEY_MAP)){const _0x3e9c67=_0x9b139e(_0x1d635b);if(!_0x3e9c67)continue;_0x3ca379[_0x4bfd29]=_0x4bfd29===_0x3f4a31(0x1a6)?Number(_0x3e9c67):_0x3e9c67;}return _0x3ca379;}export function buildAppProfileListFields(_0x226cd2){const _0x5e7bea=a196_0x2a6fce;return{'env':_0x226cd2[_0x5e7bea(0x1a0)]??null,'apiDir':_0x226cd2[_0x5e7bea(0x17f)]??null,'hasCookie':!!_0x226cd2[_0x5e7bea(0x186)],'hasAccessKey':!!_0x226cd2['accessKey'],'format':_0x226cd2['format']??null,'pageSize':_0x226cd2['pageSize']??null,'riskLevel':_0x226cd2['riskLevel']??null,'locale':_0x226cd2['locale']??null};}export function buildAppDoctorFields(_0x5c51a6,_0x445eb6){const _0x24dedc=a196_0x2a6fce;return{'env':{'value':_0x5c51a6[_0x24dedc(0x1a0)]||_0x445eb6[_0x24dedc(0x1a0)],'source':_0x5c51a6[_0x24dedc(0x1a0)]?'app':'inherit'},'apiDir':{'value':_0x5c51a6[_0x24dedc(0x17f)]||_0x445eb6[_0x24dedc(0x17f)],'source':_0x5c51a6['apiDir']?_0x24dedc(0x193):_0x24dedc(0x180)},'cookie':{'value':_0x5c51a6['cookie']||_0x445eb6[_0x24dedc(0x186)],'source':_0x5c51a6['cookie']?_0x24dedc(0x193):_0x24dedc(0x180)},'accessKey':{'value':_0x5c51a6['accessKey']||_0x445eb6[_0x24dedc(0x183)],'source':_0x5c51a6['accessKey']?'app':_0x24dedc(0x180)}};}export function buildCanonicalAppConfig(_0x20b1b4,_0x15b037){const _0x1b79a5=a196_0x2a6fce,_0xc27367=_0x20b1b4[_0x1b79a5(0x191)](_0x17d6e3=>String(_0x17d6e3||'')[_0x1b79a5(0x184)]())['filter'](Boolean);if(_0xc27367['length']===0x0)return{};const _0x4a2164={};for(const _0xa51e9e of _0xc27367){_0x4a2164[_0xa51e9e]=_0x15b037?{'appcode':_0xa51e9e,'env':_0x15b037}:{'appcode':_0xa51e9e};}return{'apps':_0x4a2164,'defaultApp':_0xc27367[0x0]};}export function buildCanonicalProjectConfig(_0x58bcdc,_0x1f43eb){const _0x48a295=a196_0x2a6fce,{appCodes:appCodes=[],env:_0x322b3f,metadata:_0x48bde5}=_0x1f43eb,_0x1b1062={..._0x58bcdc,..._0x48bde5||{}};delete _0x1b1062[_0x48a295(0x189)],delete _0x1b1062[_0x48a295(0x193)];if(_0x322b3f)_0x1b1062[_0x48a295(0x1a0)]=_0x322b3f;else!_0x1b1062[_0x48a295(0x1a0)]&&(_0x1b1062[_0x48a295(0x1a0)]=DEFAULT_CONFIG_VALUES[_0x48a295(0x1a0)]);const _0x39aa8d=buildCanonicalAppConfig(appCodes,_0x1b1062[_0x48a295(0x1a0)]);return Object['keys'](_0x39aa8d)[_0x48a295(0x188)]>0x0&&(_0x1b1062[_0x48a295(0x199)]=_0x39aa8d['apps'],_0x1b1062[_0x48a295(0x18a)]=_0x39aa8d[_0x48a295(0x18a)]),_0x1b1062;}const LOCALE_MAP={'zh':a196_0x2a6fce(0x182),'zh-cn':a196_0x2a6fce(0x182),'zh_cn':a196_0x2a6fce(0x182),'en':a196_0x2a6fce(0x19e),'en-us':a196_0x2a6fce(0x19e),'en_us':a196_0x2a6fce(0x19e)};export function normalizeLocale(_0x34517e){const _0x2194f9=a196_0x2a6fce;if(!_0x34517e)return null;return LOCALE_MAP[_0x34517e[_0x2194f9(0x18e)]()]??null;}
@@ -1 +1 @@
1
- function a195_0x1af3(_0x5b8288,_0x1c9d38){_0x5b8288=_0x5b8288-0x1cd;const _0x2cde33=a195_0x2cde();let _0x1af3d0=_0x2cde33[_0x5b8288];return _0x1af3d0;}const a195_0x57ffc5=a195_0x1af3;(function(_0x4e177c,_0x3bf3a4){const _0x194e3e=a195_0x1af3,_0x28a4ca=_0x4e177c();while(!![]){try{const _0x2d3315=-parseInt(_0x194e3e(0x1d2))/0x1+-parseInt(_0x194e3e(0x1d6))/0x2+parseInt(_0x194e3e(0x1cf))/0x3*(-parseInt(_0x194e3e(0x1d3))/0x4)+parseInt(_0x194e3e(0x1d0))/0x5*(parseInt(_0x194e3e(0x1d1))/0x6)+parseInt(_0x194e3e(0x1d5))/0x7+parseInt(_0x194e3e(0x1d4))/0x8+parseInt(_0x194e3e(0x1cd))/0x9;if(_0x2d3315===_0x3bf3a4)break;else _0x28a4ca['push'](_0x28a4ca['shift']());}catch(_0x4b43b4){_0x28a4ca['push'](_0x28a4ca['shift']());}}}(a195_0x2cde,0x57c61));function a195_0x2cde(){const _0x56e421=['1184192xAHMvZ','4944544OGNuCl','834127UcOnfv','57554NfSZKY','488781LVzCZy','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','3MmBCuC','25yOionI','125286ZBIBgm','211597iAXEgI'];a195_0x2cde=function(){return _0x56e421;};return a195_0x2cde();}export const CLI_VERSION_POLICY_URL=a195_0x57ffc5(0x1ce);
1
+ const a197_0x3ac8af=a197_0x4e50;(function(_0x391df9,_0x4b0074){const _0x19e86b=a197_0x4e50,_0x4d6c76=_0x391df9();while(!![]){try{const _0x56a959=-parseInt(_0x19e86b(0x1d9))/0x1+-parseInt(_0x19e86b(0x1dd))/0x2+-parseInt(_0x19e86b(0x1df))/0x3+parseInt(_0x19e86b(0x1da))/0x4*(-parseInt(_0x19e86b(0x1d8))/0x5)+parseInt(_0x19e86b(0x1dc))/0x6+-parseInt(_0x19e86b(0x1de))/0x7*(-parseInt(_0x19e86b(0x1d7))/0x8)+parseInt(_0x19e86b(0x1d6))/0x9*(parseInt(_0x19e86b(0x1e0))/0xa);if(_0x56a959===_0x4b0074)break;else _0x4d6c76['push'](_0x4d6c76['shift']());}catch(_0x4e5b78){_0x4d6c76['push'](_0x4d6c76['shift']());}}}(a197_0x2846,0x69d76));export const CLI_VERSION_POLICY_URL=a197_0x3ac8af(0x1db);function a197_0x4e50(_0x3a09b8,_0x28c8e8){_0x3a09b8=_0x3a09b8-0x1d6;const _0x28465a=a197_0x2846();let _0x4e50dd=_0x28465a[_0x3a09b8];return _0x4e50dd;}function a197_0x2846(){const _0x26d070=['97680JHYBmU','685524pVdiCw','177758PmLsoq','1610448JfiFqo','12193010RkycNb','9VzkXgZ','112cVqylr','155GqZyav','170857KmSFag','13824lQHoQU','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json'];a197_0x2846=function(){return _0x26d070;};return a197_0x2846();}
@@ -1 +1 @@
1
- const a196_0xf951fb=a196_0x3af9;(function(_0x26bf8d,_0x52d35e){const _0x2aad5e=a196_0x3af9,_0x102dd3=_0x26bf8d();while(!![]){try{const _0x565c72=-parseInt(_0x2aad5e(0x125))/0x1+-parseInt(_0x2aad5e(0xfd))/0x2+parseInt(_0x2aad5e(0xe3))/0x3+-parseInt(_0x2aad5e(0xdb))/0x4*(parseInt(_0x2aad5e(0xf0))/0x5)+parseInt(_0x2aad5e(0xc8))/0x6+-parseInt(_0x2aad5e(0x101))/0x7+-parseInt(_0x2aad5e(0x10a))/0x8*(-parseInt(_0x2aad5e(0x114))/0x9);if(_0x565c72===_0x52d35e)break;else _0x102dd3['push'](_0x102dd3['shift']());}catch(_0x594628){_0x102dd3['push'](_0x102dd3['shift']());}}}(a196_0x5573,0x64faf));function a196_0x3af9(_0x372d9c,_0x2cb1e7){_0x372d9c=_0x372d9c-0xc8;const _0x557354=a196_0x5573();let _0x3af92a=_0x557354[_0x372d9c];return _0x3af92a;}export const CLI_BIN_NAME=a196_0xf951fb(0x115);export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a196_0xf951fb(0xfb);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a196_0xf951fb(0x12d),'type':a196_0xf951fb(0xf9),'description':'Override\x20appcode','hint':a196_0xf951fb(0xd7)},{'name':a196_0xf951fb(0x118),'meowKey':'app','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xcd),'hint':a196_0xf951fb(0xf7)},{'name':a196_0xf951fb(0x117),'meowKey':'env','type':a196_0xf951fb(0xf9),'description':'Environment','hint':a196_0xf951fb(0x123)},{'name':'format','meowKey':a196_0xf951fb(0x105),'type':'string','description':'Output\x20format','hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':'string','description':a196_0xf951fb(0xcf),'hint':a196_0xf951fb(0x119)},{'name':a196_0xf951fb(0xd0),'meowKey':'dryRun','type':a196_0xf951fb(0x139),'description':'Preview\x20operation\x20without\x20executing'},{'name':'yes','meowKey':a196_0xf951fb(0x128),'type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0xd4)},{'name':a196_0xf951fb(0xcb),'meowKey':'nonInteractive','type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0x10f)},{'name':a196_0xf951fb(0x129),'meowKey':a196_0xf951fb(0x129),'type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0xdc)},{'name':a196_0xf951fb(0x100),'meowKey':a196_0xf951fb(0x100),'type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0x13e)},{'name':'ci','meowKey':'ci','type':a196_0xf951fb(0x139),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a196_0xf951fb(0xf1),'meowKey':'help','type':a196_0xf951fb(0x139),'description':'Show\x20help'},{'name':a196_0xf951fb(0x134),'meowKey':'name','type':a196_0xf951fb(0xf9),'description':'Name','hidden':!![]},{'name':a196_0xf951fb(0xc9),'meowKey':a196_0xf951fb(0xc9),'type':'string','description':a196_0xf951fb(0xf2),'hidden':!![]},{'name':a196_0xf951fb(0x13c),'meowKey':a196_0xf951fb(0x13c),'type':a196_0xf951fb(0x139),'description':'Clear','hidden':!![]},{'name':'watch','meowKey':a196_0xf951fb(0x104),'type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0x12c),'hidden':!![]},{'name':'output','meowKey':a196_0xf951fb(0xe7),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xe1),'hidden':!![]},{'name':a196_0xf951fb(0x121),'meowKey':a196_0xf951fb(0x121),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xff),'hidden':!![]},{'name':a196_0xf951fb(0xda),'meowKey':'datasetcode','type':'string','description':a196_0xf951fb(0xf5),'hidden':!![]},{'name':a196_0xf951fb(0xdd),'meowKey':a196_0xf951fb(0xdd),'type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0x138),'hidden':!![]},{'name':a196_0xf951fb(0xd1),'meowKey':a196_0xf951fb(0x11d),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x108),'hidden':!![]},{'name':a196_0xf951fb(0x106),'meowKey':'type','type':a196_0xf951fb(0xf9),'description':'Type\x20filter','hidden':!![]},{'name':a196_0xf951fb(0xe8),'meowKey':a196_0xf951fb(0xe8),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x136),'hidden':!![]},{'name':a196_0xf951fb(0x111),'meowKey':a196_0xf951fb(0x111),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xd2),'hidden':!![]},{'name':a196_0xf951fb(0xe6),'meowKey':'sqlName','type':a196_0xf951fb(0xf9),'description':'SQL\x20name','hidden':!![]},{'name':a196_0xf951fb(0x13d),'meowKey':a196_0xf951fb(0x13d),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x110),'hidden':!![]},{'name':a196_0xf951fb(0xed),'meowKey':'dbId','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x127),'hidden':!![]},{'name':a196_0xf951fb(0xde),'meowKey':'dbid','type':'string','description':a196_0xf951fb(0x127),'hidden':!![]},{'name':a196_0xf951fb(0x135),'meowKey':'description','type':'string','description':a196_0xf951fb(0x124),'hidden':!![]},{'name':a196_0xf951fb(0xf6),'meowKey':'descriptionFile','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x10b),'hidden':!![]},{'name':a196_0xf951fb(0xd6),'meowKey':'page','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x10c),'hidden':!![]},{'name':'pagesize','meowKey':'pagesize','type':a196_0xf951fb(0xf9),'description':'Page\x20size','hidden':!![]},{'name':a196_0xf951fb(0x10d),'meowKey':a196_0xf951fb(0x10d),'type':'string','description':a196_0xf951fb(0xf8),'hidden':!![]},{'name':a196_0xf951fb(0xe0),'meowKey':'code','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x113),'hidden':!![]},{'name':'sql','meowKey':'sql','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x131),'hidden':!![]},{'name':a196_0xf951fb(0x12e),'meowKey':a196_0xf951fb(0x12e),'type':a196_0xf951fb(0xf9),'description':'Schemas','hidden':!![]},{'name':a196_0xf951fb(0xd3),'meowKey':'operation','type':'string','description':a196_0xf951fb(0x12f),'hidden':!![]},{'name':a196_0xf951fb(0xd9),'meowKey':a196_0xf951fb(0xd9),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xfe),'hidden':!![]},{'name':'skip-imports','meowKey':a196_0xf951fb(0xec),'type':a196_0xf951fb(0x139),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a196_0xf951fb(0x102),'meowKey':a196_0xf951fb(0x102),'type':a196_0xf951fb(0xf9),'description':'Config\x20key','hidden':!![]},{'name':a196_0xf951fb(0xd8),'meowKey':'value','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xcc),'hidden':!![]},{'name':a196_0xf951fb(0xdf),'meowKey':a196_0xf951fb(0xdf),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x109),'hidden':!![]},{'name':a196_0xf951fb(0x13b),'meowKey':a196_0xf951fb(0x13b),'type':a196_0xf951fb(0x139),'description':'Read\x20value\x20from\x20stdin','hidden':!![]},{'name':a196_0xf951fb(0x11e),'meowKey':a196_0xf951fb(0xce),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x11c),'hidden':!![]},{'name':'reveal','meowKey':a196_0xf951fb(0x12a),'type':a196_0xf951fb(0x139),'description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':a196_0xf951fb(0xd5),'meowKey':a196_0xf951fb(0xd5),'type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0xfa),'hidden':!![]},{'name':a196_0xf951fb(0xe4),'meowKey':a196_0xf951fb(0xe4),'type':a196_0xf951fb(0x139),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a196_0xf951fb(0x107),'meowKey':'remote','type':'boolean','description':a196_0xf951fb(0x120),'hidden':!![]},{'name':a196_0xf951fb(0x10e),'meowKey':a196_0xf951fb(0x10e),'type':a196_0xf951fb(0x139),'description':a196_0xf951fb(0xe5),'hidden':!![]},{'name':a196_0xf951fb(0xee),'meowKey':a196_0xf951fb(0x13a),'type':'string','description':a196_0xf951fb(0xf4),'hidden':!![]},{'name':a196_0xf951fb(0x126),'meowKey':a196_0xf951fb(0x126),'type':a196_0xf951fb(0xf9),'description':'Menu\x20label','hidden':!![]},{'name':a196_0xf951fb(0x116),'meowKey':a196_0xf951fb(0xea),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x11a),'hidden':!![]},{'name':'sort','meowKey':a196_0xf951fb(0x132),'type':a196_0xf951fb(0xf9),'description':'Menu\x20sort\x20value','hidden':!![]},{'name':a196_0xf951fb(0x133),'meowKey':'expectParentId','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xf3),'hidden':!![]},{'name':a196_0xf951fb(0x122),'meowKey':'expectPath','type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xef),'hidden':!![]},{'name':'expected-children-count','meowKey':a196_0xf951fb(0x11f),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0x13f),'hidden':!![]},{'name':a196_0xf951fb(0x112),'meowKey':a196_0xf951fb(0x130),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xe2),'hidden':!![]},{'name':'task-id','meowKey':a196_0xf951fb(0x11b),'type':a196_0xf951fb(0xf9),'description':a196_0xf951fb(0xeb),'hidden':!![]},{'name':a196_0xf951fb(0x137),'meowKey':a196_0xf951fb(0x103),'type':a196_0xf951fb(0xf9),'description':'Operation\x20type','hidden':!![]},{'name':a196_0xf951fb(0xfc),'meowKey':'functionNode','type':'string','description':a196_0xf951fb(0xe9),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a196_0xf951fb(0x12d),a196_0xf951fb(0x118),a196_0xf951fb(0x117),a196_0xf951fb(0x105),'jq','dry-run','yes',a196_0xf951fb(0xcb),'ci']);export function buildMeowFlags(){const _0x32f589=a196_0xf951fb;return Object[_0x32f589(0x12b)](GLOBAL_FLAGS[_0x32f589(0xca)](_0x38bc41=>[_0x38bc41['meowKey'],{'type':_0x38bc41[_0x32f589(0x106)]}]));}function a196_0x5573(){const _0x8da5ac=['Use\x20global\x20config\x20scope','all','dbid','tags','code','Output\x20path','Comma-separated\x20menu\x20IDs','809091CnEGjP','confirm','Verbose\x20output','sql-name','output','file','Function\x20node','parentId','Asynchronous\x20task\x20ID','skipImports','db-id','expected-count','Expected\x20current\x20menu\x20path','690155jaJGXM','help','Title','Expected\x20current\x20parent\x20menu\x20id','Expected\x20affected\x20count','Dataset\x20code','description-file','<name>','Keyword\x20filter','string','Force\x20overwrite','@lovrabet/rabetbase-cli','function-node','1623650DSHDbk','Target\x20path','JSON\x20params','project','5535803bUAGWG','key','operationType','watch','format','type','remote','Record\x20ID','Tags','200yRnqzs','Description\x20file','Page\x20number','keyword','verbose','Force\x20non-interactive\x20mode\x20(CI)','SQL\x20name','sqlcode','menu-ids','Code\x20filter','645876BUIeoT','rabetbase','parent-id','env','app','<expr>','Parent\x20menu\x20id','taskId','Read\x20value\x20from\x20environment\x20variable','enableBffSave','from-env','expectedChildrenCount','Use\x20remote','params','expect-path','production\x20|\x20daily','Description','409960VisVBT','label','DB\x20ID','yes','global','reveal','fromEntries','Watch\x20mode','appcode','schemas','Operation\x20type','menuIds','SQL\x20string','sort','expect-parent-id','name','description','File\x20path','operation-type','Apply\x20to\x20all','boolean','expectedCount','stdin','clear','sqlname','Use\x20project\x20config\x20scope','Expected\x20current\x20child\x20count','3002778wAJCqa','title','map','non-interactive','Config\x20value','Select\x20app\x20profile\x20by\x20name','fromEnv','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','dry-run','enable-bff-save','SQL\x20code','operation','Skip\x20confirmation\x20for\x20high-risk\x20writes','force','page','<code>','value','target','datasetcode','4PymzfP'];a196_0x5573=function(){return _0x8da5ac;};return a196_0x5573();}
1
+ const a198_0x317b16=a198_0x526d;(function(_0x36443f,_0x43a662){const _0xecf8a8=a198_0x526d,_0x228ca3=_0x36443f();while(!![]){try{const _0x3a08be=parseInt(_0xecf8a8(0x152))/0x1+-parseInt(_0xecf8a8(0x1af))/0x2+-parseInt(_0xecf8a8(0x1c8))/0x3*(-parseInt(_0xecf8a8(0x187))/0x4)+parseInt(_0xecf8a8(0x197))/0x5*(-parseInt(_0xecf8a8(0x18e))/0x6)+parseInt(_0xecf8a8(0x1b9))/0x7+parseInt(_0xecf8a8(0x16e))/0x8*(parseInt(_0xecf8a8(0x1a3))/0x9)+parseInt(_0xecf8a8(0x176))/0xa*(-parseInt(_0xecf8a8(0x16c))/0xb);if(_0x3a08be===_0x43a662)break;else _0x228ca3['push'](_0x228ca3['shift']());}catch(_0x4508bb){_0x228ca3['push'](_0x228ca3['shift']());}}}(a198_0x40dc,0xe5b7c));export const CLI_BIN_NAME=a198_0x317b16(0x1c4);export const CLI_DISPLAY_NAME=a198_0x317b16(0x16d);export const NPM_PACKAGE_NAME=a198_0x317b16(0x179);export const GLOBAL_FLAGS=[{'name':a198_0x317b16(0x198),'meowKey':a198_0x317b16(0x198),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x178),'hint':a198_0x317b16(0x1a2)},{'name':'app','meowKey':a198_0x317b16(0x169),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x15f),'hint':a198_0x317b16(0x170)},{'name':'env','meowKey':a198_0x317b16(0x181),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x172),'hint':a198_0x317b16(0x190)},{'name':a198_0x317b16(0x18c),'meowKey':a198_0x317b16(0x18c),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x17c),'hint':a198_0x317b16(0x1bb)},{'name':'jq','meowKey':'jq','type':a198_0x317b16(0x158),'description':a198_0x317b16(0x161),'hint':a198_0x317b16(0x162)},{'name':a198_0x317b16(0x1b7),'meowKey':a198_0x317b16(0x19e),'type':'boolean','description':'Preview\x20operation\x20without\x20executing'},{'name':a198_0x317b16(0x180),'meowKey':a198_0x317b16(0x180),'type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x185)},{'name':a198_0x317b16(0x1a6),'meowKey':'nonInteractive','type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x1be)},{'name':a198_0x317b16(0x153),'meowKey':a198_0x317b16(0x153),'type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x15d)},{'name':a198_0x317b16(0x19c),'meowKey':a198_0x317b16(0x19c),'type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x18d)},{'name':'ci','meowKey':'ci','type':a198_0x317b16(0x16f),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a198_0x317b16(0x1d0),'meowKey':'help','type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x1ba)},{'name':a198_0x317b16(0x1a8),'meowKey':a198_0x317b16(0x1a8),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x19d),'hidden':!![]},{'name':a198_0x317b16(0x1a9),'meowKey':a198_0x317b16(0x1a9),'type':'string','description':a198_0x317b16(0x1c7),'hidden':!![]},{'name':a198_0x317b16(0x1c9),'meowKey':a198_0x317b16(0x1c9),'type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x1ac),'hidden':!![]},{'name':a198_0x317b16(0x1cd),'meowKey':'watch','type':'boolean','description':a198_0x317b16(0x19f),'hidden':!![]},{'name':a198_0x317b16(0x155),'meowKey':a198_0x317b16(0x155),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x184),'hidden':!![]},{'name':a198_0x317b16(0x1b4),'meowKey':a198_0x317b16(0x1b4),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x164),'hidden':!![]},{'name':a198_0x317b16(0x18f),'meowKey':a198_0x317b16(0x18f),'type':a198_0x317b16(0x158),'description':'Dataset\x20code','hidden':!![]},{'name':'all','meowKey':a198_0x317b16(0x1a7),'type':a198_0x317b16(0x16f),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a198_0x317b16(0x19b),'meowKey':'enableBffSave','type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x1c1),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a198_0x317b16(0x171),'hidden':!![]},{'name':'type','meowKey':a198_0x317b16(0x154),'type':'string','description':a198_0x317b16(0x18b),'hidden':!![]},{'name':'file','meowKey':a198_0x317b16(0x18a),'type':a198_0x317b16(0x158),'description':'File\x20path','hidden':!![]},{'name':a198_0x317b16(0x1ab),'meowKey':a198_0x317b16(0x1ab),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x183),'hidden':!![]},{'name':a198_0x317b16(0x156),'meowKey':a198_0x317b16(0x1b8),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':a198_0x317b16(0x1bf),'meowKey':a198_0x317b16(0x1bf),'type':'string','description':a198_0x317b16(0x1b1),'hidden':!![]},{'name':a198_0x317b16(0x1cc),'meowKey':'dbId','type':'string','description':a198_0x317b16(0x1b2),'hidden':!![]},{'name':'dbid','meowKey':a198_0x317b16(0x159),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1b2),'hidden':!![]},{'name':'description','meowKey':a198_0x317b16(0x17f),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1c2),'hidden':!![]},{'name':a198_0x317b16(0x177),'meowKey':'descriptionFile','type':'string','description':a198_0x317b16(0x1a1),'hidden':!![]},{'name':'page','meowKey':'page','type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1a4),'hidden':!![]},{'name':a198_0x317b16(0x193),'meowKey':a198_0x317b16(0x193),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1ca),'hidden':!![]},{'name':a198_0x317b16(0x16b),'meowKey':a198_0x317b16(0x16b),'type':'string','description':a198_0x317b16(0x1b5),'hidden':!![]},{'name':a198_0x317b16(0x174),'meowKey':a198_0x317b16(0x174),'type':a198_0x317b16(0x158),'description':'Code\x20filter','hidden':!![]},{'name':'sql','meowKey':a198_0x317b16(0x1bd),'type':a198_0x317b16(0x158),'description':'SQL\x20string','hidden':!![]},{'name':a198_0x317b16(0x16a),'meowKey':a198_0x317b16(0x16a),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1cf),'hidden':!![]},{'name':a198_0x317b16(0x1b3),'meowKey':a198_0x317b16(0x1b3),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1cb),'hidden':!![]},{'name':a198_0x317b16(0x167),'meowKey':a198_0x317b16(0x167),'type':'string','description':a198_0x317b16(0x165),'hidden':!![]},{'name':a198_0x317b16(0x195),'meowKey':a198_0x317b16(0x1a5),'type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x191),'hidden':!![]},{'name':'key','meowKey':a198_0x317b16(0x1aa),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1b6),'hidden':!![]},{'name':a198_0x317b16(0x157),'meowKey':a198_0x317b16(0x157),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x199),'hidden':!![]},{'name':'tags','meowKey':a198_0x317b16(0x15e),'type':a198_0x317b16(0x158),'description':'Tags','hidden':!![]},{'name':'stdin','meowKey':a198_0x317b16(0x1d1),'type':a198_0x317b16(0x16f),'description':'Read\x20value\x20from\x20stdin','hidden':!![]},{'name':a198_0x317b16(0x1c0),'meowKey':'fromEnv','type':a198_0x317b16(0x158),'description':a198_0x317b16(0x160),'hidden':!![]},{'name':a198_0x317b16(0x15c),'meowKey':'reveal','type':'boolean','description':a198_0x317b16(0x15b),'hidden':!![]},{'name':'force','meowKey':a198_0x317b16(0x1bc),'type':'boolean','description':a198_0x317b16(0x189),'hidden':!![]},{'name':a198_0x317b16(0x1ad),'meowKey':a198_0x317b16(0x1ad),'type':a198_0x317b16(0x16f),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':'remote','meowKey':a198_0x317b16(0x17b),'type':a198_0x317b16(0x16f),'description':a198_0x317b16(0x1ce),'hidden':!![]},{'name':a198_0x317b16(0x1a0),'meowKey':a198_0x317b16(0x1a0),'type':a198_0x317b16(0x16f),'description':'Verbose\x20output','hidden':!![]},{'name':'expected-count','meowKey':'expectedCount','type':a198_0x317b16(0x158),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a198_0x317b16(0x186),'meowKey':a198_0x317b16(0x186),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1c5),'hidden':!![]},{'name':a198_0x317b16(0x15a),'meowKey':a198_0x317b16(0x166),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x163),'hidden':!![]},{'name':'sort','meowKey':'sort','type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1c3),'hidden':!![]},{'name':'expect-parent-id','meowKey':a198_0x317b16(0x196),'type':a198_0x317b16(0x158),'description':'Expected\x20current\x20parent\x20menu\x20id','hidden':!![]},{'name':a198_0x317b16(0x194),'meowKey':a198_0x317b16(0x1c6),'type':a198_0x317b16(0x158),'description':'Expected\x20current\x20menu\x20path','hidden':!![]},{'name':a198_0x317b16(0x17a),'meowKey':a198_0x317b16(0x173),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x19a),'hidden':!![]},{'name':a198_0x317b16(0x182),'meowKey':a198_0x317b16(0x168),'type':a198_0x317b16(0x158),'description':a198_0x317b16(0x188),'hidden':!![]},{'name':'task-id','meowKey':'taskId','type':a198_0x317b16(0x158),'description':a198_0x317b16(0x192),'hidden':!![]},{'name':a198_0x317b16(0x1b0),'meowKey':'operationType','type':a198_0x317b16(0x158),'description':a198_0x317b16(0x1cb),'hidden':!![]},{'name':'function-node','meowKey':'functionNode','type':a198_0x317b16(0x158),'description':a198_0x317b16(0x17e),'hidden':!![]}];function a198_0x526d(_0x5ea3b1,_0x4a7660){_0x5ea3b1=_0x5ea3b1-0x152;const _0x40dc83=a198_0x40dc();let _0x526df5=_0x40dc83[_0x5ea3b1];return _0x526df5;}function a198_0x40dc(){const _0x350d25=['Function\x20node','description','yes','env','menu-ids','SQL\x20code','Output\x20path','Skip\x20confirmation\x20for\x20high-risk\x20writes','label','2981236TxbLOU','Comma-separated\x20menu\x20IDs','Force\x20overwrite','file','Type\x20filter','format','Use\x20project\x20config\x20scope','18MDmbDv','datasetcode','production\x20|\x20daily','Skip\x20import\x20generation','Asynchronous\x20task\x20ID','pagesize','expect-path','skip-imports','expectParentId','240655ExYOsz','appcode','Config\x20value','Expected\x20current\x20child\x20count','enable-bff-save','project','Name','dryRun','Watch\x20mode','verbose','Description\x20file','<code>','1053054LTdCeo','Page\x20number','skipImports','non-interactive','all','name','title','key','sqlcode','Clear','confirm','map','1870804MszZhE','operation-type','SQL\x20name','DB\x20ID','operation','params','Keyword\x20filter','Config\x20key','dry-run','sqlName','149471qOxuuY','Show\x20help','json\x20|\x20pretty\x20|\x20compress','force','sql','Force\x20non-interactive\x20mode\x20(CI)','sqlname','from-env','Enable\x20BFF\x20save','Description','Menu\x20sort\x20value','rabetbase','Menu\x20label','expectPath','Title','6VkwXBO','clear','Page\x20size','Operation\x20type','db-id','watch','Use\x20remote','Schemas','help','stdin','892594XxfNTh','global','type','output','sql-name','value','string','dbid','parent-id','Reveal\x20sensitive\x20value','reveal','Use\x20global\x20config\x20scope','tags','Select\x20app\x20profile\x20by\x20name','Read\x20value\x20from\x20environment\x20variable','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','<expr>','Parent\x20menu\x20id','JSON\x20params','Target\x20path','parentId','target','menuIds','app','schemas','keyword','22bDOXZv','Rabetbase\x20CLI','64pBiccA','boolean','<name>','Record\x20ID','Environment','expectedChildrenCount','code','fromEntries','6599470MFDyVn','description-file','Override\x20appcode','@lovrabet/rabetbase-cli','expected-children-count','remote','Output\x20format','meowKey'];a198_0x40dc=function(){return _0x350d25;};return a198_0x40dc();}export const PIPELINE_FLAG_NAMES=new Set([a198_0x317b16(0x198),a198_0x317b16(0x169),a198_0x317b16(0x181),a198_0x317b16(0x18c),'jq',a198_0x317b16(0x1b7),a198_0x317b16(0x180),a198_0x317b16(0x1a6),'ci']);export function buildMeowFlags(){const _0x56565e=a198_0x317b16;return Object[_0x56565e(0x175)](GLOBAL_FLAGS[_0x56565e(0x1ae)](_0x270f2c=>[_0x270f2c[_0x56565e(0x17d)],{'type':_0x270f2c[_0x56565e(0x154)]}]));}