@lovrabet/rabetbase-cli 2.5.4-beta.2 → 2.5.4-beta.3

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 (356) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.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/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/index.js +1 -1
  26. package/lib/commands/app/list.js +1 -1
  27. package/lib/commands/app/members-list.js +1 -1
  28. package/lib/commands/app/remote-directory.js +1 -1
  29. package/lib/commands/app/shared.js +1 -1
  30. package/lib/commands/app-config/delete.js +1 -1
  31. package/lib/commands/app-config/get.js +1 -1
  32. package/lib/commands/app-config/index.js +1 -1
  33. package/lib/commands/app-config/list.js +1 -1
  34. package/lib/commands/app-config/set.js +1 -1
  35. package/lib/commands/app-config/shared.js +1 -1
  36. package/lib/commands/auth/index.js +1 -1
  37. package/lib/commands/bff/create.js +1 -1
  38. package/lib/commands/bff/delete.js +1 -1
  39. package/lib/commands/bff/detail.js +1 -1
  40. package/lib/commands/bff/index.js +1 -1
  41. package/lib/commands/bff/list.js +1 -1
  42. package/lib/commands/bff/logs.js +1 -1
  43. package/lib/commands/bff/pull.js +1 -1
  44. package/lib/commands/bff/push.js +1 -1
  45. package/lib/commands/bff/status.js +1 -1
  46. package/lib/commands/cli-skill/index.js +1 -1
  47. package/lib/commands/cli-update.js +1 -1
  48. package/lib/commands/codegen/index.js +1 -1
  49. package/lib/commands/codegen/sdk.js +1 -1
  50. package/lib/commands/codegen/sql.js +1 -1
  51. package/lib/commands/common/app-registry.js +1 -1
  52. package/lib/commands/common/app-selector.js +1 -1
  53. package/lib/commands/common/async-task.js +1 -1
  54. package/lib/commands/common/dry-run.js +1 -1
  55. package/lib/commands/common/flags.js +1 -1
  56. package/lib/commands/common/local-file.js +1 -1
  57. package/lib/commands/common/validate.js +1 -1
  58. package/lib/commands/config/delete.js +1 -1
  59. package/lib/commands/config/get.js +1 -1
  60. package/lib/commands/config/index.js +1 -1
  61. package/lib/commands/config/init.js +1 -1
  62. package/lib/commands/config/list.js +1 -1
  63. package/lib/commands/config/set.js +1 -1
  64. package/lib/commands/config/shared.js +1 -1
  65. package/lib/commands/dataset/batch-design.js +1 -1
  66. package/lib/commands/dataset/business-group-update.js +1 -1
  67. package/lib/commands/dataset/business-groups.js +1 -1
  68. package/lib/commands/dataset/capability.js +1 -1
  69. package/lib/commands/dataset/cross-relation-create.js +1 -1
  70. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  71. package/lib/commands/dataset/cross-relation-list.js +1 -1
  72. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  73. package/lib/commands/dataset/cross-relation-update.js +1 -1
  74. package/lib/commands/dataset/delete.js +1 -1
  75. package/lib/commands/dataset/detail.js +1 -1
  76. package/lib/commands/dataset/extend-update.js +1 -1
  77. package/lib/commands/dataset/field-restore.js +1 -1
  78. package/lib/commands/dataset/field-update.js +1 -1
  79. package/lib/commands/dataset/generate.js +1 -1
  80. package/lib/commands/dataset/index.js +1 -1
  81. package/lib/commands/dataset/list.js +1 -1
  82. package/lib/commands/dataset/operations.js +1 -1
  83. package/lib/commands/dataset/relation-audit.js +1 -1
  84. package/lib/commands/dataset/relation-create.js +1 -1
  85. package/lib/commands/dataset/relation-delete.js +1 -1
  86. package/lib/commands/dataset/relation-shared.js +1 -1
  87. package/lib/commands/dataset/relation-update.js +1 -1
  88. package/lib/commands/dataset/relations.js +1 -1
  89. package/lib/commands/dataset/rename.js +1 -1
  90. package/lib/commands/dataset/restore.js +1 -1
  91. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  92. package/lib/commands/db/analysis-batching.js +1 -1
  93. package/lib/commands/db/analyze-batch-plan.js +1 -1
  94. package/lib/commands/db/analyze-cancel.js +1 -1
  95. package/lib/commands/db/analyze-start.js +1 -1
  96. package/lib/commands/db/analyze-status.js +1 -1
  97. package/lib/commands/db/create.js +1 -1
  98. package/lib/commands/db/delete.js +1 -1
  99. package/lib/commands/db/detail.js +1 -1
  100. package/lib/commands/db/diff-refresh-start.js +1 -1
  101. package/lib/commands/db/diff-refresh-status.js +1 -1
  102. package/lib/commands/db/diff.js +1 -1
  103. package/lib/commands/db/index.js +1 -1
  104. package/lib/commands/db/list.js +1 -1
  105. package/lib/commands/db/shared.js +1 -1
  106. package/lib/commands/db/table-diff-shared.js +1 -1
  107. package/lib/commands/db/tables.js +1 -1
  108. package/lib/commands/db/test.js +1 -1
  109. package/lib/commands/db/update.js +1 -1
  110. package/lib/commands/deployment/index.js +1 -1
  111. package/lib/commands/deployment/sync-all.js +1 -1
  112. package/lib/commands/deployment/sync-jobs.js +1 -1
  113. package/lib/commands/deployment/sync-status.js +1 -1
  114. package/lib/commands/doctor.js +1 -1
  115. package/lib/commands/file/index.js +1 -1
  116. package/lib/commands/flow/create.js +1 -1
  117. package/lib/commands/flow/detail.js +1 -1
  118. package/lib/commands/flow/index.js +1 -1
  119. package/lib/commands/flow/list.js +1 -1
  120. package/lib/commands/flow/publish.js +1 -1
  121. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  122. package/lib/commands/flow/runtime-role-list.js +1 -1
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  124. package/lib/commands/flow/runtime-user-search.js +1 -1
  125. package/lib/commands/flow/shared.js +1 -1
  126. package/lib/commands/flow/update.js +1 -1
  127. package/lib/commands/flow/validate.js +1 -1
  128. package/lib/commands/instant-api-policy/current.js +1 -1
  129. package/lib/commands/instant-api-policy/index.js +1 -1
  130. package/lib/commands/instant-api-policy/init.js +1 -1
  131. package/lib/commands/instant-api-policy/publish.js +1 -1
  132. package/lib/commands/instant-api-policy/pull.js +1 -1
  133. package/lib/commands/instant-api-policy/revision.js +1 -1
  134. package/lib/commands/instant-api-policy/revisions.js +1 -1
  135. package/lib/commands/instant-api-policy/rollback.js +1 -1
  136. package/lib/commands/instant-api-policy/shared.js +1 -1
  137. package/lib/commands/instant-api-policy/validate.js +1 -1
  138. package/lib/commands/issue/index.js +1 -1
  139. package/lib/commands/issue/nudge.js +1 -1
  140. package/lib/commands/issue/report.js +1 -1
  141. package/lib/commands/issue/shared.js +1 -1
  142. package/lib/commands/kb/create.js +1 -1
  143. package/lib/commands/kb/delete.js +1 -1
  144. package/lib/commands/kb/detail.js +1 -1
  145. package/lib/commands/kb/index.js +1 -1
  146. package/lib/commands/kb/list.js +1 -1
  147. package/lib/commands/kb/search.js +1 -1
  148. package/lib/commands/kb/shared.js +1 -1
  149. package/lib/commands/kb/update.js +1 -1
  150. package/lib/commands/logs/index.js +1 -1
  151. package/lib/commands/menu/asset-update.js +1 -1
  152. package/lib/commands/menu/delete.js +1 -1
  153. package/lib/commands/menu/external-link-create.js +1 -1
  154. package/lib/commands/menu/external-link-update.js +1 -1
  155. package/lib/commands/menu/group-create.js +1 -1
  156. package/lib/commands/menu/group-update.js +1 -1
  157. package/lib/commands/menu/index.js +1 -1
  158. package/lib/commands/menu/list.js +1 -1
  159. package/lib/commands/menu/move.js +1 -1
  160. package/lib/commands/menu/regroup-start.js +1 -1
  161. package/lib/commands/menu/rename.js +1 -1
  162. package/lib/commands/menu/shared/compare-table.js +1 -1
  163. package/lib/commands/menu/shared/delete-plan.js +1 -1
  164. package/lib/commands/menu/shared/facts.js +1 -1
  165. package/lib/commands/menu/shared/index.js +1 -1
  166. package/lib/commands/menu/shared/inquirer.js +1 -1
  167. package/lib/commands/menu/shared/local-pages.js +1 -1
  168. package/lib/commands/menu/shared/logic.js +1 -1
  169. package/lib/commands/menu/shared/mutations.js +1 -1
  170. package/lib/commands/menu/shared/service.js +1 -1
  171. package/lib/commands/menu/shared/sync-core.js +1 -1
  172. package/lib/commands/menu/shared/update-core.js +1 -1
  173. package/lib/commands/menu/shared/valid-url.js +1 -1
  174. package/lib/commands/menu/sync.js +1 -1
  175. package/lib/commands/menu/visibility-update.js +1 -1
  176. package/lib/commands/notification/config-create.js +1 -1
  177. package/lib/commands/notification/config-delete.js +1 -1
  178. package/lib/commands/notification/config-list.js +1 -1
  179. package/lib/commands/notification/config-update.js +1 -1
  180. package/lib/commands/notification/index.js +1 -1
  181. package/lib/commands/notification/shared.js +1 -1
  182. package/lib/commands/ocr/index.js +1 -1
  183. package/lib/commands/page/create.js +1 -1
  184. package/lib/commands/page/custom/detail.js +1 -1
  185. package/lib/commands/page/custom/list.js +1 -1
  186. package/lib/commands/page/custom/publish.js +1 -1
  187. package/lib/commands/page/custom/shared.js +1 -1
  188. package/lib/commands/page/custom/syntax.js +1 -1
  189. package/lib/commands/page/custom/update.js +1 -1
  190. package/lib/commands/page/data-list-status.js +1 -1
  191. package/lib/commands/page/generate-start.js +1 -1
  192. package/lib/commands/page/generate-status.js +1 -1
  193. package/lib/commands/page/index.js +1 -1
  194. package/lib/commands/page/pull.js +1 -1
  195. package/lib/commands/page/push.js +1 -1
  196. package/lib/commands/page/relation-audit.js +1 -1
  197. package/lib/commands/page/restore.js +1 -1
  198. package/lib/commands/page/shared.js +1 -1
  199. package/lib/commands/page/sync.js +1 -1
  200. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  201. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  202. package/lib/commands/project/create/format-elapsed.js +1 -1
  203. package/lib/commands/project/create/main.js +1 -1
  204. package/lib/commands/project/create/materialize-project-template.js +1 -1
  205. package/lib/commands/project/create/project-name.js +1 -1
  206. package/lib/commands/project/create/project-template-archive.js +1 -1
  207. package/lib/commands/project/create/project-template-path.js +1 -1
  208. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  209. package/lib/commands/project/create/use-format-code.js +1 -1
  210. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  211. package/lib/commands/project/domain-routing-sync.js +1 -1
  212. package/lib/commands/project/index.js +1 -1
  213. package/lib/commands/project/upgrade.js +1 -1
  214. package/lib/commands/registry.js +1 -1
  215. package/lib/commands/role/delete.js +1 -1
  216. package/lib/commands/role/detail.js +1 -1
  217. package/lib/commands/role/index.js +1 -1
  218. package/lib/commands/role/list.js +1 -1
  219. package/lib/commands/role/shared.js +1 -1
  220. package/lib/commands/role/update.js +1 -1
  221. package/lib/commands/role/user-add.js +1 -1
  222. package/lib/commands/role/user-remove.js +1 -1
  223. package/lib/commands/role/user-resolve.js +1 -1
  224. package/lib/commands/rule/get.js +1 -1
  225. package/lib/commands/rule/index.js +1 -1
  226. package/lib/commands/rule/list.js +1 -1
  227. package/lib/commands/rule/set.js +1 -1
  228. package/lib/commands/rule/shared.js +1 -1
  229. package/lib/commands/run/index.js +1 -1
  230. package/lib/commands/schema.js +1 -1
  231. package/lib/commands/sql/create.js +1 -1
  232. package/lib/commands/sql/delete.js +1 -1
  233. package/lib/commands/sql/detail.js +1 -1
  234. package/lib/commands/sql/exec.js +1 -1
  235. package/lib/commands/sql/index.js +1 -1
  236. package/lib/commands/sql/list.js +1 -1
  237. package/lib/commands/sql/pull.js +1 -1
  238. package/lib/commands/sql/push.js +1 -1
  239. package/lib/commands/sql/shared.js +1 -1
  240. package/lib/commands/sql/status.js +1 -1
  241. package/lib/commands/sql/validate.js +1 -1
  242. package/lib/commands/task/index.js +1 -1
  243. package/lib/commands/task/status.js +1 -1
  244. package/lib/commands/tenant/index.js +1 -1
  245. package/lib/commands/tenant/members-list.js +1 -1
  246. package/lib/commands/tenant/shared.js +1 -1
  247. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  248. package/lib/commands/user-account/feishu-bind.d.ts +2 -0
  249. package/lib/commands/user-account/feishu-bind.js +1 -0
  250. package/lib/commands/user-account/index.js +1 -1
  251. package/lib/commands/workspace/add.js +1 -1
  252. package/lib/commands/workspace/index.js +1 -1
  253. package/lib/commands/workspace/remove.js +1 -1
  254. package/lib/config/domain-config.js +1 -1
  255. package/lib/config/project-domain-routing.js +1 -1
  256. package/lib/config/region-config.js +1 -1
  257. package/lib/config/schema.js +1 -1
  258. package/lib/constant/cdn.js +1 -1
  259. package/lib/constant/cli.js +1 -1
  260. package/lib/constant/defaults.js +1 -1
  261. package/lib/constant/domain.js +1 -1
  262. package/lib/constant/env.js +1 -1
  263. package/lib/constant/output.js +1 -1
  264. package/lib/constant/paths.js +1 -1
  265. package/lib/constant/region.js +1 -1
  266. package/lib/constant/risk.js +1 -1
  267. package/lib/constant/routing-profile.js +1 -1
  268. package/lib/context/app-resolver.js +1 -1
  269. package/lib/context/auth-resolver.js +1 -1
  270. package/lib/context/config-loader.js +1 -1
  271. package/lib/context.js +1 -1
  272. package/lib/core/alias-resolver.js +1 -1
  273. package/lib/core/api-client.d.ts +2 -0
  274. package/lib/core/api-client.js +1 -1
  275. package/lib/core/bff/config.js +1 -1
  276. package/lib/core/bff/file-system.js +1 -1
  277. package/lib/core/bff/hash.js +1 -1
  278. package/lib/core/bff/hook-directory.js +1 -1
  279. package/lib/core/bff/lock.js +1 -1
  280. package/lib/core/bff/utils.js +1 -1
  281. package/lib/core/cross-db-relation.js +1 -1
  282. package/lib/core/db-resolver.js +1 -1
  283. package/lib/core/flow-config.js +1 -1
  284. package/lib/core/instant-api-policy/config.js +1 -1
  285. package/lib/core/kb-search-client.js +1 -1
  286. package/lib/core/page/file-system.js +1 -1
  287. package/lib/core/page/hash.js +1 -1
  288. package/lib/core/page/lock.js +1 -1
  289. package/lib/core/page/lr-smart-jsx.js +1 -1
  290. package/lib/core/sql-index-auditor.js +1 -1
  291. package/lib/core/sql-sync/config.js +1 -1
  292. package/lib/core/sql-sync/file-system.js +1 -1
  293. package/lib/core/sql-sync/hash.js +1 -1
  294. package/lib/core/sql-sync/lock.js +1 -1
  295. package/lib/core/sql-sync/utils.js +1 -1
  296. package/lib/core/sql-validator.js +1 -1
  297. package/lib/errors.js +1 -1
  298. package/lib/framework/build-all-flags.js +1 -1
  299. package/lib/framework/error-output.js +1 -1
  300. package/lib/framework/explicit-yes.js +1 -1
  301. package/lib/framework/flags.js +1 -1
  302. package/lib/framework/help.js +1 -1
  303. package/lib/framework/index.js +1 -1
  304. package/lib/framework/output.js +1 -1
  305. package/lib/framework/response.js +1 -1
  306. package/lib/framework/runner-alias.js +1 -1
  307. package/lib/framework/runner.js +1 -1
  308. package/lib/framework/schema-export.js +1 -1
  309. package/lib/framework/supported-flags.js +1 -1
  310. package/lib/framework/types.js +1 -1
  311. package/lib/generated/build-info.d.ts +4 -4
  312. package/lib/generated/build-info.js +1 -1
  313. package/lib/generated/official-routing.js +1 -1
  314. package/lib/generated/routing-contract.js +1 -1
  315. package/lib/help.js +1 -1
  316. package/lib/postinstall.js +1 -1
  317. package/lib/runtime/confirmation.js +1 -1
  318. package/lib/runtime/event.js +1 -1
  319. package/lib/runtime/index.js +1 -1
  320. package/lib/runtime/queue.js +1 -1
  321. package/lib/runtime/resolve.js +1 -1
  322. package/lib/skills/builtin-skill.js +1 -1
  323. package/lib/skills/main.js +1 -1
  324. package/lib/skills/npx-skills-add.js +1 -1
  325. package/lib/skills/skill-presence.js +1 -1
  326. package/lib/telemetry/cli-command-trace.js +1 -1
  327. package/lib/telemetry/cli-help-trace.js +1 -1
  328. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  329. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  330. package/lib/telemetry/send-cli-trace-log.js +1 -1
  331. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  332. package/lib/utils/ai_config.js +1 -1
  333. package/lib/utils/apply-jq-filter.js +1 -1
  334. package/lib/utils/cdn-config.js +1 -1
  335. package/lib/utils/check-sdk-version.js +1 -1
  336. package/lib/utils/cli-version-check.js +1 -1
  337. package/lib/utils/cli-version-policy.js +1 -1
  338. package/lib/utils/config.js +1 -1
  339. package/lib/utils/entity-with-id.js +1 -1
  340. package/lib/utils/file-utils.js +1 -1
  341. package/lib/utils/guides-cdn.js +1 -1
  342. package/lib/utils/http-client.js +1 -1
  343. package/lib/utils/is-non-interactive.js +1 -1
  344. package/lib/utils/logger.js +1 -1
  345. package/lib/utils/params.js +1 -1
  346. package/lib/utils/platform.js +1 -1
  347. package/lib/utils/sleep.js +1 -1
  348. package/lib/utils/template-replacer.js +1 -1
  349. package/lib/utils/update-notice.js +1 -1
  350. package/lib/utils/version.js +1 -1
  351. package/lib/utils/with-active-cookie.js +1 -1
  352. package/lib/utils/write-cli-side-channel.js +1 -1
  353. package/package.json +1 -1
  354. package/skills/rabetbase/SKILL.md +3 -2
  355. package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
  356. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a240_0x39417e=a240_0x14e1;(function(_0x194f00,_0x2a8cbd){const _0x2cad31=a240_0x14e1,_0x1ceb81=_0x194f00();while(!![]){try{const _0x181e14=-parseInt(_0x2cad31(0x1fd))/0x1+-parseInt(_0x2cad31(0x1f2))/0x2+-parseInt(_0x2cad31(0x1fe))/0x3+-parseInt(_0x2cad31(0x1ef))/0x4*(parseInt(_0x2cad31(0x1fa))/0x5)+parseInt(_0x2cad31(0x1f5))/0x6+parseInt(_0x2cad31(0x1fc))/0x7*(parseInt(_0x2cad31(0x1fb))/0x8)+parseInt(_0x2cad31(0x1f7))/0x9;if(_0x181e14===_0x2a8cbd)break;else _0x1ceb81['push'](_0x1ceb81['shift']());}catch(_0x5bc6e5){_0x1ceb81['push'](_0x1ceb81['shift']());}}}(a240_0x3e38,0x767d9));function a240_0x14e1(_0x15a202,_0x4d3ad8){_0x15a202=_0x15a202-0x1e3;const _0x3e38d4=a240_0x3e38();let _0x14e197=_0x3e38d4[_0x15a202];return _0x14e197;}import{listSqlQueries}from'../../core/api-client.js';function a240_0x3e38(){const _0x461fcd=['\x20missing,\x20','1169358dtTAVy','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','keys','4646814zabzll','has','11822031rjgIwP','map','appCode','5LGeSZe','8tkCVeV','4491438vgJsLU','816861gYkgKk','50928GaYrDP','hash','\x20added,\x20','\x20modified,\x20','\x20remote-only','sqlRoot','sqls','paging','push','lockFilePath','relativePath','remote','lockKey','\x20unchanged','tableData','status','read','sqlName','length','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','3303236aHNgXl','sql'];a240_0x3e38=function(){return _0x461fcd;};return a240_0x3e38();}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';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x536548){const _0x1ccc17=a240_0x14e1,_0x2bf69d=[];let _0x282430=0x1;while(!![]){const _0x3971a7=await listSqlQueries(_0x536548,{'currentPage':_0x282430,'pageSize':PAGE_SIZE}),_0x4056e9=_0x3971a7[_0x1ccc17(0x1e9)]??[];_0x2bf69d[_0x1ccc17(0x1e3)](..._0x4056e9[_0x1ccc17(0x1f8)](_0x393136=>_0x393136['sqlCode']));if(_0x4056e9[_0x1ccc17(0x1ed)]===0x0)break;const _0x52771d=_0x3971a7[_0x1ccc17(0x205)]?.['totalCount'];if(_0x52771d!=null?_0x2bf69d[_0x1ccc17(0x1ed)]>=_0x52771d:_0x4056e9[_0x1ccc17(0x1ed)]<PAGE_SIZE)break;_0x282430++;}return _0x2bf69d;}export const sqlStatus={'service':a240_0x39417e(0x1f0),'command':'status','description':a240_0x39417e(0x1ee),'risk':a240_0x39417e(0x1eb),'flags':[{'name':'remote','type':'boolean','description':a240_0x39417e(0x1f3)}],async 'execute'(_0x853731){const _0x1fe09c=a240_0x39417e,_0x298061=loadSqlProjectConfig(_0x853731[_0x1fe09c(0x1f9)]),_0x34ef06=await readSqlLockFile(_0x298061[_0x1fe09c(0x1e4)]),{appLock:_0x2f5359}=ensureSqlLockScope(_0x34ef06??createEmptySqlLock(),_0x298061['appCode'],_0x298061[_0x1fe09c(0x203)],_0x1fe09c(0x1ea)),_0xe27a31=await scanLocalSqlQueries(_0x298061),_0x164a10=[],_0x13f1a1=[],_0x1d6595=[],_0x5c4b01=[],_0x45b994=new Set(_0xe27a31[_0x1fe09c(0x1f8)](_0x28055d=>_0x28055d[_0x1fe09c(0x1e7)]));for(const _0x141b3c of _0xe27a31){const _0x58f312=await computeSqlFileHash(_0x141b3c['filePath']),_0x178208=_0x2f5359[_0x1fe09c(0x204)][_0x141b3c[_0x1fe09c(0x1e7)]],_0x44dc95=!!_0x178208&&_0x178208['path']!==_0x141b3c[_0x1fe09c(0x1e5)],_0x2f0e5c=!!_0x178208&&!!_0x141b3c[_0x1fe09c(0x1ec)]&&_0x178208[_0x1fe09c(0x1ec)]!==_0x141b3c['sqlName'];if(!_0x178208)_0x164a10[_0x1fe09c(0x1e3)](_0x141b3c[_0x1fe09c(0x1e7)]);else _0x178208[_0x1fe09c(0x1ff)]!==_0x58f312||_0x44dc95||_0x2f0e5c?_0x13f1a1[_0x1fe09c(0x1e3)](_0x141b3c[_0x1fe09c(0x1e7)]):_0x1d6595[_0x1fe09c(0x1e3)](_0x141b3c[_0x1fe09c(0x1e7)]);}for(const _0xc2aa1 of Object[_0x1fe09c(0x1f4)](_0x2f5359[_0x1fe09c(0x204)])){!_0x45b994[_0x1fe09c(0x1f6)](_0xc2aa1)&&_0x5c4b01[_0x1fe09c(0x1e3)](_0xc2aa1);}const _0x75f2d2=[];if(_0x853731['bool'](_0x1fe09c(0x1e6))){const _0x5b6fdb=await fetchAllSqlCodes(_0x853731[_0x1fe09c(0x1f9)]);for(const _0x15aeaa of _0x5b6fdb){!_0x45b994[_0x1fe09c(0x1f6)](_0x15aeaa)&&!_0x2f5359[_0x1fe09c(0x204)][_0x15aeaa]&&_0x75f2d2['push'](_0x15aeaa);}}const _0x3c2100=_0x164a10[_0x1fe09c(0x1ed)]===0x0&&_0x13f1a1['length']===0x0&&_0x5c4b01['length']===0x0&&_0x75f2d2['length']===0x0;return{'ok':!![],'data':{'added':_0x164a10,'modified':_0x13f1a1,'missing':_0x5c4b01,'unchanged':_0x1d6595,'remoteOnly':_0x75f2d2},'message':_0x3c2100?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x164a10[_0x1fe09c(0x1ed)]+_0x1fe09c(0x200)+_0x13f1a1[_0x1fe09c(0x1ed)]+_0x1fe09c(0x201)+_0x5c4b01[_0x1fe09c(0x1ed)]+_0x1fe09c(0x1f1)+_0x1d6595[_0x1fe09c(0x1ed)]+_0x1fe09c(0x1e8)+(_0x75f2d2[_0x1fe09c(0x1ed)]>0x0?',\x20'+_0x75f2d2['length']+_0x1fe09c(0x202):'')};}};
1
+ const a240_0x31a2bc=a240_0x33a9;(function(_0x2888cc,_0x58736c){const _0x5c28ae=a240_0x33a9,_0x5f0981=_0x2888cc();while(!![]){try{const _0x52a4a6=-parseInt(_0x5c28ae(0x11f))/0x1+-parseInt(_0x5c28ae(0x110))/0x2+-parseInt(_0x5c28ae(0x10c))/0x3+-parseInt(_0x5c28ae(0x128))/0x4+parseInt(_0x5c28ae(0x123))/0x5*(-parseInt(_0x5c28ae(0x112))/0x6)+-parseInt(_0x5c28ae(0x114))/0x7+parseInt(_0x5c28ae(0x12b))/0x8;if(_0x52a4a6===_0x58736c)break;else _0x5f0981['push'](_0x5f0981['shift']());}catch(_0x2c9e16){_0x5f0981['push'](_0x5f0981['shift']());}}}(a240_0x34e4,0x56675));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';function a240_0x34e4(){const _0x4c611c=['Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','status','\x20missing,\x20','sqlCode','appCode','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','map','lockFilePath','hash','121423jzMqCF','\x20modified,\x20','\x20remote-only','\x20added,\x20','307605ytNyqH','bool','paging','has','tableData','68256YGlJuO','sqls','sql','18180488fTFqfw','relativePath','boolean','All\x20SQL\x20queries\x20are\x20in\x20sync.','lockKey','700281kfFOqT','push','sqlRoot','length','1174334CfSLyB','remote','30AaGRuq','path','4563762FqPlsT','\x20unchanged'];a240_0x34e4=function(){return _0x4c611c;};return a240_0x34e4();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a240_0x33a9(_0x5e38d6,_0x949fa9){_0x5e38d6=_0x5e38d6-0x10c;const _0x34e40e=a240_0x34e4();let _0x33a93d=_0x34e40e[_0x5e38d6];return _0x33a93d;}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x3fb725){const _0x54b6de=a240_0x33a9,_0x3e9f5e=[];let _0x570901=0x1;while(!![]){const _0x1ddff7=await listSqlQueries(_0x3fb725,{'currentPage':_0x570901,'pageSize':PAGE_SIZE}),_0x5750ce=_0x1ddff7[_0x54b6de(0x127)]??[];_0x3e9f5e[_0x54b6de(0x10d)](..._0x5750ce[_0x54b6de(0x11c)](_0x3f7dd6=>_0x3f7dd6[_0x54b6de(0x119)]));if(_0x5750ce[_0x54b6de(0x10f)]===0x0)break;const _0x113d2d=_0x1ddff7[_0x54b6de(0x125)]?.['totalCount'];if(_0x113d2d!=null?_0x3e9f5e['length']>=_0x113d2d:_0x5750ce['length']<PAGE_SIZE)break;_0x570901++;}return _0x3e9f5e;}export const sqlStatus={'service':a240_0x31a2bc(0x12a),'command':'status','description':a240_0x31a2bc(0x116),'risk':'read','flags':[{'name':a240_0x31a2bc(0x111),'type':a240_0x31a2bc(0x12d),'description':a240_0x31a2bc(0x11b)}],async 'execute'(_0x1abcc0){const _0x124d56=a240_0x31a2bc,_0x3b5b40=loadSqlProjectConfig(_0x1abcc0[_0x124d56(0x11a)]),_0x9af5ae=await readSqlLockFile(_0x3b5b40[_0x124d56(0x11d)]),{appLock:_0x2a6303}=ensureSqlLockScope(_0x9af5ae??createEmptySqlLock(),_0x3b5b40[_0x124d56(0x11a)],_0x3b5b40[_0x124d56(0x10e)],_0x124d56(0x117)),_0x4dd7de=await scanLocalSqlQueries(_0x3b5b40),_0x2512b5=[],_0x5ba20f=[],_0x466207=[],_0x5a4ac0=[],_0x3896a7=new Set(_0x4dd7de[_0x124d56(0x11c)](_0x16a618=>_0x16a618[_0x124d56(0x12f)]));for(const _0x2ee12b of _0x4dd7de){const _0x5cc9b3=await computeSqlFileHash(_0x2ee12b['filePath']),_0x28de96=_0x2a6303[_0x124d56(0x129)][_0x2ee12b[_0x124d56(0x12f)]],_0x214d43=!!_0x28de96&&_0x28de96[_0x124d56(0x113)]!==_0x2ee12b[_0x124d56(0x12c)],_0x230302=!!_0x28de96&&!!_0x2ee12b['sqlName']&&_0x28de96['sqlName']!==_0x2ee12b['sqlName'];if(!_0x28de96)_0x2512b5[_0x124d56(0x10d)](_0x2ee12b[_0x124d56(0x12f)]);else _0x28de96[_0x124d56(0x11e)]!==_0x5cc9b3||_0x214d43||_0x230302?_0x5ba20f[_0x124d56(0x10d)](_0x2ee12b[_0x124d56(0x12f)]):_0x466207[_0x124d56(0x10d)](_0x2ee12b[_0x124d56(0x12f)]);}for(const _0xa9f32f of Object['keys'](_0x2a6303['sqls'])){!_0x3896a7[_0x124d56(0x126)](_0xa9f32f)&&_0x5a4ac0[_0x124d56(0x10d)](_0xa9f32f);}const _0x8d71be=[];if(_0x1abcc0[_0x124d56(0x124)](_0x124d56(0x111))){const _0x51bf88=await fetchAllSqlCodes(_0x1abcc0[_0x124d56(0x11a)]);for(const _0x1f01b4 of _0x51bf88){!_0x3896a7[_0x124d56(0x126)](_0x1f01b4)&&!_0x2a6303[_0x124d56(0x129)][_0x1f01b4]&&_0x8d71be[_0x124d56(0x10d)](_0x1f01b4);}}const _0xbba3e8=_0x2512b5[_0x124d56(0x10f)]===0x0&&_0x5ba20f[_0x124d56(0x10f)]===0x0&&_0x5a4ac0[_0x124d56(0x10f)]===0x0&&_0x8d71be['length']===0x0;return{'ok':!![],'data':{'added':_0x2512b5,'modified':_0x5ba20f,'missing':_0x5a4ac0,'unchanged':_0x466207,'remoteOnly':_0x8d71be},'message':_0xbba3e8?_0x124d56(0x12e):_0x2512b5[_0x124d56(0x10f)]+_0x124d56(0x122)+_0x5ba20f[_0x124d56(0x10f)]+_0x124d56(0x120)+_0x5a4ac0[_0x124d56(0x10f)]+_0x124d56(0x118)+_0x466207[_0x124d56(0x10f)]+_0x124d56(0x115)+(_0x8d71be[_0x124d56(0x10f)]>0x0?',\x20'+_0x8d71be[_0x124d56(0x10f)]+_0x124d56(0x121):'')};}};
@@ -1 +1 @@
1
- const a241_0x314b82=a241_0x3e4e;(function(_0x2ad4c8,_0xa08315){const _0x11485d=a241_0x3e4e,_0x4bcb73=_0x2ad4c8();while(!![]){try{const _0x5332db=parseInt(_0x11485d(0x171))/0x1+parseInt(_0x11485d(0x16a))/0x2+parseInt(_0x11485d(0x162))/0x3+parseInt(_0x11485d(0x170))/0x4+parseInt(_0x11485d(0x180))/0x5*(parseInt(_0x11485d(0x18b))/0x6)+-parseInt(_0x11485d(0x164))/0x7*(parseInt(_0x11485d(0x150))/0x8)+-parseInt(_0x11485d(0x17f))/0x9*(-parseInt(_0x11485d(0x178))/0xa);if(_0x5332db===_0xa08315)break;else _0x4bcb73['push'](_0x4bcb73['shift']());}catch(_0x7739b9){_0x4bcb73['push'](_0x4bcb73['shift']());}}}(a241_0x1c5b,0xd2719));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';function a241_0x1c5b(){const _0x8ca3b3=['valid','SQL\x20schema\x20validation','columns','1678640ngVdoP','isLockingRead','parameters','read','--check-indexes\x20requires\x20--schemas.','isDangerous','index_columns','36jpUeKx','273050DpaVRe','sql','size','push','fields','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','boolean','message','index_type','isArray','flagMissing','48COdIMh','filter','from','Provide\x20--file\x20or\x20--sql','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','bool','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','str','8BLtbAX','schemaWarnings','string','check-indexes','schemas','map','split','joinAudit','dataset','dbtableConfig','cwd','type','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','index_name','tables','name','trim','columnNames','696231KlaXlr','indexName','7519813anIeFe','isSelectOnly','primary','tableName','file','sqlType','638886ebboNr','indexes','reason','validation','find','validate','321508cVmuej','196003QnEDeL','flatMap','length','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'];a241_0x1c5b=function(){return _0x8ca3b3;};return a241_0x1c5b();}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':'sql','command':a241_0x314b82(0x16f),'description':a241_0x314b82(0x185),'risk':a241_0x314b82(0x17b),'flags':[{'name':'file','type':a241_0x314b82(0x152),'description':a241_0x314b82(0x174)},{'name':a241_0x314b82(0x181),'type':a241_0x314b82(0x152),'description':a241_0x314b82(0x14e)},{'name':'schemas','type':'string','description':a241_0x314b82(0x15c)},{'name':a241_0x314b82(0x153),'type':a241_0x314b82(0x186),'description':a241_0x314b82(0x14c)}],async 'execute'(_0x46dfb0){const _0x40c35c=a241_0x314b82,_0x1607cd=_0x46dfb0[_0x40c35c(0x14f)](_0x40c35c(0x168)),_0x18815c=_0x46dfb0[_0x40c35c(0x14f)]('sql'),_0x136f6c=_0x46dfb0[_0x40c35c(0x14f)](_0x40c35c(0x154)),_0x17d88b=_0x46dfb0[_0x40c35c(0x14d)](_0x40c35c(0x153));if(!_0x1607cd&&!_0x18815c)throw CliErrors[_0x40c35c(0x18a)]('file',_0x40c35c(0x14b));if(_0x17d88b&&!_0x136f6c)throw CliErrors[_0x40c35c(0x16d)](_0x40c35c(0x17c));let _0x2251bc;if(_0x1607cd){const _0x29c34b=resolve(process[_0x40c35c(0x15a)](),_0x1607cd);if(!existsSync(_0x29c34b))throw CliErrors[_0x40c35c(0x16d)]('File\x20not\x20found:\x20'+_0x29c34b);_0x2251bc=readFileSync(_0x29c34b,'utf-8');}else _0x2251bc=_0x18815c;const _0x22f806=validateSql(_0x2251bc),_0x56c66f={'valid':_0x22f806['valid'],'sqlType':_0x22f806[_0x40c35c(0x169)]['type'],'isSelectOnly':_0x22f806[_0x40c35c(0x169)][_0x40c35c(0x165)],'isLockingRead':_0x22f806[_0x40c35c(0x169)][_0x40c35c(0x179)]??![],'isDangerous':_0x22f806[_0x40c35c(0x169)][_0x40c35c(0x17d)],'tables':_0x22f806[_0x40c35c(0x15e)],'parameters':_0x22f806[_0x40c35c(0x17a)],'message':_0x22f806[_0x40c35c(0x187)]};_0x22f806[_0x40c35c(0x169)]['reason']&&(_0x56c66f['reason']=_0x22f806[_0x40c35c(0x169)][_0x40c35c(0x16c)]);if(_0x136f6c&&_0x22f806[_0x40c35c(0x175)]){const _0x4c4f37=_0x136f6c[_0x40c35c(0x156)](',')[_0x40c35c(0x155)](_0x14d291=>_0x14d291['trim']())['filter'](Boolean),_0x32df08=[],_0x151e3c=[],_0x59c61a=filterDbTableBackedDatasets(await listDatasets(_0x46dfb0['appCode'])),_0x313b84=new Map(_0x59c61a[_0x40c35c(0x155)](_0x20fc81=>[_0x20fc81[_0x40c35c(0x159)]?.[_0x40c35c(0x167)]?.['toLowerCase'](),_0x20fc81]));for(const _0x4ebe1f of _0x22f806[_0x40c35c(0x15e)]){const _0x4e444e=_0x313b84['get'](_0x4ebe1f['toLowerCase']());!_0x4e444e&&_0x32df08[_0x40c35c(0x183)]('Table\x20\x22'+_0x4ebe1f+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x463c11 of _0x4c4f37){let _0x3f2d9c;try{_0x3f2d9c=await getDatasetDetail(_0x463c11);}catch{_0x32df08[_0x40c35c(0x183)]('Dataset\x20\x22'+_0x463c11+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x3f2d9c,_0x40c35c(0x176));const _0x10e20f=Array[_0x40c35c(0x189)](_0x3f2d9c[_0x40c35c(0x184)])?_0x3f2d9c['fields']:[],_0x1ad39f=new Set(_0x10e20f[_0x40c35c(0x155)](_0x214739=>_0x214739['name']?.['toLowerCase']())),_0x1aa837=_0x3f2d9c[_0x40c35c(0x159)]?.[_0x40c35c(0x167)]||_0x3f2d9c[_0x40c35c(0x167)]||_0x463c11;_0x56c66f['schema:'+_0x1aa837]={'code':_0x463c11,'tableName':_0x1aa837,'fieldCount':_0x1ad39f[_0x40c35c(0x182)],'fields':Array[_0x40c35c(0x14a)](_0x1ad39f)};if(_0x17d88b){const _0x9d67ae=normalizeDatasetIndexes(_0x3f2d9c);_0x151e3c['push']({'tableName':_0x1aa837,..._0x9d67ae});}}_0x32df08['length']>0x0&&(_0x56c66f[_0x40c35c(0x151)]=_0x32df08),_0x17d88b&&(_0x56c66f[_0x40c35c(0x157)]=auditSqlJoinIndexes(_0x2251bc,_0x151e3c));}return{'ok':_0x22f806[_0x40c35c(0x175)],'data':_0x56c66f,'message':_0x22f806[_0x40c35c(0x187)]};}};function a241_0x3e4e(_0x3b18ee,_0x561067){_0x3b18ee=_0x3b18ee-0x149;const _0x1c5b3d=a241_0x1c5b();let _0x3e4ec4=_0x1c5b3d[_0x3b18ee];return _0x3e4ec4;}function normalizeDatasetIndexes(_0x107c04){const _0x4be1fb=a241_0x314b82,_0x55736e=Array['isArray'](_0x107c04?.[_0x4be1fb(0x158)]?.[_0x4be1fb(0x16b)])?_0x107c04[_0x4be1fb(0x158)][_0x4be1fb(0x16b)]:Array['isArray'](_0x107c04?.[_0x4be1fb(0x16b)])?_0x107c04[_0x4be1fb(0x16b)]:[],_0x42e812=_0x55736e[_0x4be1fb(0x172)](_0x4dda5a=>{const _0xff61b7=_0x4be1fb,_0x590301=Array['isArray'](_0x4dda5a?.[_0xff61b7(0x17e)])?_0x4dda5a[_0xff61b7(0x17e)]:Array['isArray'](_0x4dda5a?.[_0xff61b7(0x161)])?_0x4dda5a[_0xff61b7(0x161)]:Array[_0xff61b7(0x189)](_0x4dda5a?.[_0xff61b7(0x177)])?_0x4dda5a[_0xff61b7(0x177)]:[],_0x1db983=_0x590301[_0xff61b7(0x149)](_0x225a9e=>typeof _0x225a9e===_0xff61b7(0x152))['map'](_0x5ddbbe=>_0x5ddbbe[_0xff61b7(0x160)]())[_0xff61b7(0x149)](Boolean);if(_0x1db983[_0xff61b7(0x173)]===0x0)return[];const _0x32274b=[_0x4dda5a?.[_0xff61b7(0x163)],_0x4dda5a?.[_0xff61b7(0x15d)],_0x4dda5a?.[_0xff61b7(0x15f)]][_0xff61b7(0x16e)](_0x3d3530=>typeof _0x3d3530===_0xff61b7(0x152)&&_0x3d3530[_0xff61b7(0x160)]()),_0x3c6504=[_0x4dda5a?.[_0xff61b7(0x188)],_0x4dda5a?.[_0xff61b7(0x15b)]][_0xff61b7(0x16e)](_0x437950=>typeof _0x437950==='string'&&_0x437950[_0xff61b7(0x160)]());return[{..._0x32274b?{'name':_0x32274b['trim']()}:{},..._0x3c6504?{'type':_0x3c6504[_0xff61b7(0x160)]()}:{},'columns':_0x1db983}];}),_0x958b15=[..._0x42e812],_0xfbd062=typeof _0x107c04?.['dbtableConfig']?.['pkField']==='string'?_0x107c04['dbtableConfig']['pkField'][_0x4be1fb(0x156)](',')[_0x4be1fb(0x155)](_0x12f9c4=>_0x12f9c4[_0x4be1fb(0x160)]())['filter'](Boolean):[];return _0xfbd062[_0x4be1fb(0x173)]>0x0&&_0x958b15['unshift']({'type':_0x4be1fb(0x166),'columns':_0xfbd062}),{'indexes':_0x958b15,'metadataAvailable':_0x42e812[_0x4be1fb(0x173)]>0x0};}
1
+ const a241_0x32f6fe=a241_0xf43f;(function(_0x20c099,_0x370649){const _0x5b3f29=a241_0xf43f,_0x4b49e4=_0x20c099();while(!![]){try{const _0x45b13d=parseInt(_0x5b3f29(0x77))/0x1+-parseInt(_0x5b3f29(0x8b))/0x2*(parseInt(_0x5b3f29(0x8f))/0x3)+parseInt(_0x5b3f29(0x68))/0x4+-parseInt(_0x5b3f29(0x70))/0x5+-parseInt(_0x5b3f29(0x76))/0x6*(parseInt(_0x5b3f29(0x90))/0x7)+parseInt(_0x5b3f29(0x6a))/0x8+parseInt(_0x5b3f29(0x6e))/0x9;if(_0x45b13d===_0x370649)break;else _0x4b49e4['push'](_0x4b49e4['shift']());}catch(_0x126e1f){_0x4b49e4['push'](_0x4b49e4['shift']());}}}(a241_0x3c91,0xb79c1));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';function a241_0x3c91(){const _0x301094=['cwd','bool','isLockingRead','40338ItTcgN','581406tZGIVd','check-indexes','get','reason','map','read','boolean','columnNames','trim','SQL\x20schema\x20validation','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','toLowerCase','index_columns','schema:','size','fields','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','isDangerous','indexes','split','462536LfnUJv','Provide\x20--file\x20or\x20--sql','filter','name','12ASVhOV','1477NqcyQr','find','push','file','schemas','primary','sql','Dataset\x20\x22','unshift','joinAudit','validation','type','index_name','\x22\x20not\x20found\x20in\x20any\x20dataset','isArray','Table\x20\x22','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','str','valid','appCode','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','pkField','isSelectOnly','from','File\x20not\x20found:\x20','string','tables','index_type','1547756rIXjDC','message','10339664uBDcxv','sqlType','length','flagMissing','7700094GxAeCl','dbtableConfig','103395ycctMs','dataset','tableName'];a241_0x3c91=function(){return _0x301094;};return a241_0x3c91();}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a241_0xf43f(_0x36e094,_0xeb1a56){_0x36e094=_0x36e094-0x67;const _0x3c913f=a241_0x3c91();let _0xf43f8d=_0x3c913f[_0x36e094];return _0xf43f8d;}export const sqlValidate={'service':'sql','command':'validate','description':a241_0x32f6fe(0x81),'risk':a241_0x32f6fe(0x7c),'flags':[{'name':a241_0x32f6fe(0x93),'type':a241_0x32f6fe(0xaa),'description':a241_0x32f6fe(0xa0)},{'name':'sql','type':a241_0x32f6fe(0xaa),'description':a241_0x32f6fe(0xa4)},{'name':a241_0x32f6fe(0x94),'type':'string','description':a241_0x32f6fe(0x87)},{'name':'check-indexes','type':a241_0x32f6fe(0x7d),'description':a241_0x32f6fe(0xa5)}],async 'execute'(_0xe46fcb){const _0x159918=a241_0x32f6fe,_0x4d7de1=_0xe46fcb[_0x159918(0xa1)](_0x159918(0x93)),_0x86101e=_0xe46fcb[_0x159918(0xa1)](_0x159918(0x96)),_0x21926f=_0xe46fcb[_0x159918(0xa1)]('schemas'),_0x51f37d=_0xe46fcb[_0x159918(0x74)](_0x159918(0x78));if(!_0x4d7de1&&!_0x86101e)throw CliErrors[_0x159918(0x6d)](_0x159918(0x93),_0x159918(0x8c));if(_0x51f37d&&!_0x21926f)throw CliErrors['validation']('--check-indexes\x20requires\x20--schemas.');let _0x3aa6ea;if(_0x4d7de1){const _0x2d7afd=resolve(process[_0x159918(0x73)](),_0x4d7de1);if(!existsSync(_0x2d7afd))throw CliErrors[_0x159918(0x9a)](_0x159918(0xa9)+_0x2d7afd);_0x3aa6ea=readFileSync(_0x2d7afd,'utf-8');}else _0x3aa6ea=_0x86101e;const _0x53a899=validateSql(_0x3aa6ea),_0x17736b={'valid':_0x53a899['valid'],'sqlType':_0x53a899[_0x159918(0x6b)][_0x159918(0x9b)],'isSelectOnly':_0x53a899[_0x159918(0x6b)][_0x159918(0xa7)],'isLockingRead':_0x53a899[_0x159918(0x6b)][_0x159918(0x75)]??![],'isDangerous':_0x53a899[_0x159918(0x6b)][_0x159918(0x88)],'tables':_0x53a899[_0x159918(0xab)],'parameters':_0x53a899['parameters'],'message':_0x53a899[_0x159918(0x69)]};_0x53a899[_0x159918(0x6b)][_0x159918(0x7a)]&&(_0x17736b['reason']=_0x53a899[_0x159918(0x6b)]['reason']);if(_0x21926f&&_0x53a899[_0x159918(0xa2)]){const _0x1eb61c=_0x21926f[_0x159918(0x8a)](',')['map'](_0x4cf6be=>_0x4cf6be[_0x159918(0x7f)]())['filter'](Boolean),_0x3c97c3=[],_0x211a95=[],_0x511697=filterDbTableBackedDatasets(await listDatasets(_0xe46fcb[_0x159918(0xa3)])),_0x301e1d=new Map(_0x511697['map'](_0x24c2ca=>[_0x24c2ca[_0x159918(0x6f)]?.['tableName']?.[_0x159918(0x82)](),_0x24c2ca]));for(const _0x1e9944 of _0x53a899['tables']){const _0x309968=_0x301e1d[_0x159918(0x79)](_0x1e9944[_0x159918(0x82)]());!_0x309968&&_0x3c97c3['push'](_0x159918(0x9f)+_0x1e9944+_0x159918(0x9d));}for(const _0x41e090 of _0x1eb61c){let _0x438e9e;try{_0x438e9e=await getDatasetDetail(_0x41e090);}catch{_0x3c97c3[_0x159918(0x92)](_0x159918(0x97)+_0x41e090+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x438e9e,_0x159918(0x80));const _0x3d313d=Array[_0x159918(0x9e)](_0x438e9e['fields'])?_0x438e9e[_0x159918(0x86)]:[],_0x7cd849=new Set(_0x3d313d[_0x159918(0x7b)](_0x1bc33b=>_0x1bc33b['name']?.[_0x159918(0x82)]())),_0x2dc103=_0x438e9e[_0x159918(0x6f)]?.[_0x159918(0x72)]||_0x438e9e[_0x159918(0x72)]||_0x41e090;_0x17736b[_0x159918(0x84)+_0x2dc103]={'code':_0x41e090,'tableName':_0x2dc103,'fieldCount':_0x7cd849[_0x159918(0x85)],'fields':Array[_0x159918(0xa8)](_0x7cd849)};if(_0x51f37d){const _0x494e1d=normalizeDatasetIndexes(_0x438e9e);_0x211a95['push']({'tableName':_0x2dc103,..._0x494e1d});}}_0x3c97c3['length']>0x0&&(_0x17736b['schemaWarnings']=_0x3c97c3),_0x51f37d&&(_0x17736b[_0x159918(0x99)]=auditSqlJoinIndexes(_0x3aa6ea,_0x211a95));}return{'ok':_0x53a899[_0x159918(0xa2)],'data':_0x17736b,'message':_0x53a899[_0x159918(0x69)]};}};function normalizeDatasetIndexes(_0x3fa69b){const _0x43e228=a241_0x32f6fe,_0x541fe1=Array[_0x43e228(0x9e)](_0x3fa69b?.[_0x43e228(0x71)]?.['indexes'])?_0x3fa69b[_0x43e228(0x71)]['indexes']:Array['isArray'](_0x3fa69b?.[_0x43e228(0x89)])?_0x3fa69b[_0x43e228(0x89)]:[],_0x3b90df=_0x541fe1['flatMap'](_0x1b35f5=>{const _0xa182eb=_0x43e228,_0x1ccfaa=Array[_0xa182eb(0x9e)](_0x1b35f5?.[_0xa182eb(0x83)])?_0x1b35f5[_0xa182eb(0x83)]:Array[_0xa182eb(0x9e)](_0x1b35f5?.[_0xa182eb(0x7e)])?_0x1b35f5[_0xa182eb(0x7e)]:Array[_0xa182eb(0x9e)](_0x1b35f5?.['columns'])?_0x1b35f5['columns']:[],_0x520f2e=_0x1ccfaa[_0xa182eb(0x8d)](_0x17b028=>typeof _0x17b028===_0xa182eb(0xaa))['map'](_0x218122=>_0x218122['trim']())[_0xa182eb(0x8d)](Boolean);if(_0x520f2e[_0xa182eb(0x6c)]===0x0)return[];const _0x6255d6=[_0x1b35f5?.['indexName'],_0x1b35f5?.[_0xa182eb(0x9c)],_0x1b35f5?.[_0xa182eb(0x8e)]][_0xa182eb(0x91)](_0x171435=>typeof _0x171435===_0xa182eb(0xaa)&&_0x171435[_0xa182eb(0x7f)]()),_0x2dca99=[_0x1b35f5?.[_0xa182eb(0x67)],_0x1b35f5?.[_0xa182eb(0x9b)]][_0xa182eb(0x91)](_0x16b281=>typeof _0x16b281===_0xa182eb(0xaa)&&_0x16b281[_0xa182eb(0x7f)]());return[{..._0x6255d6?{'name':_0x6255d6[_0xa182eb(0x7f)]()}:{},..._0x2dca99?{'type':_0x2dca99['trim']()}:{},'columns':_0x520f2e}];}),_0x139ba9=[..._0x3b90df],_0x54564f=typeof _0x3fa69b?.[_0x43e228(0x6f)]?.[_0x43e228(0xa6)]===_0x43e228(0xaa)?_0x3fa69b[_0x43e228(0x6f)][_0x43e228(0xa6)]['split'](',')['map'](_0x4b66df=>_0x4b66df[_0x43e228(0x7f)]())[_0x43e228(0x8d)](Boolean):[];return _0x54564f[_0x43e228(0x6c)]>0x0&&_0x139ba9[_0x43e228(0x98)]({'type':_0x43e228(0x95),'columns':_0x54564f}),{'indexes':_0x139ba9,'metadataAvailable':_0x3b90df['length']>0x0};}
@@ -1 +1 @@
1
- function a242_0x3ba8(){const _0x31a169=['70oVYEGh','1555zUnDpj','3388473urNjUC','5178AUYOsh','48SFdTUS','12FfaTMc','2328990fuSdwu','496407FLANUS','7505289ohDAwx','4231GnfxGv','268016FNWdCs'];a242_0x3ba8=function(){return _0x31a169;};return a242_0x3ba8();}function a242_0x5e6d(_0xeeae57,_0x4d274c){_0xeeae57=_0xeeae57-0x1c8;const _0x3ba82e=a242_0x3ba8();let _0x5e6da0=_0x3ba82e[_0xeeae57];return _0x5e6da0;}(function(_0x17b321,_0x5ac7b3){const _0x41d8a4=a242_0x5e6d,_0x529f50=_0x17b321();while(!![]){try{const _0x30ff2d=parseInt(_0x41d8a4(0x1cf))/0x1*(-parseInt(_0x41d8a4(0x1ca))/0x2)+-parseInt(_0x41d8a4(0x1cd))/0x3*(-parseInt(_0x41d8a4(0x1cb))/0x4)+-parseInt(_0x41d8a4(0x1d2))/0x5*(-parseInt(_0x41d8a4(0x1c9))/0x6)+parseInt(_0x41d8a4(0x1d1))/0x7*(-parseInt(_0x41d8a4(0x1d0))/0x8)+parseInt(_0x41d8a4(0x1c8))/0x9+parseInt(_0x41d8a4(0x1cc))/0xa+-parseInt(_0x41d8a4(0x1ce))/0xb;if(_0x30ff2d===_0x5ac7b3)break;else _0x529f50['push'](_0x529f50['shift']());}catch(_0x245645){_0x529f50['push'](_0x529f50['shift']());}}}(a242_0x3ba8,0x3e565));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
1
+ (function(_0x280db5,_0x20a55f){const _0x367154=a242_0xd1d9,_0x28da34=_0x280db5();while(!![]){try{const _0x2c3d3d=parseInt(_0x367154(0x1b9))/0x1+parseInt(_0x367154(0x1bc))/0x2*(parseInt(_0x367154(0x1bd))/0x3)+parseInt(_0x367154(0x1be))/0x4+-parseInt(_0x367154(0x1bb))/0x5*(parseInt(_0x367154(0x1c1))/0x6)+-parseInt(_0x367154(0x1c0))/0x7+parseInt(_0x367154(0x1ba))/0x8+-parseInt(_0x367154(0x1bf))/0x9*(parseInt(_0x367154(0x1c2))/0xa);if(_0x2c3d3d===_0x20a55f)break;else _0x28da34['push'](_0x28da34['shift']());}catch(_0x5e200e){_0x28da34['push'](_0x28da34['shift']());}}}(a242_0x1e61,0x479e9));function a242_0xd1d9(_0x2f18aa,_0x435faa){_0x2f18aa=_0x2f18aa-0x1b9;const _0x1e6129=a242_0x1e61();let _0xd1d90d=_0x1e6129[_0x2f18aa];return _0xd1d90d;}function a242_0x1e61(){const _0x579705=['95320rxxcZU','166XLwofv','19581llDkEd','1732780lqWlYh','7099803XQwVdl','4000640HAesny','18rmpeyF','10vxwuSK','328840UOPLNV','3257248dMhVla'];a242_0x1e61=function(){return _0x579705;};return a242_0x1e61();}import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
@@ -1 +1 @@
1
- const a243_0x1c63a9=a243_0x282b;(function(_0x1302ea,_0x3cf742){const _0x404529=a243_0x282b,_0x442024=_0x1302ea();while(!![]){try{const _0x328054=-parseInt(_0x404529(0x172))/0x1*(-parseInt(_0x404529(0x16b))/0x2)+-parseInt(_0x404529(0x16e))/0x3+parseInt(_0x404529(0x167))/0x4*(parseInt(_0x404529(0x178))/0x5)+-parseInt(_0x404529(0x175))/0x6+-parseInt(_0x404529(0x176))/0x7*(-parseInt(_0x404529(0x173))/0x8)+-parseInt(_0x404529(0x16a))/0x9+parseInt(_0x404529(0x171))/0xa;if(_0x328054===_0x3cf742)break;else _0x442024['push'](_0x442024['shift']());}catch(_0x53dffd){_0x442024['push'](_0x442024['shift']());}}}(a243_0x4e3e,0x97106));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a243_0x4e3e(){const _0x458ab7=['flagMissing','str','11947640mBjgyU','3ZxYrZq','8nQzPXr','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','7326120qoSmyb','6913781MGBFmc','task-id','20GEvKZI','apiError','trim','appCode','isTerminal','taskId','188632HEltIV','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','status','5869674LlbHKu','678802LoVquK','string','compress','2691954aadqHj'];a243_0x4e3e=function(){return _0x458ab7;};return a243_0x4e3e();}function a243_0x282b(_0x69e376,_0x4246ae){_0x69e376=_0x69e376-0x167;const _0x4e3ed9=a243_0x4e3e();let _0x282ba7=_0x4e3ed9[_0x69e376];return _0x282ba7;}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':a243_0x1c63a9(0x169),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':'read','defaultOutputFormat':a243_0x1c63a9(0x16d),'structuredErrors':!![],'flags':[{'name':a243_0x1c63a9(0x177),'type':a243_0x1c63a9(0x16c),'required':!![],'description':a243_0x1c63a9(0x174)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x525606){const _0x53d08d=a243_0x1c63a9;if(!_0x525606[_0x53d08d(0x170)](_0x53d08d(0x177))[_0x53d08d(0x17a)]())throw CliErrors[_0x53d08d(0x16f)](_0x53d08d(0x177));},async 'execute'(_0x6d993f){const _0xbb0123=a243_0x1c63a9,_0x3afdd3=_0x6d993f[_0xbb0123(0x170)]('task-id')['trim'](),_0x390f7d=normalizeAsyncTask(await getAsyncTaskStatus(_0x3afdd3,_0x6d993f['appCode'],_0x6d993f['cookie']));if(_0x390f7d[_0xbb0123(0x17d)]!==_0x3afdd3)throw CliErrors[_0xbb0123(0x179)](_0xbb0123(0x168)+_0x3afdd3+',\x20received\x20'+_0x390f7d[_0xbb0123(0x17d)]+'.');const _0x69a810=buildAsyncTaskStatusCommand(_0x390f7d[_0xbb0123(0x17d)],_0x6d993f[_0xbb0123(0x17b)]);return{'ok':!![],'message':asyncTaskMessage(_0x390f7d),'data':{'appCode':_0x6d993f['appCode'],..._0x390f7d,'query':_0x390f7d[_0xbb0123(0x17c)]?null:{'command':_0x69a810}}};}};
1
+ const a243_0x8f6d3f=a243_0x3ab6;(function(_0x445096,_0x11b5fe){const _0x4f51cb=a243_0x3ab6,_0x511045=_0x445096();while(!![]){try{const _0x4ea84f=-parseInt(_0x4f51cb(0xf3))/0x1+parseInt(_0x4f51cb(0x101))/0x2*(-parseInt(_0x4f51cb(0xf7))/0x3)+-parseInt(_0x4f51cb(0x107))/0x4+-parseInt(_0x4f51cb(0xf4))/0x5*(-parseInt(_0x4f51cb(0xef))/0x6)+-parseInt(_0x4f51cb(0xfa))/0x7+-parseInt(_0x4f51cb(0xf5))/0x8+parseInt(_0x4f51cb(0x104))/0x9*(parseInt(_0x4f51cb(0xf8))/0xa);if(_0x4ea84f===_0x11b5fe)break;else _0x511045['push'](_0x511045['shift']());}catch(_0x51d8a7){_0x511045['push'](_0x511045['shift']());}}}(a243_0x38e0,0x2504a));function a243_0x3ab6(_0xe8d85c,_0x46a5f0){_0xe8d85c=_0xe8d85c-0xef;const _0x38e0b1=a243_0x38e0();let _0x3ab694=_0x38e0b1[_0xe8d85c];return _0x3ab694;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a243_0x38e0(){const _0x1d83ba=['Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','appCode','apiError','78641CYLAlD','53265nxuCqN','1195824laoZFH','read','6033TEtzBO','3940940YrzsRr','flagMissing','33222RHNAZP','string','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','task-id','status','taskId','256CfrhyW','trim','cookie','18qSVLjX','str',',\x20received\x20','627768NUgqaH','compress','6PNybYk'];a243_0x38e0=function(){return _0x1d83ba;};return a243_0x38e0();}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':a243_0x8f6d3f(0xff),'description':a243_0x8f6d3f(0xf0),'risk':a243_0x8f6d3f(0xf6),'defaultOutputFormat':a243_0x8f6d3f(0x108),'structuredErrors':!![],'flags':[{'name':a243_0x8f6d3f(0xfe),'type':a243_0x8f6d3f(0xfb),'required':!![],'description':a243_0x8f6d3f(0xfd)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x505eea){const _0xb31959=a243_0x8f6d3f;if(!_0x505eea[_0xb31959(0x105)](_0xb31959(0xfe))[_0xb31959(0x102)]())throw CliErrors[_0xb31959(0xf9)]('task-id');},async 'execute'(_0x21e7bb){const _0x3efd5d=a243_0x8f6d3f,_0x16a66d=_0x21e7bb[_0x3efd5d(0x105)](_0x3efd5d(0xfe))[_0x3efd5d(0x102)](),_0x5044e3=normalizeAsyncTask(await getAsyncTaskStatus(_0x16a66d,_0x21e7bb[_0x3efd5d(0xf1)],_0x21e7bb[_0x3efd5d(0x103)]));if(_0x5044e3[_0x3efd5d(0x100)]!==_0x16a66d)throw CliErrors[_0x3efd5d(0xf2)](_0x3efd5d(0xfc)+_0x16a66d+_0x3efd5d(0x106)+_0x5044e3[_0x3efd5d(0x100)]+'.');const _0x3781e7=buildAsyncTaskStatusCommand(_0x5044e3[_0x3efd5d(0x100)],_0x21e7bb[_0x3efd5d(0xf1)]);return{'ok':!![],'message':asyncTaskMessage(_0x5044e3),'data':{'appCode':_0x21e7bb[_0x3efd5d(0xf1)],..._0x5044e3,'query':_0x5044e3['isTerminal']?null:{'command':_0x3781e7}}};}};
@@ -1 +1 @@
1
- (function(_0xc26fed,_0x1fb342){const _0x195a6d=a244_0x355b,_0x58c37c=_0xc26fed();while(!![]){try{const _0xcbe3b8=parseInt(_0x195a6d(0x95))/0x1+parseInt(_0x195a6d(0x97))/0x2*(-parseInt(_0x195a6d(0x98))/0x3)+-parseInt(_0x195a6d(0x94))/0x4*(parseInt(_0x195a6d(0x9c))/0x5)+-parseInt(_0x195a6d(0x9a))/0x6*(parseInt(_0x195a6d(0x99))/0x7)+parseInt(_0x195a6d(0x93))/0x8+parseInt(_0x195a6d(0x9d))/0x9*(-parseInt(_0x195a6d(0x96))/0xa)+parseInt(_0x195a6d(0x9b))/0xb;if(_0xcbe3b8===_0x1fb342)break;else _0x58c37c['push'](_0x58c37c['shift']());}catch(_0x4dce21){_0x58c37c['push'](_0x58c37c['shift']());}}}(a244_0x4d14,0x1e168));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';function a244_0x4d14(){const _0xeb5583=['5047031vDctBE','17430KZJVCn','1125jfGszd','1395824kNyidp','252JyGuyQ','32694pvHLFV','50dLSPzG','516JIyyCK','2817xqayZF','140434tqjscG','24mpAxFX'];a244_0x4d14=function(){return _0xeb5583;};return a244_0x4d14();}function a244_0x355b(_0x119ab1,_0x259aef){_0x119ab1=_0x119ab1-0x93;const _0x4d146d=a244_0x4d14();let _0x355ba6=_0x4d146d[_0x119ab1];return _0x355ba6;}export const tenantDefinitions=[tenantMembersListDefinition];
1
+ (function(_0x48e5db,_0x2b33b1){const _0x4c20d8=a244_0x192d,_0x199e56=_0x48e5db();while(!![]){try{const _0x9ce069=parseInt(_0x4c20d8(0x88))/0x1+parseInt(_0x4c20d8(0x86))/0x2*(parseInt(_0x4c20d8(0x84))/0x3)+parseInt(_0x4c20d8(0x85))/0x4+parseInt(_0x4c20d8(0x89))/0x5+parseInt(_0x4c20d8(0x87))/0x6+-parseInt(_0x4c20d8(0x8b))/0x7+-parseInt(_0x4c20d8(0x8a))/0x8*(parseInt(_0x4c20d8(0x8c))/0x9);if(_0x9ce069===_0x2b33b1)break;else _0x199e56['push'](_0x199e56['shift']());}catch(_0x5683ac){_0x199e56['push'](_0x199e56['shift']());}}}(a244_0x2041,0xb9f2a));function a244_0x2041(){const _0x1feece=['51MLPfhU','2576296fhKWnJ','89854SDVYcZ','1348170XpFzIX','790393VcBIJD','865895oXACLY','400xhWsNz','9239706JoOUhk','92610WvuqTP'];a244_0x2041=function(){return _0x1feece;};return a244_0x2041();}import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';function a244_0x192d(_0x3e32f5,_0x2faeac){_0x3e32f5=_0x3e32f5-0x84;const _0x204139=a244_0x2041();let _0x192d95=_0x204139[_0x3e32f5];return _0x192d95;}export const tenantDefinitions=[tenantMembersListDefinition];
@@ -1 +1 @@
1
- function a245_0x4a68(){const _0x5bebf6=['tenant-code','63yOgBld','3mDjRzu','Found\x20','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','484HiBlzz','81MDVyCC','trim','length','flagMissing','string','683892oNpIyK','57910zFaLwg','347860GXRFEP','583454cCQaLy','Exact\x20tenant\x20code','str','234953KoXlqB','Pass\x20--tenant-code\x20<code>.','139506dxJSfi','members-list','269320bXUudf'];a245_0x4a68=function(){return _0x5bebf6;};return a245_0x4a68();}const a245_0x265ff0=a245_0x57b1;(function(_0x171403,_0x4ae4f8){const _0x3ad19e=a245_0x57b1,_0x209a17=_0x171403();while(!![]){try{const _0x5be191=-parseInt(_0x3ad19e(0x131))/0x1+-parseInt(_0x3ad19e(0x12e))/0x2*(-parseInt(_0x3ad19e(0x138))/0x3)+-parseInt(_0x3ad19e(0x12b))/0x4+-parseInt(_0x3ad19e(0x12d))/0x5+parseInt(_0x3ad19e(0x133))/0x6*(-parseInt(_0x3ad19e(0x137))/0x7)+-parseInt(_0x3ad19e(0x135))/0x8*(-parseInt(_0x3ad19e(0x13c))/0x9)+-parseInt(_0x3ad19e(0x12c))/0xa*(-parseInt(_0x3ad19e(0x13b))/0xb);if(_0x5be191===_0x4ae4f8)break;else _0x209a17['push'](_0x209a17['shift']());}catch(_0x11bba8){_0x209a17['push'](_0x209a17['shift']());}}}(a245_0x4a68,0x28397));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';function a245_0x57b1(_0x386d02,_0x1a3091){_0x386d02=_0x386d02-0x127;const _0x4a68a6=a245_0x4a68();let _0x57b10b=_0x4a68a6[_0x386d02];return _0x57b10b;}export const tenantMembersListDefinition={'service':'tenant','command':a245_0x265ff0(0x134),'description':a245_0x265ff0(0x13a),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a245_0x265ff0(0x136),'type':a245_0x265ff0(0x12a),'required':!![],'description':a245_0x265ff0(0x12f)}],async 'validate'(_0x44c836){const _0x6b5a15=a245_0x265ff0;if(!_0x44c836[_0x6b5a15(0x130)]('tenant-code')[_0x6b5a15(0x127)]())throw CliErrors[_0x6b5a15(0x129)](_0x6b5a15(0x136),_0x6b5a15(0x132));},async 'execute'(_0x4da1ee){const _0x38d147=a245_0x265ff0,_0x3c4704=_0x4da1ee[_0x38d147(0x130)](_0x38d147(0x136))[_0x38d147(0x127)](),_0x19f3e8=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x3c4704,_0x19f3e8);const _0x7c04b7=projectTenantMembers(await listTenantDirectoryMembers(_0x3c4704));return{'ok':!![],'data':{'tenantCode':_0x3c4704,'items':_0x7c04b7,'totalCount':_0x7c04b7[_0x38d147(0x128)]},'message':_0x38d147(0x139)+_0x7c04b7[_0x38d147(0x128)]+'\x20tenant\x20member(s)'};}};
1
+ const a245_0x3c0915=a245_0x5e5f;(function(_0x356fe7,_0x56dc80){const _0x153e31=a245_0x5e5f,_0x3c592d=_0x356fe7();while(!![]){try{const _0x57f006=-parseInt(_0x153e31(0x1c9))/0x1+parseInt(_0x153e31(0x1ba))/0x2*(-parseInt(_0x153e31(0x1c5))/0x3)+-parseInt(_0x153e31(0x1cd))/0x4*(parseInt(_0x153e31(0x1bf))/0x5)+-parseInt(_0x153e31(0x1c3))/0x6*(parseInt(_0x153e31(0x1cf))/0x7)+-parseInt(_0x153e31(0x1c0))/0x8*(-parseInt(_0x153e31(0x1bd))/0x9)+-parseInt(_0x153e31(0x1c2))/0xa*(-parseInt(_0x153e31(0x1c7))/0xb)+parseInt(_0x153e31(0x1c8))/0xc;if(_0x57f006===_0x56dc80)break;else _0x3c592d['push'](_0x3c592d['shift']());}catch(_0x202196){_0x3c592d['push'](_0x3c592d['shift']());}}}(a245_0x61ad,0x2eba1));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';function a245_0x61ad(){const _0x4409f1=['11266824NJthyM','212022PLWrRb','length','str','tenant-code','988alhhPR','Found\x20','1431843sehuyN','\x20tenant\x20member(s)','574oOepcS','Pass\x20--tenant-code\x20<code>.','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','10746bLXpDY','members-list','4145yYOFIm','976xaiKDd','trim','312560OrqtVv','6fcvdJv','Exact\x20tenant\x20code','3495xRlPeR','flagMissing','22HqFBmR'];a245_0x61ad=function(){return _0x4409f1;};return a245_0x61ad();}function a245_0x5e5f(_0x134643,_0xcc0ce3){_0x134643=_0x134643-0x1ba;const _0x61ad34=a245_0x61ad();let _0x5e5ff4=_0x61ad34[_0x134643];return _0x5e5ff4;}import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':'tenant','command':a245_0x3c0915(0x1be),'description':a245_0x3c0915(0x1bc),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a245_0x3c0915(0x1cc),'type':'string','required':!![],'description':a245_0x3c0915(0x1c4)}],async 'validate'(_0x115242){const _0x351ef6=a245_0x3c0915;if(!_0x115242['str'](_0x351ef6(0x1cc))[_0x351ef6(0x1c1)]())throw CliErrors[_0x351ef6(0x1c6)](_0x351ef6(0x1cc),_0x351ef6(0x1bb));},async 'execute'(_0x3041fe){const _0x286954=a245_0x3c0915,_0x2d0480=_0x3041fe[_0x286954(0x1cb)](_0x286954(0x1cc))[_0x286954(0x1c1)](),_0x4e5444=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x2d0480,_0x4e5444);const _0x46ee13=projectTenantMembers(await listTenantDirectoryMembers(_0x2d0480));return{'ok':!![],'data':{'tenantCode':_0x2d0480,'items':_0x46ee13,'totalCount':_0x46ee13[_0x286954(0x1ca)]},'message':_0x286954(0x1ce)+_0x46ee13[_0x286954(0x1ca)]+_0x286954(0x1d0)};}};
@@ -1 +1 @@
1
- function a246_0x4bd4(){const _0x5aa370=['3357784lvHxom','isFinite','displayName','1202254MKcYhE','adminFlag','2274PdajDw','nickname','5285736mLmTZw','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','4602230TNWZUv','1694MrXIPN','status','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','1028145neFXCT','ADMIN','tenantCode','1400912TghHnT','trim','values','set','userId','some','username','get','1UyowTl'];a246_0x4bd4=function(){return _0x5aa370;};return a246_0x4bd4();}(function(_0x25eab6,_0x3b0bb5){const _0x4af17c=a246_0x4b61,_0x373531=_0x25eab6();while(!![]){try{const _0x2a741f=-parseInt(_0x4af17c(0x79))/0x1*(-parseInt(_0x4af17c(0x7d))/0x2)+parseInt(_0x4af17c(0x6e))/0x3+parseInt(_0x4af17c(0x7a))/0x4+-parseInt(_0x4af17c(0x83))/0x5+parseInt(_0x4af17c(0x7f))/0x6*(parseInt(_0x4af17c(0x84))/0x7)+parseInt(_0x4af17c(0x71))/0x8+-parseInt(_0x4af17c(0x81))/0x9;if(_0x2a741f===_0x3b0bb5)break;else _0x373531['push'](_0x373531['shift']());}catch(_0x3d6c02){_0x373531['push'](_0x373531['shift']());}}}(a246_0x4bd4,0x846a2));import{CliErrors}from'../../errors.js';function a246_0x4b61(_0x18de8a,_0x92f627){_0x18de8a=_0x18de8a-0x6c;const _0x4bd418=a246_0x4bd4();let _0x4b61e4=_0x4bd418[_0x18de8a];return _0x4b61e4;}function textOrNull(_0x4ae69e){const _0x272140=a246_0x4b61,_0x1c2fb1=_0x4ae69e?.[_0x272140(0x72)]();return _0x1c2fb1?_0x1c2fb1:null;}export function projectTenantMembers(_0x5cfad7){const _0x1d1cdf=a246_0x4b61,_0x736454=new Map();for(const _0x49219e of _0x5cfad7){const _0x35c667=Number(_0x49219e[_0x1d1cdf(0x75)]);if(!Number[_0x1d1cdf(0x7b)](_0x35c667)||_0x35c667<=0x0)continue;const _0x52893f={'userId':_0x35c667,'username':textOrNull(_0x49219e['username']),'displayName':textOrNull(_0x49219e[_0x1d1cdf(0x80)]),'role':_0x49219e[_0x1d1cdf(0x7e)]===!![]?_0x1d1cdf(0x6f):'MEMBER','status':textOrNull(_0x49219e['status'])},_0x573260=_0x736454[_0x1d1cdf(0x78)](_0x35c667);if(!_0x573260){_0x736454[_0x1d1cdf(0x74)](_0x35c667,_0x52893f);continue;}_0x573260['username']??=_0x52893f[_0x1d1cdf(0x77)],_0x573260[_0x1d1cdf(0x7c)]??=_0x52893f[_0x1d1cdf(0x7c)],_0x573260[_0x1d1cdf(0x6c)]??=_0x52893f[_0x1d1cdf(0x6c)];if(_0x52893f['role']===_0x1d1cdf(0x6f))_0x573260['role']=_0x1d1cdf(0x6f);}return[..._0x736454[_0x1d1cdf(0x73)]()]['sort']((_0x2906d0,_0x19bfe9)=>_0x2906d0[_0x1d1cdf(0x75)]-_0x19bfe9[_0x1d1cdf(0x75)]);}export function assertTenantAccessible(_0x256c25,_0x215cca){const _0x5baa49=a246_0x4b61;if(_0x215cca[_0x5baa49(0x76)](_0x345761=>_0x345761[_0x5baa49(0x70)]===_0x256c25))return;throw CliErrors['validation']('Tenant\x20\x22'+_0x256c25+_0x5baa49(0x82),_0x5baa49(0x6d));}
1
+ (function(_0xf8dd81,_0x45eae8){const _0x1f5d7e=a246_0x1cee,_0x27aac2=_0xf8dd81();while(!![]){try{const _0x4b2d3d=parseInt(_0x1f5d7e(0x13f))/0x1+-parseInt(_0x1f5d7e(0x13c))/0x2+parseInt(_0x1f5d7e(0x134))/0x3*(-parseInt(_0x1f5d7e(0x12c))/0x4)+parseInt(_0x1f5d7e(0x13d))/0x5+parseInt(_0x1f5d7e(0x12f))/0x6*(parseInt(_0x1f5d7e(0x136))/0x7)+parseInt(_0x1f5d7e(0x128))/0x8+-parseInt(_0x1f5d7e(0x129))/0x9;if(_0x4b2d3d===_0x45eae8)break;else _0x27aac2['push'](_0x27aac2['shift']());}catch(_0x120e6a){_0x27aac2['push'](_0x27aac2['shift']());}}}(a246_0xa686,0x611e5));function a246_0x1cee(_0x5393da,_0x3bb37b){_0x5393da=_0x5393da-0x127;const _0xa68669=a246_0xa686();let _0x1ceead=_0xa68669[_0x5393da];return _0x1ceead;}import{CliErrors}from'../../errors.js';function a246_0xa686(){const _0x2c06d9=['84010hGPhDt','1342255YQQXKX','role','75862QNtXdq','values','get','Tenant\x20\x22','5482328iXwEED','8040132vjJTPS','sort','ADMIN','549260AJENhf','adminFlag','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','738wCxGOE','tenantCode','status','userId','some','9nYxfFq','MEMBER','40719ycNrcT','nickname','displayName','username','trim','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.'];a246_0xa686=function(){return _0x2c06d9;};return a246_0xa686();}function textOrNull(_0x12fda3){const _0x142b65=a246_0x1cee,_0x2eb776=_0x12fda3?.[_0x142b65(0x13a)]();return _0x2eb776?_0x2eb776:null;}export function projectTenantMembers(_0x4d98d9){const _0x39616b=a246_0x1cee,_0x3805f8=new Map();for(const _0x4200e6 of _0x4d98d9){const _0x2177ff=Number(_0x4200e6[_0x39616b(0x132)]);if(!Number['isFinite'](_0x2177ff)||_0x2177ff<=0x0)continue;const _0x20dc54={'userId':_0x2177ff,'username':textOrNull(_0x4200e6[_0x39616b(0x139)]),'displayName':textOrNull(_0x4200e6[_0x39616b(0x137)]),'role':_0x4200e6[_0x39616b(0x12d)]===!![]?_0x39616b(0x12b):_0x39616b(0x135),'status':textOrNull(_0x4200e6['status'])},_0x2b512f=_0x3805f8[_0x39616b(0x141)](_0x2177ff);if(!_0x2b512f){_0x3805f8['set'](_0x2177ff,_0x20dc54);continue;}_0x2b512f[_0x39616b(0x139)]??=_0x20dc54[_0x39616b(0x139)],_0x2b512f[_0x39616b(0x138)]??=_0x20dc54[_0x39616b(0x138)],_0x2b512f[_0x39616b(0x131)]??=_0x20dc54[_0x39616b(0x131)];if(_0x20dc54[_0x39616b(0x13e)]===_0x39616b(0x12b))_0x2b512f['role']=_0x39616b(0x12b);}return[..._0x3805f8[_0x39616b(0x140)]()][_0x39616b(0x12a)]((_0x34c888,_0x3eae4f)=>_0x34c888[_0x39616b(0x132)]-_0x3eae4f['userId']);}export function assertTenantAccessible(_0x5a3f00,_0x46c063){const _0x22a0c9=a246_0x1cee;if(_0x46c063[_0x22a0c9(0x133)](_0x13425e=>_0x13425e[_0x22a0c9(0x130)]===_0x5a3f00))return;throw CliErrors['validation'](_0x22a0c9(0x127)+_0x5a3f00+_0x22a0c9(0x12e),_0x22a0c9(0x13b));}
@@ -1 +1 @@
1
- const a247_0x39b194=a247_0x19af;(function(_0x2873fc,_0x204922){const _0xb55a3f=a247_0x19af,_0x5d4d48=_0x2873fc();while(!![]){try{const _0x1f6411=-parseInt(_0xb55a3f(0xa9))/0x1+-parseInt(_0xb55a3f(0xa2))/0x2*(-parseInt(_0xb55a3f(0xab))/0x3)+parseInt(_0xb55a3f(0xaf))/0x4*(parseInt(_0xb55a3f(0xaa))/0x5)+parseInt(_0xb55a3f(0xb7))/0x6*(-parseInt(_0xb55a3f(0xad))/0x7)+-parseInt(_0xb55a3f(0xb2))/0x8*(-parseInt(_0xb55a3f(0xae))/0x9)+parseInt(_0xb55a3f(0xa6))/0xa+-parseInt(_0xb55a3f(0xac))/0xb;if(_0x1f6411===_0x204922)break;else _0x5d4d48['push'](_0x5d4d48['shift']());}catch(_0x6e56c6){_0x5d4d48['push'](_0x5d4d48['shift']());}}}(a247_0x4d48,0x686c8));import{asDryRunResult}from'../../commands/common/dry-run.js';function a247_0x4d48(){const _0x398f84=['validation','741734BcJOng','POST','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','ding-talk-user-id','3487520isQLlX','write','str','419362oNCQKy','327925ulFRYi','3BMkwpl','4170771tIXmCF','14RqiuHI','36aHTNGn','40APbfuC','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','user-account','869144cAhpWQ','apiError','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','dingtalk','--ding-talk-user-id\x20cannot\x20be\x20empty.','1751394zZHTVA','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','string'];a247_0x4d48=function(){return _0x398f84;};return a247_0x4d48();}import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID=a247_0x39b194(0xb5),CURRENT_BINDING_WARNING=a247_0x39b194(0xa4);function readDingTalkUserId(_0x1f7e4c){const _0xa25966=a247_0x39b194,_0x1144d5=_0x1f7e4c[_0xa25966(0xa8)](_0xa25966(0xa5))['trim']();if(!_0x1144d5)throw CliErrors[_0xa25966(0xa1)](_0xa25966(0xb6),_0xa25966(0x9f));return _0x1144d5;}function a247_0x19af(_0x7407f2,_0x5b62ea){_0x7407f2=_0x7407f2-0x9f;const _0x4d48a3=a247_0x4d48();let _0x19afd6=_0x4d48a3[_0x7407f2];return _0x19afd6;}function buildBindingData(_0x25088b,_0x4899b6){const _0x58d087=a247_0x39b194;return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x25088b},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x25088b,'bound':!![]},'dryRun':_0x4899b6,'backend':{'method':_0x58d087(0xa3),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a247_0x39b194(0xb1),'command':'dingding-sandbox-bind','description':a247_0x39b194(0xb4),'risk':a247_0x39b194(0xa7),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a247_0x39b194(0xa5),'type':a247_0x39b194(0xa0),'required':!![],'description':'DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox'}],async 'validate'(_0x45f2b5){readDingTalkUserId(_0x45f2b5);},async 'dryRun'(_0x31ddd3){const _0x4b1400=a247_0x39b194,_0x3af1f7=readDingTalkUserId(_0x31ddd3);return asDryRunResult(buildBindingData(_0x3af1f7,!![]),{'method':_0x4b1400(0xa3),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x5df5bf){const _0x3dfb54=a247_0x39b194,_0x52a6cc=readDingTalkUserId(_0x5df5bf),_0x17121d=await bindDingTalkSandboxAccount(_0x52a6cc);if(_0x17121d!==!![])throw CliErrors[_0x3dfb54(0xb3)]('DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.');return{'ok':!![],'data':buildBindingData(_0x52a6cc,![]),'message':_0x3dfb54(0xb0)};}};
1
+ function a247_0x31db(){const _0x13bbe3=['1107xYWEUB','user-account','154bZirSZ','validation','163961Cwmkxg','--ding-talk-user-id\x20cannot\x20be\x20empty.','35MrGtsW','DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','string','568OqWNoR','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','apiError','DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','2065QQSlLa','507ImzjKX','dingding-sandbox-bind','ding-talk-user-id','137180wtfJdd','3824376QXLTFB','trim','70ckJZyW','146226BUWzwv','13704eYHmcO','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','str','POST'];a247_0x31db=function(){return _0x13bbe3;};return a247_0x31db();}const a247_0xda06f6=a247_0x3057;(function(_0x47faee,_0x1d78a1){const _0x53359a=a247_0x3057,_0x403a53=_0x47faee();while(!![]){try{const _0x38119f=-parseInt(_0x53359a(0x170))/0x1+-parseInt(_0x53359a(0x166))/0x2*(-parseInt(_0x53359a(0x160))/0x3)+parseInt(_0x53359a(0x15a))/0x4*(parseInt(_0x53359a(0x15f))/0x5)+-parseInt(_0x53359a(0x167))/0x6*(-parseInt(_0x53359a(0x157))/0x7)+parseInt(_0x53359a(0x168))/0x8*(parseInt(_0x53359a(0x16c))/0x9)+-parseInt(_0x53359a(0x163))/0xa*(-parseInt(_0x53359a(0x16e))/0xb)+-parseInt(_0x53359a(0x164))/0xc;if(_0x38119f===_0x1d78a1)break;else _0x403a53['push'](_0x403a53['shift']());}catch(_0x567cc0){_0x403a53['push'](_0x403a53['shift']());}}}(a247_0x31db,0x1a00c));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';function a247_0x3057(_0x21dacf,_0x46107b){_0x21dacf=_0x21dacf-0x156;const _0x31db04=a247_0x31db();let _0x3057ca=_0x31db04[_0x21dacf];return _0x3057ca;}import{CliErrors}from'../../errors.js';const PROVIDER_ID='dingtalk',CURRENT_BINDING_WARNING=a247_0xda06f6(0x169);function readDingTalkUserId(_0x12fa22){const _0x1fa494=a247_0xda06f6,_0x68bd47=_0x12fa22[_0x1fa494(0x16a)](_0x1fa494(0x162))[_0x1fa494(0x165)]();if(!_0x68bd47)throw CliErrors[_0x1fa494(0x16f)](_0x1fa494(0x156),_0x1fa494(0x15b));return _0x68bd47;}function buildBindingData(_0x49da1b,_0x905c02){const _0x59027d=a247_0xda06f6;return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x49da1b},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x49da1b,'bound':!![]},'dryRun':_0x905c02,'backend':{'method':_0x59027d(0x16b),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a247_0xda06f6(0x16d),'command':a247_0xda06f6(0x161),'description':a247_0xda06f6(0x15c),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':'ding-talk-user-id','type':a247_0xda06f6(0x159),'required':!![],'description':a247_0xda06f6(0x158)}],async 'validate'(_0x47fde3){readDingTalkUserId(_0x47fde3);},async 'dryRun'(_0x839e84){const _0x29a4da=a247_0xda06f6,_0x55763a=readDingTalkUserId(_0x839e84);return asDryRunResult(buildBindingData(_0x55763a,!![]),{'method':_0x29a4da(0x16b),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x392b04){const _0x4bfd00=a247_0xda06f6,_0x2f4f98=readDingTalkUserId(_0x392b04),_0x64a5f2=await bindDingTalkSandboxAccount(_0x2f4f98);if(_0x64a5f2!==!![])throw CliErrors[_0x4bfd00(0x15d)](_0x4bfd00(0x15e),'Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.');return{'ok':!![],'data':buildBindingData(_0x2f4f98,![]),'message':'Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.'};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const feishuBind: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a248_0x4018ee=a248_0x4b70;(function(_0x2de7f8,_0x3dfbfe){const _0x4d2322=a248_0x4b70,_0x425f4f=_0x2de7f8();while(!![]){try{const _0xf68c1a=parseInt(_0x4d2322(0x118))/0x1+-parseInt(_0x4d2322(0x11b))/0x2*(parseInt(_0x4d2322(0x123))/0x3)+parseInt(_0x4d2322(0x11a))/0x4*(-parseInt(_0x4d2322(0x132))/0x5)+parseInt(_0x4d2322(0x117))/0x6*(-parseInt(_0x4d2322(0x11c))/0x7)+parseInt(_0x4d2322(0x12c))/0x8*(-parseInt(_0x4d2322(0x122))/0x9)+-parseInt(_0x4d2322(0x12f))/0xa+parseInt(_0x4d2322(0x11d))/0xb;if(_0xf68c1a===_0x3dfbfe)break;else _0x425f4f['push'](_0x425f4f['shift']());}catch(_0x48acfd){_0x425f4f['push'](_0x425f4f['shift']());}}}(a248_0x5b73,0xbf303));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindFeishuAccount,FEISHU_BIND_PATH}from'../../core/api-client.js';function a248_0x4b70(_0xb4ceca,_0x273957){_0xb4ceca=_0xb4ceca-0x116;const _0x5b73d0=a248_0x5b73();let _0x4b7042=_0x5b73d0[_0xb4ceca];return _0x4b7042;}function a248_0x5b73(){const _0x2a70da=['bind','feishu-bind','36968BhhcIv','Pass\x20a\x20Feishu\x20open\x20id\x20such\x20as\x20ou_example_001.','test','11574190UVEXLl','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','Feishu\x20account\x20binding\x20was\x20not\x20confirmed.','14355iDZjFu','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20Feishu\x20account','18PAMGJX','773257sBvIFR','Verify\x20the\x20current\x20binding\x20through\x20the\x20platform\x20before\x20explicitly\x20retrying;\x20do\x20not\x20automatically\x20retry.','1212VRNITB','551902EoZFhG','2963387SYVtZg','43633689EFROMP','validation','POST','str','Feishu\x20open\x20id\x20for\x20the\x20configured\x20Feishu\x20application','747yBNmph','3iBnkRJ','open-id','--open-id\x20must\x20match\x20ou_\x20followed\x20by\x20letters,\x20digits,\x20underscores,\x20or\x20hyphens.','user-account','feishu','write','Bound\x20current\x20user\x20to\x20Feishu\x20account.'];a248_0x5b73=function(){return _0x2a70da;};return a248_0x5b73();}import{CliErrors}from'../../errors.js';const PROVIDER_ID=a248_0x4018ee(0x127),CURRENT_BINDING_WARNING=a248_0x4018ee(0x130);function readOpenId(_0x50ca01){const _0x57ab7e=a248_0x4018ee,_0x47ced1=_0x50ca01[_0x57ab7e(0x120)](_0x57ab7e(0x124))['trim']();if(!/^ou_[A-Za-z0-9_-]+$/[_0x57ab7e(0x12e)](_0x47ced1))throw CliErrors[_0x57ab7e(0x11e)](_0x57ab7e(0x125),_0x57ab7e(0x12d));return _0x47ced1;}function buildBindingData(_0x1884df,_0x246aca){const _0x35097c=a248_0x4018ee;return{'operation':_0x35097c(0x12a),'selector':{'providerId':PROVIDER_ID,'openId':_0x1884df},'before':null,'after':{'providerId':PROVIDER_ID,'openId':_0x1884df,'bound':!![]},'dryRun':_0x246aca,'backend':{'method':_0x35097c(0x11f),'path':FEISHU_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const feishuBind={'service':a248_0x4018ee(0x126),'command':a248_0x4018ee(0x12b),'description':a248_0x4018ee(0x116),'risk':a248_0x4018ee(0x128),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a248_0x4018ee(0x124),'type':'string','required':!![],'description':a248_0x4018ee(0x121)}],async 'validate'(_0x1b833e){readOpenId(_0x1b833e);},async 'dryRun'(_0x46dee1){const _0x4dd1d2=a248_0x4018ee,_0x38127a=readOpenId(_0x46dee1);return asDryRunResult(buildBindingData(_0x38127a,!![]),{'method':_0x4dd1d2(0x11f),'url':FEISHU_BIND_PATH});},async 'execute'(_0x54e3fc){const _0xb7f8cf=a248_0x4018ee,_0x1855c6=readOpenId(_0x54e3fc),_0xd793ee=await bindFeishuAccount(_0x1855c6);if(_0xd793ee!==!![])throw CliErrors['apiError'](_0xb7f8cf(0x131),_0xb7f8cf(0x119));return{'ok':!![],'data':buildBindingData(_0x1855c6,![]),'message':_0xb7f8cf(0x129)};}};
@@ -1 +1 @@
1
- function a248_0x78b2(_0x3d9c7e,_0x42f59c){_0x3d9c7e=_0x3d9c7e-0xc8;const _0x301d05=a248_0x301d();let _0x78b260=_0x301d05[_0x3d9c7e];return _0x78b260;}(function(_0x564a16,_0x35e6a0){const _0x3ef385=a248_0x78b2,_0x517ac2=_0x564a16();while(!![]){try{const _0x8d7abe=-parseInt(_0x3ef385(0xcf))/0x1+parseInt(_0x3ef385(0xc9))/0x2*(parseInt(_0x3ef385(0xd1))/0x3)+parseInt(_0x3ef385(0xc8))/0x4+parseInt(_0x3ef385(0xcb))/0x5*(-parseInt(_0x3ef385(0xd0))/0x6)+-parseInt(_0x3ef385(0xca))/0x7+-parseInt(_0x3ef385(0xcc))/0x8*(-parseInt(_0x3ef385(0xcd))/0x9)+parseInt(_0x3ef385(0xce))/0xa;if(_0x8d7abe===_0x35e6a0)break;else _0x517ac2['push'](_0x517ac2['shift']());}catch(_0x274f29){_0x517ac2['push'](_0x517ac2['shift']());}}}(a248_0x301d,0x760c0));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';function a248_0x301d(){const _0x50d5da=['5124378chzzLF','985770RUUsbv','352BbdunQ','141741YMuZaH','19396030ItWgBd','949053eevMdg','24NSeLDj','12267kwLIhi','857480wahTaC','52XnfrmY'];a248_0x301d=function(){return _0x50d5da;};return a248_0x301d();}export const userAccountDefinitions=[dingTalkSandboxBind];
1
+ function a249_0x7081(_0x2881a5,_0x58d992){_0x2881a5=_0x2881a5-0x10f;const _0x4d2042=a249_0x4d20();let _0x708141=_0x4d2042[_0x2881a5];return _0x708141;}(function(_0x20d8bb,_0x573671){const _0x81ac13=a249_0x7081,_0x555561=_0x20d8bb();while(!![]){try{const _0x12cf4c=-parseInt(_0x81ac13(0x118))/0x1+parseInt(_0x81ac13(0x116))/0x2*(-parseInt(_0x81ac13(0x110))/0x3)+-parseInt(_0x81ac13(0x113))/0x4*(parseInt(_0x81ac13(0x10f))/0x5)+-parseInt(_0x81ac13(0x119))/0x6+parseInt(_0x81ac13(0x117))/0x7*(parseInt(_0x81ac13(0x112))/0x8)+parseInt(_0x81ac13(0x115))/0x9*(-parseInt(_0x81ac13(0x111))/0xa)+parseInt(_0x81ac13(0x114))/0xb;if(_0x12cf4c===_0x573671)break;else _0x555561['push'](_0x555561['shift']());}catch(_0x4428a4){_0x555561['push'](_0x555561['shift']());}}}(a249_0x4d20,0xe0658));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';function a249_0x4d20(){const _0x68487a=['1990776HerWRa','406348kQxCUx','34486573KzEqHz','27cIXDLz','14hylHsg','49ktExzb','1101023ZUVfXv','1270266dQtjvh','25NOupJZ','772857kgDohC','1113140OSIpNL'];a249_0x4d20=function(){return _0x68487a;};return a249_0x4d20();}import{feishuBind}from'../../commands/user-account/feishu-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind,feishuBind];
@@ -1 +1 @@
1
- const a249_0x153a07=a249_0x3aa6;(function(_0x367df3,_0x19ab92){const _0x564bac=a249_0x3aa6,_0x4ea60e=_0x367df3();while(!![]){try{const _0x21aac0=parseInt(_0x564bac(0x1df))/0x1+-parseInt(_0x564bac(0x1e7))/0x2*(parseInt(_0x564bac(0x1e3))/0x3)+-parseInt(_0x564bac(0x1ed))/0x4+parseInt(_0x564bac(0x1e8))/0x5+parseInt(_0x564bac(0x1e6))/0x6*(parseInt(_0x564bac(0x1e2))/0x7)+parseInt(_0x564bac(0x1e5))/0x8*(-parseInt(_0x564bac(0x1e4))/0x9)+parseInt(_0x564bac(0x1eb))/0xa;if(_0x21aac0===_0x19ab92)break;else _0x4ea60e['push'](_0x4ea60e['shift']());}catch(_0x2da780){_0x4ea60e['push'](_0x4ea60e['shift']());}}}(a249_0x1d5f,0x72369));function a249_0x3aa6(_0x1292af,_0x3f430c){_0x1292af=_0x1292af-0x1de;const _0x1d5f00=a249_0x1d5f();let _0x3aa6dd=_0x1d5f00[_0x1292af];return _0x3aa6dd;}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a249_0x1d5f(){const _0x133cd3=['5370960vufUMv','workspace\x20add','2947484IkzfXL','add','473185WwXRXP','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','App\x20profile\x20name','7YTCTIY','521049kCseGm','3586185RZysss','16YZzrTe','5428470vvcwah','2QQpFFa','1301375fpYbqm','write','workspace'];a249_0x1d5f=function(){return _0x133cd3;};return a249_0x1d5f();}export const workspaceAddDefinition={'service':a249_0x153a07(0x1ea),'command':a249_0x153a07(0x1de),'description':a249_0x153a07(0x1e0),'risk':a249_0x153a07(0x1e9),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a249_0x153a07(0x1e1),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x4718fb=>validateAppName(_0x4718fb,a249_0x153a07(0x1ec)),'execute':_0x11024c=>runAppAdd(_0x11024c,a249_0x153a07(0x1ec))};
1
+ const a250_0x44a375=a250_0x3895;(function(_0x31261f,_0x1c77f2){const _0x19080d=a250_0x3895,_0x308d92=_0x31261f();while(!![]){try{const _0x246c31=-parseInt(_0x19080d(0x181))/0x1+-parseInt(_0x19080d(0x17f))/0x2+-parseInt(_0x19080d(0x18b))/0x3*(-parseInt(_0x19080d(0x182))/0x4)+parseInt(_0x19080d(0x18d))/0x5+parseInt(_0x19080d(0x186))/0x6+-parseInt(_0x19080d(0x180))/0x7*(-parseInt(_0x19080d(0x189))/0x8)+-parseInt(_0x19080d(0x18c))/0x9;if(_0x246c31===_0x1c77f2)break;else _0x308d92['push'](_0x308d92['shift']());}catch(_0xc247bb){_0x308d92['push'](_0x308d92['shift']());}}}(a250_0x2dec,0x947b3));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a250_0x44a375(0x185),'command':a250_0x44a375(0x184),'description':a250_0x44a375(0x18a),'risk':a250_0x44a375(0x183),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a250_0x44a375(0x187),'description':a250_0x44a375(0x17e),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0xe258eb=>validateAppName(_0xe258eb,'workspace\x20add'),'execute':_0x33fef1=>runAppAdd(_0x33fef1,a250_0x44a375(0x188))};function a250_0x3895(_0x5e356a,_0xb5a6b4){_0x5e356a=_0x5e356a-0x17e;const _0x2deca3=a250_0x2dec();let _0x3895fd=_0x2deca3[_0x5e356a];return _0x3895fd;}function a250_0x2dec(){const _0x21d848=['48yvzwJE','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','2326257YNtoJK','1108620LqdKuB','1584250mncHlJ','App\x20profile\x20name','1829516qeIgeq','1058050nPloiW','1210995PtpQQb','4eiTSev','write','add','workspace','5147658Lyxvhv','name','workspace\x20add'];a250_0x2dec=function(){return _0x21d848;};return a250_0x2dec();}
@@ -1 +1 @@
1
- const a250_0x5d09ae=a250_0x2e52;(function(_0x28394a,_0x25d237){const _0x279e36=a250_0x2e52,_0x3b0ebc=_0x28394a();while(!![]){try{const _0x4ea84d=-parseInt(_0x279e36(0x169))/0x1*(-parseInt(_0x279e36(0x162))/0x2)+parseInt(_0x279e36(0x19c))/0x3+parseInt(_0x279e36(0x186))/0x4+-parseInt(_0x279e36(0x172))/0x5+-parseInt(_0x279e36(0x181))/0x6*(parseInt(_0x279e36(0x17a))/0x7)+-parseInt(_0x279e36(0x177))/0x8*(parseInt(_0x279e36(0x17d))/0x9)+-parseInt(_0x279e36(0x18a))/0xa;if(_0x4ea84d===_0x25d237)break;else _0x3b0ebc['push'](_0x3b0ebc['shift']());}catch(_0x173a3a){_0x3b0ebc['push'](_0x3b0ebc['shift']());}}}(a250_0x55a6,0x4aa0c));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 a250_0x2e52(_0x46ea29,_0x286986){_0x46ea29=_0x46ea29-0x162;const _0x55a616=a250_0x55a6();let _0x2e5299=_0x55a616[_0x46ea29];return _0x2e5299;}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';import{normalizeStoredDefaultApp}from'../../config/schema.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../../constant/region.js';const WORKSPACE_USAGE=CLI_BIN_NAME+'\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]',SAFE_PROFILE_KEYS=[a250_0x5d09ae(0x164),a250_0x5d09ae(0x168),'region',a250_0x5d09ae(0x187),a250_0x5d09ae(0x18f),a250_0x5d09ae(0x180),a250_0x5d09ae(0x17f),a250_0x5d09ae(0x16e),a250_0x5d09ae(0x19a)],workspaceFlags=[{'name':a250_0x5d09ae(0x16d),'type':a250_0x5d09ae(0x166),'description':a250_0x5d09ae(0x19f)},{'name':a250_0x5d09ae(0x164),'type':a250_0x5d09ae(0x166),'description':a250_0x5d09ae(0x185)},{'name':a250_0x5d09ae(0x168),'type':'string','description':'Join\x20key\x20for\x20app\x20profiles\x20that\x20share\x20one\x20generated\x20API\x20model\x20registry'},{'name':a250_0x5d09ae(0x179),'type':'string','description':a250_0x5d09ae(0x17b),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a250_0x5d09ae(0x187),'type':a250_0x5d09ae(0x166),'description':a250_0x5d09ae(0x167),'enum':[...RABETBASE_ENV_VALUES]},{'name':a250_0x5d09ae(0x18f),'type':'string','description':a250_0x5d09ae(0x196)},{'name':a250_0x5d09ae(0x17c),'type':a250_0x5d09ae(0x166),'description':a250_0x5d09ae(0x18e),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a250_0x5d09ae(0x17f),'type':'number','description':a250_0x5d09ae(0x190)},{'name':a250_0x5d09ae(0x16e),'type':a250_0x5d09ae(0x166),'description':a250_0x5d09ae(0x193),'enum':[...RISK_LEVEL_VALUES]},{'name':a250_0x5d09ae(0x19a),'type':a250_0x5d09ae(0x166),'description':'App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)'}];function isRecord(_0x5123eb){const _0x52d853=a250_0x5d09ae;return!!_0x5123eb&&typeof _0x5123eb===_0x52d853(0x178)&&!Array[_0x52d853(0x170)](_0x5123eb);}function assertValidAppcode(_0x607839){const _0x4c1b13=a250_0x5d09ae,{valid:_0x348bae,message:_0x2c1c7b}=validateAppcode(_0x607839);if(!_0x348bae)throw CliErrors['validation'](_0x4c1b13(0x197)+_0x607839,_0x2c1c7b);}function sanitizeProfile(_0x3173b3){if(!isRecord(_0x3173b3))return{};const _0xadd574={};for(const _0x144ca5 of SAFE_PROFILE_KEYS){if(_0x3173b3[_0x144ca5]!==undefined)_0xadd574[_0x144ca5]=_0x3173b3[_0x144ca5];}return _0xadd574;}function cloneProfile(_0x575d87){return isRecord(_0x575d87)?{..._0x575d87}:{};}function collectWorkspaceProfileOverrides(_0x22e234){const _0xb34bb9=a250_0x5d09ae,_0x5c30b2={},_0x228fc4=_0x22e234[_0xb34bb9(0x189)](_0xb34bb9(0x168)),_0x2b0733=_0x22e234[_0xb34bb9(0x189)](_0xb34bb9(0x179)),_0x2704a8=_0x22e234[_0xb34bb9(0x189)](_0xb34bb9(0x187)),_0x443e9e=_0x22e234[_0xb34bb9(0x189)](_0xb34bb9(0x18f)),_0x3ea34c=_0x22e234[_0xb34bb9(0x189)](_0xb34bb9(0x17c)),_0x4ac455=_0x22e234[_0xb34bb9(0x188)]('pageSize'),_0x2d38a4=_0x22e234[_0xb34bb9(0x189)](_0xb34bb9(0x16e)),_0x4a6361=_0x22e234['str'](_0xb34bb9(0x19a));if(_0x228fc4)_0x5c30b2['apiGroup']=_0x228fc4;if(_0x2b0733)_0x5c30b2[_0xb34bb9(0x179)]=_0x2b0733;if(_0x2704a8)_0x5c30b2[_0xb34bb9(0x187)]=_0x2704a8;if(_0x443e9e)_0x5c30b2[_0xb34bb9(0x18f)]=_0x443e9e;if(_0x3ea34c)_0x5c30b2['format']=_0x3ea34c;if(_0x4ac455!==undefined&&_0x4ac455!=='')_0x5c30b2[_0xb34bb9(0x17f)]=Number(_0x4ac455);if(_0x2d38a4)_0x5c30b2['riskLevel']=_0x2d38a4;if(_0x4a6361)_0x5c30b2[_0xb34bb9(0x19a)]=_0x4a6361;return _0x5c30b2;}function a250_0x55a6(){const _0x54014b=['91269prjlzi','Use\x20`','pageSize','format','15078EkbAxy','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','length','workspace.','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','2213168XiHrQK','env','flag','str','972470tDEpeV','initialized','\x20workspace\x20','App\x20\x22','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','apiDir','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','\x20workspace\x20use\x20--app\x20<name>`.','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','Switch\x20the\x20current\x20workspace\x20app\x20binding','\x22\x20not\x20found.','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','Invalid\x20appcode:\x20','validation','use','locale','\x20--app\x20','253494DvMXMw','workspace','\x20(appcode:\x20','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','16ZgdBLz','keys','appcode','write','string','Target\x20environment','apiGroup','28121mPYcfh','apps','\x20--appcode\x20<code>`.','trim','app','riskLevel','updated','isArray','project','729545RYsPHr','init','Initialize\x20the\x20current\x20workspace\x20app\x20binding','globalConfig','Missing\x20workspace\x20app\x20selector.','208KlcsTD','object','region','140TQhmip','Country/region\x20for\x20this\x20workspace\x20app\x20profile','defaultFormat'];a250_0x55a6=function(){return _0x54014b;};return a250_0x55a6();}async function validateWorkspaceArgs(_0x408dc5){const _0x26bde9=a250_0x5d09ae,_0x191cac=_0x408dc5[_0x26bde9(0x189)](_0x26bde9(0x16d))['trim'](),_0x28864f=_0x408dc5['str'](_0x26bde9(0x164))[_0x26bde9(0x16c)]();if(!_0x191cac&&!_0x28864f)throw CliErrors[_0x26bde9(0x198)](_0x26bde9(0x176),_0x26bde9(0x17e)+CLI_BIN_NAME+_0x26bde9(0x191)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x28864f)assertValidAppcode(_0x28864f);}function resolveKnownApps(){const _0x454dd0=a250_0x5d09ae,{config:_0x3ce5d3,layers:_0x4521f9}=readRawConfigWithLayers(),_0x4b4094=isRecord(_0x3ce5d3[_0x454dd0(0x16a)])?_0x3ce5d3[_0x454dd0(0x16a)]:{},_0x43aa40=isRecord(_0x4521f9[_0x454dd0(0x175)][_0x454dd0(0x16a)])?_0x4521f9['globalConfig'][_0x454dd0(0x16a)]:{};return{..._0x43aa40,..._0x4b4094};}async function configureWorkspace(_0xcd53ac,_0x22c025){const _0x4b715d=a250_0x5d09ae,_0x42fc62=_0xcd53ac['str'](_0x4b715d(0x16d))['trim'](),_0x46be1c=_0xcd53ac[_0x4b715d(0x189)](_0x4b715d(0x164))['trim'](),_0x44fbbc=_0x42fc62||_0x46be1c;if(!_0x44fbbc)throw CliErrors[_0x4b715d(0x198)](_0x4b715d(0x176),'Use\x20`'+CLI_BIN_NAME+_0x4b715d(0x191)+CLI_BIN_NAME+_0x4b715d(0x192));if(_0x46be1c)assertValidAppcode(_0x46be1c);const _0x4e7ca7=resolveWriteConfigPath(_0x4b715d(0x171)),_0x3655a4=readConfigFile(_0x4e7ca7),_0x5929d7=resolveKnownApps(),_0x405f4b=isRecord(_0x3655a4[_0x4b715d(0x16a)])?{..._0x3655a4[_0x4b715d(0x16a)]}:{},_0x334697=cloneProfile(_0x405f4b[_0x44fbbc]),_0x42d9be=sanitizeProfile(_0x5929d7[_0x44fbbc]),_0x2df760=_0x46be1c?{}:_0x42d9be,_0xae187b=_0x46be1c||_0x2df760[_0x4b715d(0x164)];if(!_0xae187b){const _0x203140=Object[_0x4b715d(0x163)](_0x5929d7),_0x586b6a=_0x203140[_0x4b715d(0x183)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x4b715d(0x18c)+_0x22c025+_0x4b715d(0x19b)+_0x44fbbc+_0x4b715d(0x16b):_0x4b715d(0x182)+_0x203140['join'](',\x20');throw CliErrors[_0x4b715d(0x198)](_0x4b715d(0x18d)+_0x44fbbc+_0x4b715d(0x195),_0x586b6a);}assertValidAppcode(String(_0xae187b));const _0x26812c={..._0x2df760,..._0x334697,'appcode':String(_0xae187b),...collectWorkspaceProfileOverrides(_0xcd53ac)};return _0x405f4b[_0x44fbbc]=_0x26812c,_0x3655a4[_0x4b715d(0x16a)]=_0x405f4b,normalizeStoredDefaultApp(_0x3655a4,_0x44fbbc),delete _0x3655a4['appcode'],delete _0x3655a4[_0x4b715d(0x16d)],_0x26812c[_0x4b715d(0x187)]&&(_0x3655a4[_0x4b715d(0x187)]=_0x26812c[_0x4b715d(0x187)]),writeConfigFile(_0x4e7ca7,_0x3655a4),{'ok':!![],'message':'Workspace\x20'+(_0x22c025===_0x4b715d(0x173)?_0x4b715d(0x18b):_0x4b715d(0x16f))+':\x20'+_0x44fbbc+_0x4b715d(0x19e)+_0x26812c[_0x4b715d(0x164)]+').\x20Config:\x20'+_0x4e7ca7+'.\x20Credentials:\x20not\x20written.','data':{'operation':_0x4b715d(0x184)+_0x22c025,'configPath':_0x4e7ca7,'app':_0x44fbbc,'appcode':_0x26812c['appcode'],'apiGroup':_0x26812c[_0x4b715d(0x168)]??null,'region':_0x26812c[_0x4b715d(0x179)]??null,'env':_0x26812c[_0x4b715d(0x187)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a250_0x5d09ae(0x173),'description':a250_0x5d09ae(0x174),'risk':a250_0x5d09ae(0x165),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x2d9a52=>configureWorkspace(_0x2d9a52,a250_0x5d09ae(0x173))},workspaceUseDefinition={'service':a250_0x5d09ae(0x19d),'command':a250_0x5d09ae(0x199),'description':a250_0x5d09ae(0x194),'risk':a250_0x5d09ae(0x165),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x23b487=>configureWorkspace(_0x23b487,a250_0x5d09ae(0x199))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a251_0x4c2033=a251_0x50c1;(function(_0x519752,_0x378e68){const _0x1a68bc=a251_0x50c1,_0x44086d=_0x519752();while(!![]){try{const _0x5c56a2=-parseInt(_0x1a68bc(0x10a))/0x1+-parseInt(_0x1a68bc(0x105))/0x2+parseInt(_0x1a68bc(0x108))/0x3+-parseInt(_0x1a68bc(0xee))/0x4*(parseInt(_0x1a68bc(0x10e))/0x5)+-parseInt(_0x1a68bc(0xda))/0x6*(parseInt(_0x1a68bc(0xe0))/0x7)+-parseInt(_0x1a68bc(0xe2))/0x8*(parseInt(_0x1a68bc(0x101))/0x9)+parseInt(_0x1a68bc(0x112))/0xa;if(_0x5c56a2===_0x378e68)break;else _0x44086d['push'](_0x44086d['shift']());}catch(_0x4de10a){_0x44086d['push'](_0x44086d['shift']());}}}(a251_0x2a00,0x9efcc));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 a251_0x50c1(_0x468a31,_0x3cb0fa){_0x468a31=_0x468a31-0xd7;const _0x2a00fc=a251_0x2a00();let _0x50c15d=_0x2a00fc[_0x468a31];return _0x50c15d;}import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';function a251_0x2a00(){const _0x2df0a6=['riskLevel','apiDir','apiGroup','3322326kUdmhm','Missing\x20workspace\x20app\x20selector.','.\x20Credentials:\x20not\x20written.','app','initialized','Target\x20environment','14DjDePP','Workspace\x20','712gRUVet','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','apps','validation','env','flag','format','\x20--appcode\x20<code>`.','str','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','pageSize','number','3328zAEGuP','region','App\x20\x22','Country/region\x20for\x20this\x20workspace\x20app\x20profile','string','workspace','write','appcode','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','Join\x20key\x20for\x20app\x20profiles\x20that\x20share\x20one\x20generated\x20API\x20model\x20registry',').\x20Config:\x20','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','locale','join','trim','init','108126CVTthI','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','use','\x22\x20not\x20found.','1465518WsSHOe','updated','globalConfig','2344032QMOViL','keys','125438IXPRRZ','Initialize\x20the\x20current\x20workspace\x20app\x20binding','Switch\x20the\x20current\x20workspace\x20app\x20binding','isArray','5440TYMEqs','length','\x20workspace\x20use\x20--app\x20<name>`.','defaultFormat','38099690uArAGZ','\x20--app\x20','Use\x20`','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace'];a251_0x2a00=function(){return _0x2df0a6;};return a251_0x2a00();}import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';import{normalizeStoredDefaultApp}from'../../config/schema.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../../constant/region.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a251_0x4c2033(0x102),SAFE_PROFILE_KEYS=[a251_0x4c2033(0xf5),a251_0x4c2033(0xd9),a251_0x4c2033(0xef),a251_0x4c2033(0xe6),'apiDir',a251_0x4c2033(0xe8),a251_0x4c2033(0xec),a251_0x4c2033(0xd7),'locale'],workspaceFlags=[{'name':a251_0x4c2033(0xdd),'type':'string','description':a251_0x4c2033(0x115)},{'name':a251_0x4c2033(0xf5),'type':'string','description':a251_0x4c2033(0xfc)},{'name':a251_0x4c2033(0xd9),'type':a251_0x4c2033(0xf2),'description':a251_0x4c2033(0xf8)},{'name':a251_0x4c2033(0xef),'type':a251_0x4c2033(0xf2),'description':a251_0x4c2033(0xf1),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a251_0x4c2033(0xe6),'type':a251_0x4c2033(0xf2),'description':a251_0x4c2033(0xdf),'enum':[...RABETBASE_ENV_VALUES]},{'name':a251_0x4c2033(0xd8),'type':a251_0x4c2033(0xf2),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a251_0x4c2033(0x111),'type':a251_0x4c2033(0xf2),'description':a251_0x4c2033(0xeb),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a251_0x4c2033(0xec),'type':a251_0x4c2033(0xed),'description':a251_0x4c2033(0xf6)},{'name':a251_0x4c2033(0xd7),'type':'string','description':a251_0x4c2033(0xe3),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a251_0x4c2033(0xf2),'description':a251_0x4c2033(0xfb)}];function isRecord(_0x2aa702){const _0x2b3c87=a251_0x4c2033;return!!_0x2aa702&&typeof _0x2aa702==='object'&&!Array[_0x2b3c87(0x10d)](_0x2aa702);}function assertValidAppcode(_0x6605ae){const _0x22a0f4=a251_0x4c2033,{valid:_0x599abf,message:_0x474995}=validateAppcode(_0x6605ae);if(!_0x599abf)throw CliErrors[_0x22a0f4(0xe5)]('Invalid\x20appcode:\x20'+_0x6605ae,_0x474995);}function sanitizeProfile(_0x278a6c){if(!isRecord(_0x278a6c))return{};const _0x28194d={};for(const _0x56f4f8 of SAFE_PROFILE_KEYS){if(_0x278a6c[_0x56f4f8]!==undefined)_0x28194d[_0x56f4f8]=_0x278a6c[_0x56f4f8];}return _0x28194d;}function cloneProfile(_0x2bb0ff){return isRecord(_0x2bb0ff)?{..._0x2bb0ff}:{};}function collectWorkspaceProfileOverrides(_0x3b5a06){const _0x180ffb=a251_0x4c2033,_0x3b55d2={},_0x50b6ac=_0x3b5a06[_0x180ffb(0xea)](_0x180ffb(0xd9)),_0x4e722c=_0x3b5a06['str']('region'),_0x5ae8d9=_0x3b5a06[_0x180ffb(0xea)](_0x180ffb(0xe6)),_0x412a72=_0x3b5a06[_0x180ffb(0xea)]('apiDir'),_0x3ccf4f=_0x3b5a06[_0x180ffb(0xea)](_0x180ffb(0x111)),_0x1c660d=_0x3b5a06[_0x180ffb(0xe7)](_0x180ffb(0xec)),_0x3e6e98=_0x3b5a06[_0x180ffb(0xea)]('riskLevel'),_0x56584f=_0x3b5a06[_0x180ffb(0xea)](_0x180ffb(0xfd));if(_0x50b6ac)_0x3b55d2[_0x180ffb(0xd9)]=_0x50b6ac;if(_0x4e722c)_0x3b55d2['region']=_0x4e722c;if(_0x5ae8d9)_0x3b55d2[_0x180ffb(0xe6)]=_0x5ae8d9;if(_0x412a72)_0x3b55d2[_0x180ffb(0xd8)]=_0x412a72;if(_0x3ccf4f)_0x3b55d2[_0x180ffb(0xe8)]=_0x3ccf4f;if(_0x1c660d!==undefined&&_0x1c660d!=='')_0x3b55d2[_0x180ffb(0xec)]=Number(_0x1c660d);if(_0x3e6e98)_0x3b55d2[_0x180ffb(0xd7)]=_0x3e6e98;if(_0x56584f)_0x3b55d2[_0x180ffb(0xfd)]=_0x56584f;return _0x3b55d2;}async function validateWorkspaceArgs(_0x3bc6bc){const _0x4f3ae0=a251_0x4c2033,_0x3f254e=_0x3bc6bc[_0x4f3ae0(0xea)](_0x4f3ae0(0xdd))[_0x4f3ae0(0xff)](),_0x1b0302=_0x3bc6bc[_0x4f3ae0(0xea)](_0x4f3ae0(0xf5))[_0x4f3ae0(0xff)]();if(!_0x3f254e&&!_0x1b0302)throw CliErrors[_0x4f3ae0(0xe5)](_0x4f3ae0(0xdb),_0x4f3ae0(0x114)+CLI_BIN_NAME+_0x4f3ae0(0xfa)+CLI_BIN_NAME+_0x4f3ae0(0x110));if(_0x1b0302)assertValidAppcode(_0x1b0302);}function resolveKnownApps(){const _0x8e1b1=a251_0x4c2033,{config:_0x4e44a8,layers:_0xce36e5}=readRawConfigWithLayers(),_0x45bfb9=isRecord(_0x4e44a8[_0x8e1b1(0xe4)])?_0x4e44a8['apps']:{},_0x830ae9=isRecord(_0xce36e5[_0x8e1b1(0x107)][_0x8e1b1(0xe4)])?_0xce36e5['globalConfig'][_0x8e1b1(0xe4)]:{};return{..._0x830ae9,..._0x45bfb9};}async function configureWorkspace(_0x1c3e97,_0x4dc0f3){const _0x195f6e=a251_0x4c2033,_0x4dd1db=_0x1c3e97[_0x195f6e(0xea)](_0x195f6e(0xdd))[_0x195f6e(0xff)](),_0x36af83=_0x1c3e97[_0x195f6e(0xea)](_0x195f6e(0xf5))[_0x195f6e(0xff)](),_0x49a759=_0x4dd1db||_0x36af83;if(!_0x49a759)throw CliErrors['validation'](_0x195f6e(0xdb),_0x195f6e(0x114)+CLI_BIN_NAME+_0x195f6e(0xfa)+CLI_BIN_NAME+_0x195f6e(0x110));if(_0x36af83)assertValidAppcode(_0x36af83);const _0x4c0be8=resolveWriteConfigPath('project'),_0x1ed999=readConfigFile(_0x4c0be8),_0x2d5fdb=resolveKnownApps(),_0x36b581=isRecord(_0x1ed999['apps'])?{..._0x1ed999[_0x195f6e(0xe4)]}:{},_0x5e571b=cloneProfile(_0x36b581[_0x49a759]),_0x5290d8=sanitizeProfile(_0x2d5fdb[_0x49a759]),_0x4ef9e0=_0x36af83?{}:_0x5290d8,_0x31b03e=_0x36af83||_0x4ef9e0[_0x195f6e(0xf5)];if(!_0x31b03e){const _0x32fe26=Object[_0x195f6e(0x109)](_0x2d5fdb),_0x42aa0d=_0x32fe26[_0x195f6e(0x10f)]===0x0?_0x195f6e(0x114)+CLI_BIN_NAME+'\x20workspace\x20'+_0x4dc0f3+_0x195f6e(0x113)+_0x49a759+_0x195f6e(0xe9):_0x195f6e(0xf7)+_0x32fe26[_0x195f6e(0xfe)](',\x20');throw CliErrors[_0x195f6e(0xe5)](_0x195f6e(0xf0)+_0x49a759+_0x195f6e(0x104),_0x42aa0d);}assertValidAppcode(String(_0x31b03e));const _0x37a475={..._0x4ef9e0,..._0x5e571b,'appcode':String(_0x31b03e),...collectWorkspaceProfileOverrides(_0x1c3e97)};return _0x36b581[_0x49a759]=_0x37a475,_0x1ed999[_0x195f6e(0xe4)]=_0x36b581,normalizeStoredDefaultApp(_0x1ed999,_0x49a759),delete _0x1ed999[_0x195f6e(0xf5)],delete _0x1ed999['app'],_0x37a475[_0x195f6e(0xe6)]&&(_0x1ed999['env']=_0x37a475[_0x195f6e(0xe6)]),writeConfigFile(_0x4c0be8,_0x1ed999),{'ok':!![],'message':_0x195f6e(0xe1)+(_0x4dc0f3===_0x195f6e(0x100)?_0x195f6e(0xde):_0x195f6e(0x106))+':\x20'+_0x49a759+'\x20(appcode:\x20'+_0x37a475[_0x195f6e(0xf5)]+_0x195f6e(0xf9)+_0x4c0be8+_0x195f6e(0xdc),'data':{'operation':'workspace.'+_0x4dc0f3,'configPath':_0x4c0be8,'app':_0x49a759,'appcode':_0x37a475[_0x195f6e(0xf5)],'apiGroup':_0x37a475[_0x195f6e(0xd9)]??null,'region':_0x37a475[_0x195f6e(0xef)]??null,'env':_0x37a475[_0x195f6e(0xe6)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a251_0x4c2033(0xf3),'command':a251_0x4c2033(0x100),'description':a251_0x4c2033(0x10b),'risk':a251_0x4c2033(0xf4),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x12ed96=>configureWorkspace(_0x12ed96,a251_0x4c2033(0x100))},workspaceUseDefinition={'service':a251_0x4c2033(0xf3),'command':a251_0x4c2033(0x103),'description':a251_0x4c2033(0x10c),'risk':a251_0x4c2033(0xf4),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x459306=>configureWorkspace(_0x459306,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- function a251_0x44e5(){const _0x5752cb=['1433362siJZcF','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','3145413cupMIZ','2RMkMII','857172qGFHdI','514026RaBhQe','name','4951048HIXYJc','App\x20profile\x20name\x20to\x20remove','workspace\x20remove','858MRruKP','271436IGHQuy','125xHLVfH','write','remove'];a251_0x44e5=function(){return _0x5752cb;};return a251_0x44e5();}const a251_0x48bf37=a251_0x11c9;(function(_0xcd293c,_0x3ae741){const _0x5d3b31=a251_0x11c9,_0x308815=_0xcd293c();while(!![]){try{const _0x58aa4c=-parseInt(_0x5d3b31(0x1e6))/0x1+-parseInt(_0x5d3b31(0x1df))/0x2*(parseInt(_0x5d3b31(0x1de))/0x3)+parseInt(_0x5d3b31(0x1e7))/0x4*(parseInt(_0x5d3b31(0x1e8))/0x5)+-parseInt(_0x5d3b31(0x1e0))/0x6+-parseInt(_0x5d3b31(0x1dc))/0x7+parseInt(_0x5d3b31(0x1e3))/0x8+-parseInt(_0x5d3b31(0x1e1))/0x9;if(_0x58aa4c===_0x3ae741)break;else _0x308815['push'](_0x308815['shift']());}catch(_0xd13e37){_0x308815['push'](_0x308815['shift']());}}}(a251_0x44e5,0xd2465));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a251_0x11c9(_0x43029d,_0x56ee3b){_0x43029d=_0x43029d-0x1db;const _0x44e5a3=a251_0x44e5();let _0x11c9ad=_0x44e5a3[_0x43029d];return _0x11c9ad;}export const workspaceRemoveDefinition={'service':'workspace','command':a251_0x48bf37(0x1db),'description':a251_0x48bf37(0x1dd),'risk':a251_0x48bf37(0x1e9),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a251_0x48bf37(0x1e2),'description':a251_0x48bf37(0x1e4),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x254d41=>validateAppName(_0x254d41,a251_0x48bf37(0x1e5)),'execute':_0x1b6016=>runAppRemove(_0x1b6016,a251_0x48bf37(0x1e5))};
1
+ function a252_0x1a47(_0x3535d5,_0x5e38d2){_0x3535d5=_0x3535d5-0x124;const _0x4bc322=a252_0x4bc3();let _0x1a4735=_0x4bc322[_0x3535d5];return _0x1a4735;}const a252_0x16ccf2=a252_0x1a47;function a252_0x4bc3(){const _0x415d5c=['17143990GRWpdz','write','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','6537DZOyvz','848GrljmH','workspace\x20remove','3361878TXNrjo','App\x20profile\x20name\x20to\x20remove','2068JRobMQ','902TIgBUw','4962072XHMmVT','workspace','1965muygaC','7794OKTpFm','3951682lYlSQd'];a252_0x4bc3=function(){return _0x415d5c;};return a252_0x4bc3();}(function(_0x287043,_0xe89394){const _0x1cf105=a252_0x1a47,_0x4d5d0a=_0x287043();while(!![]){try{const _0x56f396=-parseInt(_0x1cf105(0x12c))/0x1*(parseInt(_0x1cf105(0x12d))/0x2)+parseInt(_0x1cf105(0x127))/0x3*(-parseInt(_0x1cf105(0x128))/0x4)+parseInt(_0x1cf105(0x130))/0x5*(parseInt(_0x1cf105(0x131))/0x6)+-parseInt(_0x1cf105(0x132))/0x7+parseInt(_0x1cf105(0x12e))/0x8+-parseInt(_0x1cf105(0x12a))/0x9+parseInt(_0x1cf105(0x124))/0xa;if(_0x56f396===_0xe89394)break;else _0x4d5d0a['push'](_0x4d5d0a['shift']());}catch(_0x643b59){_0x4d5d0a['push'](_0x4d5d0a['shift']());}}}(a252_0x4bc3,0x7d1e1));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a252_0x16ccf2(0x12f),'command':'remove','description':a252_0x16ccf2(0x126),'risk':a252_0x16ccf2(0x125),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a252_0x16ccf2(0x12b),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x3d9e0=>validateAppName(_0x3d9e0,a252_0x16ccf2(0x129)),'execute':_0xac698c=>runAppRemove(_0xac698c,'workspace\x20remove')};
@@ -1 +1 @@
1
- const a252_0x12ab4c=a252_0x5bfc;(function(_0x26688c,_0x5e87da){const _0x7b6659=a252_0x5bfc,_0x238528=_0x26688c();while(!![]){try{const _0x5893e1=-parseInt(_0x7b6659(0x127))/0x1+parseInt(_0x7b6659(0x153))/0x2+-parseInt(_0x7b6659(0x152))/0x3+parseInt(_0x7b6659(0x145))/0x4*(parseInt(_0x7b6659(0x119))/0x5)+-parseInt(_0x7b6659(0x120))/0x6+parseInt(_0x7b6659(0x117))/0x7+parseInt(_0x7b6659(0x14c))/0x8*(parseInt(_0x7b6659(0x15e))/0x9);if(_0x5893e1===_0x5e87da)break;else _0x238528['push'](_0x238528['shift']());}catch(_0x550cf0){_0x238528['push'](_0x238528['shift']());}}}(a252_0x1d79,0x34220));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';function a252_0x1d79(){const _0x1acb63=['filter','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','username','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','default','keys','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','rabetbase-cli','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.','kb-domain','2258181gljQzS','localDomain','runtimeDomain','Invalid\x20domain\x20config\x20JSON:\x20','https:','object','\x22\x20is\x20not\x20a\x20valid\x20URL.','origin','base\x20URL','Allowed\x20fields:\x20','skillDomain','586635ckbONo','trim','10yFKPLD','validation','kbServiceDomain','kind','cdn','enterprise-v1','legacy','537918LpxdVH','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','kb-service-domain','skillHubDomain','join','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','isArray','135414TiHUkg','certificateDomain','kbDomain','platformDomain','Unsupported\x20domain\x20config\x20field(s):\x20','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','hash','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','Enterprise\x20','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','appDomain','str','includes','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','utf8','lovrabet','api-domain','certificate-domain','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','userDomain','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','parse','pathname','length',':\x20expected\x20an\x20HTTPS\x20','runtime-domain',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','Domain\x20config\x20file\x20not\x20found:\x20','user-domain','528952EsIrSP','password','mode',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','skill-domain','replace','domains','8ZeiOGF','string',':\x20\x22','protocol','apiDomain','Invalid\x20','809724tUFRLd','218642kEuCFp'];a252_0x1d79=function(){return _0x1acb63;};return a252_0x1d79();}import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a252_0x12ab4c(0x13b),a252_0x12ab4c(0x150),a252_0x12ab4c(0x160),a252_0x12ab4c(0x116),'kbDomain',a252_0x12ab4c(0x11b),a252_0x12ab4c(0x131),a252_0x12ab4c(0x15f),a252_0x12ab4c(0x128)];const DOMAIN_FLAGS={'userDomain':a252_0x12ab4c(0x144),'apiDomain':a252_0x12ab4c(0x138),'runtimeDomain':a252_0x12ab4c(0x141),'skillDomain':a252_0x12ab4c(0x149),'kbDomain':a252_0x12ab4c(0x15d),'kbServiceDomain':a252_0x12ab4c(0x122),'appDomain':'app-domain','localDomain':'local-domain','certificateDomain':a252_0x12ab4c(0x139)};function a252_0x5bfc(_0x10fc0e,_0x2e2bd3){_0x10fc0e=_0x10fc0e-0x116;const _0x1d79ab=a252_0x1d79();let _0x5bfce3=_0x1d79ab[_0x10fc0e];return _0x5bfce3;}export const LEGACY_DOMAIN_CONFIG_FIELDS=['agentDomain',a252_0x12ab4c(0x12a),a252_0x12ab4c(0x123)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a252_0x12ab4c(0x13b),'apiDomain':a252_0x12ab4c(0x150),'runtimeDomain':a252_0x12ab4c(0x160),'skillDomain':'skillDomain','kbDomain':a252_0x12ab4c(0x129),'kbServiceDomain':a252_0x12ab4c(0x11b),'appDomain':'appDomain','localDomain':a252_0x12ab4c(0x15f),'certificateDomain':'certificateDomain'},ROUTING_CONSUMER=a252_0x12ab4c(0x15b);export function normalizeDomainOrigin(_0x35d7e0,_0x464498){const _0x3da8ff=a252_0x12ab4c;if(typeof _0x464498!==_0x3da8ff(0x14d)||!_0x464498[_0x3da8ff(0x118)]())throw CliErrors['validation'](_0x3da8ff(0x151)+_0x35d7e0+_0x3da8ff(0x148));let _0x369a35;try{_0x369a35=new URL(_0x464498[_0x3da8ff(0x118)]());}catch{throw CliErrors[_0x3da8ff(0x11a)](_0x3da8ff(0x151)+_0x35d7e0+_0x3da8ff(0x14e)+_0x464498+_0x3da8ff(0x164));}if(_0x369a35[_0x3da8ff(0x14f)]!==_0x3da8ff(0x162)||_0x369a35[_0x3da8ff(0x156)]||_0x369a35[_0x3da8ff(0x146)]||_0x369a35[_0x3da8ff(0x13e)]!=='/'&&_0x369a35[_0x3da8ff(0x13e)]!==''||_0x369a35['search']||_0x369a35[_0x3da8ff(0x12d)])throw CliErrors[_0x3da8ff(0x11a)]('Invalid\x20'+_0x35d7e0+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',_0x3da8ff(0x134));return _0x369a35['origin'];}export function normalizeRoutingDomainValue(_0x4c0220,_0x2d4bcc){const _0x761e6a=a252_0x12ab4c;if(typeof _0x2d4bcc==='string')return normalizeDomainOrigin(_0x4c0220,_0x2d4bcc);if(!_0x2d4bcc||typeof _0x2d4bcc!==_0x761e6a(0x163)||Array[_0x761e6a(0x126)](_0x2d4bcc))throw CliErrors[_0x761e6a(0x11a)](_0x761e6a(0x151)+_0x4c0220+_0x761e6a(0x142));const _0x3d2f9f=_0x2d4bcc,_0x15c95d=_0x3d2f9f[ROUTING_CONSUMER]??_0x3d2f9f[_0x761e6a(0x158)];if(_0x15c95d===undefined)throw CliErrors['validation'](_0x761e6a(0x12f)+_0x4c0220+_0x761e6a(0x12c)+ROUTING_CONSUMER+'\x20and\x20has\x20no\x20default.');return normalizeDomainOrigin(_0x4c0220,_0x15c95d);}export function normalizeCdnBaseUrl(_0xb6d085,_0x1e643d){const _0x1497de=a252_0x12ab4c;if(typeof _0x1e643d!==_0x1497de(0x14d)||!_0x1e643d[_0x1497de(0x118)]())throw CliErrors[_0x1497de(0x11a)]('Invalid\x20cdn.'+_0xb6d085+_0x1497de(0x135));const _0x3e49a6=_0x1e643d[_0x1497de(0x118)]()['replace'](/\/$/,'');let _0x56ce21;try{_0x56ce21=new URL(_0x3e49a6);}catch{throw CliErrors[_0x1497de(0x11a)]('Invalid\x20cdn.'+_0xb6d085+_0x1497de(0x14e)+_0x1e643d+_0x1497de(0x164));}if(_0x56ce21[_0x1497de(0x14f)]!==_0x1497de(0x162)||_0x56ce21[_0x1497de(0x156)]||_0x56ce21[_0x1497de(0x146)]||_0x56ce21['search']||_0x56ce21['hash']||_0x56ce21['href'][_0x1497de(0x14a)](/\/$/,'')!==_0x3e49a6||_0xb6d085==='lovrabet'&&_0x56ce21['origin']!==_0x3e49a6)throw CliErrors[_0x1497de(0x11a)]('Invalid\x20cdn.'+_0xb6d085+_0x1497de(0x140)+(_0xb6d085===_0x1497de(0x137)?_0x1497de(0x165):_0x1497de(0x166))+'\x20without\x20credentials,\x20query,\x20or\x20fragment.');return _0x3e49a6;}export function resolveEnterpriseRoutingConfig(_0x154494){const _0x47513d=a252_0x12ab4c;return resolveEnterpriseRoutingManifest(_0x154494)?.[_0x47513d(0x14b)];}export function resolveEnterpriseRoutingManifest(_0x3be997){const _0x17a204=a252_0x12ab4c;if(_0x3be997===undefined)return undefined;if(!_0x3be997||typeof _0x3be997!==_0x17a204(0x163)||Array[_0x17a204(0x126)](_0x3be997))throw CliErrors[_0x17a204(0x11a)](_0x17a204(0x121));return parseEnterpriseRoutingManifest(_0x3be997);}export function readDomainConfigInput(_0x3b9a72){const _0x562f7a=a252_0x12ab4c,_0x57f8b6=isAbsolute(_0x3b9a72)?_0x3b9a72:resolve(process['cwd'](),_0x3b9a72);if(!existsSync(_0x57f8b6))throw CliErrors[_0x562f7a(0x11a)](_0x562f7a(0x143)+_0x57f8b6);let _0xa21ad3;try{_0xa21ad3=JSON[_0x562f7a(0x13d)](readFileSync(_0x57f8b6,_0x562f7a(0x136)));}catch{throw CliErrors[_0x562f7a(0x11a)](_0x562f7a(0x161)+_0x57f8b6);}if(!_0xa21ad3||typeof _0xa21ad3!==_0x562f7a(0x163)||Array[_0x562f7a(0x126)](_0xa21ad3))throw CliErrors['validation'](_0x562f7a(0x13c));const _0x5e8513=_0xa21ad3;if(_0x562f7a(0x14f)in _0x5e8513)return parseEnterpriseRoutingManifest(_0x5e8513);const _0x7eb2dd=Object[_0x562f7a(0x159)](_0x5e8513)['filter'](_0x3a5bbc=>!DOMAIN_CONFIG_FIELDS[_0x562f7a(0x133)](_0x3a5bbc));if(_0x7eb2dd[_0x562f7a(0x13f)]>0x0)throw CliErrors[_0x562f7a(0x11a)](_0x562f7a(0x12b)+_0x7eb2dd[_0x562f7a(0x124)](',\x20'),_0x562f7a(0x167)+DOMAIN_CONFIG_FIELDS[_0x562f7a(0x124)](',\x20'));const _0x21e5e3={};for(const _0x1e6407 of DOMAIN_CONFIG_FIELDS){_0x5e8513[_0x1e6407]!==undefined&&(_0x21e5e3[_0x1e6407]=normalizeDomainOrigin(_0x1e6407,_0x5e8513[_0x1e6407]));}if(Object[_0x562f7a(0x159)](_0x21e5e3)[_0x562f7a(0x13f)]===0x0)throw CliErrors[_0x562f7a(0x11a)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':_0x562f7a(0x11f),'domains':_0x21e5e3};}export function readDomainConfig(_0x4cff12){const _0x296d45=a252_0x12ab4c;return readDomainConfigInput(_0x4cff12)[_0x296d45(0x14b)];}export function resolveDomainConfigInput(_0xba3408){const _0x266a43=a252_0x12ab4c,_0x147636=(_0xba3408[_0x266a43(0x132)]('domain-config')||'')[_0x266a43(0x118)](),_0x2cb08d=_0x147636?readDomainConfigInput(_0x147636):{'mode':'legacy','domains':{}},_0x44c5fb=DOMAIN_CONFIG_FIELDS[_0x266a43(0x154)](_0x4d660c=>Boolean((_0xba3408['str'](DOMAIN_FLAGS[_0x4d660c])||'')[_0x266a43(0x118)]()));if(_0x2cb08d[_0x266a43(0x147)]===_0x266a43(0x11e)&&_0x44c5fb[_0x266a43(0x13f)]>0x0)throw CliErrors[_0x266a43(0x11a)]('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.',_0x266a43(0x130));for(const _0x37f825 of DOMAIN_CONFIG_FIELDS){const _0x339842=(_0xba3408[_0x266a43(0x132)](DOMAIN_FLAGS[_0x37f825])||'')['trim']();if(_0x339842)_0x2cb08d[_0x266a43(0x14b)][_0x37f825]=normalizeDomainOrigin(_0x37f825,_0x339842);}return _0x2cb08d;}export function resolveDomainFlags(_0x49fb47){const _0x193915=a252_0x12ab4c;return resolveDomainConfigInput(_0x49fb47)[_0x193915(0x14b)];}export function parseEnterpriseRoutingManifest(_0x53cc9d){const _0x4219dc=a252_0x12ab4c;if(_0x53cc9d[_0x4219dc(0x14f)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x53cc9d[_0x4219dc(0x11c)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors['validation'](_0x4219dc(0x125)+ENTERPRISE_ROUTING_PROTOCOL+'\x22\x20and\x20kind\x20\x22'+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x53cc9d[_0x4219dc(0x14b)]||typeof _0x53cc9d['domains']!=='object'||Array[_0x4219dc(0x126)](_0x53cc9d[_0x4219dc(0x14b)]))throw CliErrors[_0x4219dc(0x11a)](_0x4219dc(0x12e));if(!_0x53cc9d['cdn']||typeof _0x53cc9d[_0x4219dc(0x11d)]!==_0x4219dc(0x163)||Array[_0x4219dc(0x126)](_0x53cc9d[_0x4219dc(0x11d)]))throw CliErrors[_0x4219dc(0x11a)](_0x4219dc(0x15c));const _0xb47b61=_0x53cc9d[_0x4219dc(0x14b)],_0x3faaf4=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS['filter'](_0x19290e=>_0xb47b61[_0x19290e]===undefined);if(_0x3faaf4[_0x4219dc(0x13f)]>0x0)throw CliErrors['validation'](_0x4219dc(0x13a)+_0x3faaf4[_0x4219dc(0x124)](',\x20'));if(_0xb47b61[_0x4219dc(0x15f)]===undefined!==(_0xb47b61[_0x4219dc(0x128)]===undefined))throw CliErrors[_0x4219dc(0x11a)](_0x4219dc(0x15a));const _0x56c98=_0x53cc9d[_0x4219dc(0x11d)],_0x1db49f=Object[_0x4219dc(0x159)](_0x56c98)[_0x4219dc(0x154)](_0x423be2=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x4219dc(0x133)](_0x423be2));if(_0x1db49f[_0x4219dc(0x13f)]>0x0)throw CliErrors[_0x4219dc(0x11a)](_0x4219dc(0x155)+_0x1db49f[_0x4219dc(0x124)](',\x20'),'Allowed\x20fields:\x20'+ENTERPRISE_ROUTING_CDN_FIELDS[_0x4219dc(0x124)](',\x20'));const _0x1b5ee9=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x4219dc(0x154)](_0x5b0752=>_0x56c98[_0x5b0752]===undefined);if(_0x1b5ee9[_0x4219dc(0x13f)]>0x0)throw CliErrors[_0x4219dc(0x11a)](_0x4219dc(0x157)+_0x1b5ee9[_0x4219dc(0x124)](',\x20'));const _0x28543d={};for(const _0x4e69a5 of ENTERPRISE_ROUTING_CDN_FIELDS){_0x28543d[_0x4e69a5]=normalizeCdnBaseUrl(_0x4e69a5,_0x56c98[_0x4e69a5]);}const _0x2ac9ab={},_0x1c8330={};for(const _0x11be4a of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x10f2cf=_0xb47b61[_0x11be4a];if(_0x10f2cf===undefined)continue;const _0x4d3da8=normalizeRoutingDomainValue(_0x11be4a,_0x10f2cf);_0x2ac9ab[_0x11be4a]=_0x4d3da8;const _0x46c6d3=ENTERPRISE_TO_LOCAL_FIELD[_0x11be4a];_0x46c6d3&&(_0x1c8330[_0x46c6d3]=_0x4d3da8);}return{'mode':_0x4219dc(0x11e),'domains':_0x1c8330,'manifestDomains':_0x2ac9ab,'cdn':_0x28543d};}
1
+ const a253_0x5b758a=a253_0x1343;(function(_0x2ddbd8,_0x4b760b){const _0x58c98f=a253_0x1343,_0xa43628=_0x2ddbd8();while(!![]){try{const _0x26005a=-parseInt(_0x58c98f(0x10f))/0x1*(parseInt(_0x58c98f(0xed))/0x2)+parseInt(_0x58c98f(0xf9))/0x3+parseInt(_0x58c98f(0x10d))/0x4*(parseInt(_0x58c98f(0xfe))/0x5)+parseInt(_0x58c98f(0xd8))/0x6+-parseInt(_0x58c98f(0x116))/0x7+-parseInt(_0x58c98f(0x12c))/0x8*(parseInt(_0x58c98f(0xe9))/0x9)+-parseInt(_0x58c98f(0xe6))/0xa*(-parseInt(_0x58c98f(0xde))/0xb);if(_0x26005a===_0x4b760b)break;else _0xa43628['push'](_0xa43628['shift']());}catch(_0x29d17d){_0xa43628['push'](_0xa43628['shift']());}}}(a253_0x3557,0x98307));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a253_0x5b758a(0xf3),a253_0x5b758a(0xe4),'runtimeDomain','skillDomain',a253_0x5b758a(0x111),a253_0x5b758a(0xff),'appDomain',a253_0x5b758a(0x11d),a253_0x5b758a(0x100)];const DOMAIN_FLAGS={'userDomain':a253_0x5b758a(0xe0),'apiDomain':a253_0x5b758a(0xec),'runtimeDomain':a253_0x5b758a(0xdf),'skillDomain':'skill-domain','kbDomain':a253_0x5b758a(0xf2),'kbServiceDomain':a253_0x5b758a(0xf7),'appDomain':a253_0x5b758a(0xfa),'localDomain':'local-domain','certificateDomain':a253_0x5b758a(0x123)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a253_0x5b758a(0xfc),'platformDomain',a253_0x5b758a(0x103)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a253_0x5b758a(0xf3),'apiDomain':a253_0x5b758a(0xe4),'runtimeDomain':'runtimeDomain','skillDomain':a253_0x5b758a(0xda),'kbDomain':'kbDomain','kbServiceDomain':'kbServiceDomain','appDomain':a253_0x5b758a(0x122),'localDomain':a253_0x5b758a(0x11d),'certificateDomain':a253_0x5b758a(0x100)},ROUTING_CONSUMER='rabetbase-cli';export function normalizeDomainOrigin(_0x2e7e75,_0x532ab3){const _0xe5809f=a253_0x5b758a;if(typeof _0x532ab3!==_0xe5809f(0xeb)||!_0x532ab3[_0xe5809f(0x117)]())throw CliErrors[_0xe5809f(0xfd)]('Invalid\x20'+_0x2e7e75+_0xe5809f(0xe1));let _0x2b2f7e;try{_0x2b2f7e=new URL(_0x532ab3['trim']());}catch{throw CliErrors['validation'](_0xe5809f(0xf4)+_0x2e7e75+_0xe5809f(0x113)+_0x532ab3+_0xe5809f(0x126));}if(_0x2b2f7e[_0xe5809f(0x11b)]!=='https:'||_0x2b2f7e['username']||_0x2b2f7e[_0xe5809f(0xfb)]||_0x2b2f7e['pathname']!=='/'&&_0x2b2f7e['pathname']!==''||_0x2b2f7e[_0xe5809f(0x112)]||_0x2b2f7e['hash'])throw CliErrors['validation'](_0xe5809f(0xf4)+_0x2e7e75+_0xe5809f(0x10c),_0xe5809f(0x121));return _0x2b2f7e[_0xe5809f(0x107)];}function a253_0x1343(_0x2e2dfc,_0x4113ad){_0x2e2dfc=_0x2e2dfc-0xd8;const _0x355718=a253_0x3557();let _0x13436e=_0x355718[_0x2e2dfc];return _0x13436e;}function a253_0x3557(){const _0x4b39fb=[':\x20\x22','str','Domain\x20config\x20file\x20not\x20found:\x20','5219032FXaKJr','trim','cdn','legacy','utf8','protocol','replace','localDomain','username','filter','Allowed\x20fields:\x20','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','appDomain','certificate-domain','Invalid\x20domain\x20config\x20JSON:\x20','Enterprise\x20','\x22\x20is\x20not\x20a\x20valid\x20URL.','length','domain-config','hash',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','https:','4007056TVCNrU','\x20and\x20has\x20no\x20default.','5615124DFwYBt','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','skillDomain','join','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','1243mDZdov','runtime-domain','user-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','mode',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','apiDomain','Unsupported\x20domain\x20config\x20field(s):\x20','21050fgHQtC','includes','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','9coZYIZ','enterprise-v1','string','api-domain','1726DEFASk','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.','\x20without\x20credentials,\x20query,\x20or\x20fragment.','kb-domain','userDomain','Invalid\x20','keys','isArray','kb-service-domain','cwd','3075093uAkHXH','app-domain','password','agentDomain','validation','40ywImJi','kbServiceDomain','certificateDomain',':\x20expected\x20an\x20HTTPS\x20','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','skillHubDomain','lovrabet','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','Invalid\x20cdn.','origin','object','\x22\x20and\x20kind\x20\x22','domains','default',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','202744cJQyDK','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','851AJMvkm','href','kbDomain','search'];a253_0x3557=function(){return _0x4b39fb;};return a253_0x3557();}export function normalizeRoutingDomainValue(_0x536bd5,_0x655646){const _0x51508b=a253_0x5b758a;if(typeof _0x655646==='string')return normalizeDomainOrigin(_0x536bd5,_0x655646);if(!_0x655646||typeof _0x655646!==_0x51508b(0x108)||Array[_0x51508b(0xf6)](_0x655646))throw CliErrors[_0x51508b(0xfd)](_0x51508b(0xf4)+_0x536bd5+_0x51508b(0x12a));const _0xbf3321=_0x655646,_0x425112=_0xbf3321[ROUTING_CONSUMER]??_0xbf3321[_0x51508b(0x10b)];if(_0x425112===undefined)throw CliErrors[_0x51508b(0xfd)](_0x51508b(0x125)+_0x536bd5+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+ROUTING_CONSUMER+_0x51508b(0x12d));return normalizeDomainOrigin(_0x536bd5,_0x425112);}export function normalizeCdnBaseUrl(_0x396619,_0x219cf5){const _0x1a2819=a253_0x5b758a;if(typeof _0x219cf5!=='string'||!_0x219cf5[_0x1a2819(0x117)]())throw CliErrors[_0x1a2819(0xfd)](_0x1a2819(0x106)+_0x396619+_0x1a2819(0xe3));const _0x2f9b8a=_0x219cf5[_0x1a2819(0x117)]()[_0x1a2819(0x11c)](/\/$/,'');let _0x182e95;try{_0x182e95=new URL(_0x2f9b8a);}catch{throw CliErrors[_0x1a2819(0xfd)]('Invalid\x20cdn.'+_0x396619+_0x1a2819(0x113)+_0x219cf5+_0x1a2819(0x126));}if(_0x182e95[_0x1a2819(0x11b)]!==_0x1a2819(0x12b)||_0x182e95[_0x1a2819(0x11e)]||_0x182e95['password']||_0x182e95[_0x1a2819(0x112)]||_0x182e95[_0x1a2819(0x129)]||_0x182e95[_0x1a2819(0x110)][_0x1a2819(0x11c)](/\/$/,'')!==_0x2f9b8a||_0x396619===_0x1a2819(0x104)&&_0x182e95[_0x1a2819(0x107)]!==_0x2f9b8a)throw CliErrors[_0x1a2819(0xfd)](_0x1a2819(0x106)+_0x396619+_0x1a2819(0x101)+(_0x396619==='lovrabet'?_0x1a2819(0x107):'base\x20URL')+_0x1a2819(0xf1));return _0x2f9b8a;}export function resolveEnterpriseRoutingConfig(_0x5e1e72){const _0x435ebb=a253_0x5b758a;return resolveEnterpriseRoutingManifest(_0x5e1e72)?.[_0x435ebb(0x10a)];}export function resolveEnterpriseRoutingManifest(_0x14ad17){const _0xe059c9=a253_0x5b758a;if(_0x14ad17===undefined)return undefined;if(!_0x14ad17||typeof _0x14ad17!==_0xe059c9(0x108)||Array[_0xe059c9(0xf6)](_0x14ad17))throw CliErrors['validation'](_0xe059c9(0x105));return parseEnterpriseRoutingManifest(_0x14ad17);}export function readDomainConfigInput(_0x4b5a15){const _0x171f11=a253_0x5b758a,_0x398e29=isAbsolute(_0x4b5a15)?_0x4b5a15:resolve(process[_0x171f11(0xf8)](),_0x4b5a15);if(!existsSync(_0x398e29))throw CliErrors[_0x171f11(0xfd)](_0x171f11(0x115)+_0x398e29);let _0x2b0595;try{_0x2b0595=JSON['parse'](readFileSync(_0x398e29,_0x171f11(0x11a)));}catch{throw CliErrors[_0x171f11(0xfd)](_0x171f11(0x124)+_0x398e29);}if(!_0x2b0595||typeof _0x2b0595!==_0x171f11(0x108)||Array[_0x171f11(0xf6)](_0x2b0595))throw CliErrors[_0x171f11(0xfd)](_0x171f11(0xe8));const _0x31e359=_0x2b0595;if(_0x171f11(0x11b)in _0x31e359)return parseEnterpriseRoutingManifest(_0x31e359);const _0x55fa65=Object[_0x171f11(0xf5)](_0x31e359)['filter'](_0x184174=>!DOMAIN_CONFIG_FIELDS[_0x171f11(0xe7)](_0x184174));if(_0x55fa65[_0x171f11(0x127)]>0x0)throw CliErrors[_0x171f11(0xfd)](_0x171f11(0xe5)+_0x55fa65[_0x171f11(0xdb)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x171f11(0xdb)](',\x20'));const _0xc0b8c9={};for(const _0x4ed85a of DOMAIN_CONFIG_FIELDS){_0x31e359[_0x4ed85a]!==undefined&&(_0xc0b8c9[_0x4ed85a]=normalizeDomainOrigin(_0x4ed85a,_0x31e359[_0x4ed85a]));}if(Object[_0x171f11(0xf5)](_0xc0b8c9)['length']===0x0)throw CliErrors['validation'](_0x171f11(0xdc));return{'mode':_0x171f11(0x119),'domains':_0xc0b8c9};}export function readDomainConfig(_0x264807){const _0x38f745=a253_0x5b758a;return readDomainConfigInput(_0x264807)[_0x38f745(0x10a)];}export function resolveDomainConfigInput(_0x4f331b){const _0x1eec8e=a253_0x5b758a,_0x5b3149=(_0x4f331b[_0x1eec8e(0x114)](_0x1eec8e(0x128))||'')[_0x1eec8e(0x117)](),_0x3c5d94=_0x5b3149?readDomainConfigInput(_0x5b3149):{'mode':_0x1eec8e(0x119),'domains':{}},_0x17d748=DOMAIN_CONFIG_FIELDS[_0x1eec8e(0x11f)](_0xd52cb7=>Boolean((_0x4f331b[_0x1eec8e(0x114)](DOMAIN_FLAGS[_0xd52cb7])||'')[_0x1eec8e(0x117)]()));if(_0x3c5d94[_0x1eec8e(0xe2)]===_0x1eec8e(0xea)&&_0x17d748[_0x1eec8e(0x127)]>0x0)throw CliErrors[_0x1eec8e(0xfd)]('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.',_0x1eec8e(0x10e));for(const _0x482c91 of DOMAIN_CONFIG_FIELDS){const _0x456ba6=(_0x4f331b['str'](DOMAIN_FLAGS[_0x482c91])||'')['trim']();if(_0x456ba6)_0x3c5d94[_0x1eec8e(0x10a)][_0x482c91]=normalizeDomainOrigin(_0x482c91,_0x456ba6);}return _0x3c5d94;}export function resolveDomainFlags(_0x3edb78){const _0xa919b3=a253_0x5b758a;return resolveDomainConfigInput(_0x3edb78)[_0xa919b3(0x10a)];}export function parseEnterpriseRoutingManifest(_0xd240ec){const _0x15de4b=a253_0x5b758a;if(_0xd240ec[_0x15de4b(0x11b)]!==ENTERPRISE_ROUTING_PROTOCOL||_0xd240ec['kind']!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x15de4b(0xfd)](_0x15de4b(0xdd)+ENTERPRISE_ROUTING_PROTOCOL+_0x15de4b(0x109)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0xd240ec['domains']||typeof _0xd240ec['domains']!==_0x15de4b(0x108)||Array['isArray'](_0xd240ec['domains']))throw CliErrors[_0x15de4b(0xfd)](_0x15de4b(0xef));if(!_0xd240ec[_0x15de4b(0x118)]||typeof _0xd240ec[_0x15de4b(0x118)]!==_0x15de4b(0x108)||Array[_0x15de4b(0xf6)](_0xd240ec[_0x15de4b(0x118)]))throw CliErrors[_0x15de4b(0xfd)](_0x15de4b(0xf0));const _0x140535=_0xd240ec['domains'],_0xb844b9=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x15de4b(0x11f)](_0x75e870=>_0x140535[_0x75e870]===undefined);if(_0xb844b9['length']>0x0)throw CliErrors['validation'](_0x15de4b(0xd9)+_0xb844b9[_0x15de4b(0xdb)](',\x20'));if(_0x140535[_0x15de4b(0x11d)]===undefined!==(_0x140535['certificateDomain']===undefined))throw CliErrors[_0x15de4b(0xfd)](_0x15de4b(0xee));const _0x5cc367=_0xd240ec[_0x15de4b(0x118)],_0x1949d7=Object[_0x15de4b(0xf5)](_0x5cc367)['filter'](_0x16ed75=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x15de4b(0xe7)](_0x16ed75));if(_0x1949d7['length']>0x0)throw CliErrors['validation'](_0x15de4b(0x102)+_0x1949d7['join'](',\x20'),_0x15de4b(0x120)+ENTERPRISE_ROUTING_CDN_FIELDS[_0x15de4b(0xdb)](',\x20'));const _0x10b8db=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS['filter'](_0x4c6b23=>_0x5cc367[_0x4c6b23]===undefined);if(_0x10b8db['length']>0x0)throw CliErrors[_0x15de4b(0xfd)]('Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20'+_0x10b8db[_0x15de4b(0xdb)](',\x20'));const _0xa48dc8={};for(const _0xd95315 of ENTERPRISE_ROUTING_CDN_FIELDS){_0xa48dc8[_0xd95315]=normalizeCdnBaseUrl(_0xd95315,_0x5cc367[_0xd95315]);}const _0x3a8596={},_0x5c482d={};for(const _0x4d238b of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x1841c8=_0x140535[_0x4d238b];if(_0x1841c8===undefined)continue;const _0x5f1bc3=normalizeRoutingDomainValue(_0x4d238b,_0x1841c8);_0x3a8596[_0x4d238b]=_0x5f1bc3;const _0x43a9cc=ENTERPRISE_TO_LOCAL_FIELD[_0x4d238b];_0x43a9cc&&(_0x5c482d[_0x43a9cc]=_0x5f1bc3);}return{'mode':_0x15de4b(0xea),'domains':_0x5c482d,'manifestDomains':_0x3a8596,'cdn':_0xa48dc8};}
@@ -1 +1 @@
1
- (function(_0x411140,_0x3975fb){const _0x564cce=a253_0x55e7,_0xb9dad=_0x411140();while(!![]){try{const _0x4fb526=parseInt(_0x564cce(0xba))/0x1+parseInt(_0x564cce(0xad))/0x2*(-parseInt(_0x564cce(0xb0))/0x3)+-parseInt(_0x564cce(0xac))/0x4*(-parseInt(_0x564cce(0xae))/0x5)+parseInt(_0x564cce(0xbc))/0x6*(parseInt(_0x564cce(0xb6))/0x7)+-parseInt(_0x564cce(0xb8))/0x8+-parseInt(_0x564cce(0xbb))/0x9+-parseInt(_0x564cce(0xb3))/0xa;if(_0x4fb526===_0x3975fb)break;else _0xb9dad['push'](_0xb9dad['shift']());}catch(_0x49dd3b){_0xb9dad['push'](_0xb9dad['shift']());}}}(a253_0x5a94,0x2925d));function a253_0x5a94(){const _0x29f385=['stringify','origin','utf8','1114504RnBvOe','298bziRYA','5QvNOHP','official','6582YRYEcZ','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','independent','90480wCtgXc','http://localhost','.tmp','7lReYJT','now','277488DqtICr','lovrabet','312371tDCVdB','1146915frZURZ','453714VjocfO','/cert/lovrabet-dev.json'];a253_0x5a94=function(){return _0x29f385;};return a253_0x5a94();}function a253_0x55e7(_0x3d39cd,_0x1fe4cd){_0x3d39cd=_0x3d39cd-0xab;const _0x5a943f=a253_0x5a94();let _0x55e7fe=_0x5a943f[_0x3d39cd];return _0x55e7fe;}import{readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getApiDomain,getAppDomain,getCertificateDomain,getKbDomain,getLocalDomain,getRuntimeDomain,getSkillDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME='rabetbase.domain-routing.json';export const PROJECT_DOMAIN_ROUTING_PROTOCOL='lovrabet-project-domain-routing/v1';export function getProjectDomainRoutingManifest(){const _0x18b29b=a253_0x55e7,_0x73c366=getActiveRegion(),_0x1be81d=isIndependentDeployment(),_0x4de825=getOfficialRoutingProfile(_0x73c366),_0x59dca1=getLocalDomain(),_0x5b51a7=getCertificateDomain(),_0x75e668=getActiveCdn();if(!!_0x59dca1!==!!_0x5b51a7)throw new Error(_0x18b29b(0xb1));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x1be81d?_0x18b29b(0xb2):_0x18b29b(0xaf),'region':_0x1be81d?null:_0x73c366,'domains':{'api':getApiDomain(),'runtime':getRuntimeDomain(),'user':getUserDomain(),'app':getAppDomain(),'skill':getSkillDomain(),'kb':getKbDomain()},'cdn':_0x75e668,'local':_0x59dca1&&_0x5b51a7?{'origin':_0x59dca1,'certificateUrl':_0x5b51a7+_0x18b29b(0xbd)}:_0x1be81d?{'origin':_0x18b29b(0xb4)}:{'origin':_0x4de825['local'][_0x18b29b(0xbf)],'certificateUrl':_0x75e668[_0x18b29b(0xb9)]+_0x18b29b(0xbd)}};}export function writeProjectDomainRoutingManifest(_0x1b6f21){const _0x2a8321=a253_0x55e7,_0x4fcb85=getProjectDomainRoutingManifest(),_0x414c34=join(_0x1b6f21,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x1a7fd9=JSON[_0x2a8321(0xbe)](_0x4fcb85,null,0x2)+'\x0a';try{if(readFileSync(_0x414c34,'utf8')===_0x1a7fd9)return{'path':_0x414c34,'manifest':_0x4fcb85,'changed':![]};}catch{}const _0x5d398a=_0x414c34+'.'+process['pid']+'.'+Date[_0x2a8321(0xb7)]()+_0x2a8321(0xb5);try{writeFileSync(_0x5d398a,_0x1a7fd9,{'encoding':_0x2a8321(0xab),'mode':0x1a4}),renameSync(_0x5d398a,_0x414c34);}catch(_0x469a52){try{unlinkSync(_0x5d398a);}catch{}throw _0x469a52;}return{'path':_0x414c34,'manifest':_0x4fcb85,'changed':!![]};}
1
+ const a254_0x4873f3=a254_0x2ec8;(function(_0x158d7e,_0x2160bf){const _0x244359=a254_0x2ec8,_0x4561e9=_0x158d7e();while(!![]){try{const _0x5de33e=parseInt(_0x244359(0x15a))/0x1+parseInt(_0x244359(0x163))/0x2*(-parseInt(_0x244359(0x165))/0x3)+parseInt(_0x244359(0x15d))/0x4+-parseInt(_0x244359(0x15b))/0x5+-parseInt(_0x244359(0x167))/0x6+parseInt(_0x244359(0x166))/0x7*(parseInt(_0x244359(0x159))/0x8)+parseInt(_0x244359(0x162))/0x9;if(_0x5de33e===_0x2160bf)break;else _0x4561e9['push'](_0x4561e9['shift']());}catch(_0x19acf0){_0x4561e9['push'](_0x4561e9['shift']());}}}(a254_0xfea2,0x975b8));import{readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';function a254_0x2ec8(_0x39c194,_0x518275){_0x39c194=_0x39c194-0x156;const _0xfea2dd=a254_0xfea2();let _0x2ec839=_0xfea2dd[_0x39c194];return _0x2ec839;}import{getActiveRegion,getActiveCdn,getApiDomain,getAppDomain,getCertificateDomain,getKbDomain,getLocalDomain,getRuntimeDomain,getSkillDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a254_0x4873f3(0x161);function a254_0xfea2(){const _0x3830cb=['1355376ydMSop','/cert/lovrabet-dev.json','utf8','.tmp','http://localhost','pid','8dOPXRT','446736fYKipJ','3385015LKNACF','lovrabet','1012124DgWCLN','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','stringify','independent','rabetbase.domain-routing.json','5266800kRQbZI','484214fCOQAU','now','9PZdHom','6749491pTFHeT'];a254_0xfea2=function(){return _0x3830cb;};return a254_0xfea2();}export const PROJECT_DOMAIN_ROUTING_PROTOCOL='lovrabet-project-domain-routing/v1';export function getProjectDomainRoutingManifest(){const _0x4e00bd=a254_0x4873f3,_0x260e65=getActiveRegion(),_0x14e356=isIndependentDeployment(),_0x1e9743=getOfficialRoutingProfile(_0x260e65),_0x57d696=getLocalDomain(),_0x19e623=getCertificateDomain(),_0x435169=getActiveCdn();if(!!_0x57d696!==!!_0x19e623)throw new Error(_0x4e00bd(0x15e));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x14e356?_0x4e00bd(0x160):'official','region':_0x14e356?null:_0x260e65,'domains':{'api':getApiDomain(),'runtime':getRuntimeDomain(),'user':getUserDomain(),'app':getAppDomain(),'skill':getSkillDomain(),'kb':getKbDomain()},'cdn':_0x435169,'local':_0x57d696&&_0x19e623?{'origin':_0x57d696,'certificateUrl':_0x19e623+_0x4e00bd(0x168)}:_0x14e356?{'origin':_0x4e00bd(0x157)}:{'origin':_0x1e9743['local']['origin'],'certificateUrl':_0x435169[_0x4e00bd(0x15c)]+'/cert/lovrabet-dev.json'}};}export function writeProjectDomainRoutingManifest(_0x330f67){const _0x473f4e=a254_0x4873f3,_0x3ba141=getProjectDomainRoutingManifest(),_0x54aa75=join(_0x330f67,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x1e34a7=JSON[_0x473f4e(0x15f)](_0x3ba141,null,0x2)+'\x0a';try{if(readFileSync(_0x54aa75,_0x473f4e(0x169))===_0x1e34a7)return{'path':_0x54aa75,'manifest':_0x3ba141,'changed':![]};}catch{}const _0x102790=_0x54aa75+'.'+process[_0x473f4e(0x158)]+'.'+Date[_0x473f4e(0x164)]()+_0x473f4e(0x156);try{writeFileSync(_0x102790,_0x1e34a7,{'encoding':_0x473f4e(0x169),'mode':0x1a4}),renameSync(_0x102790,_0x54aa75);}catch(_0x566356){try{unlinkSync(_0x102790);}catch{}throw _0x566356;}return{'path':_0x54aa75,'manifest':_0x3ba141,'changed':!![]};}
@@ -1 +1 @@
1
- const a254_0x314b55=a254_0x21d6;(function(_0x50d99d,_0x43f738){const _0x311fef=a254_0x21d6,_0x214daf=_0x50d99d();while(!![]){try{const _0x445ef3=-parseInt(_0x311fef(0xc7))/0x1+parseInt(_0x311fef(0xd4))/0x2*(-parseInt(_0x311fef(0xd3))/0x3)+-parseInt(_0x311fef(0xbf))/0x4+-parseInt(_0x311fef(0xb9))/0x5+parseInt(_0x311fef(0xd5))/0x6*(-parseInt(_0x311fef(0xcd))/0x7)+-parseInt(_0x311fef(0xc1))/0x8*(parseInt(_0x311fef(0xd7))/0x9)+parseInt(_0x311fef(0xbc))/0xa;if(_0x445ef3===_0x43f738)break;else _0x214daf['push'](_0x214daf['shift']());}catch(_0xf368a9){_0x214daf['push'](_0x214daf['shift']());}}}(a254_0x5afa,0xe1d15));import{CLI_BIN_NAME}from'../constant/cli.js';function a254_0x5afa(){const _0xa1b405=['projectRegion','322136qGIAQu','stringify','global','string','config','mergedRegion','2005171OzXctR','appName','\x20in\x20','default','value','Invalid\x20country/region\x20','35286zxBWRg','166LzZbLi','6YWdkVr','Rabetbase\x20configuration','8829189BzsbqZ','appRegion','global\x20Rabetbase\x20configuration','globalRegion','6230290lSpQdi','a\x20value\x20of\x20type\x20','null','56613650EJxCsf','Run\x20`','source','3698008RSuGdl','project','8ZlyvtA','selected\x20app\x20profile','project\x20Rabetbase\x20configuration','app\x20profile\x20\x22','app'];a254_0x5afa=function(){return _0xa1b405;};return a254_0x5afa();}import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'../constant/region.js';function a254_0x21d6(_0x1c8cb7,_0x21eae9){_0x1c8cb7=_0x1c8cb7-0xb7;const _0x5afa27=a254_0x5afa();let _0x21d65c=_0x5afa27[_0x1c8cb7];return _0x21d65c;}import{CliErrors}from'../errors.js';export function selectConfiguredRegion(_0x11e5d3){const _0x6bde12=a254_0x21d6;if(_0x11e5d3['appRegion']!==undefined&&_0x11e5d3[_0x6bde12(0xd8)]!==null&&_0x11e5d3[_0x6bde12(0xd8)]!=='')return{'value':_0x11e5d3[_0x6bde12(0xd8)],'source':_0x6bde12(0xc5)};if(_0x11e5d3[_0x6bde12(0xc6)]!==undefined&&_0x11e5d3[_0x6bde12(0xc6)]!==null&&_0x11e5d3[_0x6bde12(0xc6)]!=='')return{'value':_0x11e5d3[_0x6bde12(0xc6)],'source':_0x6bde12(0xc0)};if(_0x11e5d3['globalRegion']!==undefined&&_0x11e5d3[_0x6bde12(0xb8)]!==null&&_0x11e5d3[_0x6bde12(0xb8)]!=='')return{'value':_0x11e5d3[_0x6bde12(0xb8)],'source':_0x6bde12(0xc9)};if(_0x11e5d3[_0x6bde12(0xcc)]!==undefined&&_0x11e5d3[_0x6bde12(0xcc)]!==null&&_0x11e5d3[_0x6bde12(0xcc)]!=='')return{'value':_0x11e5d3[_0x6bde12(0xcc)],'source':_0x6bde12(0xcb)};return{'value':undefined,'source':_0x6bde12(0xd0)};}function describeConfiguredRegion(_0x23a258){const _0x2f84c9=a254_0x21d6;return typeof _0x23a258===_0x2f84c9(0xca)?JSON[_0x2f84c9(0xc8)](_0x23a258):_0x2f84c9(0xba)+(_0x23a258===null?_0x2f84c9(0xbb):typeof _0x23a258);}export function resolveConfiguredRegion(_0x268bac,_0x20b2e1=a254_0x314b55(0xd6)){const _0x3119c3=a254_0x314b55;if(isInvalidLovrabetRegion(_0x268bac))throw CliErrors['validation'](_0x3119c3(0xd2)+describeConfiguredRegion(_0x268bac)+_0x3119c3(0xcf)+_0x20b2e1+'.',_0x3119c3(0xbd)+CLI_BIN_NAME+'\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.');return normalizeLovrabetRegion(_0x268bac)??DEFAULT_LOVRABET_REGION;}export function resolveEffectiveRegion(_0x293f79){const _0x717426=a254_0x314b55,_0x4b0a26=selectConfiguredRegion(_0x293f79),_0x435de9=_0x4b0a26[_0x717426(0xbe)]==='app'?_0x293f79['appName']?_0x717426(0xc4)+_0x293f79[_0x717426(0xce)]+'\x22':_0x717426(0xc2):_0x4b0a26[_0x717426(0xbe)]===_0x717426(0xc0)?_0x717426(0xc3):_0x4b0a26[_0x717426(0xbe)]===_0x717426(0xc9)?_0x717426(0xb7):_0x717426(0xd6);return{'region':resolveConfiguredRegion(_0x4b0a26[_0x717426(0xd1)],_0x435de9),'source':_0x4b0a26[_0x717426(0xbe)]};}
1
+ const a255_0x54cceb=a255_0x4a37;(function(_0x3add01,_0x28bc38){const _0x6647e2=a255_0x4a37,_0x40cb7c=_0x3add01();while(!![]){try{const _0x249e3a=-parseInt(_0x6647e2(0xd2))/0x1*(parseInt(_0x6647e2(0xbb))/0x2)+-parseInt(_0x6647e2(0xc5))/0x3+parseInt(_0x6647e2(0xb6))/0x4+-parseInt(_0x6647e2(0xc2))/0x5*(-parseInt(_0x6647e2(0xc9))/0x6)+parseInt(_0x6647e2(0xb7))/0x7+parseInt(_0x6647e2(0xd5))/0x8*(-parseInt(_0x6647e2(0xce))/0x9)+parseInt(_0x6647e2(0xba))/0xa*(parseInt(_0x6647e2(0xb9))/0xb);if(_0x249e3a===_0x28bc38)break;else _0x40cb7c['push'](_0x40cb7c['shift']());}catch(_0x1a41f3){_0x40cb7c['push'](_0x40cb7c['shift']());}}}(a255_0xcd24,0xc45be));import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'../constant/region.js';import{CliErrors}from'../errors.js';function a255_0x4a37(_0x158ba6,_0x14059e){_0x158ba6=_0x158ba6-0xb5;const _0xcd24e7=a255_0xcd24();let _0x4a3776=_0xcd24e7[_0x158ba6];return _0x4a3776;}export function selectConfiguredRegion(_0x216de0){const _0x3cd36d=a255_0x4a37;if(_0x216de0[_0x3cd36d(0xd1)]!==undefined&&_0x216de0[_0x3cd36d(0xd1)]!==null&&_0x216de0['appRegion']!=='')return{'value':_0x216de0[_0x3cd36d(0xd1)],'source':_0x3cd36d(0xd3)};if(_0x216de0[_0x3cd36d(0xc7)]!==undefined&&_0x216de0[_0x3cd36d(0xc7)]!==null&&_0x216de0['projectRegion']!=='')return{'value':_0x216de0[_0x3cd36d(0xc7)],'source':_0x3cd36d(0xbe)};if(_0x216de0['globalRegion']!==undefined&&_0x216de0['globalRegion']!==null&&_0x216de0[_0x3cd36d(0xc3)]!=='')return{'value':_0x216de0[_0x3cd36d(0xc3)],'source':'global'};if(_0x216de0[_0x3cd36d(0xcc)]!==undefined&&_0x216de0['mergedRegion']!==null&&_0x216de0[_0x3cd36d(0xcc)]!=='')return{'value':_0x216de0[_0x3cd36d(0xcc)],'source':_0x3cd36d(0xcd)};return{'value':undefined,'source':_0x3cd36d(0xbd)};}function describeConfiguredRegion(_0x49639c){const _0x471e67=a255_0x4a37;return typeof _0x49639c===_0x471e67(0xd0)?JSON[_0x471e67(0xbc)](_0x49639c):_0x471e67(0xbf)+(_0x49639c===null?_0x471e67(0xca):typeof _0x49639c);}export function resolveConfiguredRegion(_0x1bf8be,_0x534016=a255_0x54cceb(0xc0)){const _0x1b8227=a255_0x54cceb;if(isInvalidLovrabetRegion(_0x1bf8be))throw CliErrors[_0x1b8227(0xc6)]('Invalid\x20country/region\x20'+describeConfiguredRegion(_0x1bf8be)+_0x1b8227(0xb8)+_0x534016+'.',_0x1b8227(0xb5)+CLI_BIN_NAME+_0x1b8227(0xcb));return normalizeLovrabetRegion(_0x1bf8be)??DEFAULT_LOVRABET_REGION;}export function resolveEffectiveRegion(_0x8280d5){const _0x2e3214=a255_0x54cceb,_0x603086=selectConfiguredRegion(_0x8280d5),_0x877567=_0x603086['source']===_0x2e3214(0xd3)?_0x8280d5['appName']?_0x2e3214(0xcf)+_0x8280d5[_0x2e3214(0xd6)]+'\x22':_0x2e3214(0xc1):_0x603086[_0x2e3214(0xd4)]===_0x2e3214(0xbe)?'project\x20Rabetbase\x20configuration':_0x603086[_0x2e3214(0xd4)]===_0x2e3214(0xc8)?_0x2e3214(0xc4):_0x2e3214(0xc0);return{'region':resolveConfiguredRegion(_0x603086['value'],_0x877567),'source':_0x603086['source']};}function a255_0xcd24(){const _0xfd8040=['default','project','a\x20value\x20of\x20type\x20','Rabetbase\x20configuration','selected\x20app\x20profile','5zkmxWQ','globalRegion','global\x20Rabetbase\x20configuration','1066749bRbYkM','validation','projectRegion','global','3914628BZZuNv','null','\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.','mergedRegion','config','9HcfRyF','app\x20profile\x20\x22','string','appRegion','3OjnuYd','app','source','10522712ulCwOF','appName','Run\x20`','5314068ILHrtw','2412935GUpZqC','\x20in\x20','11kMmhdi','4162930wbbHBz','177830mPlwgF','stringify'];a255_0xcd24=function(){return _0xfd8040;};return a255_0xcd24();}
@@ -1 +1 @@
1
- const a255_0x503c16=a255_0x140c;(function(_0x3d0c7e,_0x588dd0){const _0x440002=a255_0x140c,_0x49becd=_0x3d0c7e();while(!![]){try{const _0x4733ca=-parseInt(_0x440002(0xd4))/0x1*(parseInt(_0x440002(0xa4))/0x2)+parseInt(_0x440002(0xba))/0x3*(parseInt(_0x440002(0xd1))/0x4)+parseInt(_0x440002(0xa3))/0x5+-parseInt(_0x440002(0xaf))/0x6*(-parseInt(_0x440002(0xc3))/0x7)+parseInt(_0x440002(0xb0))/0x8+parseInt(_0x440002(0xd3))/0x9+-parseInt(_0x440002(0xb8))/0xa;if(_0x4733ca===_0x588dd0)break;else _0x49becd['push'](_0x49becd['shift']());}catch(_0x2b7430){_0x49becd['push'](_0x49becd['shift']());}}}(a255_0x41a0,0x90671));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,isProduction,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{ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a255_0x503c16(0xc4),a255_0x503c16(0xb6),a255_0x503c16(0xbd),a255_0x503c16(0xb5),a255_0x503c16(0xcb),a255_0x503c16(0xb2),a255_0x503c16(0xc2),'apiDomain',a255_0x503c16(0xbc),a255_0x503c16(0xd6),a255_0x503c16(0xcf),a255_0x503c16(0xcd),a255_0x503c16(0xd7),a255_0x503c16(0xc6),'certificateDomain'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a255_0x503c16(0xd0),a255_0x503c16(0xb7),'locale',a255_0x503c16(0xbd),a255_0x503c16(0xa6),a255_0x503c16(0xc4),a255_0x503c16(0xa1),a255_0x503c16(0xcb),a255_0x503c16(0xc2),a255_0x503c16(0xc9),'runtimeDomain',a255_0x503c16(0xd6),a255_0x503c16(0xcf),'kbServiceDomain','appDomain',a255_0x503c16(0xc6),a255_0x503c16(0xa2)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x2c0cf0){return[..._0x2c0cf0]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x5b59c1){const _0x9ff913=a255_0x503c16;return TOP_LEVEL_CONFIG_KEYS[_0x9ff913(0xc1)](_0x5b59c1);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x430acb=a255_0x503c16;return _0x430acb(0xa7)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'apiGroup':a255_0x503c16(0xd2),'region':'region','env':a255_0x503c16(0xb7),'apiDir':a255_0x503c16(0xa1),'cookie':'cookie','accessKey':'accessKey','defaultFormat':a255_0x503c16(0xbd),'pageSize':'pageSize','riskLevel':'riskLevel','locale':a255_0x503c16(0xb6)};export function getAppProfileFlagDefs(){const _0x418545=a255_0x503c16;return[{'name':_0x418545(0xd2),'type':_0x418545(0xb4),'description':_0x418545(0xcc)},{'name':_0x418545(0xcb),'type':_0x418545(0xb4),'description':'Country/region\x20for\x20this\x20app\x20profile','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'env','type':'string','description':_0x418545(0xd5),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x418545(0xa1),'type':_0x418545(0xb4),'description':_0x418545(0xaa)},{'name':_0x418545(0xa6),'type':_0x418545(0xb4),'description':_0x418545(0xb9),'hidden':!![]},{'name':_0x418545(0xc4),'type':_0x418545(0xb4),'description':_0x418545(0xbb),'hidden':!![]},{'name':'defaultFormat','type':_0x418545(0xb4),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x418545(0xbf),'type':'number','description':'Default\x20page\x20size'},{'name':_0x418545(0xb5),'type':_0x418545(0xb4),'description':_0x418545(0xac),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x418545(0xb6),'type':'string','description':_0x418545(0xa9)}];}export function collectAppProfileOverrides(_0xd65473){const _0x5cde00=a255_0x503c16,_0x3a5046={};for(const [_0x35659d,_0x9be6c7]of Object[_0x5cde00(0x9f)](APP_PROFILE_FLAG_KEY_MAP)){const _0x372af1=_0xd65473(_0x35659d);if(!_0x372af1)continue;_0x3a5046[_0x9be6c7]=_0x9be6c7===_0x5cde00(0xbf)?Number(_0x372af1):_0x372af1;}return _0x3a5046;}export function buildAppProfileListFields(_0x2c428e){const _0x5d79bd=a255_0x503c16;return{'apiGroup':_0x2c428e[_0x5d79bd(0xd2)]??null,'region':_0x2c428e['region']??null,'env':_0x2c428e[_0x5d79bd(0xb7)]??null,'apiDir':_0x2c428e[_0x5d79bd(0xa1)]??null,'hasCookie':!!_0x2c428e[_0x5d79bd(0xa6)],'hasAccessKey':!!_0x2c428e[_0x5d79bd(0xc4)],'format':_0x2c428e[_0x5d79bd(0xbd)]??null,'pageSize':_0x2c428e[_0x5d79bd(0xbf)]??null,'riskLevel':_0x2c428e['riskLevel']??null,'locale':_0x2c428e[_0x5d79bd(0xb6)]??null};}function a255_0x140c(_0x24195d,_0x5b71d6){_0x24195d=_0x24195d-0x9f;const _0x41a0f0=a255_0x41a0();let _0x140c6b=_0x41a0f0[_0x24195d];return _0x140c6b;}export function buildAppDoctorFields(_0x276bfb,_0x559c7b){const _0x2ebcf4=a255_0x503c16;return{'region':{'value':_0x276bfb[_0x2ebcf4(0xcb)]||_0x559c7b[_0x2ebcf4(0xcb)],'source':_0x276bfb[_0x2ebcf4(0xcb)]?_0x2ebcf4(0xa8):_0x2ebcf4(0xb1)},'env':{'value':_0x276bfb[_0x2ebcf4(0xb7)]||_0x559c7b[_0x2ebcf4(0xb7)],'source':_0x276bfb['env']?_0x2ebcf4(0xa8):_0x2ebcf4(0xb1)},'apiDir':{'value':_0x276bfb[_0x2ebcf4(0xa1)]||_0x559c7b['apiDir'],'source':_0x276bfb[_0x2ebcf4(0xa1)]?_0x2ebcf4(0xa8):_0x2ebcf4(0xb1)},'cookie':{'value':_0x276bfb[_0x2ebcf4(0xa6)]||_0x559c7b['cookie'],'source':_0x276bfb[_0x2ebcf4(0xa6)]?'app':_0x2ebcf4(0xb1)},'accessKey':{'value':_0x276bfb[_0x2ebcf4(0xc4)]||_0x559c7b['accessKey'],'source':_0x276bfb[_0x2ebcf4(0xc4)]?_0x2ebcf4(0xa8):_0x2ebcf4(0xb1)}};}export function buildCanonicalAppConfig(_0x246df2,_0x3d1511){const _0x146aec=a255_0x503c16,_0x57e1fd=_0x246df2[_0x146aec(0xc0)](_0x1974db=>String(_0x1974db||'')[_0x146aec(0xc7)]())['filter'](Boolean);if(_0x57e1fd['length']===0x0)return{};const _0x5ca888={};for(const _0x2dd401 of _0x57e1fd){_0x5ca888[_0x2dd401]=_0x3d1511&&!isProduction(_0x3d1511)?{'appcode':_0x2dd401,'env':_0x3d1511}:{'appcode':_0x2dd401};}return _0x57e1fd[_0x146aec(0xc5)]>0x1?{'apps':_0x5ca888,'defaultApp':_0x57e1fd[0x0]}:{'apps':_0x5ca888};}export function normalizeStoredDefaultApp(_0x11c56b,_0x57c8ea){const _0x2c7e03=a255_0x503c16,_0x377408=_0x11c56b[_0x2c7e03(0xa0)]&&typeof _0x11c56b[_0x2c7e03(0xa0)]===_0x2c7e03(0xca)?_0x11c56b[_0x2c7e03(0xa0)]:{},_0xfb5359=Object[_0x2c7e03(0xc8)](_0x377408);if(_0xfb5359[_0x2c7e03(0xc5)]<=0x1)return delete _0x11c56b[_0x2c7e03(0xbe)],undefined;const _0x1204a7=typeof _0x11c56b[_0x2c7e03(0xbe)]===_0x2c7e03(0xb4)&&_0x377408[_0x11c56b[_0x2c7e03(0xbe)]]?_0x11c56b[_0x2c7e03(0xbe)]:undefined,_0x505266=_0x57c8ea&&_0x377408[_0x57c8ea]?_0x57c8ea:_0x1204a7;if(_0x505266)return _0x11c56b[_0x2c7e03(0xbe)]=_0x505266,_0x505266;return delete _0x11c56b[_0x2c7e03(0xbe)],undefined;}export function buildCanonicalProjectConfig(_0x3651f9,_0x4de795){const _0x2188dc=a255_0x503c16,{appCodes:appCodes=[],env:_0x123f0b,metadata:_0x4e2b59}=_0x4de795,_0x55e749={..._0x3651f9,..._0x4e2b59||{}};delete _0x55e749[_0x2188dc(0xd0)],delete _0x55e749[_0x2188dc(0xa8)];const _0x133220=_0x123f0b||(typeof _0x55e749[_0x2188dc(0xb7)]===_0x2188dc(0xb4)?_0x55e749[_0x2188dc(0xb7)]:'')||DEFAULT_CONFIG_VALUES['env'];if(isProduction(_0x133220))delete _0x55e749[_0x2188dc(0xb7)];else _0x55e749[_0x2188dc(0xb7)]=_0x133220;const _0x5e13a1=buildCanonicalAppConfig(appCodes,_0x133220);if(Object['keys'](_0x5e13a1)[_0x2188dc(0xc5)]>0x0){_0x55e749['apps']=_0x5e13a1[_0x2188dc(0xa0)];if(_0x5e13a1[_0x2188dc(0xbe)])_0x55e749[_0x2188dc(0xbe)]=_0x5e13a1[_0x2188dc(0xbe)];else delete _0x55e749[_0x2188dc(0xbe)];}return normalizeConfigForWrite(_0x55e749);}function isRecord(_0x49b51f){const _0x29efc7=a255_0x503c16;return!!_0x49b51f&&typeof _0x49b51f===_0x29efc7(0xca)&&!Array[_0x29efc7(0xab)](_0x49b51f);}function a255_0x41a0(){const _0x458f78=['app','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','API\x20directory\x20path','isArray','Risk\x20level','fromEntries','some','370632sXgmzt','630240xCIuFU','inherit','routing','values','string','riskLevel','locale','env','7594000YoiATt','Auth\x20cookie','698613JNvwNf','Access\x20key','runtimeDomain','format','defaultApp','pageSize','map','has','userDomain','98PzWOwS','accessKey','length','localDomain','trim','keys','apiDomain','object','region','Join\x20key\x20for\x20app\x20profiles\x20that\x20share\x20one\x20generated\x20API\x20model\x20registry','kbServiceDomain','zh-CN','kbDomain','appcode','8YVnEaZ','apiGroup','5212242KoEAhr','154335ovnGLd','Target\x20environment','skillDomain','appDomain','entries','apps','apiDir','certificateDomain','670400Vfmsnr','10BwhLDm','en-US','cookie','Config\x20key\x20('];a255_0x41a0=function(){return _0x458f78;};return a255_0x41a0();}export function normalizeConfigForWrite(_0xe63fbe){const _0x55914f=a255_0x503c16,_0x12aacf={..._0xe63fbe},_0x3979ca=isRecord(_0xe63fbe[_0x55914f(0xa0)])?_0xe63fbe[_0x55914f(0xa0)]:undefined,_0xe1f913=_0x3979ca?Object[_0x55914f(0xad)](Object['entries'](_0x3979ca)[_0x55914f(0xc0)](([_0x52bab4,_0x403f00])=>[_0x52bab4,isRecord(_0x403f00)?{..._0x403f00}:_0x403f00])):undefined;if(_0xe1f913){const _0x3ed523=typeof _0x12aacf[_0x55914f(0xb7)]===_0x55914f(0xb4)?_0x12aacf[_0x55914f(0xb7)]:undefined,_0x2c22cf=Object[_0x55914f(0xb3)](_0xe1f913)[_0x55914f(0xae)](_0x48a957=>isRecord(_0x48a957)&&typeof _0x48a957[_0x55914f(0xb7)]==='string'&&isProduction(_0x48a957[_0x55914f(0xb7)]));if(_0x3ed523&&isDaily(_0x3ed523)&&_0x2c22cf){for(const _0x60877f of Object[_0x55914f(0xb3)](_0xe1f913)){if(!isRecord(_0x60877f))continue;if(_0x60877f[_0x55914f(0xb7)]===undefined)_0x60877f['env']=_0x3ed523;}delete _0x12aacf['env'];}for(const _0x53889e of Object[_0x55914f(0xb3)](_0xe1f913)){isRecord(_0x53889e)&&typeof _0x53889e['env']===_0x55914f(0xb4)&&isProduction(_0x53889e['env'])&&delete _0x53889e['env'];}_0x12aacf[_0x55914f(0xa0)]=_0xe1f913;}return typeof _0x12aacf[_0x55914f(0xb7)]===_0x55914f(0xb4)&&isProduction(_0x12aacf[_0x55914f(0xb7)])&&delete _0x12aacf[_0x55914f(0xb7)],_0x12aacf;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a255_0x503c16(0xce),'zh_cn':a255_0x503c16(0xce),'en':'en-US','en-us':a255_0x503c16(0xa5),'en_us':a255_0x503c16(0xa5)};export function normalizeLocale(_0x204a30){if(!_0x204a30)return null;return LOCALE_MAP[_0x204a30['toLowerCase']()]??null;}
1
+ const a256_0x4f83e3=a256_0x13b9;(function(_0x308b42,_0x2076e5){const _0x2fb0f2=a256_0x13b9,_0x19f422=_0x308b42();while(!![]){try{const _0x5d9b2f=parseInt(_0x2fb0f2(0xec))/0x1+parseInt(_0x2fb0f2(0x11e))/0x2+parseInt(_0x2fb0f2(0x117))/0x3+-parseInt(_0x2fb0f2(0x11a))/0x4*(-parseInt(_0x2fb0f2(0x101))/0x5)+-parseInt(_0x2fb0f2(0x102))/0x6*(parseInt(_0x2fb0f2(0xf0))/0x7)+-parseInt(_0x2fb0f2(0x11d))/0x8*(parseInt(_0x2fb0f2(0x11b))/0x9)+parseInt(_0x2fb0f2(0x114))/0xa;if(_0x5d9b2f===_0x2076e5)break;else _0x19f422['push'](_0x19f422['shift']());}catch(_0x2dde5f){_0x19f422['push'](_0x19f422['shift']());}}}(a256_0x3e68,0x6892d));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,isProduction,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{ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a256_0x4f83e3(0x107),a256_0x4f83e3(0x103),'format','riskLevel',a256_0x4f83e3(0xe6),a256_0x4f83e3(0xf8),a256_0x4f83e3(0xee),'apiDomain',a256_0x4f83e3(0x119),'skillDomain',a256_0x4f83e3(0xf3),a256_0x4f83e3(0x118),a256_0x4f83e3(0xe5),'localDomain','certificateDomain'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a256_0x4f83e3(0xfb),'env',a256_0x4f83e3(0x103),'format','cookie',a256_0x4f83e3(0x107),a256_0x4f83e3(0xeb),'region',a256_0x4f83e3(0xee),'apiDomain',a256_0x4f83e3(0x119),a256_0x4f83e3(0x10d),a256_0x4f83e3(0xf3),a256_0x4f83e3(0x118),a256_0x4f83e3(0xe5),a256_0x4f83e3(0x11f),a256_0x4f83e3(0xf9)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x552cf1){return[..._0x552cf1]['join'](',\x20');}function a256_0x3e68(){const _0x515720=['apiGroup','appcode','values','inherit','map','length','fromEntries','77080AuTRkZ','4610634cEhDCc','locale','Country/region\x20for\x20this\x20app\x20profile','trim','some','accessKey','cookie','Join\x20key\x20for\x20app\x20profiles\x20that\x20share\x20one\x20generated\x20API\x20model\x20registry','Auth\x20cookie','entries','has','skillDomain','object','defaultFormat','Config\x20key\x20(','Target\x20environment','apps','pageSize','5057490mDxyqh','Risk\x20level','number','141363tStHyI','kbServiceDomain','runtimeDomain','76TzGyWM','1325601dpqTlg','keys','24ZBvNBQ','418598euMebL','localDomain','defaultApp','appDomain','region','app','Access\x20key','riskLevel','format','apiDir','583566qwcbws','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','userDomain','en-US','7Vdpuju','string','filter','kbDomain','env','zh-CN','Default\x20page\x20size','API\x20directory\x20path','routing','certificateDomain'];a256_0x3e68=function(){return _0x515720;};return a256_0x3e68();}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x530fc8){const _0x3de80a=a256_0x4f83e3;return TOP_LEVEL_CONFIG_KEYS[_0x3de80a(0x10c)](_0x530fc8);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x3917d1=a256_0x4f83e3;return _0x3917d1(0x110)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'apiGroup':'apiGroup','region':'region','env':a256_0x4f83e3(0xf4),'apiDir':'apiDir','cookie':a256_0x4f83e3(0x108),'accessKey':a256_0x4f83e3(0x107),'defaultFormat':'format','pageSize':a256_0x4f83e3(0x113),'riskLevel':a256_0x4f83e3(0xe9),'locale':'locale'};function a256_0x13b9(_0x523e52,_0x29c303){_0x523e52=_0x523e52-0xe4;const _0x3e689e=a256_0x3e68();let _0x13b9eb=_0x3e689e[_0x523e52];return _0x13b9eb;}export function getAppProfileFlagDefs(){const _0x4e9fc8=a256_0x4f83e3;return[{'name':_0x4e9fc8(0xfa),'type':_0x4e9fc8(0xf1),'description':_0x4e9fc8(0x109)},{'name':_0x4e9fc8(0xe6),'type':_0x4e9fc8(0xf1),'description':_0x4e9fc8(0x104),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':_0x4e9fc8(0xf4),'type':_0x4e9fc8(0xf1),'description':_0x4e9fc8(0x111),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':'string','description':_0x4e9fc8(0xf7)},{'name':'cookie','type':_0x4e9fc8(0xf1),'description':_0x4e9fc8(0x10a),'hidden':!![]},{'name':'accessKey','type':_0x4e9fc8(0xf1),'description':_0x4e9fc8(0xe8),'hidden':!![]},{'name':_0x4e9fc8(0x10f),'type':_0x4e9fc8(0xf1),'description':_0x4e9fc8(0xed),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x4e9fc8(0x113),'type':_0x4e9fc8(0x116),'description':_0x4e9fc8(0xf6)},{'name':_0x4e9fc8(0xe9),'type':_0x4e9fc8(0xf1),'description':_0x4e9fc8(0x115),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x4e9fc8(0x103),'type':_0x4e9fc8(0xf1),'description':'App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)'}];}export function collectAppProfileOverrides(_0x590048){const _0x50d8f6=a256_0x4f83e3,_0x5d9823={};for(const [_0x19c0e1,_0x171f51]of Object[_0x50d8f6(0x10b)](APP_PROFILE_FLAG_KEY_MAP)){const _0x1b3d7=_0x590048(_0x19c0e1);if(!_0x1b3d7)continue;_0x5d9823[_0x171f51]=_0x171f51===_0x50d8f6(0x113)?Number(_0x1b3d7):_0x1b3d7;}return _0x5d9823;}export function buildAppProfileListFields(_0x435f8d){const _0x2b1ab8=a256_0x4f83e3;return{'apiGroup':_0x435f8d[_0x2b1ab8(0xfa)]??null,'region':_0x435f8d['region']??null,'env':_0x435f8d['env']??null,'apiDir':_0x435f8d[_0x2b1ab8(0xeb)]??null,'hasCookie':!!_0x435f8d['cookie'],'hasAccessKey':!!_0x435f8d[_0x2b1ab8(0x107)],'format':_0x435f8d[_0x2b1ab8(0xea)]??null,'pageSize':_0x435f8d[_0x2b1ab8(0x113)]??null,'riskLevel':_0x435f8d[_0x2b1ab8(0xe9)]??null,'locale':_0x435f8d['locale']??null};}export function buildAppDoctorFields(_0x28b564,_0x4f8b39){const _0x59679e=a256_0x4f83e3;return{'region':{'value':_0x28b564['region']||_0x4f8b39[_0x59679e(0xe6)],'source':_0x28b564[_0x59679e(0xe6)]?_0x59679e(0xe7):'inherit'},'env':{'value':_0x28b564[_0x59679e(0xf4)]||_0x4f8b39[_0x59679e(0xf4)],'source':_0x28b564[_0x59679e(0xf4)]?_0x59679e(0xe7):_0x59679e(0xfd)},'apiDir':{'value':_0x28b564[_0x59679e(0xeb)]||_0x4f8b39[_0x59679e(0xeb)],'source':_0x28b564['apiDir']?_0x59679e(0xe7):_0x59679e(0xfd)},'cookie':{'value':_0x28b564['cookie']||_0x4f8b39['cookie'],'source':_0x28b564[_0x59679e(0x108)]?'app':_0x59679e(0xfd)},'accessKey':{'value':_0x28b564[_0x59679e(0x107)]||_0x4f8b39[_0x59679e(0x107)],'source':_0x28b564[_0x59679e(0x107)]?_0x59679e(0xe7):_0x59679e(0xfd)}};}export function buildCanonicalAppConfig(_0x43d580,_0x2ce379){const _0x520729=a256_0x4f83e3,_0x34b32b=_0x43d580['map'](_0x384079=>String(_0x384079||'')[_0x520729(0x105)]())[_0x520729(0xf2)](Boolean);if(_0x34b32b['length']===0x0)return{};const _0x48f8fd={};for(const _0x52d506 of _0x34b32b){_0x48f8fd[_0x52d506]=_0x2ce379&&!isProduction(_0x2ce379)?{'appcode':_0x52d506,'env':_0x2ce379}:{'appcode':_0x52d506};}return _0x34b32b[_0x520729(0xff)]>0x1?{'apps':_0x48f8fd,'defaultApp':_0x34b32b[0x0]}:{'apps':_0x48f8fd};}export function normalizeStoredDefaultApp(_0x14217f,_0x55982a){const _0x377748=a256_0x4f83e3,_0x3fad2c=_0x14217f[_0x377748(0x112)]&&typeof _0x14217f[_0x377748(0x112)]===_0x377748(0x10e)?_0x14217f[_0x377748(0x112)]:{},_0x1d53a3=Object[_0x377748(0x11c)](_0x3fad2c);if(_0x1d53a3[_0x377748(0xff)]<=0x1)return delete _0x14217f[_0x377748(0xe4)],undefined;const _0x5bcbdd=typeof _0x14217f[_0x377748(0xe4)]==='string'&&_0x3fad2c[_0x14217f[_0x377748(0xe4)]]?_0x14217f[_0x377748(0xe4)]:undefined,_0x76f743=_0x55982a&&_0x3fad2c[_0x55982a]?_0x55982a:_0x5bcbdd;if(_0x76f743)return _0x14217f[_0x377748(0xe4)]=_0x76f743,_0x76f743;return delete _0x14217f[_0x377748(0xe4)],undefined;}export function buildCanonicalProjectConfig(_0x2ed746,_0x3262eb){const _0x2cfe06=a256_0x4f83e3,{appCodes:appCodes=[],env:_0x5a8a55,metadata:_0xf90558}=_0x3262eb,_0x5a5916={..._0x2ed746,..._0xf90558||{}};delete _0x5a5916[_0x2cfe06(0xfb)],delete _0x5a5916[_0x2cfe06(0xe7)];const _0x545111=_0x5a8a55||(typeof _0x5a5916[_0x2cfe06(0xf4)]===_0x2cfe06(0xf1)?_0x5a5916['env']:'')||DEFAULT_CONFIG_VALUES[_0x2cfe06(0xf4)];if(isProduction(_0x545111))delete _0x5a5916['env'];else _0x5a5916[_0x2cfe06(0xf4)]=_0x545111;const _0x340c18=buildCanonicalAppConfig(appCodes,_0x545111);if(Object[_0x2cfe06(0x11c)](_0x340c18)[_0x2cfe06(0xff)]>0x0){_0x5a5916[_0x2cfe06(0x112)]=_0x340c18[_0x2cfe06(0x112)];if(_0x340c18[_0x2cfe06(0xe4)])_0x5a5916['defaultApp']=_0x340c18['defaultApp'];else delete _0x5a5916['defaultApp'];}return normalizeConfigForWrite(_0x5a5916);}function isRecord(_0x756e81){return!!_0x756e81&&typeof _0x756e81==='object'&&!Array['isArray'](_0x756e81);}export function normalizeConfigForWrite(_0x4fa21f){const _0x4a935c=a256_0x4f83e3,_0xd000e6={..._0x4fa21f},_0x74631d=isRecord(_0x4fa21f[_0x4a935c(0x112)])?_0x4fa21f['apps']:undefined,_0x38d135=_0x74631d?Object[_0x4a935c(0x100)](Object[_0x4a935c(0x10b)](_0x74631d)[_0x4a935c(0xfe)](([_0x52d61a,_0x677f6d])=>[_0x52d61a,isRecord(_0x677f6d)?{..._0x677f6d}:_0x677f6d])):undefined;if(_0x38d135){const _0x337d70=typeof _0xd000e6[_0x4a935c(0xf4)]===_0x4a935c(0xf1)?_0xd000e6[_0x4a935c(0xf4)]:undefined,_0x516dfb=Object[_0x4a935c(0xfc)](_0x38d135)[_0x4a935c(0x106)](_0x41bb76=>isRecord(_0x41bb76)&&typeof _0x41bb76[_0x4a935c(0xf4)]===_0x4a935c(0xf1)&&isProduction(_0x41bb76['env']));if(_0x337d70&&isDaily(_0x337d70)&&_0x516dfb){for(const _0x55bde7 of Object[_0x4a935c(0xfc)](_0x38d135)){if(!isRecord(_0x55bde7))continue;if(_0x55bde7['env']===undefined)_0x55bde7[_0x4a935c(0xf4)]=_0x337d70;}delete _0xd000e6[_0x4a935c(0xf4)];}for(const _0x12bfb1 of Object[_0x4a935c(0xfc)](_0x38d135)){isRecord(_0x12bfb1)&&typeof _0x12bfb1[_0x4a935c(0xf4)]===_0x4a935c(0xf1)&&isProduction(_0x12bfb1[_0x4a935c(0xf4)])&&delete _0x12bfb1[_0x4a935c(0xf4)];}_0xd000e6[_0x4a935c(0x112)]=_0x38d135;}return typeof _0xd000e6[_0x4a935c(0xf4)]===_0x4a935c(0xf1)&&isProduction(_0xd000e6[_0x4a935c(0xf4)])&&delete _0xd000e6[_0x4a935c(0xf4)],_0xd000e6;}const LOCALE_MAP={'zh':a256_0x4f83e3(0xf5),'zh-cn':a256_0x4f83e3(0xf5),'zh_cn':'zh-CN','en':'en-US','en-us':'en-US','en_us':a256_0x4f83e3(0xef)};export function normalizeLocale(_0x2e72f8){if(!_0x2e72f8)return null;return LOCALE_MAP[_0x2e72f8['toLowerCase']()]??null;}