@lovrabet/rabetbase-cli 2.5.13 → 2.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/README.md +42 -17
  2. package/lib/api/api-doc.js +3 -1
  3. package/lib/api/api-group.js +3 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +8 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +2 -1
  8. package/lib/api/model-registry-file.js +11 -1
  9. package/lib/api/model-registry-scaffold.js +2 -1
  10. package/lib/api/model-source.js +3 -1
  11. package/lib/auth/auth-server-ui.js +2 -1
  12. package/lib/auth/auth-server.js +5 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +3 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +5 -1
  21. package/lib/commands/api/generate.js +4 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +2 -1
  24. package/lib/commands/api/pull.js +10 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +5 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +4 -1
  32. package/lib/commands/app-config/delete.js +2 -1
  33. package/lib/commands/app-config/get.js +2 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +2 -1
  36. package/lib/commands/app-config/set.js +3 -1
  37. package/lib/commands/app-config/shared.d.ts +9 -2
  38. package/lib/commands/app-config/shared.js +6 -1
  39. package/lib/commands/auth/index.js +1 -1
  40. package/lib/commands/bff/create.js +11 -1
  41. package/lib/commands/bff/delete.js +6 -1
  42. package/lib/commands/bff/detail.js +1 -1
  43. package/lib/commands/bff/index.js +1 -1
  44. package/lib/commands/bff/list.js +1 -1
  45. package/lib/commands/bff/logs.js +4 -1
  46. package/lib/commands/bff/pull.js +22 -1
  47. package/lib/commands/bff/push.js +16 -1
  48. package/lib/commands/bff/status.js +3 -1
  49. package/lib/commands/cli-skill/index.js +2 -1
  50. package/lib/commands/cli-update.js +7 -1
  51. package/lib/commands/codegen/index.js +1 -1
  52. package/lib/commands/codegen/sdk.js +1 -1
  53. package/lib/commands/codegen/sql.js +1 -1
  54. package/lib/commands/common/app-registry.js +4 -1
  55. package/lib/commands/common/app-selector.js +4 -1
  56. package/lib/commands/common/async-task.js +2 -1
  57. package/lib/commands/common/dry-run.js +1 -1
  58. package/lib/commands/common/flags.js +3 -1
  59. package/lib/commands/common/local-file.js +1 -1
  60. package/lib/commands/common/validate.js +1 -1
  61. package/lib/commands/config/delete.js +2 -1
  62. package/lib/commands/config/get.js +1 -1
  63. package/lib/commands/config/index.js +1 -1
  64. package/lib/commands/config/init.js +5 -1
  65. package/lib/commands/config/list.js +1 -1
  66. package/lib/commands/config/set.js +4 -1
  67. package/lib/commands/config/shared.js +2 -1
  68. package/lib/commands/dataset/batch-design.js +9 -1
  69. package/lib/commands/dataset/business-group-update.js +10 -1
  70. package/lib/commands/dataset/business-groups.js +1 -1
  71. package/lib/commands/dataset/capability.js +3 -1
  72. package/lib/commands/dataset/cross-relation-create.js +2 -1
  73. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  74. package/lib/commands/dataset/cross-relation-list.js +2 -1
  75. package/lib/commands/dataset/cross-relation-shared.js +10 -1
  76. package/lib/commands/dataset/cross-relation-update.js +2 -1
  77. package/lib/commands/dataset/delete.js +6 -1
  78. package/lib/commands/dataset/design-context.js +1 -1
  79. package/lib/commands/dataset/design-start.js +1 -1
  80. package/lib/commands/dataset/design-status.js +1 -1
  81. package/lib/commands/dataset/design-sync-retry.js +1 -1
  82. package/lib/commands/dataset/design-sync-status.js +1 -1
  83. package/lib/commands/dataset/design-validate.js +1 -1
  84. package/lib/commands/dataset/detail.js +5 -1
  85. package/lib/commands/dataset/extend-update.js +7 -1
  86. package/lib/commands/dataset/field-restore.js +7 -1
  87. package/lib/commands/dataset/field-update.js +7 -1
  88. package/lib/commands/dataset/generate.js +19 -1
  89. package/lib/commands/dataset/index.js +3 -1
  90. package/lib/commands/dataset/list.js +2 -1
  91. package/lib/commands/dataset/operations.js +2 -1
  92. package/lib/commands/dataset/relation-audit.js +7 -1
  93. package/lib/commands/dataset/relation-create.js +3 -1
  94. package/lib/commands/dataset/relation-delete.js +3 -1
  95. package/lib/commands/dataset/relation-shared.js +21 -1
  96. package/lib/commands/dataset/relation-update.js +4 -1
  97. package/lib/commands/dataset/relations.js +7 -1
  98. package/lib/commands/dataset/rename.js +4 -1
  99. package/lib/commands/dataset/restore.js +7 -1
  100. package/lib/commands/dataset/user-deleted-field-list.js +3 -1
  101. package/lib/commands/db/analysis-batching.js +3 -1
  102. package/lib/commands/db/analyze-batch-plan.js +2 -1
  103. package/lib/commands/db/analyze-cancel.js +1 -1
  104. package/lib/commands/db/analyze-start.js +3 -1
  105. package/lib/commands/db/analyze-status.js +6 -1
  106. package/lib/commands/db/create.js +4 -1
  107. package/lib/commands/db/cross-db-analysis-shared.js +3 -1
  108. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-start.js +2 -1
  110. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  111. package/lib/commands/db/delete.js +3 -1
  112. package/lib/commands/db/detail.js +1 -1
  113. package/lib/commands/db/diff-refresh-start.js +1 -1
  114. package/lib/commands/db/diff-refresh-status.js +2 -1
  115. package/lib/commands/db/diff.js +3 -1
  116. package/lib/commands/db/index.js +2 -1
  117. package/lib/commands/db/list.js +2 -1
  118. package/lib/commands/db/shared.js +3 -1
  119. package/lib/commands/db/table-diff-shared.js +2 -1
  120. package/lib/commands/db/tables.js +2 -1
  121. package/lib/commands/db/test.js +2 -1
  122. package/lib/commands/db/update.js +4 -1
  123. package/lib/commands/deployment/index.js +1 -1
  124. package/lib/commands/deployment/sync-all.js +3 -1
  125. package/lib/commands/deployment/sync-jobs.js +2 -1
  126. package/lib/commands/deployment/sync-status.js +2 -1
  127. package/lib/commands/doctor.js +12 -1
  128. package/lib/commands/file/index.js +3 -1
  129. package/lib/commands/flow/create.js +2 -1
  130. package/lib/commands/flow/detail.js +3 -1
  131. package/lib/commands/flow/index.js +1 -1
  132. package/lib/commands/flow/list.js +2 -1
  133. package/lib/commands/flow/page-list.js +2 -1
  134. package/lib/commands/flow/publish.js +2 -1
  135. package/lib/commands/flow/runtime-resources-shared.js +3 -1
  136. package/lib/commands/flow/runtime-role-list.js +2 -1
  137. package/lib/commands/flow/runtime-role-user-list.js +2 -1
  138. package/lib/commands/flow/runtime-user-search.js +2 -1
  139. package/lib/commands/flow/shared.js +6 -1
  140. package/lib/commands/flow/update.js +4 -1
  141. package/lib/commands/flow/validate.js +2 -1
  142. package/lib/commands/instant-api-policy/current.js +1 -1
  143. package/lib/commands/instant-api-policy/index.js +1 -1
  144. package/lib/commands/instant-api-policy/init.js +2 -1
  145. package/lib/commands/instant-api-policy/publish.js +5 -1
  146. package/lib/commands/instant-api-policy/pull.js +2 -1
  147. package/lib/commands/instant-api-policy/revision.js +1 -1
  148. package/lib/commands/instant-api-policy/revisions.js +1 -1
  149. package/lib/commands/instant-api-policy/rollback.js +5 -1
  150. package/lib/commands/instant-api-policy/shared.js +5 -1
  151. package/lib/commands/instant-api-policy/validate.js +1 -1
  152. package/lib/commands/issue/context.js +1 -1
  153. package/lib/commands/issue/index.js +1 -1
  154. package/lib/commands/issue/nudge.js +2 -1
  155. package/lib/commands/issue/report.js +5 -1
  156. package/lib/commands/kb/create.js +5 -1
  157. package/lib/commands/kb/delete.js +5 -1
  158. package/lib/commands/kb/detail.js +1 -1
  159. package/lib/commands/kb/import-api.d.ts +3 -0
  160. package/lib/commands/kb/import-api.js +1 -0
  161. package/lib/commands/kb/import-resume.d.ts +2 -0
  162. package/lib/commands/kb/import-resume.js +2 -0
  163. package/lib/commands/kb/import-shared.d.ts +69 -0
  164. package/lib/commands/kb/import-shared.js +9 -0
  165. package/lib/commands/kb/import-status.d.ts +2 -0
  166. package/lib/commands/kb/import-status.js +1 -0
  167. package/lib/commands/kb/import.d.ts +2 -0
  168. package/lib/commands/kb/import.js +3 -0
  169. package/lib/commands/kb/index.js +1 -1
  170. package/lib/commands/kb/list.js +1 -1
  171. package/lib/commands/kb/search.js +3 -1
  172. package/lib/commands/kb/shared.js +9 -1
  173. package/lib/commands/kb/update.js +7 -1
  174. package/lib/commands/logs/index.js +2 -1
  175. package/lib/commands/menu/asset-update.js +8 -1
  176. package/lib/commands/menu/delete.js +15 -1
  177. package/lib/commands/menu/external-link-create.js +16 -1
  178. package/lib/commands/menu/external-link-update.js +10 -1
  179. package/lib/commands/menu/group-create.js +8 -1
  180. package/lib/commands/menu/group-update.js +6 -1
  181. package/lib/commands/menu/index.js +2 -1
  182. package/lib/commands/menu/list.js +1 -1
  183. package/lib/commands/menu/move.js +6 -1
  184. package/lib/commands/menu/regroup-start.js +11 -1
  185. package/lib/commands/menu/rename.js +9 -1
  186. package/lib/commands/menu/shared/compare-table.js +2 -1
  187. package/lib/commands/menu/shared/delete-plan.js +13 -1
  188. package/lib/commands/menu/shared/facts.js +5 -1
  189. package/lib/commands/menu/shared/index.js +1 -1
  190. package/lib/commands/menu/shared/inquirer.js +4 -1
  191. package/lib/commands/menu/shared/local-pages.js +5 -1
  192. package/lib/commands/menu/shared/logic.js +3 -1
  193. package/lib/commands/menu/shared/mutations.js +9 -1
  194. package/lib/commands/menu/shared/path.js +1 -1
  195. package/lib/commands/menu/shared/service.js +4 -1
  196. package/lib/commands/menu/shared/subapp-assets.js +4 -1
  197. package/lib/commands/menu/shared/sync-core.js +7 -1
  198. package/lib/commands/menu/shared/types.js +1 -1
  199. package/lib/commands/menu/shared/update-core.js +8 -1
  200. package/lib/commands/menu/shared/valid-url.js +1 -1
  201. package/lib/commands/menu/subapp-assets-status.js +1 -1
  202. package/lib/commands/menu/subapp-assets-update.js +7 -1
  203. package/lib/commands/menu/sync.js +7 -1
  204. package/lib/commands/menu/visibility-update.js +13 -1
  205. package/lib/commands/metric/contract.d.ts +8 -0
  206. package/lib/commands/metric/contract.js +5 -0
  207. package/lib/commands/metric/definition.d.ts +43 -0
  208. package/lib/commands/metric/definition.js +4 -0
  209. package/lib/commands/metric/delete.d.ts +2 -0
  210. package/lib/commands/metric/delete.js +3 -0
  211. package/lib/commands/metric/detail.d.ts +2 -0
  212. package/lib/commands/metric/detail.js +1 -0
  213. package/lib/commands/metric/example.d.ts +2 -0
  214. package/lib/commands/metric/example.js +1 -0
  215. package/lib/commands/metric/index.d.ts +2 -0
  216. package/lib/commands/metric/index.js +1 -0
  217. package/lib/commands/metric/list.d.ts +2 -0
  218. package/lib/commands/metric/list.js +2 -0
  219. package/lib/commands/metric/publication-diff.d.ts +8 -0
  220. package/lib/commands/metric/publication-diff.js +1 -0
  221. package/lib/commands/metric/publish.d.ts +2 -0
  222. package/lib/commands/metric/publish.js +4 -0
  223. package/lib/commands/metric/schema.d.ts +2 -0
  224. package/lib/commands/metric/schema.js +1 -0
  225. package/lib/commands/metric/shared.d.ts +14 -0
  226. package/lib/commands/metric/shared.js +2 -0
  227. package/lib/commands/metric/validate.d.ts +2 -0
  228. package/lib/commands/metric/validate.js +1 -0
  229. package/lib/commands/notification/config-create.js +4 -1
  230. package/lib/commands/notification/config-delete.js +4 -1
  231. package/lib/commands/notification/config-list.js +2 -1
  232. package/lib/commands/notification/config-update.js +4 -1
  233. package/lib/commands/notification/index.js +1 -1
  234. package/lib/commands/notification/shared.js +18 -1
  235. package/lib/commands/ocr/index.js +4 -1
  236. package/lib/commands/page/create.js +6 -1
  237. package/lib/commands/page/custom/detail.js +2 -1
  238. package/lib/commands/page/custom/list.js +2 -1
  239. package/lib/commands/page/custom/publish.js +3 -1
  240. package/lib/commands/page/custom/shared.js +3 -1
  241. package/lib/commands/page/custom/syntax.js +2 -1
  242. package/lib/commands/page/custom/update.js +3 -1
  243. package/lib/commands/page/data-list-status.js +2 -1
  244. package/lib/commands/page/generate-start.js +5 -1
  245. package/lib/commands/page/generate-status.js +4 -1
  246. package/lib/commands/page/index.js +2 -1
  247. package/lib/commands/page/pull.js +6 -1
  248. package/lib/commands/page/push.js +11 -1
  249. package/lib/commands/page/relation-audit.js +15 -1
  250. package/lib/commands/page/restore.js +5 -1
  251. package/lib/commands/page/shared.js +16 -1
  252. package/lib/commands/page/sync.js +2 -1
  253. package/lib/commands/project/api-architecture-upgrade.js +11 -1
  254. package/lib/commands/project/create/enhanced-guided-create.js +2 -1
  255. package/lib/commands/project/create/format-elapsed.js +1 -1
  256. package/lib/commands/project/create/main.js +13 -1
  257. package/lib/commands/project/create/materialize-project-template.js +12 -1
  258. package/lib/commands/project/create/project-name.js +1 -1
  259. package/lib/commands/project/create/project-template-archive.js +5 -1
  260. package/lib/commands/project/create/project-template-path.js +1 -1
  261. package/lib/commands/project/create/use-copy-project-template.js +2 -1
  262. package/lib/commands/project/create/use-format-code.js +1 -1
  263. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  264. package/lib/commands/project/domain-routing-sync.js +1 -1
  265. package/lib/commands/project/index.js +4 -1
  266. package/lib/commands/project/upgrade.js +7 -1
  267. package/lib/commands/registry.js +10 -1
  268. package/lib/commands/role/delete.js +2 -1
  269. package/lib/commands/role/detail.js +1 -1
  270. package/lib/commands/role/index.js +1 -1
  271. package/lib/commands/role/list.js +2 -1
  272. package/lib/commands/role/shared.js +8 -1
  273. package/lib/commands/role/update.js +3 -1
  274. package/lib/commands/role/user-add.js +2 -1
  275. package/lib/commands/role/user-remove.js +2 -1
  276. package/lib/commands/role/user-resolve.js +1 -1
  277. package/lib/commands/rule/get.js +1 -1
  278. package/lib/commands/rule/index.js +1 -1
  279. package/lib/commands/rule/list.js +1 -1
  280. package/lib/commands/rule/set.js +7 -1
  281. package/lib/commands/rule/shared.js +4 -1
  282. package/lib/commands/run/index.js +5 -1
  283. package/lib/commands/schema.js +1 -1
  284. package/lib/commands/sql/create.js +7 -1
  285. package/lib/commands/sql/delete.js +4 -1
  286. package/lib/commands/sql/detail.js +1 -1
  287. package/lib/commands/sql/exec.js +1 -1
  288. package/lib/commands/sql/index.js +1 -1
  289. package/lib/commands/sql/list.js +2 -1
  290. package/lib/commands/sql/pull.js +10 -1
  291. package/lib/commands/sql/push.js +9 -1
  292. package/lib/commands/sql/shared.js +5 -1
  293. package/lib/commands/sql/status.js +3 -1
  294. package/lib/commands/sql/validate.js +5 -1
  295. package/lib/commands/task/index.js +1 -1
  296. package/lib/commands/task/status.js +2 -1
  297. package/lib/commands/tenant/index.js +1 -1
  298. package/lib/commands/tenant/members-list.js +2 -1
  299. package/lib/commands/tenant/shared.js +2 -1
  300. package/lib/commands/user-account/dingding-sandbox-bind.js +2 -1
  301. package/lib/commands/user-account/feishu-bind.js +2 -1
  302. package/lib/commands/user-account/index.js +1 -1
  303. package/lib/commands/workspace/add.js +1 -1
  304. package/lib/commands/workspace/index.js +7 -1
  305. package/lib/commands/workspace/remove.js +1 -1
  306. package/lib/config/domain-config.js +8 -1
  307. package/lib/config/project-domain-routing.js +3 -1
  308. package/lib/config/region-config.js +2 -1
  309. package/lib/config/schema.js +7 -1
  310. package/lib/constant/cdn.js +2 -1
  311. package/lib/constant/cli.js +8 -1
  312. package/lib/constant/defaults.js +1 -1
  313. package/lib/constant/domain.js +4 -1
  314. package/lib/constant/env.js +1 -1
  315. package/lib/constant/output.js +1 -1
  316. package/lib/constant/paths.js +1 -1
  317. package/lib/constant/region.js +1 -1
  318. package/lib/constant/risk.js +1 -1
  319. package/lib/constant/routing-profile.js +1 -1
  320. package/lib/context/app-resolver.js +7 -1
  321. package/lib/context/auth-resolver.js +1 -1
  322. package/lib/context/config-loader.js +7 -1
  323. package/lib/context.js +9 -1
  324. package/lib/core/alias-resolver.js +5 -1
  325. package/lib/core/api-client.d.ts +14 -7
  326. package/lib/core/api-client.js +69 -1
  327. package/lib/core/bff/config.js +1 -1
  328. package/lib/core/bff/file-system.js +6 -1
  329. package/lib/core/bff/hash.js +1 -1
  330. package/lib/core/bff/hook-directory.js +9 -1
  331. package/lib/core/bff/lock.js +2 -1
  332. package/lib/core/bff/types.js +1 -1
  333. package/lib/core/bff/utils.js +3 -1
  334. package/lib/core/cross-db-analysis.js +1 -1
  335. package/lib/core/cross-db-relation.js +1 -1
  336. package/lib/core/db-resolver.js +2 -1
  337. package/lib/core/flow-config.js +49 -1
  338. package/lib/core/instant-api-policy/config.js +7 -1
  339. package/lib/core/instant-api-policy/endpoints.js +1 -1
  340. package/lib/core/kb-management-client.d.ts +11 -0
  341. package/lib/core/kb-management-client.js +4 -1
  342. package/lib/core/kb-search-client.js +3 -1
  343. package/lib/core/page/file-system.js +2 -1
  344. package/lib/core/page/hash.js +1 -1
  345. package/lib/core/page/lock.js +2 -1
  346. package/lib/core/page/lr-smart-jsx.js +4 -1
  347. package/lib/core/page/types.js +1 -1
  348. package/lib/core/sql-index-auditor.js +14 -1
  349. package/lib/core/sql-sync/config.js +1 -1
  350. package/lib/core/sql-sync/file-system.js +3 -1
  351. package/lib/core/sql-sync/hash.js +1 -1
  352. package/lib/core/sql-sync/lock.js +2 -1
  353. package/lib/core/sql-sync/types.js +1 -1
  354. package/lib/core/sql-sync/utils.js +2 -1
  355. package/lib/core/sql-validator.js +15 -1
  356. package/lib/errors.js +3 -1
  357. package/lib/framework/build-all-flags.js +1 -1
  358. package/lib/framework/error-output.js +1 -1
  359. package/lib/framework/explicit-yes.js +1 -1
  360. package/lib/framework/flags.js +1 -1
  361. package/lib/framework/help.js +2 -1
  362. package/lib/framework/index.js +1 -1
  363. package/lib/framework/output.js +2 -1
  364. package/lib/framework/response.js +1 -1
  365. package/lib/framework/runner-alias.js +2 -1
  366. package/lib/framework/runner.js +9 -1
  367. package/lib/framework/schema-export.js +1 -1
  368. package/lib/framework/supported-flags.js +2 -1
  369. package/lib/framework/types.js +1 -1
  370. package/lib/generated/build-info.d.ts +4 -4
  371. package/lib/generated/build-info.js +1 -1
  372. package/lib/generated/official-routing.js +3 -1
  373. package/lib/generated/routing-contract.js +1 -1
  374. package/lib/help.js +1 -1
  375. package/lib/runtime/confirmation.js +2 -1
  376. package/lib/runtime/event.js +1 -1
  377. package/lib/runtime/index.js +4 -1
  378. package/lib/runtime/queue.js +1 -1
  379. package/lib/runtime/resolve.js +2 -1
  380. package/lib/runtime/types.js +1 -1
  381. package/lib/services/dataset-design/checkpoint.js +2 -1
  382. package/lib/services/dataset-design/commands.js +14 -1
  383. package/lib/services/dataset-design/contract.js +8 -1
  384. package/lib/skills/builtin-skill.js +8 -1
  385. package/lib/skills/install-updated-skill.d.ts +8 -0
  386. package/lib/skills/install-updated-skill.js +3 -0
  387. package/lib/skills/local-skills-installer.d.ts +2 -0
  388. package/lib/skills/local-skills-installer.js +1 -0
  389. package/lib/skills/main.js +2 -1
  390. package/lib/skills/npx-skills-add.d.ts +6 -6
  391. package/lib/skills/npx-skills-add.js +5 -1
  392. package/lib/skills/skill-presence.d.ts +1 -30
  393. package/lib/skills/skill-presence.js +2 -1
  394. package/lib/telemetry/cli-command-trace.js +2 -1
  395. package/lib/telemetry/cli-help-trace.js +1 -1
  396. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  397. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  398. package/lib/telemetry/send-cli-trace-log.js +1 -1
  399. package/lib/types/index.js +1 -1
  400. package/lib/utils/ai_config.js +3 -1
  401. package/lib/utils/apply-jq-filter.js +1 -1
  402. package/lib/utils/cdn-config.js +1 -1
  403. package/lib/utils/check-sdk-version.js +5 -1
  404. package/lib/utils/cli-version-check.js +4 -1
  405. package/lib/utils/cli-version-policy.js +3 -1
  406. package/lib/utils/config.js +1 -1
  407. package/lib/utils/entity-with-id.js +1 -1
  408. package/lib/utils/file-utils.js +1 -1
  409. package/lib/utils/guides-cdn.js +3 -1
  410. package/lib/utils/http-client.js +2 -1
  411. package/lib/utils/is-non-interactive.js +1 -1
  412. package/lib/utils/logger.js +3 -1
  413. package/lib/utils/params.js +1 -1
  414. package/lib/utils/platform.js +1 -1
  415. package/lib/utils/sleep.js +1 -1
  416. package/lib/utils/template-replacer.js +5 -1
  417. package/lib/utils/update-notice.js +3 -1
  418. package/lib/utils/version.js +1 -1
  419. package/lib/utils/with-active-cookie.js +1 -1
  420. package/lib/utils/write-cli-side-channel.js +1 -1
  421. package/package.json +10 -7
  422. package/skills/rabetbase/SKILL.md +11 -7
  423. package/skills/rabetbase/guides/backend-function.md +3 -1
  424. package/skills/rabetbase/guides/data-api-guidelines.md +1 -1
  425. package/skills/rabetbase/guides/frontend-development.md +1 -0
  426. package/skills/rabetbase/guides/metric-development.md +185 -0
  427. package/skills/rabetbase/references/rabetbase-app-config.md +4 -3
  428. package/skills/rabetbase/references/rabetbase-cli-skill-install.md +5 -5
  429. package/skills/rabetbase/references/rabetbase-dataset-design.md +1 -1
  430. package/skills/rabetbase/references/rabetbase-kb.md +16 -0
  431. package/skills/rabetbase/references/rabetbase-metric.md +119 -0
  432. package/skills/rabetbase/references/rabetbase-update.md +7 -5
  433. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  434. package/skills/rabetbase-dataset-generation/references/workflow.md +1 -1
  435. package/skills/rabetbase-metrics-generation/SKILL.md +22 -0
  436. package/skills/rabetbase-metrics-generation/references/verification.md +19 -0
  437. package/skills/rabetbase-metrics-generation/references/workflow.md +41 -0
  438. package/skills/rabetbase-metrics-generation/templates/statistics-delivery.md +11 -0
  439. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  440. package/skills/rabetbase-page-generation/references/generation.md +1 -1
  441. package/skills/rabetbase.manifest.json +5 -3
  442. package/templates/metrics/definition.json +78 -0
  443. package/templates/metrics/metric-definition.schema.json +136 -0
  444. package/lib/postinstall.d.ts +0 -3
  445. package/lib/postinstall.js +0 -1
  446. package/scripts/postinstall.mjs +0 -24
@@ -1 +1 @@
1
- (function(_0x38c4de,_0x2494e0){const _0x1e423d=a258_0x60aa,_0x38ae64=_0x38c4de();while(!![]){try{const _0x29a473=parseInt(_0x1e423d(0x121))/0x1+parseInt(_0x1e423d(0x120))/0x2*(parseInt(_0x1e423d(0x124))/0x3)+parseInt(_0x1e423d(0x125))/0x4*(parseInt(_0x1e423d(0x127))/0x5)+parseInt(_0x1e423d(0x11f))/0x6+parseInt(_0x1e423d(0x122))/0x7+parseInt(_0x1e423d(0x11e))/0x8+-parseInt(_0x1e423d(0x123))/0x9*(parseInt(_0x1e423d(0x126))/0xa);if(_0x29a473===_0x2494e0)break;else _0x38ae64['push'](_0x38ae64['shift']());}catch(_0x54aa5f){_0x38ae64['push'](_0x38ae64['shift']());}}}(a258_0x23a9,0x5bd58));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a258_0x60aa(_0x227801,_0x42e894){_0x227801=_0x227801-0x11e;const _0x23a988=a258_0x23a9();let _0x60aa2e=_0x23a988[_0x227801];return _0x60aa2e;}function a258_0x23a9(){const _0x34c102=['1539537bHVYAz','76892dyxDLq','4814380nrxtyU','10ZXnTVB','199144rKnMdP','3138138ozdSln','2uEPUXP','310157LkJoCD','2875376WwCACY','27ZPSSCM'];a258_0x23a9=function(){return _0x34c102;};return a258_0x23a9();}
1
+ import{taskStatus}from"../../commands/task/status.js";export const taskDefinitions=[taskStatus];
@@ -1 +1,2 @@
1
- const a259_0x27dcff=a259_0x882b;(function(_0x2e89a7,_0x55e77c){const _0x256439=a259_0x882b,_0x1e5b32=_0x2e89a7();while(!![]){try{const _0x2fdfc7=-parseInt(_0x256439(0x1d4))/0x1*(parseInt(_0x256439(0x1d3))/0x2)+-parseInt(_0x256439(0x1db))/0x3+-parseInt(_0x256439(0x1cf))/0x4*(-parseInt(_0x256439(0x1e7))/0x5)+-parseInt(_0x256439(0x1d5))/0x6+-parseInt(_0x256439(0x1df))/0x7*(parseInt(_0x256439(0x1d7))/0x8)+-parseInt(_0x256439(0x1e6))/0x9+-parseInt(_0x256439(0x1e3))/0xa*(-parseInt(_0x256439(0x1d6))/0xb);if(_0x2fdfc7===_0x55e77c)break;else _0x1e5b32['push'](_0x1e5b32['shift']());}catch(_0xe56910){_0x1e5b32['push'](_0x1e5b32['shift']());}}}(a259_0x13ed,0x2084c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';function a259_0x13ed(){const _0x4d828d=['49JmOswR','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','appCode','trim','10fgEMiD','isTerminal','task','772029PRrZYN','105QTUFvX','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','31932xIPzGt','apiError','cookie','taskId','16858PynYGK','31sOMRsL','781110CDCYqu','9982291zxmZzw','266032rIOnfW','string','flagMissing','task-id','695655Xeyozm','compress','status','read'];a259_0x13ed=function(){return _0x4d828d;};return a259_0x13ed();}function a259_0x882b(_0x35c2ff,_0xcfbf9c){_0x35c2ff=_0x35c2ff-0x1cf;const _0x13ed71=a259_0x13ed();let _0x882b9f=_0x13ed71[_0x35c2ff];return _0x882b9f;}import{CliErrors}from'../../errors.js';export const taskStatus={'service':a259_0x27dcff(0x1e5),'command':a259_0x27dcff(0x1dd),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':a259_0x27dcff(0x1de),'defaultOutputFormat':a259_0x27dcff(0x1dc),'structuredErrors':!![],'flags':[{'name':a259_0x27dcff(0x1da),'type':a259_0x27dcff(0x1d8),'required':!![],'description':a259_0x27dcff(0x1e0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2807e6){const _0x404ff4=a259_0x27dcff;if(!_0x2807e6['str'](_0x404ff4(0x1da))[_0x404ff4(0x1e2)]())throw CliErrors[_0x404ff4(0x1d9)](_0x404ff4(0x1da));},async 'execute'(_0x2a46f8){const _0x3cc95b=a259_0x27dcff,_0x5c25b6=_0x2a46f8['str']('task-id')[_0x3cc95b(0x1e2)](),_0x5739b7=normalizeAsyncTask(await getAsyncTaskStatus(_0x5c25b6,_0x2a46f8[_0x3cc95b(0x1e1)],_0x2a46f8[_0x3cc95b(0x1d1)]));if(_0x5739b7[_0x3cc95b(0x1d2)]!==_0x5c25b6)throw CliErrors[_0x3cc95b(0x1d0)](_0x3cc95b(0x1e8)+_0x5c25b6+',\x20received\x20'+_0x5739b7[_0x3cc95b(0x1d2)]+'.');const _0x3430aa=buildAsyncTaskStatusCommand(_0x5739b7[_0x3cc95b(0x1d2)],_0x2a46f8[_0x3cc95b(0x1e1)]);return{'ok':!![],'message':asyncTaskMessage(_0x5739b7),'data':{'appCode':_0x2a46f8[_0x3cc95b(0x1e1)],..._0x5739b7,'query':_0x5739b7[_0x3cc95b(0x1e4)]?null:{'command':_0x3430aa}}};}};
1
+ import{APPCODE_FLAG_OPTIONAL}from"../../commands/common/flags.js";import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from"../../commands/common/async-task.js";import{getAsyncTaskStatus}from"../../core/api-client.js";import{CliErrors}from"../../errors.js";export const taskStatus={service:"task",command:"status",description:"Query an asynchronous task; repeat for PENDING or PROCESSING until SUCCESS or FAILED",risk:"read",defaultOutputFormat:"compress",structuredErrors:true,flags:[{name:"task-id",type:"string",required:true,description:"Task id returned by an asynchronous platform command"},APPCODE_FLAG_OPTIONAL],async validate(ctx){if(!ctx.str("task-id").trim()){throw CliErrors.flagMissing("task-id")}},async execute(ctx){const requestedTaskId=ctx.str("task-id").trim();const task=normalizeAsyncTask(await getAsyncTaskStatus(requestedTaskId,ctx.appCode,ctx.cookie));if(task.taskId!==requestedTaskId){
2
+ throw CliErrors.apiError(`Task status response id mismatch: requested ${requestedTaskId}, received ${task.taskId}.`)}const queryCommand=buildAsyncTaskStatusCommand(task.taskId,ctx.appCode);return{ok:true,message:asyncTaskMessage(task),data:{appCode:ctx.appCode,...task,query:task.isTerminal?null:{command:queryCommand}}}}};
@@ -1 +1 @@
1
- function a260_0x5239(_0x1a02e7,_0x4ecfe5){_0x1a02e7=_0x1a02e7-0x1c3;const _0x13867e=a260_0x1386();let _0x523955=_0x13867e[_0x1a02e7];return _0x523955;}(function(_0x7be67f,_0x56f74d){const _0x259497=a260_0x5239,_0x11ea87=_0x7be67f();while(!![]){try{const _0x23d252=parseInt(_0x259497(0x1c7))/0x1+parseInt(_0x259497(0x1c4))/0x2+-parseInt(_0x259497(0x1cc))/0x3+parseInt(_0x259497(0x1c8))/0x4*(-parseInt(_0x259497(0x1c5))/0x5)+-parseInt(_0x259497(0x1ca))/0x6*(parseInt(_0x259497(0x1c3))/0x7)+-parseInt(_0x259497(0x1c6))/0x8*(parseInt(_0x259497(0x1cd))/0x9)+parseInt(_0x259497(0x1c9))/0xa*(parseInt(_0x259497(0x1cb))/0xb);if(_0x23d252===_0x56f74d)break;else _0x11ea87['push'](_0x11ea87['shift']());}catch(_0x7f8cfd){_0x11ea87['push'](_0x11ea87['shift']());}}}(a260_0x1386,0x83bf7));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];function a260_0x1386(){const _0x3aeb9f=['2390264XJgNMk','635206aPILOf','8OIcjhw','4090UcGLZu','3225666ZiUQvu','35409fMTKXX','291894XmppmJ','27xABDpx','7hhPWoA','1130580MxXSus','1115425LfSduV'];a260_0x1386=function(){return _0x3aeb9f;};return a260_0x1386();}
1
+ import{tenantMembersListDefinition}from"../../commands/tenant/members-list.js";export const tenantDefinitions=[tenantMembersListDefinition];
@@ -1 +1,2 @@
1
- const a261_0xd766f1=a261_0x76a5;(function(_0x28170b,_0x55d527){const _0x1486ef=a261_0x76a5,_0x66e0f0=_0x28170b();while(!![]){try{const _0xfc697a=parseInt(_0x1486ef(0x164))/0x1*(-parseInt(_0x1486ef(0x170))/0x2)+parseInt(_0x1486ef(0x175))/0x3+-parseInt(_0x1486ef(0x16a))/0x4+parseInt(_0x1486ef(0x168))/0x5+parseInt(_0x1486ef(0x16c))/0x6*(-parseInt(_0x1486ef(0x166))/0x7)+parseInt(_0x1486ef(0x177))/0x8+parseInt(_0x1486ef(0x16b))/0x9;if(_0xfc697a===_0x55d527)break;else _0x66e0f0['push'](_0x66e0f0['shift']());}catch(_0x5c09d9){_0x66e0f0['push'](_0x66e0f0['shift']());}}}(a261_0x12cc,0x2db86));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a261_0x12cc(){const _0xd71c11=['trim','Exact\x20tenant\x20code','43466wRTvjG','length','\x20tenant\x20member(s)','Found\x20','tenant-code','39366auUZIT','read','2757640MOJhiz','17pEcULN','string','7cDyxaX','flagMissing','411145UIgbVj','Pass\x20--tenant-code\x20<code>.','145840Brwfim','3655080YwByQY','1517910hfPwMo','str'];a261_0x12cc=function(){return _0xd71c11;};return a261_0x12cc();}function a261_0x76a5(_0x4a45af,_0x1aad71){_0x4a45af=_0x4a45af-0x164;const _0x12ccf7=a261_0x12cc();let _0x76a55=_0x12ccf7[_0x4a45af];return _0x76a55;}import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':'tenant','command':'members-list','description':'List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','risk':a261_0xd766f1(0x176),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a261_0xd766f1(0x174),'type':a261_0xd766f1(0x165),'required':!![],'description':a261_0xd766f1(0x16f)}],async 'validate'(_0x2cf34e){const _0x202517=a261_0xd766f1;if(!_0x2cf34e[_0x202517(0x16d)]('tenant-code')[_0x202517(0x16e)]())throw CliErrors[_0x202517(0x167)](_0x202517(0x174),_0x202517(0x169));},async 'execute'(_0x5223a0){const _0x2efc0a=a261_0xd766f1,_0x5e3e92=_0x5223a0['str'](_0x2efc0a(0x174))['trim'](),_0x500d7a=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x5e3e92,_0x500d7a);const _0x1cadad=projectTenantMembers(await listTenantDirectoryMembers(_0x5e3e92));return{'ok':!![],'data':{'tenantCode':_0x5e3e92,'items':_0x1cadad,'totalCount':_0x1cadad[_0x2efc0a(0x171)]},'message':_0x2efc0a(0x173)+_0x1cadad['length']+_0x2efc0a(0x172)};}};
1
+ import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from"../../core/api-client.js";import{CliErrors}from"../../errors.js";import{assertTenantAccessible,projectTenantMembers}from"../../commands/tenant/shared.js";export const tenantMembersListDefinition={service:"tenant",command:"members-list",description:"List members of a tenant available to the current account",risk:"read",requiresAuth:true,requiresAppCode:false,structuredErrors:true,flags:[{name:"tenant-code",type:"string",required:true,description:"Exact tenant code"}],async validate(ctx){if(!ctx.str("tenant-code").trim()){throw CliErrors.flagMissing("tenant-code","Pass --tenant-code <code>.")}},async execute(ctx){const tenantCode=ctx.str("tenant-code").trim();const memberships=await listCurrentUserTenantMemberships();assertTenantAccessible(tenantCode,memberships);const items=projectTenantMembers(await listTenantDirectoryMembers(tenantCode));return{ok:true,data:{tenantCode:tenantCode,items:items,
2
+ totalCount:items.length},message:`Found ${items.length} tenant member(s)`}}};
@@ -1 +1,2 @@
1
- (function(_0x27b769,_0x3f15e3){const _0x55108f=a262_0x3e59,_0x32bb78=_0x27b769();while(!![]){try{const _0x4cca38=parseInt(_0x55108f(0x7d))/0x1+-parseInt(_0x55108f(0x89))/0x2*(parseInt(_0x55108f(0x96))/0x3)+-parseInt(_0x55108f(0x7f))/0x4+-parseInt(_0x55108f(0x85))/0x5+-parseInt(_0x55108f(0x7b))/0x6*(parseInt(_0x55108f(0x8c))/0x7)+parseInt(_0x55108f(0x8d))/0x8+parseInt(_0x55108f(0x7c))/0x9*(parseInt(_0x55108f(0x91))/0xa);if(_0x4cca38===_0x3f15e3)break;else _0x32bb78['push'](_0x32bb78['shift']());}catch(_0x249766){_0x32bb78['push'](_0x32bb78['shift']());}}}(a262_0x1704,0x52559));import{CliErrors}from'../../errors.js';function textOrNull(_0x2e0273){const _0x44dbd3=a262_0x3e59,_0x4b28a0=_0x2e0273?.[_0x44dbd3(0x81)]();return _0x4b28a0?_0x4b28a0:null;}function a262_0x3e59(_0x18e616,_0x3f8e13){_0x18e616=_0x18e616-0x7b;const _0x17046b=a262_0x1704();let _0x3e5922=_0x17046b[_0x18e616];return _0x3e5922;}export function projectTenantMembers(_0x134a9d){const _0x3e2aa2=a262_0x3e59,_0x5822ec=new Map();for(const _0x5d771a of _0x134a9d){const _0x5d30ae=Number(_0x5d771a[_0x3e2aa2(0x90)]);if(!Number[_0x3e2aa2(0x82)](_0x5d30ae)||_0x5d30ae<=0x0)continue;const _0x54507e={'userId':_0x5d30ae,'username':textOrNull(_0x5d771a['username']),'displayName':textOrNull(_0x5d771a[_0x3e2aa2(0x92)]),'role':_0x5d771a[_0x3e2aa2(0x83)]===!![]?_0x3e2aa2(0x86):_0x3e2aa2(0x95),'status':textOrNull(_0x5d771a[_0x3e2aa2(0x93)])},_0x4b415b=_0x5822ec[_0x3e2aa2(0x88)](_0x5d30ae);if(!_0x4b415b){_0x5822ec[_0x3e2aa2(0x84)](_0x5d30ae,_0x54507e);continue;}_0x4b415b[_0x3e2aa2(0x87)]??=_0x54507e[_0x3e2aa2(0x87)],_0x4b415b[_0x3e2aa2(0x80)]??=_0x54507e[_0x3e2aa2(0x80)],_0x4b415b[_0x3e2aa2(0x93)]??=_0x54507e[_0x3e2aa2(0x93)];if(_0x54507e[_0x3e2aa2(0x7e)]===_0x3e2aa2(0x86))_0x4b415b[_0x3e2aa2(0x7e)]=_0x3e2aa2(0x86);}return[..._0x5822ec[_0x3e2aa2(0x8e)]()]['sort']((_0xe7be95,_0x2e6f75)=>_0xe7be95['userId']-_0x2e6f75[_0x3e2aa2(0x90)]);}export function assertTenantAccessible(_0x154b7c,_0x18634f){const _0x3e2861=a262_0x3e59;if(_0x18634f[_0x3e2861(0x8f)](_0x84cdd=>_0x84cdd[_0x3e2861(0x94)]===_0x154b7c))return;throw CliErrors[_0x3e2861(0x8a)]('Tenant\x20\x22'+_0x154b7c+_0x3e2861(0x8b),'Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.');}function a262_0x1704(){const _0x39549f=['some','userId','302470HrkwfQ','nickname','status','tenantCode','MEMBER','532902zwrBhH','12HwUeAG','297GZsfVK','167767wIacTs','role','1199696GMYNMQ','displayName','trim','isFinite','adminFlag','set','1767215yxJZuq','ADMIN','username','get','4TJmXiI','validation','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','522011uDWtgl','2632832CNgnyZ','values'];a262_0x1704=function(){return _0x39549f;};return a262_0x1704();}
1
+ import{CliErrors}from"../../errors.js";function textOrNull(value){const normalized=value?.trim();return normalized?normalized:null}export function projectTenantMembers(members){const projected=new Map;for(const member of members){const userId=Number(member.userId);if(!Number.isFinite(userId)||userId<=0)continue;const next={userId:userId,username:textOrNull(member.username),displayName:textOrNull(member.nickname),role:member.adminFlag===true?"ADMIN":"MEMBER",status:textOrNull(member.status)};const existing=projected.get(userId);if(!existing){projected.set(userId,next);continue}existing.username??=next.username;existing.displayName??=next.displayName;existing.status??=next.status;if(next.role==="ADMIN")existing.role="ADMIN"}return[...projected.values()].sort((left,right)=>left.userId-right.userId)}export function assertTenantAccessible(tenantCode,memberships){if(memberships.some(membership=>membership.tenantCode===tenantCode)){return}
2
+ throw CliErrors.validation(`Tenant "${tenantCode}" is not available to the current account.`,"Check --tenant-code or login with an account that belongs to this tenant.")}
@@ -1 +1,2 @@
1
- const a263_0x1526eb=a263_0x4e2a;(function(_0x2d2c53,_0x4c0d79){const _0x1508fc=a263_0x4e2a,_0x527799=_0x2d2c53();while(!![]){try{const _0x2cc280=-parseInt(_0x1508fc(0x121))/0x1+-parseInt(_0x1508fc(0x10c))/0x2+-parseInt(_0x1508fc(0x11d))/0x3*(parseInt(_0x1508fc(0x120))/0x4)+parseInt(_0x1508fc(0x111))/0x5+-parseInt(_0x1508fc(0x115))/0x6*(parseInt(_0x1508fc(0x11a))/0x7)+-parseInt(_0x1508fc(0x116))/0x8+parseInt(_0x1508fc(0x11b))/0x9;if(_0x2cc280===_0x4c0d79)break;else _0x527799['push'](_0x527799['shift']());}catch(_0x3b03ae){_0x527799['push'](_0x527799['shift']());}}}(a263_0x19d8,0xcfcd8));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID=a263_0x1526eb(0x10f),CURRENT_BINDING_WARNING=a263_0x1526eb(0x10d);function readDingTalkUserId(_0x3b9dca){const _0x477f7f=a263_0x1526eb,_0x2701e4=_0x3b9dca[_0x477f7f(0x10e)](_0x477f7f(0x110))[_0x477f7f(0x11f)]();if(!_0x2701e4)throw CliErrors[_0x477f7f(0x10b)](_0x477f7f(0x11c),_0x477f7f(0x113));return _0x2701e4;}function a263_0x4e2a(_0x5d0eab,_0x5e4f89){_0x5d0eab=_0x5d0eab-0x10b;const _0x19d8f9=a263_0x19d8();let _0x4e2a65=_0x19d8f9[_0x5d0eab];return _0x4e2a65;}function buildBindingData(_0x4c57d9,_0x4375c7){return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x4c57d9},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x4c57d9,'bound':!![]},'dryRun':_0x4375c7,'backend':{'method':'POST','path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a263_0x1526eb(0x117),'command':'dingding-sandbox-bind','description':a263_0x1526eb(0x114),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a263_0x1526eb(0x110),'type':'string','required':!![],'description':a263_0x1526eb(0x112)}],async 'validate'(_0x1d1e98){readDingTalkUserId(_0x1d1e98);},async 'dryRun'(_0x360458){const _0x176a76=readDingTalkUserId(_0x360458);return asDryRunResult(buildBindingData(_0x176a76,!![]),{'method':'POST','url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x1c7834){const _0x17ce11=a263_0x1526eb,_0xa2b72a=readDingTalkUserId(_0x1c7834),_0x308230=await bindDingTalkSandboxAccount(_0xa2b72a);if(_0x308230!==!![])throw CliErrors[_0x17ce11(0x11e)](_0x17ce11(0x118),_0x17ce11(0x119));return{'ok':!![],'data':buildBindingData(_0xa2b72a,![]),'message':'Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.'};}};function a263_0x19d8(){const _0x439fa4=['DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','532854XqnGnH','30415509tOgVua','--ding-talk-user-id\x20cannot\x20be\x20empty.','3rfonyl','apiError','trim','1717404BMvsGR','588144pRFLhN','validation','1496102wSoQAC','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','str','dingtalk','ding-talk-user-id','4666325vTEhLn','DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','54GOaGtt','8087696zhCIQu','user-account'];a263_0x19d8=function(){return _0x439fa4;};return a263_0x19d8();}
1
+ import{asDryRunResult}from"../../commands/common/dry-run.js";import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from"../../core/api-client.js";import{CliErrors}from"../../errors.js";const PROVIDER_ID="dingtalk";const CURRENT_BINDING_WARNING="The current binding is not exposed by the server; before is unavailable.";function readDingTalkUserId(ctx){const dingTalkUserId=ctx.str("ding-talk-user-id").trim();if(!dingTalkUserId){throw CliErrors.validation("--ding-talk-user-id cannot be empty.","Pass the DingTalk user id returned by the sandbox.")}return dingTalkUserId}function buildBindingData(dingTalkUserId,dryRun){return{operation:"bind",selector:{providerId:PROVIDER_ID,dingTalkUserId:dingTalkUserId},before:null,after:{providerId:PROVIDER_ID,dingTalkUserId:dingTalkUserId,bound:true},dryRun:dryRun,backend:{method:"POST",path:DING_TALK_SANDBOX_BIND_PATH},warnings:[CURRENT_BINDING_WARNING]}}export const dingTalkSandboxBind={service:"user-account",command:"dingding-sandbox-bind",
2
+ description:"Bind the current platform user to a DingTalk sandbox account",risk:"write",requiresAuth:true,requiresAppCode:false,structuredErrors:true,flags:[{name:"ding-talk-user-id",type:"string",required:true,description:"DingTalk user id returned by the sandbox"}],async validate(ctx){readDingTalkUserId(ctx)},async dryRun(ctx){const dingTalkUserId=readDingTalkUserId(ctx);return asDryRunResult(buildBindingData(dingTalkUserId,true),{method:"POST",url:DING_TALK_SANDBOX_BIND_PATH})},async execute(ctx){const dingTalkUserId=readDingTalkUserId(ctx);const confirmed=await bindDingTalkSandboxAccount(dingTalkUserId);if(confirmed!==true){throw CliErrors.apiError("DingTalk sandbox account binding was not confirmed.","Retry with the same --ding-talk-user-id only after checking the current platform session.")}return{ok:true,data:buildBindingData(dingTalkUserId,false),message:"Bound current user to DingTalk sandbox account."}}};
@@ -1 +1,2 @@
1
- const a264_0x3b4644=a264_0x3ee8;(function(_0x50755c,_0x149e6b){const _0xd01c03=a264_0x3ee8,_0x211668=_0x50755c();while(!![]){try{const _0xd79281=-parseInt(_0xd01c03(0xde))/0x1*(-parseInt(_0xd01c03(0xe8))/0x2)+-parseInt(_0xd01c03(0xea))/0x3*(parseInt(_0xd01c03(0xe1))/0x4)+-parseInt(_0xd01c03(0xef))/0x5*(-parseInt(_0xd01c03(0xdc))/0x6)+parseInt(_0xd01c03(0xe9))/0x7*(-parseInt(_0xd01c03(0xee))/0x8)+parseInt(_0xd01c03(0xec))/0x9+parseInt(_0xd01c03(0xd7))/0xa+-parseInt(_0xd01c03(0xeb))/0xb;if(_0xd79281===_0x149e6b)break;else _0x211668['push'](_0x211668['shift']());}catch(_0x3509aa){_0x211668['push'](_0x211668['shift']());}}}(a264_0x2e13,0x5f5ac));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindFeishuAccount,FEISHU_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID=a264_0x3b4644(0xd6),CURRENT_BINDING_WARNING='The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.';function a264_0x2e13(){const _0x5284db=['test','feishu','4804470ktyoQg','apiError','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20Feishu\x20account','trim','Verify\x20the\x20current\x20binding\x20through\x20the\x20platform\x20before\x20explicitly\x20retrying;\x20do\x20not\x20automatically\x20retry.','6NeMwXr','bind','3mstRZH','union-id','write','168676tgaENb','POST','str','validation','user-account','--union-id\x20must\x20match\x20on_\x20followed\x20by\x20letters,\x20digits,\x20underscores,\x20or\x20hyphens.','string','145190sIWXen','7VovxAt','39tXIfFo','4948031eViWsF','5810904GTVQbO','Feishu\x20union_id\x20for\x20the\x20configured\x20Feishu\x20application\x20developer','4889176zWodco','3279245jOSQid','Feishu\x20account\x20binding\x20was\x20not\x20confirmed.'];a264_0x2e13=function(){return _0x5284db;};return a264_0x2e13();}function a264_0x3ee8(_0x26d931,_0x49b214){_0x26d931=_0x26d931-0xd6;const _0x2e1395=a264_0x2e13();let _0x3ee85d=_0x2e1395[_0x26d931];return _0x3ee85d;}function readUnionId(_0x3db11b){const _0x1c9011=a264_0x3b4644,_0x26e15b=_0x3db11b[_0x1c9011(0xe3)](_0x1c9011(0xdf))[_0x1c9011(0xda)]();if(!/^on_[A-Za-z0-9_-]+$/[_0x1c9011(0xf1)](_0x26e15b))throw CliErrors[_0x1c9011(0xe4)](_0x1c9011(0xe6),'Pass\x20a\x20Feishu\x20union\x20id\x20such\x20as\x20on_example_001.');return _0x26e15b;}function buildBindingData(_0x17982d,_0x1fda9a){const _0x1dd90d=a264_0x3b4644;return{'operation':_0x1dd90d(0xdd),'selector':{'providerId':PROVIDER_ID,'unionId':_0x17982d},'before':null,'after':{'providerId':PROVIDER_ID,'unionId':_0x17982d,'bound':!![]},'dryRun':_0x1fda9a,'backend':{'method':'POST','path':FEISHU_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const feishuBind={'service':a264_0x3b4644(0xe5),'command':'feishu-bind','description':a264_0x3b4644(0xd9),'risk':a264_0x3b4644(0xe0),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a264_0x3b4644(0xdf),'type':a264_0x3b4644(0xe7),'required':!![],'description':a264_0x3b4644(0xed)}],async 'validate'(_0x14ded7){readUnionId(_0x14ded7);},async 'dryRun'(_0x1a61af){const _0x10ff13=a264_0x3b4644,_0x19d887=readUnionId(_0x1a61af);return asDryRunResult(buildBindingData(_0x19d887,!![]),{'method':_0x10ff13(0xe2),'url':FEISHU_BIND_PATH});},async 'execute'(_0x25508d){const _0x511fc6=a264_0x3b4644,_0x2fae36=readUnionId(_0x25508d),_0x437ff7=await bindFeishuAccount(_0x2fae36);if(_0x437ff7!==!![])throw CliErrors[_0x511fc6(0xd8)](_0x511fc6(0xf0),_0x511fc6(0xdb));return{'ok':!![],'data':buildBindingData(_0x2fae36,![]),'message':'Bound\x20current\x20user\x20to\x20Feishu\x20account.'};}};
1
+ import{asDryRunResult}from"../../commands/common/dry-run.js";import{bindFeishuAccount,FEISHU_BIND_PATH}from"../../core/api-client.js";import{CliErrors}from"../../errors.js";const PROVIDER_ID="feishu";const CURRENT_BINDING_WARNING="The current binding is not exposed by the server; before is unavailable.";function readUnionId(ctx){const unionId=ctx.str("union-id").trim();if(!/^on_[A-Za-z0-9_-]+$/.test(unionId)){throw CliErrors.validation("--union-id must match on_ followed by letters, digits, underscores, or hyphens.","Pass a Feishu union id such as on_example_001.")}return unionId}function buildBindingData(unionId,dryRun){return{operation:"bind",selector:{providerId:PROVIDER_ID,unionId:unionId},before:null,after:{providerId:PROVIDER_ID,unionId:unionId,bound:true},dryRun:dryRun,backend:{method:"POST",path:FEISHU_BIND_PATH},warnings:[CURRENT_BINDING_WARNING]}}export const feishuBind={service:"user-account",command:"feishu-bind",
2
+ description:"Bind the current platform user to a Feishu account",risk:"write",requiresAuth:true,requiresAppCode:false,structuredErrors:true,flags:[{name:"union-id",type:"string",required:true,description:"Feishu union_id for the configured Feishu application developer"}],async validate(ctx){readUnionId(ctx)},async dryRun(ctx){const unionId=readUnionId(ctx);return asDryRunResult(buildBindingData(unionId,true),{method:"POST",url:FEISHU_BIND_PATH})},async execute(ctx){const unionId=readUnionId(ctx);const confirmed=await bindFeishuAccount(unionId);if(confirmed!==true){throw CliErrors.apiError("Feishu account binding was not confirmed.","Verify the current binding through the platform before explicitly retrying; do not automatically retry.")}return{ok:true,data:buildBindingData(unionId,false),message:"Bound current user to Feishu account."}}};
@@ -1 +1 @@
1
- (function(_0x4c4269,_0x35a3d5){const _0x5b29a6=a265_0x2178,_0x477740=_0x4c4269();while(!![]){try{const _0x268e20=-parseInt(_0x5b29a6(0x92))/0x1+-parseInt(_0x5b29a6(0x8b))/0x2+-parseInt(_0x5b29a6(0x8e))/0x3*(-parseInt(_0x5b29a6(0x90))/0x4)+parseInt(_0x5b29a6(0x88))/0x5*(-parseInt(_0x5b29a6(0x87))/0x6)+-parseInt(_0x5b29a6(0x8f))/0x7*(parseInt(_0x5b29a6(0x8a))/0x8)+parseInt(_0x5b29a6(0x8c))/0x9*(parseInt(_0x5b29a6(0x89))/0xa)+parseInt(_0x5b29a6(0x91))/0xb*(parseInt(_0x5b29a6(0x8d))/0xc);if(_0x268e20===_0x35a3d5)break;else _0x477740['push'](_0x477740['shift']());}catch(_0x385154){_0x477740['push'](_0x477740['shift']());}}}(a265_0x3905,0x6c2c9));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';import{feishuBind}from'../../commands/user-account/feishu-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind,feishuBind];function a265_0x2178(_0x34b2fa,_0xaf2a26){_0x34b2fa=_0x34b2fa-0x87;const _0x390500=a265_0x3905();let _0x217832=_0x390500[_0x34b2fa];return _0x217832;}function a265_0x3905(){const _0x2e3156=['496752yFZUHW','11MXiade','833508AqfkRo','1069416sDyLwM','10mwZyko','10qBLbBu','16lZJtDE','71318fDnJUb','4855581kbmjHB','16805004Ykcpkd','3awVvul','1383879dDisOa'];a265_0x3905=function(){return _0x2e3156;};return a265_0x3905();}
1
+ import{dingTalkSandboxBind}from"../../commands/user-account/dingding-sandbox-bind.js";import{feishuBind}from"../../commands/user-account/feishu-bind.js";export const userAccountDefinitions=[dingTalkSandboxBind,feishuBind];
@@ -1 +1 @@
1
- const a266_0x22858a=a266_0x18e6;function a266_0x18e6(_0x4222b2,_0x5aa996){_0x4222b2=_0x4222b2-0x8d;const _0x5b7291=a266_0x5b72();let _0x18e6f8=_0x5b7291[_0x4222b2];return _0x18e6f8;}(function(_0x497c0a,_0x27bb5b){const _0x5aa2c3=a266_0x18e6,_0x32e96b=_0x497c0a();while(!![]){try{const _0x2f5a52=-parseInt(_0x5aa2c3(0x90))/0x1+-parseInt(_0x5aa2c3(0x9a))/0x2+-parseInt(_0x5aa2c3(0x8f))/0x3+parseInt(_0x5aa2c3(0x99))/0x4*(-parseInt(_0x5aa2c3(0x8e))/0x5)+parseInt(_0x5aa2c3(0x91))/0x6*(-parseInt(_0x5aa2c3(0x95))/0x7)+parseInt(_0x5aa2c3(0x97))/0x8*(parseInt(_0x5aa2c3(0x92))/0x9)+parseInt(_0x5aa2c3(0x98))/0xa;if(_0x2f5a52===_0x27bb5b)break;else _0x32e96b['push'](_0x32e96b['shift']());}catch(_0x53e774){_0x32e96b['push'](_0x32e96b['shift']());}}}(a266_0x5b72,0xbb56a));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':'workspace','command':'add','description':'Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a266_0x22858a(0x93),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a266_0x22858a(0x8d),'description':a266_0x22858a(0x96),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x4f2420=>validateAppName(_0x4f2420,a266_0x22858a(0x94)),'execute':_0x533b58=>runAppAdd(_0x533b58,a266_0x22858a(0x94))};function a266_0x5b72(){const _0x609150=['1168344hgdVxk','705598qRdDOJ','7253502TdTZsr','45GZjiHz','write','workspace\x20add','7jOKetE','App\x20profile\x20name','475336eNFxGE','40227740CDXNBW','4pAFpNz','1348098VEqcpq','name','2872545zwSiNp'];a266_0x5b72=function(){return _0x609150;};return a266_0x5b72();}
1
+ import{buildAppAddFlags,runAppAdd,validateAppName}from"../../commands/common/app-registry.js";export const workspaceAddDefinition={service:"workspace",command:"add",description:"Register an app profile in the current workspace (or --global)",risk:"write",requiresAuth:false,requiresAppCode:false,args:[{name:"name",description:"App profile name",required:true}],flags:buildAppAddFlags(),validate:ctx=>validateAppName(ctx,"workspace add"),execute:ctx=>runAppAdd(ctx,"workspace add")};
@@ -1 +1,7 @@
1
- const a267_0x19c9c9=a267_0x3f6b;(function(_0x38eddc,_0x29a651){const _0x1206b6=a267_0x3f6b,_0x42f622=_0x38eddc();while(!![]){try{const _0x36ea69=parseInt(_0x1206b6(0x14d))/0x1*(parseInt(_0x1206b6(0x142))/0x2)+-parseInt(_0x1206b6(0x154))/0x3*(parseInt(_0x1206b6(0x123))/0x4)+-parseInt(_0x1206b6(0x134))/0x5*(parseInt(_0x1206b6(0x12f))/0x6)+parseInt(_0x1206b6(0x139))/0x7*(parseInt(_0x1206b6(0x12a))/0x8)+parseInt(_0x1206b6(0x125))/0x9+-parseInt(_0x1206b6(0x153))/0xa*(parseInt(_0x1206b6(0x149))/0xb)+-parseInt(_0x1206b6(0x120))/0xc*(-parseInt(_0x1206b6(0x13b))/0xd);if(_0x36ea69===_0x29a651)break;else _0x42f622['push'](_0x42f622['shift']());}catch(_0x24821e){_0x42f622['push'](_0x42f622['shift']());}}}(a267_0x4fa8,0x2fac1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';import{normalizeStoredDefaultApp}from'../../config/schema.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../../constant/region.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a267_0x19c9c9(0x148),SAFE_PROFILE_KEYS=['appcode',a267_0x19c9c9(0x152),a267_0x19c9c9(0x13e),a267_0x19c9c9(0x144),a267_0x19c9c9(0x124),a267_0x19c9c9(0x127),'pageSize','riskLevel','locale'],workspaceFlags=[{'name':a267_0x19c9c9(0x11a),'type':a267_0x19c9c9(0x133),'description':'App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace'},{'name':a267_0x19c9c9(0x143),'type':a267_0x19c9c9(0x133),'description':a267_0x19c9c9(0x12e)},{'name':'apiGroup','type':'string','description':a267_0x19c9c9(0x13f)},{'name':a267_0x19c9c9(0x13e),'type':'string','description':a267_0x19c9c9(0x145),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a267_0x19c9c9(0x144),'type':'string','description':a267_0x19c9c9(0x131),'enum':[...RABETBASE_ENV_VALUES]},{'name':a267_0x19c9c9(0x124),'type':a267_0x19c9c9(0x133),'description':a267_0x19c9c9(0x14c)},{'name':a267_0x19c9c9(0x13a),'type':a267_0x19c9c9(0x133),'description':a267_0x19c9c9(0x13d),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a267_0x19c9c9(0x14a),'type':a267_0x19c9c9(0x12d),'description':a267_0x19c9c9(0x146)},{'name':a267_0x19c9c9(0x132),'type':a267_0x19c9c9(0x133),'description':a267_0x19c9c9(0x11b),'enum':[...RISK_LEVEL_VALUES]},{'name':a267_0x19c9c9(0x11f),'type':'string','description':'App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)'}];function isRecord(_0x360858){const _0x2ad098=a267_0x19c9c9;return!!_0x360858&&typeof _0x360858==='object'&&!Array[_0x2ad098(0x14b)](_0x360858);}function assertValidAppcode(_0x39a371){const _0x1234b4=a267_0x19c9c9,{valid:_0x4d5fcf,message:_0x2369b6}=validateAppcode(_0x39a371);if(!_0x4d5fcf)throw CliErrors[_0x1234b4(0x129)](_0x1234b4(0x147)+_0x39a371,_0x2369b6);}function a267_0x3f6b(_0x21e39a,_0x2a7fbc){_0x21e39a=_0x21e39a-0x118;const _0x4fa824=a267_0x4fa8();let _0x3f6b46=_0x4fa824[_0x21e39a];return _0x3f6b46;}function sanitizeProfile(_0x57fff9){if(!isRecord(_0x57fff9))return{};const _0x527ef6={};for(const _0x58c500 of SAFE_PROFILE_KEYS){if(_0x57fff9[_0x58c500]!==undefined)_0x527ef6[_0x58c500]=_0x57fff9[_0x58c500];}return _0x527ef6;}function cloneProfile(_0x55b62c){return isRecord(_0x55b62c)?{..._0x55b62c}:{};}function a267_0x4fa8(){const _0x1a4fa6=['28325uHsSrg','flag','apps','workspace','initialized','5845zPzFlf','defaultFormat','1465061wZYWKP','\x20--app\x20','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','region','Join\x20key\x20for\x20app\x20profiles\x20that\x20share\x20one\x20generated\x20API\x20model\x20registry','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','use','681140MkxFhR','appcode','env','Country/region\x20for\x20this\x20workspace\x20app\x20profile','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','Invalid\x20appcode:\x20','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','373615jhZTtG','pageSize','isArray','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','1yZxfKm','globalConfig','Missing\x20workspace\x20app\x20selector.','keys','str','apiGroup','30BmnJer','808218edoDYd','Use\x20`','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x22\x20not\x20found.','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','app','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','\x20workspace\x20use\x20--app\x20<name>`.','length','init','locale','36mOGoxy','trim','\x20workspace\x20','4UgNEcK','apiDir','1126485ftIwbI','\x20(appcode:\x20','format','Workspace\x20','validation','712VJhUze',').\x20Config:\x20','write','number','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','330DhdDlj','.\x20Credentials:\x20not\x20written.','Target\x20environment','riskLevel','string'];a267_0x4fa8=function(){return _0x1a4fa6;};return a267_0x4fa8();}function collectWorkspaceProfileOverrides(_0x272267){const _0x341cb2=a267_0x19c9c9,_0x499791={},_0x15c627=_0x272267['str'](_0x341cb2(0x152)),_0x43e08f=_0x272267[_0x341cb2(0x151)]('region'),_0x47ecea=_0x272267[_0x341cb2(0x151)](_0x341cb2(0x144)),_0x2b5680=_0x272267[_0x341cb2(0x151)](_0x341cb2(0x124)),_0x540964=_0x272267[_0x341cb2(0x151)](_0x341cb2(0x13a)),_0x8da70a=_0x272267[_0x341cb2(0x135)](_0x341cb2(0x14a)),_0x4ddde5=_0x272267[_0x341cb2(0x151)](_0x341cb2(0x132)),_0x4497c7=_0x272267[_0x341cb2(0x151)](_0x341cb2(0x11f));if(_0x15c627)_0x499791[_0x341cb2(0x152)]=_0x15c627;if(_0x43e08f)_0x499791['region']=_0x43e08f;if(_0x47ecea)_0x499791['env']=_0x47ecea;if(_0x2b5680)_0x499791[_0x341cb2(0x124)]=_0x2b5680;if(_0x540964)_0x499791[_0x341cb2(0x127)]=_0x540964;if(_0x8da70a!==undefined&&_0x8da70a!=='')_0x499791['pageSize']=Number(_0x8da70a);if(_0x4ddde5)_0x499791[_0x341cb2(0x132)]=_0x4ddde5;if(_0x4497c7)_0x499791['locale']=_0x4497c7;return _0x499791;}async function validateWorkspaceArgs(_0x458f26){const _0x349ec0=a267_0x19c9c9,_0x3cdc48=_0x458f26[_0x349ec0(0x151)]('app')[_0x349ec0(0x121)](),_0x4ff74b=_0x458f26['str']('appcode')[_0x349ec0(0x121)]();if(!_0x3cdc48&&!_0x4ff74b)throw CliErrors['validation'](_0x349ec0(0x14f),_0x349ec0(0x155)+CLI_BIN_NAME+_0x349ec0(0x140)+CLI_BIN_NAME+_0x349ec0(0x11c));if(_0x4ff74b)assertValidAppcode(_0x4ff74b);}function resolveKnownApps(){const _0x64fb3b=a267_0x19c9c9,{config:_0x12796c,layers:_0x57ca5f}=readRawConfigWithLayers(),_0x434772=isRecord(_0x12796c[_0x64fb3b(0x136)])?_0x12796c[_0x64fb3b(0x136)]:{},_0x22d7a5=isRecord(_0x57ca5f[_0x64fb3b(0x14e)][_0x64fb3b(0x136)])?_0x57ca5f['globalConfig'][_0x64fb3b(0x136)]:{};return{..._0x22d7a5,..._0x434772};}async function configureWorkspace(_0x31f99e,_0x405120){const _0x49c4b4=a267_0x19c9c9,_0x23d146=_0x31f99e[_0x49c4b4(0x151)]('app')[_0x49c4b4(0x121)](),_0x546e29=_0x31f99e[_0x49c4b4(0x151)](_0x49c4b4(0x143))[_0x49c4b4(0x121)](),_0xe0fd17=_0x23d146||_0x546e29;if(!_0xe0fd17)throw CliErrors[_0x49c4b4(0x129)](_0x49c4b4(0x14f),_0x49c4b4(0x155)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x49c4b4(0x11c));if(_0x546e29)assertValidAppcode(_0x546e29);const _0x10f86a=resolveWriteConfigPath('project'),_0x2c2161=readConfigFile(_0x10f86a),_0xda8260=resolveKnownApps(),_0x296086=isRecord(_0x2c2161[_0x49c4b4(0x136)])?{..._0x2c2161[_0x49c4b4(0x136)]}:{},_0xae9468=cloneProfile(_0x296086[_0xe0fd17]),_0x4e57c9=sanitizeProfile(_0xda8260[_0xe0fd17]),_0x4311c0=_0x546e29?{}:_0x4e57c9,_0x1ab50b=_0x546e29||_0x4311c0[_0x49c4b4(0x143)];if(!_0x1ab50b){const _0x388f85=Object[_0x49c4b4(0x150)](_0xda8260),_0x23ca3f=_0x388f85[_0x49c4b4(0x11d)]===0x0?_0x49c4b4(0x155)+CLI_BIN_NAME+_0x49c4b4(0x122)+_0x405120+_0x49c4b4(0x13c)+_0xe0fd17+'\x20--appcode\x20<code>`.':_0x49c4b4(0x119)+_0x388f85['join'](',\x20');throw CliErrors[_0x49c4b4(0x129)]('App\x20\x22'+_0xe0fd17+_0x49c4b4(0x118),_0x23ca3f);}assertValidAppcode(String(_0x1ab50b));const _0xe97009={..._0x4311c0,..._0xae9468,'appcode':String(_0x1ab50b),...collectWorkspaceProfileOverrides(_0x31f99e)};return _0x296086[_0xe0fd17]=_0xe97009,_0x2c2161[_0x49c4b4(0x136)]=_0x296086,normalizeStoredDefaultApp(_0x2c2161,_0xe0fd17),delete _0x2c2161[_0x49c4b4(0x143)],delete _0x2c2161[_0x49c4b4(0x11a)],_0xe97009[_0x49c4b4(0x144)]&&(_0x2c2161[_0x49c4b4(0x144)]=_0xe97009[_0x49c4b4(0x144)]),writeConfigFile(_0x10f86a,_0x2c2161),{'ok':!![],'message':_0x49c4b4(0x128)+(_0x405120===_0x49c4b4(0x11e)?_0x49c4b4(0x138):'updated')+':\x20'+_0xe0fd17+_0x49c4b4(0x126)+_0xe97009[_0x49c4b4(0x143)]+_0x49c4b4(0x12b)+_0x10f86a+_0x49c4b4(0x130),'data':{'operation':'workspace.'+_0x405120,'configPath':_0x10f86a,'app':_0xe0fd17,'appcode':_0xe97009[_0x49c4b4(0x143)],'apiGroup':_0xe97009['apiGroup']??null,'region':_0xe97009['region']??null,'env':_0xe97009[_0x49c4b4(0x144)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a267_0x19c9c9(0x137),'command':'init','description':a267_0x19c9c9(0x156),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x17f2f9=>configureWorkspace(_0x17f2f9,a267_0x19c9c9(0x11e))},workspaceUseDefinition={'service':a267_0x19c9c9(0x137),'command':a267_0x19c9c9(0x141),'description':'Switch\x20the\x20current\x20workspace\x20app\x20binding','risk':a267_0x19c9c9(0x12c),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x2b9f75=>configureWorkspace(_0x2b9f75,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ import{CliErrors}from"../../errors.js";import{CLI_BIN_NAME}from"../../constant/cli.js";import{RABETBASE_ENV_VALUES}from"../../constant/env.js";import{RABETBASE_OUTPUT_FORMAT_VALUES}from"../../constant/output.js";import{RISK_LEVEL_VALUES}from"../../constant/risk.js";import{validateAppcode}from"../../commands/common/validate.js";import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from"../../context.js";import{workspaceAddDefinition}from"../../commands/workspace/add.js";import{workspaceRemoveDefinition}from"../../commands/workspace/remove.js";import{normalizeStoredDefaultApp}from"../../config/schema.js";import{ENABLED_LOVRABET_REGION_VALUES}from"../../constant/region.js";const WORKSPACE_USAGE=`${CLI_BIN_NAME} workspace <init|use> --app <name> [--appcode <code>]`;const SAFE_PROFILE_KEYS=["appcode","apiGroup","region","env","apiDir","format","pageSize","riskLevel","locale"];const workspaceFlags=[{name:"app",type:"string",
2
+ description:"App profile name to use in this workspace"},{name:"appcode",type:"string",description:"App code to bind to this workspace"},{name:"apiGroup",type:"string",description:"Join key for app profiles that share one generated API model registry"},{name:"region",type:"string",description:"Country/region for this workspace app profile",enum:[...ENABLED_LOVRABET_REGION_VALUES]},{name:"env",type:"string",description:"Target environment",enum:[...RABETBASE_ENV_VALUES]},{name:"apiDir",type:"string",description:"API directory path for this workspace app profile"},{name:"defaultFormat",type:"string",description:"Default output format for this workspace app profile",enum:[...RABETBASE_OUTPUT_FORMAT_VALUES]},{name:"pageSize",type:"number",description:"Default page size for this workspace app profile"},{name:"riskLevel",type:"string",description:"Risk level for this workspace app profile",enum:[...RISK_LEVEL_VALUES]},{name:"locale",type:"string",
3
+ description:"App locale for this workspace app profile (not CLI language; reserved for later app use)"}];function isRecord(value){return!!value&&typeof value==="object"&&!Array.isArray(value)}function assertValidAppcode(appcode){const{valid:valid,message:message}=validateAppcode(appcode);if(!valid){throw CliErrors.validation(`Invalid appcode: ${appcode}`,message)}}function sanitizeProfile(profile){if(!isRecord(profile))return{};const sanitized={};for(const key of SAFE_PROFILE_KEYS){if(profile[key]!==undefined)sanitized[key]=profile[key]}return sanitized}function cloneProfile(profile){return isRecord(profile)?{...profile}:{}}function collectWorkspaceProfileOverrides(ctx){const profile={};const apiGroup=ctx.str("apiGroup");const region=ctx.str("region");const env=ctx.str("env");const apiDir=ctx.str("apiDir");const defaultFormat=ctx.str("defaultFormat");const pageSize=ctx.flag("pageSize");const riskLevel=ctx.str("riskLevel");const locale=ctx.str("locale")
4
+ ;if(apiGroup)profile.apiGroup=apiGroup;if(region)profile.region=region;if(env)profile.env=env;if(apiDir)profile.apiDir=apiDir;if(defaultFormat)profile.format=defaultFormat;if(pageSize!==undefined&&pageSize!=="")profile.pageSize=Number(pageSize);if(riskLevel)profile.riskLevel=riskLevel;if(locale)profile.locale=locale;return profile}async function validateWorkspaceArgs(ctx){const app=ctx.str("app").trim();const appcode=ctx.str("appcode").trim();if(!app&&!appcode){throw CliErrors.validation("Missing workspace app selector.",`Use \`${CLI_BIN_NAME} workspace init --appcode <code>\` or \`${CLI_BIN_NAME} workspace use --app <name>\`.`)}if(appcode)assertValidAppcode(appcode)}function resolveKnownApps(){const{config:merged,layers:layers}=readRawConfigWithLayers();const mergedApps=isRecord(merged.apps)?merged.apps:{};const globalApps=isRecord(layers.globalConfig.apps)?layers.globalConfig.apps:{};return{...globalApps,...mergedApps}}async function configureWorkspace(ctx,operation){
5
+ const inputApp=ctx.str("app").trim();const inputAppcode=ctx.str("appcode").trim();const appName=inputApp||inputAppcode;if(!appName){throw CliErrors.validation("Missing workspace app selector.",`Use \`${CLI_BIN_NAME} workspace init --appcode <code>\` or \`${CLI_BIN_NAME} workspace use --app <name>\`.`)}if(inputAppcode)assertValidAppcode(inputAppcode);const configPath=resolveWriteConfigPath("project");const config=readConfigFile(configPath);const knownApps=resolveKnownApps();const projectApps=isRecord(config.apps)?{...config.apps}:{};const existingProjectProfile=cloneProfile(projectApps[appName]);const knownProfile=sanitizeProfile(knownApps[appName]);const sourceProfile=inputAppcode?{}:knownProfile;const resolvedAppcode=inputAppcode||sourceProfile.appcode;if(!resolvedAppcode){const available=Object.keys(knownApps)
6
+ ;const hint=available.length===0?`Use \`${CLI_BIN_NAME} workspace ${operation} --app ${appName} --appcode <code>\`.`:`Pass --appcode <code>, or choose one of: ${available.join(", ")}`;throw CliErrors.validation(`App "${appName}" not found.`,hint)}assertValidAppcode(String(resolvedAppcode));const profile={...sourceProfile,...existingProjectProfile,appcode:String(resolvedAppcode),...collectWorkspaceProfileOverrides(ctx)};projectApps[appName]=profile;config.apps=projectApps;normalizeStoredDefaultApp(config,appName);delete config.appcode;delete config.app;if(profile.env){config.env=profile.env}writeConfigFile(configPath,config);return{ok:true,message:`Workspace ${operation==="init"?"initialized":"updated"}: ${appName} (appcode: ${profile.appcode}). Config: ${configPath}. Credentials: not written.`,data:{operation:`workspace.${operation}`,configPath:configPath,app:appName,appcode:profile.appcode,apiGroup:profile.apiGroup??null,region:profile.region??null,env:profile.env??null,
7
+ credentialsWritten:false}}}const workspaceInitDefinition={service:"workspace",command:"init",description:"Initialize the current workspace app binding",risk:"write",requiresAuth:false,requiresAppCode:false,args:[],flags:workspaceFlags,validate:validateWorkspaceArgs,execute:ctx=>configureWorkspace(ctx,"init")};const workspaceUseDefinition={service:"workspace",command:"use",description:"Switch the current workspace app binding",risk:"write",requiresAuth:false,requiresAppCode:false,args:[],flags:workspaceFlags,validate:validateWorkspaceArgs,execute:ctx=>configureWorkspace(ctx,"use")};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a268_0x5cc432=a268_0x17bf;function a268_0x3458(){const _0xbdfc2b=['name','1375297LylpRI','495420CVaEQp','45412qeYssP','874864vJAUSr','1112472VZtvwJ','write','workspace\x20remove','942216blqLKZ','16315hNTVft','204sJEhUa','workspace','App\x20profile\x20name\x20to\x20remove','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','5xtMMJk'];a268_0x3458=function(){return _0xbdfc2b;};return a268_0x3458();}function a268_0x17bf(_0x15976f,_0x4ce436){_0x15976f=_0x15976f-0x157;const _0x34588f=a268_0x3458();let _0x17bff8=_0x34588f[_0x15976f];return _0x17bff8;}(function(_0x2875dd,_0x2c0da6){const _0x163ca4=a268_0x17bf,_0x2a0471=_0x2875dd();while(!![]){try{const _0x343e33=parseInt(_0x163ca4(0x164))/0x1*(-parseInt(_0x163ca4(0x159))/0x2)+-parseInt(_0x163ca4(0x158))/0x3+-parseInt(_0x163ca4(0x160))/0x4*(parseInt(_0x163ca4(0x15f))/0x5)+parseInt(_0x163ca4(0x15e))/0x6+parseInt(_0x163ca4(0x157))/0x7+parseInt(_0x163ca4(0x15a))/0x8+parseInt(_0x163ca4(0x15b))/0x9;if(_0x343e33===_0x2c0da6)break;else _0x2a0471['push'](_0x2a0471['shift']());}catch(_0x3a6906){_0x2a0471['push'](_0x2a0471['shift']());}}}(a268_0x3458,0x2284e));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a268_0x5cc432(0x161),'command':'remove','description':a268_0x5cc432(0x163),'risk':a268_0x5cc432(0x15c),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a268_0x5cc432(0x165),'description':a268_0x5cc432(0x162),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x5b3cbb=>validateAppName(_0x5b3cbb,'workspace\x20remove'),'execute':_0x44875b=>runAppRemove(_0x44875b,a268_0x5cc432(0x15d))};
1
+ import{buildAppRemoveFlags,runAppRemove,validateAppName}from"../../commands/common/app-registry.js";export const workspaceRemoveDefinition={service:"workspace",command:"remove",description:"Remove an app profile from the current workspace (or --global)",risk:"write",requiresAuth:false,requiresAppCode:false,args:[{name:"name",description:"App profile name to remove",required:true}],flags:buildAppRemoveFlags(),validate:ctx=>validateAppName(ctx,"workspace remove"),execute:ctx=>runAppRemove(ctx,"workspace remove")};
@@ -1 +1,8 @@
1
- const a269_0x27b7d1=a269_0x4fd0;(function(_0x3abf4e,_0x168aaa){const _0x314c06=a269_0x4fd0,_0x42ef0e=_0x3abf4e();while(!![]){try{const _0x404ee0=parseInt(_0x314c06(0x173))/0x1*(-parseInt(_0x314c06(0x183))/0x2)+-parseInt(_0x314c06(0x17a))/0x3*(parseInt(_0x314c06(0x16f))/0x4)+-parseInt(_0x314c06(0x178))/0x5*(parseInt(_0x314c06(0x17c))/0x6)+parseInt(_0x314c06(0x19c))/0x7*(parseInt(_0x314c06(0x186))/0x8)+parseInt(_0x314c06(0x18c))/0x9+parseInt(_0x314c06(0x176))/0xa+parseInt(_0x314c06(0x163))/0xb;if(_0x404ee0===_0x168aaa)break;else _0x42ef0e['push'](_0x42ef0e['shift']());}catch(_0x1feceb){_0x42ef0e['push'](_0x42ef0e['shift']());}}}(a269_0x4576,0x34813));function a269_0x4576(){const _0x4241b5=[':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','cwd','8nqHurD','runtime-domain','lovrabet','certificateDomain','Domain\x20config\x20file\x20not\x20found:\x20','domains','582768xrvpnO','skillDomain','\x20and\x20has\x20no\x20default.','username','search','cdn','agentDomain','https:','trim','localDomain','Enterprise\x20','length','userDomain','Allowed\x20fields:\x20','origin','kind','2721733oTQJtA','pathname','isArray','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','api-domain','protocol','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','skill-domain','str','href','join','domain-config','base\x20URL','kb-domain','password','app-domain','runtimeDomain','appDomain','kbDomain','user-domain','keys','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','Unsupported\x20domain\x20config\x20field(s):\x20','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','skillHubDomain','Invalid\x20cdn.','\x22\x20and\x20kind\x20\x22','local-domain','validation','568656nixTBf','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','kb-service-domain','string','utf8','default','mode','kbServiceDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','apiDomain','Invalid\x20','replace','763816MTNPaM','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','Invalid\x20domain\x20config\x20JSON:\x20','rabetbase-cli','7BOSSop','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','filter','2384670vHSSqq','parse','135200qVhkVa','hash','6SSeiUN','enterprise-v1','12nYbLkt','includes','certificate-domain',':\x20\x22','legacy','\x22\x20is\x20not\x20a\x20valid\x20URL.','object','26482gJXujX'];a269_0x4576=function(){return _0x4241b5;};return a269_0x4576();}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=[a269_0x27b7d1(0x198),a269_0x27b7d1(0x16c),a269_0x27b7d1(0x1ac),a269_0x27b7d1(0x18d),a269_0x27b7d1(0x1ae),a269_0x27b7d1(0x16a),a269_0x27b7d1(0x1ad),a269_0x27b7d1(0x195),a269_0x27b7d1(0x189)];const DOMAIN_FLAGS={'userDomain':a269_0x27b7d1(0x1af),'apiDomain':a269_0x27b7d1(0x1a0),'runtimeDomain':a269_0x27b7d1(0x187),'skillDomain':a269_0x27b7d1(0x1a3),'kbDomain':a269_0x27b7d1(0x1a9),'kbServiceDomain':a269_0x27b7d1(0x165),'appDomain':a269_0x27b7d1(0x1ab),'localDomain':a269_0x27b7d1(0x1b7),'certificateDomain':a269_0x27b7d1(0x17e)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a269_0x27b7d1(0x192),'platformDomain',a269_0x27b7d1(0x1b4)];function a269_0x4fd0(_0x4bc73c,_0x346a3b){_0x4bc73c=_0x4bc73c-0x163;const _0x4576ba=a269_0x4576();let _0x4fd08a=_0x4576ba[_0x4bc73c];return _0x4fd08a;}const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a269_0x27b7d1(0x198),'apiDomain':'apiDomain','runtimeDomain':'runtimeDomain','skillDomain':'skillDomain','kbDomain':'kbDomain','kbServiceDomain':a269_0x27b7d1(0x16a),'appDomain':a269_0x27b7d1(0x1ad),'localDomain':'localDomain','certificateDomain':a269_0x27b7d1(0x189)},ROUTING_CONSUMER=a269_0x27b7d1(0x172);export function normalizeDomainOrigin(_0x50f109,_0xc43d57){const _0x2f9f25=a269_0x27b7d1;if(typeof _0xc43d57!==_0x2f9f25(0x166)||!_0xc43d57['trim']())throw CliErrors[_0x2f9f25(0x1b8)]('Invalid\x20'+_0x50f109+':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.');let _0x54a479;try{_0x54a479=new URL(_0xc43d57[_0x2f9f25(0x194)]());}catch{throw CliErrors[_0x2f9f25(0x1b8)](_0x2f9f25(0x16d)+_0x50f109+_0x2f9f25(0x17f)+_0xc43d57+_0x2f9f25(0x181));}if(_0x54a479[_0x2f9f25(0x1a1)]!==_0x2f9f25(0x193)||_0x54a479[_0x2f9f25(0x18f)]||_0x54a479[_0x2f9f25(0x1aa)]||_0x54a479['pathname']!=='/'&&_0x54a479[_0x2f9f25(0x19d)]!==''||_0x54a479[_0x2f9f25(0x190)]||_0x54a479[_0x2f9f25(0x179)])throw CliErrors[_0x2f9f25(0x1b8)](_0x2f9f25(0x16d)+_0x50f109+_0x2f9f25(0x184),'For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.');return _0x54a479[_0x2f9f25(0x19a)];}export function normalizeRoutingDomainValue(_0x56f146,_0x3f6ef2){const _0x104d91=a269_0x27b7d1;if(typeof _0x3f6ef2===_0x104d91(0x166))return normalizeDomainOrigin(_0x56f146,_0x3f6ef2);if(!_0x3f6ef2||typeof _0x3f6ef2!=='object'||Array[_0x104d91(0x19e)](_0x3f6ef2))throw CliErrors[_0x104d91(0x1b8)](_0x104d91(0x16d)+_0x56f146+_0x104d91(0x16b));const _0xe88871=_0x3f6ef2,_0x26d8a0=_0xe88871[ROUTING_CONSUMER]??_0xe88871[_0x104d91(0x168)];if(_0x26d8a0===undefined)throw CliErrors[_0x104d91(0x1b8)](_0x104d91(0x196)+_0x56f146+_0x104d91(0x164)+ROUTING_CONSUMER+_0x104d91(0x18e));return normalizeDomainOrigin(_0x56f146,_0x26d8a0);}export function normalizeCdnBaseUrl(_0x31e8fe,_0x1ca377){const _0x1c5e1f=a269_0x27b7d1;if(typeof _0x1ca377!==_0x1c5e1f(0x166)||!_0x1ca377[_0x1c5e1f(0x194)]())throw CliErrors['validation']('Invalid\x20cdn.'+_0x31e8fe+':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.');const _0x331263=_0x1ca377[_0x1c5e1f(0x194)]()['replace'](/\/$/,'');let _0x380650;try{_0x380650=new URL(_0x331263);}catch{throw CliErrors[_0x1c5e1f(0x1b8)](_0x1c5e1f(0x1b5)+_0x31e8fe+':\x20\x22'+_0x1ca377+_0x1c5e1f(0x181));}if(_0x380650[_0x1c5e1f(0x1a1)]!==_0x1c5e1f(0x193)||_0x380650[_0x1c5e1f(0x18f)]||_0x380650['password']||_0x380650[_0x1c5e1f(0x190)]||_0x380650[_0x1c5e1f(0x179)]||_0x380650[_0x1c5e1f(0x1a5)][_0x1c5e1f(0x16e)](/\/$/,'')!==_0x331263||_0x31e8fe===_0x1c5e1f(0x188)&&_0x380650[_0x1c5e1f(0x19a)]!==_0x331263)throw CliErrors[_0x1c5e1f(0x1b8)](_0x1c5e1f(0x1b5)+_0x31e8fe+':\x20expected\x20an\x20HTTPS\x20'+(_0x31e8fe===_0x1c5e1f(0x188)?'origin':_0x1c5e1f(0x1a8))+'\x20without\x20credentials,\x20query,\x20or\x20fragment.');return _0x331263;}export function resolveEnterpriseRoutingConfig(_0x5383eb){const _0x3eac31=a269_0x27b7d1;return resolveEnterpriseRoutingManifest(_0x5383eb)?.[_0x3eac31(0x18b)];}export function resolveEnterpriseRoutingManifest(_0x28952e){const _0x4a15dc=a269_0x27b7d1;if(_0x28952e===undefined)return undefined;if(!_0x28952e||typeof _0x28952e!==_0x4a15dc(0x182)||Array[_0x4a15dc(0x19e)](_0x28952e))throw CliErrors[_0x4a15dc(0x1b8)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x28952e);}export function readDomainConfigInput(_0x56c88f){const _0x1e3cd1=a269_0x27b7d1,_0x46992e=isAbsolute(_0x56c88f)?_0x56c88f:resolve(process[_0x1e3cd1(0x185)](),_0x56c88f);if(!existsSync(_0x46992e))throw CliErrors[_0x1e3cd1(0x1b8)](_0x1e3cd1(0x18a)+_0x46992e);let _0x30bda8;try{_0x30bda8=JSON[_0x1e3cd1(0x177)](readFileSync(_0x46992e,_0x1e3cd1(0x167)));}catch{throw CliErrors[_0x1e3cd1(0x1b8)](_0x1e3cd1(0x171)+_0x46992e);}if(!_0x30bda8||typeof _0x30bda8!==_0x1e3cd1(0x182)||Array[_0x1e3cd1(0x19e)](_0x30bda8))throw CliErrors['validation'](_0x1e3cd1(0x1b3));const _0x70020d=_0x30bda8;if(_0x1e3cd1(0x1a1)in _0x70020d)return parseEnterpriseRoutingManifest(_0x70020d);const _0x387527=Object[_0x1e3cd1(0x1b0)](_0x70020d)[_0x1e3cd1(0x175)](_0x1baf1d=>!DOMAIN_CONFIG_FIELDS['includes'](_0x1baf1d));if(_0x387527[_0x1e3cd1(0x197)]>0x0)throw CliErrors[_0x1e3cd1(0x1b8)](_0x1e3cd1(0x1b2)+_0x387527[_0x1e3cd1(0x1a6)](',\x20'),_0x1e3cd1(0x199)+DOMAIN_CONFIG_FIELDS[_0x1e3cd1(0x1a6)](',\x20'));const _0x173041={};for(const _0x3cf25f of DOMAIN_CONFIG_FIELDS){_0x70020d[_0x3cf25f]!==undefined&&(_0x173041[_0x3cf25f]=normalizeDomainOrigin(_0x3cf25f,_0x70020d[_0x3cf25f]));}if(Object[_0x1e3cd1(0x1b0)](_0x173041)['length']===0x0)throw CliErrors[_0x1e3cd1(0x1b8)](_0x1e3cd1(0x170));return{'mode':_0x1e3cd1(0x180),'domains':_0x173041};}export function readDomainConfig(_0x3cf64e){const _0x4be3e9=a269_0x27b7d1;return readDomainConfigInput(_0x3cf64e)[_0x4be3e9(0x18b)];}export function resolveDomainConfigInput(_0x5652f9){const _0x5523a8=a269_0x27b7d1,_0x1a37e5=(_0x5652f9[_0x5523a8(0x1a4)](_0x5523a8(0x1a7))||'')[_0x5523a8(0x194)](),_0x34c010=_0x1a37e5?readDomainConfigInput(_0x1a37e5):{'mode':_0x5523a8(0x180),'domains':{}},_0x1dee58=DOMAIN_CONFIG_FIELDS[_0x5523a8(0x175)](_0x26c1c5=>Boolean((_0x5652f9[_0x5523a8(0x1a4)](DOMAIN_FLAGS[_0x26c1c5])||'')['trim']()));if(_0x34c010[_0x5523a8(0x169)]===_0x5523a8(0x17b)&&_0x1dee58[_0x5523a8(0x197)]>0x0)throw CliErrors[_0x5523a8(0x1b8)]('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.',_0x5523a8(0x1b1));for(const _0x892daf of DOMAIN_CONFIG_FIELDS){const _0x2c5fa2=(_0x5652f9[_0x5523a8(0x1a4)](DOMAIN_FLAGS[_0x892daf])||'')[_0x5523a8(0x194)]();if(_0x2c5fa2)_0x34c010[_0x5523a8(0x18b)][_0x892daf]=normalizeDomainOrigin(_0x892daf,_0x2c5fa2);}return _0x34c010;}export function resolveDomainFlags(_0x5cdaba){const _0x395e2c=a269_0x27b7d1;return resolveDomainConfigInput(_0x5cdaba)[_0x395e2c(0x18b)];}export function parseEnterpriseRoutingManifest(_0x3634ad){const _0x2b14b9=a269_0x27b7d1;if(_0x3634ad['protocol']!==ENTERPRISE_ROUTING_PROTOCOL||_0x3634ad[_0x2b14b9(0x19b)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x2b14b9(0x1b8)](_0x2b14b9(0x1a2)+ENTERPRISE_ROUTING_PROTOCOL+_0x2b14b9(0x1b6)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x3634ad['domains']||typeof _0x3634ad[_0x2b14b9(0x18b)]!==_0x2b14b9(0x182)||Array[_0x2b14b9(0x19e)](_0x3634ad[_0x2b14b9(0x18b)]))throw CliErrors[_0x2b14b9(0x1b8)](_0x2b14b9(0x19f));if(!_0x3634ad[_0x2b14b9(0x191)]||typeof _0x3634ad[_0x2b14b9(0x191)]!==_0x2b14b9(0x182)||Array['isArray'](_0x3634ad[_0x2b14b9(0x191)]))throw CliErrors['validation']('Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.');const _0xf9a5cb=_0x3634ad[_0x2b14b9(0x18b)],_0x23525f=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x2b14b9(0x175)](_0x1ebc92=>_0xf9a5cb[_0x1ebc92]===undefined);if(_0x23525f[_0x2b14b9(0x197)]>0x0)throw CliErrors['validation']('Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20'+_0x23525f[_0x2b14b9(0x1a6)](',\x20'));if(_0xf9a5cb[_0x2b14b9(0x195)]===undefined!==(_0xf9a5cb[_0x2b14b9(0x189)]===undefined))throw CliErrors[_0x2b14b9(0x1b8)](_0x2b14b9(0x174));const _0x11c8c6=_0x3634ad[_0x2b14b9(0x191)],_0x89348b=Object[_0x2b14b9(0x1b0)](_0x11c8c6)[_0x2b14b9(0x175)](_0x55fc35=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x2b14b9(0x17d)](_0x55fc35));if(_0x89348b[_0x2b14b9(0x197)]>0x0)throw CliErrors[_0x2b14b9(0x1b8)]('Unsupported\x20enterprise\x20CDN\x20field(s):\x20'+_0x89348b[_0x2b14b9(0x1a6)](',\x20'),_0x2b14b9(0x199)+ENTERPRISE_ROUTING_CDN_FIELDS['join'](',\x20'));const _0x5ed3f0=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x2b14b9(0x175)](_0x3e56c5=>_0x11c8c6[_0x3e56c5]===undefined);if(_0x5ed3f0[_0x2b14b9(0x197)]>0x0)throw CliErrors[_0x2b14b9(0x1b8)]('Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20'+_0x5ed3f0[_0x2b14b9(0x1a6)](',\x20'));const _0x1bae96={};for(const _0x569787 of ENTERPRISE_ROUTING_CDN_FIELDS){_0x1bae96[_0x569787]=normalizeCdnBaseUrl(_0x569787,_0x11c8c6[_0x569787]);}const _0x44bf7d={},_0x1d0f4e={};for(const _0x2f4389 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x33a61e=_0xf9a5cb[_0x2f4389];if(_0x33a61e===undefined)continue;const _0x40e35f=normalizeRoutingDomainValue(_0x2f4389,_0x33a61e);_0x44bf7d[_0x2f4389]=_0x40e35f;const _0x479d3c=ENTERPRISE_TO_LOCAL_FIELD[_0x2f4389];_0x479d3c&&(_0x1d0f4e[_0x479d3c]=_0x40e35f);}return{'mode':'enterprise-v1','domains':_0x1d0f4e,'manifestDomains':_0x44bf7d,'cdn':_0x1bae96};}
1
+ 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=["userDomain","apiDomain","runtimeDomain","skillDomain","kbDomain","kbServiceDomain","appDomain","localDomain","certificateDomain"];const DOMAIN_FLAGS={userDomain:"user-domain",apiDomain:"api-domain",runtimeDomain:"runtime-domain",skillDomain:"skill-domain",kbDomain:"kb-domain",kbServiceDomain:"kb-service-domain",appDomain:"app-domain",localDomain:"local-domain",certificateDomain:"certificate-domain"};export const LEGACY_DOMAIN_CONFIG_FIELDS=["agentDomain","platformDomain","skillHubDomain"];const ENTERPRISE_TO_LOCAL_FIELD={userDomain:"userDomain",apiDomain:"apiDomain",
2
+ runtimeDomain:"runtimeDomain",skillDomain:"skillDomain",kbDomain:"kbDomain",kbServiceDomain:"kbServiceDomain",appDomain:"appDomain",localDomain:"localDomain",certificateDomain:"certificateDomain"};const ROUTING_CONSUMER="rabetbase-cli";export function normalizeDomainOrigin(field,input){if(typeof input!=="string"||!input.trim()){throw CliErrors.validation(`Invalid ${field}: expected a non-empty HTTPS origin.`)}let url;try{url=new URL(input.trim())}catch{throw CliErrors.validation(`Invalid ${field}: "${input}" is not a valid URL.`)}if(url.protocol!=="https:"||url.username||url.password||url.pathname!=="/"&&url.pathname!==""||url.search||url.hash){throw CliErrors.validation(`Invalid ${field}: expected an HTTPS origin without credentials, path, query, or fragment.`,"For internal deployments, terminate TLS at the ingress, reverse proxy, or load balancer; an internal CA is supported.")}return url.origin}export function normalizeRoutingDomainValue(field,input){
3
+ if(typeof input==="string")return normalizeDomainOrigin(field,input);if(!input||typeof input!=="object"||Array.isArray(input)){throw CliErrors.validation(`Invalid ${field}: expected an HTTPS origin or consumer Domain object.`)}const source=input;const resolved=source[ROUTING_CONSUMER]??source.default;if(resolved===undefined){throw CliErrors.validation(`Enterprise ${field} does not provide a Domain for ${ROUTING_CONSUMER} and has no default.`)}return normalizeDomainOrigin(field,resolved)}export function normalizeCdnBaseUrl(field,input){if(typeof input!=="string"||!input.trim()){throw CliErrors.validation(`Invalid cdn.${field}: expected a non-empty HTTPS URL.`)}const value=input.trim().replace(/\/$/,"");let url;try{url=new URL(value)}catch{throw CliErrors.validation(`Invalid cdn.${field}: "${input}" is not a valid URL.`)}if(url.protocol!=="https:"||url.username||url.password||url.search||url.hash||url.href.replace(/\/$/,"")!==value||field==="lovrabet"&&url.origin!==value){
4
+ throw CliErrors.validation(`Invalid cdn.${field}: expected an HTTPS ${field==="lovrabet"?"origin":"base URL"} without credentials, query, or fragment.`)}return value}export function resolveEnterpriseRoutingConfig(input){return resolveEnterpriseRoutingManifest(input)?.domains}export function resolveEnterpriseRoutingManifest(input){if(input===undefined)return undefined;if(!input||typeof input!=="object"||Array.isArray(input)){throw CliErrors.validation("Invalid enterprise routing config: expected an object.")}return parseEnterpriseRoutingManifest(input)}export function readDomainConfigInput(filePath){const absolutePath=isAbsolute(filePath)?filePath:resolve(process.cwd(),filePath);if(!existsSync(absolutePath)){throw CliErrors.validation(`Domain config file not found: ${absolutePath}`)}let parsed;try{parsed=JSON.parse(readFileSync(absolutePath,"utf8"))}catch{throw CliErrors.validation(`Invalid domain config JSON: ${absolutePath}`)}
5
+ if(!parsed||typeof parsed!=="object"||Array.isArray(parsed)){throw CliErrors.validation("Invalid domain config: expected a JSON object.")}const source=parsed;if("protocol"in source)return parseEnterpriseRoutingManifest(source);const unknown=Object.keys(source).filter(key=>!DOMAIN_CONFIG_FIELDS.includes(key));if(unknown.length>0){throw CliErrors.validation(`Unsupported domain config field(s): ${unknown.join(", ")}`,`Allowed fields: ${DOMAIN_CONFIG_FIELDS.join(", ")}`)}const result={};for(const field of DOMAIN_CONFIG_FIELDS){if(source[field]!==undefined){result[field]=normalizeDomainOrigin(field,source[field])}}if(Object.keys(result).length===0){throw CliErrors.validation("Invalid domain config: provide at least one supported Domain.")}return{mode:"legacy",domains:result}}export function readDomainConfig(filePath){return readDomainConfigInput(filePath).domains}export function resolveDomainConfigInput(ctx){const filePath=(ctx.str("domain-config")||"").trim()
6
+ ;const input=filePath?readDomainConfigInput(filePath):{mode:"legacy",domains:{}};const explicitFields=DOMAIN_CONFIG_FIELDS.filter(field=>Boolean((ctx.str(DOMAIN_FLAGS[field])||"").trim()));if(input.mode==="enterprise-v1"&&explicitFields.length>0){throw CliErrors.validation("Enterprise routing manifests cannot be combined with individual Domain flags.","Update the manifest so both CLIs consume the same routing data.")}for(const field of DOMAIN_CONFIG_FIELDS){const value=(ctx.str(DOMAIN_FLAGS[field])||"").trim();if(value)input.domains[field]=normalizeDomainOrigin(field,value)}return input}export function resolveDomainFlags(ctx){return resolveDomainConfigInput(ctx).domains}export function parseEnterpriseRoutingManifest(source){if(source.protocol!==ENTERPRISE_ROUTING_PROTOCOL||source.kind!==ENTERPRISE_ROUTING_KIND){throw CliErrors.validation(`Unsupported routing manifest: expected protocol "${ENTERPRISE_ROUTING_PROTOCOL}" and kind "${ENTERPRISE_ROUTING_KIND}".`)}
7
+ if(!source.domains||typeof source.domains!=="object"||Array.isArray(source.domains)){throw CliErrors.validation("Invalid enterprise routing manifest: domains must be an object.")}if(!source.cdn||typeof source.cdn!=="object"||Array.isArray(source.cdn)){throw CliErrors.validation("Invalid enterprise routing manifest: cdn must be an object.")}const rawDomains=source.domains;const missing=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS.filter(field=>rawDomains[field]===undefined);if(missing.length>0){throw CliErrors.validation(`Enterprise routing manifest is missing required Domain(s): ${missing.join(", ")}`)}if(rawDomains.localDomain===undefined!==(rawDomains.certificateDomain===undefined)){throw CliErrors.validation("Enterprise routing manifest requires localDomain and certificateDomain together.")}const rawCdn=source.cdn;const unknownCdnFields=Object.keys(rawCdn).filter(field=>!ENTERPRISE_ROUTING_CDN_FIELDS.includes(field));if(unknownCdnFields.length>0){
8
+ throw CliErrors.validation(`Unsupported enterprise CDN field(s): ${unknownCdnFields.join(", ")}`,`Allowed fields: ${ENTERPRISE_ROUTING_CDN_FIELDS.join(", ")}`)}const missingCdnFields=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS.filter(field=>rawCdn[field]===undefined);if(missingCdnFields.length>0){throw CliErrors.validation(`Enterprise routing manifest is missing required CDN field(s): ${missingCdnFields.join(", ")}`)}const cdn={};for(const field of ENTERPRISE_ROUTING_CDN_FIELDS){cdn[field]=normalizeCdnBaseUrl(field,rawCdn[field])}const manifestDomains={};const domains={};for(const field of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const value=rawDomains[field];if(value===undefined)continue;const normalized=normalizeRoutingDomainValue(field,value);manifestDomains[field]=normalized;const localField=ENTERPRISE_TO_LOCAL_FIELD[field];if(localField){domains[localField]=normalized}}return{mode:"enterprise-v1",domains:domains,manifestDomains:manifestDomains,cdn:cdn}}
@@ -1 +1,3 @@
1
- const a270_0x268b6e=a270_0x25cd;function a270_0x25cd(_0x35e46b,_0x2561a9){_0x35e46b=_0x35e46b-0x122;const _0x1e2967=a270_0x1e29();let _0x25cd11=_0x1e2967[_0x35e46b];return _0x25cd11;}function a270_0x1e29(){const _0x3a4f34=['official','lovrabet-project-domain-routing/v1','local','/cert/lovrabet-dev.json','now','lovrabet','16737908PAUKll','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','pid','840462GBkmDl','35STKLrk','1011119qLNyEo','10AIsjoF','origin','http://localhost','456ZINmQP','48429JxscJo','.tmp','utf8','2435428WrBwpD','1581188fFcrWT','6rCAeUN','2509435fkUQFf'];a270_0x1e29=function(){return _0x3a4f34;};return a270_0x1e29();}(function(_0x5ad490,_0x13c945){const _0x28138d=a270_0x25cd,_0x5e1efc=_0x5ad490();while(!![]){try{const _0x1ba503=parseInt(_0x28138d(0x134))/0x1+-parseInt(_0x28138d(0x126))/0x2+parseInt(_0x28138d(0x127))/0x3*(-parseInt(_0x28138d(0x125))/0x4)+parseInt(_0x28138d(0x128))/0x5+parseInt(_0x28138d(0x132))/0x6*(-parseInt(_0x28138d(0x133))/0x7)+-parseInt(_0x28138d(0x138))/0x8*(-parseInt(_0x28138d(0x122))/0x9)+parseInt(_0x28138d(0x135))/0xa*(parseInt(_0x28138d(0x12f))/0xb);if(_0x1ba503===_0x13c945)break;else _0x5e1efc['push'](_0x5e1efc['shift']());}catch(_0x5c0cfb){_0x5e1efc['push'](_0x5e1efc['shift']());}}}(a270_0x1e29,0x9a752));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=a270_0x268b6e(0x12a);export function getProjectDomainRoutingManifest(){const _0x49353d=a270_0x268b6e,_0x18b372=getActiveRegion(),_0x59a808=isIndependentDeployment(),_0x28e958=getOfficialRoutingProfile(_0x18b372),_0x2a4efe=getLocalDomain(),_0xdf7ca=getCertificateDomain(),_0x3ab569=getActiveCdn();if(!!_0x2a4efe!==!!_0xdf7ca)throw new Error(_0x49353d(0x130));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x59a808?'independent':_0x49353d(0x129),'region':_0x59a808?null:_0x18b372,'domains':{'api':getApiDomain(),'runtime':getRuntimeDomain(),'user':getUserDomain(),'app':getAppDomain(),'skill':getSkillDomain(),'kb':getKbDomain()},'cdn':_0x3ab569,'local':_0x2a4efe&&_0xdf7ca?{'origin':_0x2a4efe,'certificateUrl':_0xdf7ca+_0x49353d(0x12c)}:_0x59a808?{'origin':_0x49353d(0x137)}:{'origin':_0x28e958[_0x49353d(0x12b)][_0x49353d(0x136)],'certificateUrl':_0x3ab569[_0x49353d(0x12e)]+_0x49353d(0x12c)}};}export function writeProjectDomainRoutingManifest(_0x4a7361){const _0x145743=a270_0x268b6e,_0x575a82=getProjectDomainRoutingManifest(),_0x39acc6=join(_0x4a7361,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x91ecf1=JSON['stringify'](_0x575a82,null,0x2)+'\x0a';try{if(readFileSync(_0x39acc6,'utf8')===_0x91ecf1)return{'path':_0x39acc6,'manifest':_0x575a82,'changed':![]};}catch{}const _0x2a660a=_0x39acc6+'.'+process[_0x145743(0x131)]+'.'+Date[_0x145743(0x12d)]()+_0x145743(0x123);try{writeFileSync(_0x2a660a,_0x91ecf1,{'encoding':_0x145743(0x124),'mode':0x1a4}),renameSync(_0x2a660a,_0x39acc6);}catch(_0x3102f9){try{unlinkSync(_0x2a660a);}catch{}throw _0x3102f9;}return{'path':_0x39acc6,'manifest':_0x575a82,'changed':!![]};}
1
+ 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 region=getActiveRegion();const independent=isIndependentDeployment();const officialProfile=getOfficialRoutingProfile(region);const localDomain=getLocalDomain();const certificateDomain=getCertificateDomain();const cdn=getActiveCdn();if(!!localDomain!==!!certificateDomain){throw new Error("Independent deployment routing requires localDomain and certificateDomain together.")}return{
2
+ protocol:PROJECT_DOMAIN_ROUTING_PROTOCOL,mode:independent?"independent":"official",region:independent?null:region,domains:{api:getApiDomain(),runtime:getRuntimeDomain(),user:getUserDomain(),app:getAppDomain(),skill:getSkillDomain(),kb:getKbDomain()},cdn:cdn,local:localDomain&&certificateDomain?{origin:localDomain,certificateUrl:`${certificateDomain}/cert/lovrabet-dev.json`}:independent?{origin:"http://localhost"}:{origin:officialProfile.local.origin,certificateUrl:`${cdn.lovrabet}/cert/lovrabet-dev.json`}}}export function writeProjectDomainRoutingManifest(projectRoot){const manifest=getProjectDomainRoutingManifest();const filePath=join(projectRoot,PROJECT_DOMAIN_ROUTING_FILE_NAME);const content=`${JSON.stringify(manifest,null,2)}\n`;try{if(readFileSync(filePath,"utf8")===content){return{path:filePath,manifest:manifest,changed:false}}}catch{}const tempPath=`${filePath}.${process.pid}.${Date.now()}.tmp`;try{writeFileSync(tempPath,content,{encoding:"utf8",mode:420})
3
+ ;renameSync(tempPath,filePath)}catch(error){try{unlinkSync(tempPath)}catch{}throw error}return{path:filePath,manifest:manifest,changed:true}}
@@ -1 +1,2 @@
1
- const a271_0x2e4ae0=a271_0x11de;function a271_0x2995(){const _0x3b230b=['319316JgqUWN','181071FZfACC','project\x20Rabetbase\x20configuration','default','3eVzFdN','global\x20Rabetbase\x20configuration','validation','mergedRegion','appRegion','3384WcEwyi','a\x20value\x20of\x20type\x20','Rabetbase\x20configuration','\x20in\x20','source','stringify','globalRegion','4640xwLeAN','app\x20profile\x20\x22','null','\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.','40CCORAi','projectRegion','string','value','project','5290cDfVNF','2791180UJFNuv','624065ptSyJA','global','Run\x20`','1060096Kyuxpu','app','appName','Invalid\x20country/region\x20','14113hqxZHv'];a271_0x2995=function(){return _0x3b230b;};return a271_0x2995();}(function(_0x2ca548,_0x253f5c){const _0x158427=a271_0x11de,_0xd8bb3c=_0x2ca548();while(!![]){try{const _0x346429=parseInt(_0x158427(0x153))/0x1+parseInt(_0x158427(0x15b))/0x2*(parseInt(_0x158427(0x15f))/0x3)+-parseInt(_0x158427(0x156))/0x4+-parseInt(_0x158427(0x16b))/0x5*(parseInt(_0x158427(0x164))/0x6)+-parseInt(_0x158427(0x152))/0x7+-parseInt(_0x158427(0x16f))/0x8*(-parseInt(_0x158427(0x15c))/0x9)+-parseInt(_0x158427(0x151))/0xa*(-parseInt(_0x158427(0x15a))/0xb);if(_0x346429===_0x253f5c)break;else _0xd8bb3c['push'](_0xd8bb3c['shift']());}catch(_0xfa685c){_0xd8bb3c['push'](_0xd8bb3c['shift']());}}}(a271_0x2995,0x5bc3d));function a271_0x11de(_0x49ef46,_0x2f2f46){_0x49ef46=_0x49ef46-0x14d;const _0x2995c5=a271_0x2995();let _0x11def1=_0x2995c5[_0x49ef46];return _0x11def1;}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'../constant/region.js';import{CliErrors}from'../errors.js';export function selectConfiguredRegion(_0x27298d){const _0x231294=a271_0x11de;if(_0x27298d['appRegion']!==undefined&&_0x27298d[_0x231294(0x163)]!==null&&_0x27298d[_0x231294(0x163)]!=='')return{'value':_0x27298d[_0x231294(0x163)],'source':_0x231294(0x157)};if(_0x27298d['projectRegion']!==undefined&&_0x27298d['projectRegion']!==null&&_0x27298d[_0x231294(0x14d)]!=='')return{'value':_0x27298d['projectRegion'],'source':_0x231294(0x150)};if(_0x27298d[_0x231294(0x16a)]!==undefined&&_0x27298d[_0x231294(0x16a)]!==null&&_0x27298d[_0x231294(0x16a)]!=='')return{'value':_0x27298d[_0x231294(0x16a)],'source':_0x231294(0x154)};if(_0x27298d[_0x231294(0x162)]!==undefined&&_0x27298d[_0x231294(0x162)]!==null&&_0x27298d['mergedRegion']!=='')return{'value':_0x27298d['mergedRegion'],'source':'config'};return{'value':undefined,'source':_0x231294(0x15e)};}function describeConfiguredRegion(_0x2d5a96){const _0x48613b=a271_0x11de;return typeof _0x2d5a96===_0x48613b(0x14e)?JSON[_0x48613b(0x169)](_0x2d5a96):_0x48613b(0x165)+(_0x2d5a96===null?_0x48613b(0x16d):typeof _0x2d5a96);}export function resolveConfiguredRegion(_0x385126,_0x585f2f=a271_0x2e4ae0(0x166)){const _0x4875ce=a271_0x2e4ae0;if(isInvalidLovrabetRegion(_0x385126))throw CliErrors[_0x4875ce(0x161)](_0x4875ce(0x159)+describeConfiguredRegion(_0x385126)+_0x4875ce(0x167)+_0x585f2f+'.',_0x4875ce(0x155)+CLI_BIN_NAME+_0x4875ce(0x16e));return normalizeLovrabetRegion(_0x385126)??DEFAULT_LOVRABET_REGION;}export function resolveEffectiveRegion(_0x154a05){const _0x2b9ed1=a271_0x2e4ae0,_0x5ac792=selectConfiguredRegion(_0x154a05),_0x4d7fc0=_0x5ac792[_0x2b9ed1(0x168)]===_0x2b9ed1(0x157)?_0x154a05[_0x2b9ed1(0x158)]?_0x2b9ed1(0x16c)+_0x154a05[_0x2b9ed1(0x158)]+'\x22':'selected\x20app\x20profile':_0x5ac792[_0x2b9ed1(0x168)]===_0x2b9ed1(0x150)?_0x2b9ed1(0x15d):_0x5ac792[_0x2b9ed1(0x168)]===_0x2b9ed1(0x154)?_0x2b9ed1(0x160):_0x2b9ed1(0x166);return{'region':resolveConfiguredRegion(_0x5ac792[_0x2b9ed1(0x14f)],_0x4d7fc0),'source':_0x5ac792[_0x2b9ed1(0x168)]};}
1
+ import{CLI_BIN_NAME}from"../constant/cli.js";import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from"../constant/region.js";import{CliErrors}from"../errors.js";export function selectConfiguredRegion(options){if(options.appRegion!==undefined&&options.appRegion!==null&&options.appRegion!==""){return{value:options.appRegion,source:"app"}}if(options.projectRegion!==undefined&&options.projectRegion!==null&&options.projectRegion!==""){return{value:options.projectRegion,source:"project"}}if(options.globalRegion!==undefined&&options.globalRegion!==null&&options.globalRegion!==""){return{value:options.globalRegion,source:"global"}}if(options.mergedRegion!==undefined&&options.mergedRegion!==null&&options.mergedRegion!==""){return{value:options.mergedRegion,source:"config"}}return{value:undefined,source:"default"}}function describeConfiguredRegion(value){return typeof value==="string"?JSON.stringify(value):`a value of type ${value===null?"null":typeof value}`}
2
+ export function resolveConfiguredRegion(value,location="Rabetbase configuration"){if(isInvalidLovrabetRegion(value)){throw CliErrors.validation(`Invalid country/region ${describeConfiguredRegion(value)} in ${location}.`,`Run \`${CLI_BIN_NAME} doctor\` to locate and repair the invalid configuration before retrying.`)}return normalizeLovrabetRegion(value)??DEFAULT_LOVRABET_REGION}export function resolveEffectiveRegion(options){const selected=selectConfiguredRegion(options);const location=selected.source==="app"?options.appName?`app profile "${options.appName}"`:"selected app profile":selected.source==="project"?"project Rabetbase configuration":selected.source==="global"?"global Rabetbase configuration":"Rabetbase configuration";return{region:resolveConfiguredRegion(selected.value,location),source:selected.source}}
@@ -1 +1,7 @@
1
- const a272_0x5adbdf=a272_0xeba0;function a272_0xeba0(_0x478dad,_0x3ef0ff){_0x478dad=_0x478dad-0x10a;const _0x48c72c=a272_0x48c7();let _0xeba0b3=_0x48c72c[_0x478dad];return _0xeba0b3;}(function(_0xc0c4f0,_0x19725c){const _0xb6a064=a272_0xeba0,_0x12ad73=_0xc0c4f0();while(!![]){try{const _0x5b814d=-parseInt(_0xb6a064(0x114))/0x1*(-parseInt(_0xb6a064(0x13e))/0x2)+parseInt(_0xb6a064(0x11c))/0x3+parseInt(_0xb6a064(0x126))/0x4*(-parseInt(_0xb6a064(0x110))/0x5)+parseInt(_0xb6a064(0x129))/0x6*(-parseInt(_0xb6a064(0x10c))/0x7)+parseInt(_0xb6a064(0x122))/0x8*(parseInt(_0xb6a064(0x10b))/0x9)+-parseInt(_0xb6a064(0x115))/0xa*(-parseInt(_0xb6a064(0x116))/0xb)+-parseInt(_0xb6a064(0x10a))/0xc;if(_0x5b814d===_0x19725c)break;else _0x12ad73['push'](_0x12ad73['shift']());}catch(_0x168958){_0x12ad73['push'](_0x12ad73['shift']());}}}(a272_0x48c7,0xc73dd));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',a272_0x5adbdf(0x131),a272_0x5adbdf(0x10f),a272_0x5adbdf(0x138),'riskLevel','region','routing',a272_0x5adbdf(0x11a),a272_0x5adbdf(0x11f),'runtimeDomain',a272_0x5adbdf(0x13d),'kbDomain','kbServiceDomain',a272_0x5adbdf(0x127),a272_0x5adbdf(0x10e),'certificateDomain'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a272_0x5adbdf(0x12c),a272_0x5adbdf(0x13c),'locale',a272_0x5adbdf(0x138),a272_0x5adbdf(0x130),a272_0x5adbdf(0x131),a272_0x5adbdf(0x12b),'region',a272_0x5adbdf(0x11a),'apiDomain',a272_0x5adbdf(0x11d),a272_0x5adbdf(0x13d),'kbDomain',a272_0x5adbdf(0x11b),'appDomain',a272_0x5adbdf(0x10e),a272_0x5adbdf(0x13a)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};function a272_0x48c7(){const _0x24af7d=['trim','356872qarCIA','toLowerCase','defaultApp','zh-CN','735836SXsOFO','appDomain','riskLevel','276lsDphJ','filter','apiDir','appcode','inherit','object','values','cookie','accessKey','has','Join\x20key\x20for\x20app\x20profiles\x20that\x20share\x20one\x20generated\x20API\x20model\x20registry','apps','Config\x20key\x20(','isArray','map','format','apiGroup','certificateDomain','Country/region\x20for\x20this\x20app\x20profile','env','skillDomain','2iIUOAY','Access\x20key','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','en-US','entries','fromEntries','region','length','app','15626208ekIKjW','45aewYVM','50666aogXUK','keys','localDomain','locale','5fuxjNk','some','join','number','855884gvppum','3044810qVZYOQ','44FxqmMm','Auth\x20cookie','Default\x20page\x20size','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','userDomain','kbServiceDomain','1014993QetOHS','runtimeDomain','pageSize','apiDomain','string'];a272_0x48c7=function(){return _0x24af7d;};return a272_0x48c7();}export function formatConfigKeyList(_0x4dcf1f){const _0x4fd2e0=a272_0x5adbdf;return[..._0x4dcf1f][_0x4fd2e0(0x112)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x5e876c){const _0x1e7682=a272_0x5adbdf;return TOP_LEVEL_CONFIG_KEYS[_0x1e7682(0x132)](_0x5e876c);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x350baf=a272_0x5adbdf;return _0x350baf(0x135)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'apiGroup':a272_0x5adbdf(0x139),'region':a272_0x5adbdf(0x144),'env':a272_0x5adbdf(0x13c),'apiDir':a272_0x5adbdf(0x12b),'cookie':a272_0x5adbdf(0x130),'accessKey':'accessKey','defaultFormat':'format','pageSize':a272_0x5adbdf(0x11e),'riskLevel':a272_0x5adbdf(0x128),'locale':a272_0x5adbdf(0x10f)};export function getAppProfileFlagDefs(){const _0x311401=a272_0x5adbdf;return[{'name':_0x311401(0x139),'type':_0x311401(0x120),'description':_0x311401(0x133)},{'name':_0x311401(0x144),'type':_0x311401(0x120),'description':_0x311401(0x13b),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':_0x311401(0x13c),'type':_0x311401(0x120),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':_0x311401(0x12b),'type':_0x311401(0x120),'description':'API\x20directory\x20path'},{'name':_0x311401(0x130),'type':_0x311401(0x120),'description':_0x311401(0x117),'hidden':!![]},{'name':_0x311401(0x131),'type':_0x311401(0x120),'description':_0x311401(0x13f),'hidden':!![]},{'name':'defaultFormat','type':_0x311401(0x120),'description':_0x311401(0x140),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x311401(0x11e),'type':_0x311401(0x113),'description':_0x311401(0x118)},{'name':_0x311401(0x128),'type':'string','description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x311401(0x10f),'type':_0x311401(0x120),'description':_0x311401(0x119)}];}export function collectAppProfileOverrides(_0x2d1326){const _0x4794a2=a272_0x5adbdf,_0x1e4933={};for(const [_0x1fcebe,_0x3a3117]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x384b2d=_0x2d1326(_0x1fcebe);if(!_0x384b2d)continue;_0x1e4933[_0x3a3117]=_0x3a3117===_0x4794a2(0x11e)?Number(_0x384b2d):_0x384b2d;}return _0x1e4933;}export function buildAppProfileListFields(_0x3f26cf){const _0x2afeaf=a272_0x5adbdf;return{'apiGroup':_0x3f26cf['apiGroup']??null,'region':_0x3f26cf[_0x2afeaf(0x144)]??null,'env':_0x3f26cf[_0x2afeaf(0x13c)]??null,'apiDir':_0x3f26cf['apiDir']??null,'hasCookie':!!_0x3f26cf[_0x2afeaf(0x130)],'hasAccessKey':!!_0x3f26cf[_0x2afeaf(0x131)],'format':_0x3f26cf[_0x2afeaf(0x138)]??null,'pageSize':_0x3f26cf['pageSize']??null,'riskLevel':_0x3f26cf[_0x2afeaf(0x128)]??null,'locale':_0x3f26cf[_0x2afeaf(0x10f)]??null};}export function buildAppDoctorFields(_0x4d65b0,_0x2fdc9d){const _0x508b65=a272_0x5adbdf;return{'region':{'value':_0x4d65b0[_0x508b65(0x144)]||_0x2fdc9d[_0x508b65(0x144)],'source':_0x4d65b0[_0x508b65(0x144)]?'app':_0x508b65(0x12d)},'env':{'value':_0x4d65b0[_0x508b65(0x13c)]||_0x2fdc9d[_0x508b65(0x13c)],'source':_0x4d65b0[_0x508b65(0x13c)]?_0x508b65(0x146):_0x508b65(0x12d)},'apiDir':{'value':_0x4d65b0['apiDir']||_0x2fdc9d[_0x508b65(0x12b)],'source':_0x4d65b0[_0x508b65(0x12b)]?'app':_0x508b65(0x12d)},'cookie':{'value':_0x4d65b0[_0x508b65(0x130)]||_0x2fdc9d[_0x508b65(0x130)],'source':_0x4d65b0[_0x508b65(0x130)]?'app':'inherit'},'accessKey':{'value':_0x4d65b0[_0x508b65(0x131)]||_0x2fdc9d[_0x508b65(0x131)],'source':_0x4d65b0[_0x508b65(0x131)]?'app':_0x508b65(0x12d)}};}export function buildCanonicalAppConfig(_0x507f78,_0x12a5b9){const _0x4d5e15=a272_0x5adbdf,_0x1864a2=_0x507f78[_0x4d5e15(0x137)](_0x5dfcc2=>String(_0x5dfcc2||'')[_0x4d5e15(0x121)]())[_0x4d5e15(0x12a)](Boolean);if(_0x1864a2[_0x4d5e15(0x145)]===0x0)return{};const _0x4fe915={};for(const _0xfb3616 of _0x1864a2){_0x4fe915[_0xfb3616]=_0x12a5b9&&!isProduction(_0x12a5b9)?{'appcode':_0xfb3616,'env':_0x12a5b9}:{'appcode':_0xfb3616};}return _0x1864a2[_0x4d5e15(0x145)]>0x1?{'apps':_0x4fe915,'defaultApp':_0x1864a2[0x0]}:{'apps':_0x4fe915};}export function normalizeStoredDefaultApp(_0x1c4b0d,_0x31f663){const _0x1946c0=a272_0x5adbdf,_0x4ef329=_0x1c4b0d['apps']&&typeof _0x1c4b0d['apps']===_0x1946c0(0x12e)?_0x1c4b0d[_0x1946c0(0x134)]:{},_0x38df84=Object[_0x1946c0(0x10d)](_0x4ef329);if(_0x38df84[_0x1946c0(0x145)]<=0x1)return delete _0x1c4b0d[_0x1946c0(0x124)],undefined;const _0x44e923=typeof _0x1c4b0d['defaultApp']==='string'&&_0x4ef329[_0x1c4b0d[_0x1946c0(0x124)]]?_0x1c4b0d[_0x1946c0(0x124)]:undefined,_0x3a2864=_0x31f663&&_0x4ef329[_0x31f663]?_0x31f663:_0x44e923;if(_0x3a2864)return _0x1c4b0d[_0x1946c0(0x124)]=_0x3a2864,_0x3a2864;return delete _0x1c4b0d[_0x1946c0(0x124)],undefined;}export function buildCanonicalProjectConfig(_0x5aa28b,_0x122dbd){const _0x2179b4=a272_0x5adbdf,{appCodes:appCodes=[],env:_0x5dc330,metadata:_0x453e6e}=_0x122dbd,_0x18eba0={..._0x5aa28b,..._0x453e6e||{}};delete _0x18eba0[_0x2179b4(0x12c)],delete _0x18eba0[_0x2179b4(0x146)];const _0x553a36=_0x5dc330||(typeof _0x18eba0[_0x2179b4(0x13c)]==='string'?_0x18eba0[_0x2179b4(0x13c)]:'')||DEFAULT_CONFIG_VALUES[_0x2179b4(0x13c)];if(isProduction(_0x553a36))delete _0x18eba0[_0x2179b4(0x13c)];else _0x18eba0[_0x2179b4(0x13c)]=_0x553a36;const _0x2b78f0=buildCanonicalAppConfig(appCodes,_0x553a36);if(Object[_0x2179b4(0x10d)](_0x2b78f0)[_0x2179b4(0x145)]>0x0){_0x18eba0[_0x2179b4(0x134)]=_0x2b78f0[_0x2179b4(0x134)];if(_0x2b78f0[_0x2179b4(0x124)])_0x18eba0[_0x2179b4(0x124)]=_0x2b78f0[_0x2179b4(0x124)];else delete _0x18eba0[_0x2179b4(0x124)];}return normalizeConfigForWrite(_0x18eba0);}function isRecord(_0x96f6b1){const _0x23f9ec=a272_0x5adbdf;return!!_0x96f6b1&&typeof _0x96f6b1===_0x23f9ec(0x12e)&&!Array[_0x23f9ec(0x136)](_0x96f6b1);}export function normalizeConfigForWrite(_0x5ce01c){const _0x417b34=a272_0x5adbdf,_0x439a8d={..._0x5ce01c},_0x3330dd=isRecord(_0x5ce01c[_0x417b34(0x134)])?_0x5ce01c[_0x417b34(0x134)]:undefined,_0x459963=_0x3330dd?Object[_0x417b34(0x143)](Object[_0x417b34(0x142)](_0x3330dd)[_0x417b34(0x137)](([_0x366d4a,_0x3e3360])=>[_0x366d4a,isRecord(_0x3e3360)?{..._0x3e3360}:_0x3e3360])):undefined;if(_0x459963){const _0xa8bec2=typeof _0x439a8d['env']===_0x417b34(0x120)?_0x439a8d[_0x417b34(0x13c)]:undefined,_0x4ffc9f=Object[_0x417b34(0x12f)](_0x459963)[_0x417b34(0x111)](_0x1e0806=>isRecord(_0x1e0806)&&typeof _0x1e0806['env']===_0x417b34(0x120)&&isProduction(_0x1e0806[_0x417b34(0x13c)]));if(_0xa8bec2&&isDaily(_0xa8bec2)&&_0x4ffc9f){for(const _0xa4b365 of Object[_0x417b34(0x12f)](_0x459963)){if(!isRecord(_0xa4b365))continue;if(_0xa4b365[_0x417b34(0x13c)]===undefined)_0xa4b365[_0x417b34(0x13c)]=_0xa8bec2;}delete _0x439a8d['env'];}for(const _0x35fe63 of Object[_0x417b34(0x12f)](_0x459963)){isRecord(_0x35fe63)&&typeof _0x35fe63[_0x417b34(0x13c)]===_0x417b34(0x120)&&isProduction(_0x35fe63[_0x417b34(0x13c)])&&delete _0x35fe63[_0x417b34(0x13c)];}_0x439a8d[_0x417b34(0x134)]=_0x459963;}return typeof _0x439a8d['env']==='string'&&isProduction(_0x439a8d[_0x417b34(0x13c)])&&delete _0x439a8d['env'],_0x439a8d;}const LOCALE_MAP={'zh':a272_0x5adbdf(0x125),'zh-cn':a272_0x5adbdf(0x125),'zh_cn':a272_0x5adbdf(0x125),'en':a272_0x5adbdf(0x141),'en-us':a272_0x5adbdf(0x141),'en_us':'en-US'};export function normalizeLocale(_0x4bff49){const _0x553b43=a272_0x5adbdf;if(!_0x4bff49)return null;return LOCALE_MAP[_0x4bff49[_0x553b43(0x123)]()]??null;}
1
+ 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","accessKey","locale","format","riskLevel","region","routing","userDomain","apiDomain","runtimeDomain","skillDomain","kbDomain","kbServiceDomain","appDomain","localDomain","certificateDomain"];export const TOP_LEVEL_CONFIG_KEYS=new Set(["appcode","env","locale","format","cookie","accessKey","apiDir","region","userDomain","apiDomain","runtimeDomain","skillDomain","kbDomain","kbServiceDomain","appDomain","localDomain","certificateDomain"]);export const CONFIG_ENUM_VALUES={env:[...RABETBASE_ENV_VALUES],format:[...RABETBASE_OUTPUT_FORMAT_VALUES],
2
+ region:[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(keys){return[...keys].join(", ")}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS]}export function isTopLevelConfigKey(key){return TOP_LEVEL_CONFIG_KEYS.has(key)}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList())}export function getConfigCommandKeyDescription(){return`Config key (${getTopLevelConfigKeySummary()})`}export const APP_PROFILE_FLAG_KEY_MAP={apiGroup:"apiGroup",region:"region",env:"env",apiDir:"apiDir",cookie:"cookie",accessKey:"accessKey",defaultFormat:"format",pageSize:"pageSize",riskLevel:"riskLevel",locale:"locale"};export function getAppProfileFlagDefs(){return[{name:"apiGroup",type:"string",description:"Join key for app profiles that share one generated API model registry"},{name:"region",type:"string",description:"Country/region for this app profile",enum:[...ENABLED_LOVRABET_REGION_VALUES]},{name:"env",
3
+ type:"string",description:"Target environment",enum:[...RABETBASE_ENV_VALUES]},{name:"apiDir",type:"string",description:"API directory path"},{name:"cookie",type:"string",description:"Auth cookie",hidden:true},{name:"accessKey",type:"string",description:"Access key",hidden:true},{name:"defaultFormat",type:"string",description:"Default output format for this app (profile)",enum:[...RABETBASE_OUTPUT_FORMAT_VALUES]},{name:"pageSize",type:"number",description:"Default page size"},{name:"riskLevel",type:"string",description:"Risk level",enum:[...RISK_LEVEL_VALUES]},{name:"locale",type:"string",description:"App locale (not CLI language; reserved for later app use)"}]}export function collectAppProfileOverrides(getFlagValue){const profile={};for(const[flagKey,profileKey]of Object.entries(APP_PROFILE_FLAG_KEY_MAP)){const val=getFlagValue(flagKey);if(!val)continue;profile[profileKey]=profileKey==="pageSize"?Number(val):val}return profile}export function buildAppProfileListFields(profile){return{
4
+ apiGroup:profile.apiGroup??null,region:profile.region??null,env:profile.env??null,apiDir:profile.apiDir??null,hasCookie:!!profile.cookie,hasAccessKey:!!profile.accessKey,format:profile.format??null,pageSize:profile.pageSize??null,riskLevel:profile.riskLevel??null,locale:profile.locale??null}}export function buildAppDoctorFields(profile,effective){return{region:{value:profile.region||effective.region,source:profile.region?"app":"inherit"},env:{value:profile.env||effective.env,source:profile.env?"app":"inherit"},apiDir:{value:profile.apiDir||effective.apiDir,source:profile.apiDir?"app":"inherit"},cookie:{value:profile.cookie||effective.cookie,source:profile.cookie?"app":"inherit"},accessKey:{value:profile.accessKey||effective.accessKey,source:profile.accessKey?"app":"inherit"}}}export function buildCanonicalAppConfig(appCodes,env){const normalized=appCodes.map(code=>String(code||"").trim()).filter(Boolean);if(normalized.length===0)return{};const apps={};for(const appCode of normalized){
5
+ apps[appCode]=env&&!isProduction(env)?{appcode:appCode,env:env}:{appcode:appCode}}return normalized.length>1?{apps:apps,defaultApp:normalized[0]}:{apps:apps}}export function normalizeStoredDefaultApp(config,preferredApp){const apps=config.apps&&typeof config.apps==="object"?config.apps:{};const names=Object.keys(apps);if(names.length<=1){delete config.defaultApp;return undefined}const current=typeof config.defaultApp==="string"&&apps[config.defaultApp]?config.defaultApp:undefined;const selected=preferredApp&&apps[preferredApp]?preferredApp:current;if(selected){config.defaultApp=selected;return selected}delete config.defaultApp;return undefined}export function buildCanonicalProjectConfig(base,options){const{appCodes:appCodes=[],env:env,metadata:metadata}=options;const config={...base,...metadata||{}};delete config.appcode;delete config.app;const effectiveEnv=env||(typeof config.env==="string"?config.env:"")||DEFAULT_CONFIG_VALUES.env
6
+ ;if(isProduction(effectiveEnv))delete config.env;else config.env=effectiveEnv;const appConfig=buildCanonicalAppConfig(appCodes,effectiveEnv);if(Object.keys(appConfig).length>0){config.apps=appConfig.apps;if(appConfig.defaultApp)config.defaultApp=appConfig.defaultApp;else delete config.defaultApp}return normalizeConfigForWrite(config)}function isRecord(value){return!!value&&typeof value==="object"&&!Array.isArray(value)}export function normalizeConfigForWrite(input){const config={...input};const inputApps=isRecord(input.apps)?input.apps:undefined;const apps=inputApps?Object.fromEntries(Object.entries(inputApps).map(([name,profile])=>[name,isRecord(profile)?{...profile}:profile])):undefined;if(apps){const topLevelEnv=typeof config.env==="string"?config.env:undefined;const hasDefaultOverride=Object.values(apps).some(profile=>isRecord(profile)&&typeof profile.env==="string"&&isProduction(profile.env));if(topLevelEnv&&isDaily(topLevelEnv)&&hasDefaultOverride){
7
+ for(const profile of Object.values(apps)){if(!isRecord(profile))continue;if(profile.env===undefined)profile.env=topLevelEnv}delete config.env}for(const profile of Object.values(apps)){if(isRecord(profile)&&typeof profile.env==="string"&&isProduction(profile.env)){delete profile.env}}config.apps=apps}if(typeof config.env==="string"&&isProduction(config.env)){delete config.env}return config}const LOCALE_MAP={zh:"zh-CN","zh-cn":"zh-CN",zh_cn:"zh-CN",en:"en-US","en-us":"en-US",en_us:"en-US"};export function normalizeLocale(value){if(!value)return null;return LOCALE_MAP[value.toLowerCase()]??null}
@@ -1 +1,2 @@
1
- const a273_0x557aec=a273_0x3eb2;function a273_0x3eb2(_0x37a8a3,_0x3fb4c4){_0x37a8a3=_0x37a8a3-0x19e;const _0x5af0c=a273_0x5af0();let _0x3eb218=_0x5af0c[_0x37a8a3];return _0x3eb218;}function a273_0x5af0(){const _0x2770d9=['867706PfGefV','templates/projects','https://g.lovrabet.com','config/index.json','60xqbzsA','sub-app-react-demo-beta.zip','48BWDpMd','.zip','rabetbase-cli','981IJYjrk','/dist/','19288yTiSlf','7938950xSnHtS','183634cNebev','523794xbfPqb','78252iItcen','sub-app-react-demo-','freeze','297625niSXCS'];a273_0x5af0=function(){return _0x2770d9;};return a273_0x5af0();}(function(_0x29254c,_0x54541c){const _0x15a887=a273_0x3eb2,_0x5b87ab=_0x29254c();while(!![]){try{const _0x407a44=parseInt(_0x15a887(0x1b0))/0x1+parseInt(_0x15a887(0x1af))/0x2+-parseInt(_0x15a887(0x19e))/0x3*(parseInt(_0x15a887(0x1a8))/0x4)+parseInt(_0x15a887(0x1a1))/0x5*(-parseInt(_0x15a887(0x1a6))/0x6)+parseInt(_0x15a887(0x1a2))/0x7+parseInt(_0x15a887(0x1ad))/0x8*(-parseInt(_0x15a887(0x1ab))/0x9)+parseInt(_0x15a887(0x1ae))/0xa;if(_0x407a44===_0x54541c)break;else _0x5b87ab['push'](_0x5b87ab['shift']());}catch(_0x403579){_0x5b87ab['push'](_0x5b87ab['shift']());}}}(a273_0x5af0,0x587a7));import{getActiveCdn}from'../constant/domain.js';const RABETBASE_CDN_PROJECT=a273_0x557aec(0x1aa),RABETBASE_CDN_CONFIG_ORIGIN=a273_0x557aec(0x1a4),CDN_CONFIG_PATH=a273_0x557aec(0x1a5),PROJECT_TEMPLATE_ASSET_PATH=a273_0x557aec(0x1a3),PROJECT_TEMPLATE_ARCHIVE_NAMES=Object[a273_0x557aec(0x1a0)]({'release':'sub-app-react-demo.zip','beta':a273_0x557aec(0x1a7)});export const RABETBASE_CDN_PROJECT_PATH=a273_0x557aec(0x1ac)+RABETBASE_CDN_PROJECT;function getRabetbaseCdnBaseUrl(){return''+getActiveCdn()['lovrabet']+RABETBASE_CDN_PROJECT_PATH;}export function getCliVersionPolicyUrl(){return''+RABETBASE_CDN_CONFIG_ORIGIN+RABETBASE_CDN_PROJECT_PATH+'/'+CDN_CONFIG_PATH;}export function getProjectTemplateAssetBaseUrl(){return getRabetbaseCdnBaseUrl()+'/'+PROJECT_TEMPLATE_ASSET_PATH;}export function getProjectTemplateLegacyAssetBaseUrl(){return''+RABETBASE_CDN_CONFIG_ORIGIN+RABETBASE_CDN_PROJECT_PATH+'/'+PROJECT_TEMPLATE_ASSET_PATH;}export function getProjectTemplateRelativeUrl(_0xabcf7d,_0x3b38b1){const _0x2b8df8=a273_0x557aec,_0x300cf6=_0x3b38b1?_0x2b8df8(0x19f)+_0x3b38b1+_0x2b8df8(0x1a9):PROJECT_TEMPLATE_ARCHIVE_NAMES[_0xabcf7d];return RABETBASE_CDN_PROJECT_PATH+'/'+PROJECT_TEMPLATE_ASSET_PATH+'/'+_0x300cf6;}
1
+ import{getActiveCdn}from"../constant/domain.js";const RABETBASE_CDN_PROJECT="rabetbase-cli";const RABETBASE_CDN_CONFIG_ORIGIN="https://g.lovrabet.com";const CDN_CONFIG_PATH="config/index.json";const PROJECT_TEMPLATE_ASSET_PATH="templates/projects";const PROJECT_TEMPLATE_ARCHIVE_NAMES=Object.freeze({release:"sub-app-react-demo.zip",beta:"sub-app-react-demo-beta.zip"});export const RABETBASE_CDN_PROJECT_PATH=`/dist/${RABETBASE_CDN_PROJECT}`;function getRabetbaseCdnBaseUrl(){return`${getActiveCdn().lovrabet}${RABETBASE_CDN_PROJECT_PATH}`}export function getCliVersionPolicyUrl(){return`${RABETBASE_CDN_CONFIG_ORIGIN}${RABETBASE_CDN_PROJECT_PATH}/${CDN_CONFIG_PATH}`}export function getProjectTemplateAssetBaseUrl(){return`${getRabetbaseCdnBaseUrl()}/${PROJECT_TEMPLATE_ASSET_PATH}`}export function getProjectTemplateLegacyAssetBaseUrl(){return`${RABETBASE_CDN_CONFIG_ORIGIN}${RABETBASE_CDN_PROJECT_PATH}/${PROJECT_TEMPLATE_ASSET_PATH}`}
2
+ export function getProjectTemplateRelativeUrl(channel,version){const archiveName=version?`sub-app-react-demo-${version}.zip`:PROJECT_TEMPLATE_ARCHIVE_NAMES[channel];return`${RABETBASE_CDN_PROJECT_PATH}/${PROJECT_TEMPLATE_ASSET_PATH}/${archiveName}`}
@@ -1 +1,8 @@
1
- const a274_0x360a19=a274_0xf87c;(function(_0x3c8527,_0x6ad848){const _0x72199c=a274_0xf87c,_0x2bcec1=_0x3c8527();while(!![]){try{const _0x388d78=parseInt(_0x72199c(0x1c5))/0x1*(parseInt(_0x72199c(0x172))/0x2)+-parseInt(_0x72199c(0x1c3))/0x3*(-parseInt(_0x72199c(0x170))/0x4)+parseInt(_0x72199c(0x1a0))/0x5*(-parseInt(_0x72199c(0x17a))/0x6)+-parseInt(_0x72199c(0x15f))/0x7+parseInt(_0x72199c(0x150))/0x8*(-parseInt(_0x72199c(0x151))/0x9)+parseInt(_0x72199c(0x165))/0xa+-parseInt(_0x72199c(0x143))/0xb*(parseInt(_0x72199c(0x162))/0xc);if(_0x388d78===_0x6ad848)break;else _0x2bcec1['push'](_0x2bcec1['shift']());}catch(_0x3829a0){_0x2bcec1['push'](_0x2bcec1['shift']());}}}(a274_0x2f01,0x820c8));export const CLI_BIN_NAME='rabetbase';function a274_0xf87c(_0x2fb39e,_0x505755){_0x2fb39e=_0x2fb39e-0x143;const _0x2f0165=a274_0x2f01();let _0xf87cbf=_0x2f0165[_0x2fb39e];return _0xf87cbf;}function a274_0x2f01(){const _0x10cc3e=['all','sqlcode','boolean','global','sqlname','Force\x20overwrite','remote','codes','code','dry-run','Dataset\x20code','operation','Rabetbase\x20CLI','menu-ids','file','842743roSAbf','Operation\x20type','description','expectPath','map','skip-imports','title','datasetcode','Page\x20size','page','Record\x20ID','Use\x20remote','Comma-separated\x20metadata\x20codes','57808AYqwEN','126PyYAXH','flow-code','schemas','target','<name>','Description\x20file','env','tags','value','enable-bff-save','Description','meowKey','Page\x20number','taskId','7320243DnXbjv','Select\x20app\x20profile\x20by\x20name','JSON\x20params','48nQBOmM','enableBffSave','page-size','6268330fiFtci','function-node','expect-path','Expected\x20current\x20parent\x20menu\x20id','Type\x20filter','Environment','from-env','locale','expected-count','Code\x20filter','Override\x20appcode','109932TXSZes','flow-type','2053666KCYVPe','dbid','confirm','operation-type','pagesize','DB\x20ID','non-interactive','parent-id','6BONwJa','task-id','watch','Watch\x20mode','Config\x20key','Skip\x20import\x20generation','fromEntries','Read\x20value\x20from\x20environment\x20variable','keyword','Title','type','Read\x20value\x20from\x20stdin','appcode','Enable\x20Backend\x20Function\x20save','expectedChildrenCount','<expr>','Reveal\x20sensitive\x20value','sql','expected-children-count','Expected\x20current\x20menu\x20path','operationType','SQL\x20string','Force\x20non-interactive\x20mode\x20(CI)','description-file','force','app','key','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Use\x20global\x20config\x20scope','datasetCode','SQL\x20name','App\x20locale\x20(workspace\x20pass-through;\x20not\x20CLI\x20language)','Output\x20path','Config\x20value','File\x20path','string','params','Maximum\x20search\x20hits','2597970lFQxar','Alias\x20for\x20--non-interactive','fromEnv','sort','label','yes','Use\x20project\x20config\x20scope','Name','Parent\x20menu\x20id','skipImports','Apply\x20to\x20all','output','Show\x20help','Flow\x20name','json\x20|\x20pretty\x20|\x20compress','clear','Keyword\x20filter','Function\x20node','flow-name','parentId','dbId','verbose','dryRun','expectedCount','sqlName','stdin','Expected\x20affected\x20count','Tags','query','reveal','help','Flow\x20type','Clear','project','dataset-code','93fUkXWt','format','1IPoJsO','topk','Search\x20query','functionNode','descriptionFile'];a274_0x2f01=function(){return _0x10cc3e;};return a274_0x2f01();}export const CLI_DISPLAY_NAME=a274_0x360a19(0x1d6);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a274_0x360a19(0x186),'meowKey':'appcode','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x16f),'hint':'<code>'},{'name':a274_0x360a19(0x193),'meowKey':a274_0x360a19(0x193),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x160),'hint':a274_0x360a19(0x155)},{'name':a274_0x360a19(0x157),'meowKey':a274_0x360a19(0x157),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x16a),'hint':'production\x20|\x20daily'},{'name':a274_0x360a19(0x1c4),'meowKey':a274_0x360a19(0x1c4),'type':'string','description':'Output\x20format','hint':a274_0x360a19(0x1ae)},{'name':'jq','meowKey':'jq','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x195),'hint':a274_0x360a19(0x189)},{'name':'dry-run','meowKey':a274_0x360a19(0x1b6),'type':a274_0x360a19(0x1cc),'description':'Preview\x20operation\x20without\x20executing'},{'name':a274_0x360a19(0x1a5),'meowKey':'yes','type':a274_0x360a19(0x1cc),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a274_0x360a19(0x178),'meowKey':'nonInteractive','type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x190)},{'name':'global','meowKey':a274_0x360a19(0x1cd),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x196)},{'name':a274_0x360a19(0x1c1),'meowKey':a274_0x360a19(0x1c1),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x1a6)},{'name':'ci','meowKey':'ci','type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x1a1),'hidden':!![]},{'name':a274_0x360a19(0x1be),'meowKey':a274_0x360a19(0x1be),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x1ac)},{'name':a274_0x360a19(0x16c),'meowKey':a274_0x360a19(0x16c),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x199),'hidden':!![],'hint':'zh-CN\x20|\x20en-US'},{'name':'name','meowKey':'name','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x1a7),'hidden':!![]},{'name':a274_0x360a19(0x149),'meowKey':a274_0x360a19(0x149),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x183),'hidden':!![]},{'name':a274_0x360a19(0x1bc),'meowKey':a274_0x360a19(0x1bc),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x1c7),'hidden':!![]},{'name':a274_0x360a19(0x1c6),'meowKey':'topk','type':'string','description':a274_0x360a19(0x19f),'hidden':!![]},{'name':a274_0x360a19(0x1af),'meowKey':a274_0x360a19(0x1af),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x1c0),'hidden':!![]},{'name':a274_0x360a19(0x17c),'meowKey':a274_0x360a19(0x17c),'type':'boolean','description':a274_0x360a19(0x17d),'hidden':!![]},{'name':a274_0x360a19(0x1ab),'meowKey':'output','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x19a),'hidden':!![]},{'name':a274_0x360a19(0x19e),'meowKey':a274_0x360a19(0x19e),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x161),'hidden':!![]},{'name':a274_0x360a19(0x14a),'meowKey':'datasetcode','type':'string','description':a274_0x360a19(0x1d4),'hidden':!![]},{'name':a274_0x360a19(0x1ca),'meowKey':a274_0x360a19(0x1ca),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x1aa),'hidden':!![]},{'name':a274_0x360a19(0x15a),'meowKey':a274_0x360a19(0x163),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x187),'hidden':!![]},{'name':'id','meowKey':'id','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x14d),'hidden':!![]},{'name':'type','meowKey':a274_0x360a19(0x184),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x169),'hidden':!![]},{'name':'file','meowKey':a274_0x360a19(0x1d8),'type':'string','description':a274_0x360a19(0x19c),'hidden':!![]},{'name':a274_0x360a19(0x152),'meowKey':'flowCode','type':'string','description':'Flow\x20code','hidden':!![]},{'name':a274_0x360a19(0x1b2),'meowKey':'flowName','type':'string','description':a274_0x360a19(0x1ad),'hidden':!![]},{'name':'flow-status','meowKey':'flowStatus','type':a274_0x360a19(0x19d),'description':'Flow\x20status','hidden':!![]},{'name':a274_0x360a19(0x171),'meowKey':'flowType','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x1bf),'hidden':!![]},{'name':a274_0x360a19(0x1c2),'meowKey':a274_0x360a19(0x197),'type':'string','description':a274_0x360a19(0x1d4),'hidden':!![]},{'name':a274_0x360a19(0x1cb),'meowKey':'sqlcode','type':'string','description':'SQL\x20code','hidden':!![]},{'name':'sql-name','meowKey':a274_0x360a19(0x1b8),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x198),'hidden':!![]},{'name':a274_0x360a19(0x1ce),'meowKey':a274_0x360a19(0x1ce),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x198),'hidden':!![]},{'name':'db-id','meowKey':a274_0x360a19(0x1b4),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x177),'hidden':!![]},{'name':a274_0x360a19(0x173),'meowKey':'dbid','type':'string','description':'DB\x20ID','hidden':!![]},{'name':a274_0x360a19(0x145),'meowKey':a274_0x360a19(0x145),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x15b),'hidden':!![]},{'name':a274_0x360a19(0x191),'meowKey':a274_0x360a19(0x1c9),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x156),'hidden':!![]},{'name':'page','meowKey':a274_0x360a19(0x14c),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x15d),'hidden':!![]},{'name':a274_0x360a19(0x164),'meowKey':'pageSize','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x14b),'hidden':!![]},{'name':a274_0x360a19(0x176),'meowKey':a274_0x360a19(0x176),'type':'string','description':a274_0x360a19(0x14b),'hidden':!![]},{'name':a274_0x360a19(0x182),'meowKey':a274_0x360a19(0x182),'type':'string','description':a274_0x360a19(0x1b0),'hidden':!![]},{'name':a274_0x360a19(0x1d2),'meowKey':'code','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x16e),'hidden':!![]},{'name':a274_0x360a19(0x18b),'meowKey':'sql','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x18f),'hidden':!![]},{'name':a274_0x360a19(0x153),'meowKey':a274_0x360a19(0x153),'type':'string','description':'Schemas','hidden':!![]},{'name':a274_0x360a19(0x1d5),'meowKey':a274_0x360a19(0x1d5),'type':'string','description':'Operation\x20type','hidden':!![]},{'name':a274_0x360a19(0x154),'meowKey':a274_0x360a19(0x154),'type':a274_0x360a19(0x19d),'description':'Target\x20path','hidden':!![]},{'name':a274_0x360a19(0x148),'meowKey':a274_0x360a19(0x1a9),'type':'boolean','description':a274_0x360a19(0x17f),'hidden':!![]},{'name':a274_0x360a19(0x194),'meowKey':a274_0x360a19(0x194),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x17e),'hidden':!![]},{'name':a274_0x360a19(0x159),'meowKey':a274_0x360a19(0x159),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x19b),'hidden':!![]},{'name':'tags','meowKey':a274_0x360a19(0x158),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x1bb),'hidden':!![]},{'name':a274_0x360a19(0x1b9),'meowKey':a274_0x360a19(0x1b9),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x185),'hidden':!![]},{'name':a274_0x360a19(0x16b),'meowKey':a274_0x360a19(0x1a2),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x181),'hidden':!![]},{'name':a274_0x360a19(0x1bd),'meowKey':'reveal','type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x18a),'hidden':!![]},{'name':a274_0x360a19(0x192),'meowKey':a274_0x360a19(0x192),'type':'boolean','description':a274_0x360a19(0x1cf),'hidden':!![]},{'name':a274_0x360a19(0x174),'meowKey':a274_0x360a19(0x174),'type':'boolean','description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a274_0x360a19(0x1d0),'meowKey':a274_0x360a19(0x1d0),'type':a274_0x360a19(0x1cc),'description':a274_0x360a19(0x14e),'hidden':!![]},{'name':a274_0x360a19(0x1b5),'meowKey':'verbose','type':a274_0x360a19(0x1cc),'description':'Verbose\x20output','hidden':!![]},{'name':a274_0x360a19(0x16d),'meowKey':a274_0x360a19(0x1b7),'type':'string','description':a274_0x360a19(0x1ba),'hidden':!![]},{'name':a274_0x360a19(0x1a4),'meowKey':a274_0x360a19(0x1a4),'type':'string','description':'Menu\x20label','hidden':!![]},{'name':a274_0x360a19(0x179),'meowKey':a274_0x360a19(0x1b3),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x1a8),'hidden':!![]},{'name':'sort','meowKey':a274_0x360a19(0x1a3),'type':a274_0x360a19(0x19d),'description':'Menu\x20sort\x20value','hidden':!![]},{'name':'expect-parent-id','meowKey':'expectParentId','type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x168),'hidden':!![]},{'name':a274_0x360a19(0x167),'meowKey':a274_0x360a19(0x146),'type':a274_0x360a19(0x19d),'description':a274_0x360a19(0x18d),'hidden':!![]},{'name':a274_0x360a19(0x18c),'meowKey':a274_0x360a19(0x188),'type':a274_0x360a19(0x19d),'description':'Expected\x20current\x20child\x20count','hidden':!![]},{'name':a274_0x360a19(0x1d7),'meowKey':'menuIds','type':a274_0x360a19(0x19d),'description':'Comma-separated\x20menu\x20IDs','hidden':!![]},{'name':a274_0x360a19(0x17b),'meowKey':a274_0x360a19(0x15e),'type':'string','description':'Asynchronous\x20task\x20ID','hidden':!![]},{'name':a274_0x360a19(0x175),'meowKey':a274_0x360a19(0x18e),'type':'string','description':a274_0x360a19(0x144),'hidden':!![]},{'name':a274_0x360a19(0x166),'meowKey':a274_0x360a19(0x1c8),'type':'string','description':a274_0x360a19(0x1b1),'hidden':!![]},{'name':a274_0x360a19(0x1d1),'meowKey':a274_0x360a19(0x1d1),'type':'string','description':a274_0x360a19(0x14f),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a274_0x360a19(0x186),a274_0x360a19(0x193),a274_0x360a19(0x157),'format','jq',a274_0x360a19(0x1d3),a274_0x360a19(0x1a5),a274_0x360a19(0x178),'ci']);export function buildMeowFlags(){const _0x18fb21=a274_0x360a19;return Object[_0x18fb21(0x180)](GLOBAL_FLAGS[_0x18fb21(0x147)](_0x5c9e0b=>[_0x5c9e0b[_0x18fb21(0x15c)],{'type':_0x5c9e0b[_0x18fb21(0x184)]}]));}
1
+ export const CLI_BIN_NAME="rabetbase";export const CLI_DISPLAY_NAME="Rabetbase CLI";export const NPM_PACKAGE_NAME="@lovrabet/rabetbase-cli";export const GLOBAL_FLAGS=[{name:"appcode",meowKey:"appcode",type:"string",description:"Override appcode",hint:"<code>"},{name:"app",meowKey:"app",type:"string",description:"Select app profile by name",hint:"<name>"},{name:"env",meowKey:"env",type:"string",description:"Environment",hint:"production | daily"},{name:"format",meowKey:"format",type:"string",description:"Output format",hint:"json | pretty | compress"},{name:"jq",meowKey:"jq",type:"string",description:"Filter JSON output (JQ_PATH > bundled jq > PATH; use with --format json or compress)",hint:"<expr>"},{name:"dry-run",meowKey:"dryRun",type:"boolean",description:"Preview operation without executing"},{name:"yes",meowKey:"yes",type:"boolean",description:"Skip confirmation for high-risk writes"},{name:"non-interactive",meowKey:"nonInteractive",type:"boolean",
2
+ description:"Force non-interactive mode (CI)"},{name:"global",meowKey:"global",type:"boolean",description:"Use global config scope"},{name:"project",meowKey:"project",type:"boolean",description:"Use project config scope"},{name:"ci",meowKey:"ci",type:"boolean",description:"Alias for --non-interactive",hidden:true},{name:"help",meowKey:"help",type:"boolean",description:"Show help"},{name:"locale",meowKey:"locale",type:"string",description:"App locale (workspace pass-through; not CLI language)",hidden:true,hint:"zh-CN | en-US"},{name:"name",meowKey:"name",type:"string",description:"Name",hidden:true},{name:"title",meowKey:"title",type:"string",description:"Title",hidden:true},{name:"query",meowKey:"query",type:"string",description:"Search query",hidden:true},{name:"topk",meowKey:"topk",type:"string",description:"Maximum search hits",hidden:true},{name:"clear",meowKey:"clear",type:"boolean",description:"Clear",hidden:true},{name:"watch",meowKey:"watch",type:"boolean",
3
+ description:"Watch mode",hidden:true},{name:"output",meowKey:"output",type:"string",description:"Output path",hidden:true},{name:"params",meowKey:"params",type:"string",description:"JSON params",hidden:true},{name:"datasetcode",meowKey:"datasetcode",type:"string",description:"Dataset code",hidden:true},{name:"all",meowKey:"all",type:"boolean",description:"Apply to all",hidden:true},{name:"enable-bff-save",meowKey:"enableBffSave",type:"boolean",description:"Enable Backend Function save",hidden:true},{name:"id",meowKey:"id",type:"string",description:"Record ID",hidden:true},{name:"type",meowKey:"type",type:"string",description:"Type filter",hidden:true},{name:"file",meowKey:"file",type:"string",description:"File path",hidden:true},{name:"flow-code",meowKey:"flowCode",type:"string",description:"Flow code",hidden:true},{name:"flow-name",meowKey:"flowName",type:"string",description:"Flow name",hidden:true},{name:"flow-status",meowKey:"flowStatus",type:"string",description:"Flow status",
4
+ hidden:true},{name:"flow-type",meowKey:"flowType",type:"string",description:"Flow type",hidden:true},{name:"dataset-code",meowKey:"datasetCode",type:"string",description:"Dataset code",hidden:true},{name:"sqlcode",meowKey:"sqlcode",type:"string",description:"SQL code",hidden:true},{name:"sql-name",meowKey:"sqlName",type:"string",description:"SQL name",hidden:true},{name:"sqlname",meowKey:"sqlname",type:"string",description:"SQL name",hidden:true},{name:"db-id",meowKey:"dbId",type:"string",description:"DB ID",hidden:true},{name:"dbid",meowKey:"dbid",type:"string",description:"DB ID",hidden:true},{name:"description",meowKey:"description",type:"string",description:"Description",hidden:true},{name:"description-file",meowKey:"descriptionFile",type:"string",description:"Description file",hidden:true},{name:"page",meowKey:"page",type:"string",description:"Page number",hidden:true},{name:"page-size",meowKey:"pageSize",type:"string",description:"Page size",hidden:true},{name:"pagesize",
5
+ meowKey:"pagesize",type:"string",description:"Page size",hidden:true},{name:"keyword",meowKey:"keyword",type:"string",description:"Keyword filter",hidden:true},{name:"code",meowKey:"code",type:"string",description:"Code filter",hidden:true},{name:"sql",meowKey:"sql",type:"string",description:"SQL string",hidden:true},{name:"schemas",meowKey:"schemas",type:"string",description:"Schemas",hidden:true},{name:"operation",meowKey:"operation",type:"string",description:"Operation type",hidden:true},{name:"target",meowKey:"target",type:"string",description:"Target path",hidden:true},{name:"skip-imports",meowKey:"skipImports",type:"boolean",description:"Skip import generation",hidden:true},{name:"key",meowKey:"key",type:"string",description:"Config key",hidden:true},{name:"value",meowKey:"value",type:"string",description:"Config value",hidden:true},{name:"tags",meowKey:"tags",type:"string",description:"Tags",hidden:true},{name:"stdin",meowKey:"stdin",type:"boolean",
6
+ description:"Read value from stdin",hidden:true},{name:"from-env",meowKey:"fromEnv",type:"string",description:"Read value from environment variable",hidden:true},{name:"reveal",meowKey:"reveal",type:"boolean",description:"Reveal sensitive value",hidden:true},{name:"force",meowKey:"force",type:"boolean",description:"Force overwrite",hidden:true},{name:"confirm",meowKey:"confirm",type:"boolean",description:"Confirm destructive action",hidden:true},{name:"remote",meowKey:"remote",type:"boolean",description:"Use remote",hidden:true},{name:"verbose",meowKey:"verbose",type:"boolean",description:"Verbose output",hidden:true},{name:"expected-count",meowKey:"expectedCount",type:"string",description:"Expected affected count",hidden:true},{name:"label",meowKey:"label",type:"string",description:"Menu label",hidden:true},{name:"parent-id",meowKey:"parentId",type:"string",description:"Parent menu id",hidden:true},{name:"sort",meowKey:"sort",type:"string",description:"Menu sort value",hidden:true},{
7
+ name:"expect-parent-id",meowKey:"expectParentId",type:"string",description:"Expected current parent menu id",hidden:true},{name:"expect-path",meowKey:"expectPath",type:"string",description:"Expected current menu path",hidden:true},{name:"expected-children-count",meowKey:"expectedChildrenCount",type:"string",description:"Expected current child count",hidden:true},{name:"menu-ids",meowKey:"menuIds",type:"string",description:"Comma-separated menu IDs",hidden:true},{name:"task-id",meowKey:"taskId",type:"string",description:"Asynchronous task ID",hidden:true},{name:"operation-type",meowKey:"operationType",type:"string",description:"Operation type",hidden:true},{name:"function-node",meowKey:"functionNode",type:"string",description:"Function node",hidden:true},{name:"codes",meowKey:"codes",type:"string",description:"Comma-separated metadata codes",hidden:true}];export const PIPELINE_FLAG_NAMES=new Set(["appcode","app","env","format","jq","dry-run","yes","non-interactive","ci"])
8
+ ;export function buildMeowFlags(){return Object.fromEntries(GLOBAL_FLAGS.map(f=>[f.meowKey,{type:f.type}]))}
@@ -1 +1 @@
1
- const a275_0x473e4a=a275_0x23d2;(function(_0x6dccf4,_0x1cf077){const _0x89b596=a275_0x23d2,_0x40eeee=_0x6dccf4();while(!![]){try{const _0x1b9c30=-parseInt(_0x89b596(0x102))/0x1*(parseInt(_0x89b596(0x100))/0x2)+-parseInt(_0x89b596(0x107))/0x3*(parseInt(_0x89b596(0xfd))/0x4)+-parseInt(_0x89b596(0x108))/0x5*(parseInt(_0x89b596(0xfa))/0x6)+parseInt(_0x89b596(0x103))/0x7*(parseInt(_0x89b596(0xfb))/0x8)+-parseInt(_0x89b596(0xfe))/0x9+parseInt(_0x89b596(0xfc))/0xa*(-parseInt(_0x89b596(0x105))/0xb)+parseInt(_0x89b596(0x104))/0xc;if(_0x1b9c30===_0x1cf077)break;else _0x40eeee['push'](_0x40eeee['shift']());}catch(_0x5e5d2c){_0x40eeee['push'](_0x40eeee['shift']());}}}(a275_0x8af0,0x26753));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a275_0x473e4a(0xff),'format':a275_0x473e4a(0x106),'locale':'en-US','riskLevel':a275_0x473e4a(0x101),'apiDir':DEFAULT_API_DIR};function a275_0x8af0(){const _0x4549ad=['compress','3ZcHdWC','64830feeSxe','42DnFbWB','16tNdaQM','34810HRtyDT','1167428HZgwFl','29691EjZYbj','production','660BMjQSp','write','853YPrgAd','952133ZTSxfh','10227108HFehCX','946CSPsMV'];a275_0x8af0=function(){return _0x4549ad;};return a275_0x8af0();}function a275_0x23d2(_0x545ac9,_0x44f441){_0x545ac9=_0x545ac9-0xfa;const _0x8af0b8=a275_0x8af0();let _0x23d266=_0x8af0b8[_0x545ac9];return _0x23d266;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
1
+ import{DEFAULT_API_DIR}from"../constant/paths.js";export const DEFAULT_CONFIG_VALUES={env:"production",format:"compress",locale:"en-US",riskLevel:"write",apiDir:DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT="compress";
@@ -1 +1,4 @@
1
- const a276_0x2ad743=a276_0x1441;(function(_0x32fb25,_0x420ec3){const _0x47c9fd=a276_0x1441,_0x143175=_0x32fb25();while(!![]){try{const _0x51a379=parseInt(_0x47c9fd(0x124))/0x1+-parseInt(_0x47c9fd(0x120))/0x2*(-parseInt(_0x47c9fd(0x10d))/0x3)+parseInt(_0x47c9fd(0x10e))/0x4*(-parseInt(_0x47c9fd(0x127))/0x5)+-parseInt(_0x47c9fd(0x10f))/0x6*(-parseInt(_0x47c9fd(0x117))/0x7)+parseInt(_0x47c9fd(0x10c))/0x8+-parseInt(_0x47c9fd(0x109))/0x9*(-parseInt(_0x47c9fd(0x111))/0xa)+-parseInt(_0x47c9fd(0x122))/0xb;if(_0x51a379===_0x420ec3)break;else _0x143175['push'](_0x143175['shift']());}catch(_0x487927){_0x143175['push'](_0x143175['shift']());}}}(a276_0x1bcd,0xf150c));function a276_0x1bcd(){const _0x59c895=['allowOfficialKbServiceDefault','localDomain','cdn','app','/web-app/app/','kbServiceDomain','appDomain','478104jOQino','production','43691362iLOuBx','apiDomain','1060673JqxSTU','/app/','runtime','27995JgFAdM','9hEFfFe','hostname','user','2395952gJJzWi','21PDyAbI','644AHCyQk','54BmCZVT','trim','19517590WkXTxL','kbService','serviceDomains','daily','api','region','681737RSaWtS','kbDomain'];a276_0x1bcd=function(){return _0x59c895;};return a276_0x1bcd();}import{getEnv,isProduction}from'../constant/env.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';import{getOfficialRoutingCdn,getOfficialRoutingProfile}from'../constant/routing-profile.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbDomain,customKbServiceDomain,allowOfficialKbServiceDefault=!![],customAppDomain,customLocalDomain,customCertificateDomain,customCdn,activeRegion=DEFAULT_LOVRABET_REGION;function getActiveRegionDomains(){const _0x55402c=a276_0x1441,_0xbff3f3=getOfficialRoutingProfile(activeRegion);return isProduction(getEnv())?_0xbff3f3[_0x55402c(0x113)]['production']:_0xbff3f3[_0x55402c(0x113)][_0x55402c(0x114)]??_0xbff3f3[_0x55402c(0x113)][_0x55402c(0x121)];}export function initDomains(_0x43bd72){const _0x1e4510=a276_0x1441;customApiDomain=_0x43bd72?.[_0x1e4510(0x123)],customUserDomain=_0x43bd72?.['userDomain'],customRuntimeDomain=_0x43bd72?.['runtimeDomain'],customSkillDomain=_0x43bd72?.['skillDomain'],customKbDomain=_0x43bd72?.[_0x1e4510(0x118)],customKbServiceDomain=_0x43bd72?.[_0x1e4510(0x11e)],allowOfficialKbServiceDefault=_0x43bd72?.[_0x1e4510(0x119)]??!![],customAppDomain=_0x43bd72?.[_0x1e4510(0x11f)],customLocalDomain=_0x43bd72?.[_0x1e4510(0x11a)],customCertificateDomain=_0x43bd72?.['certificateDomain'],customCdn=_0x43bd72?.[_0x1e4510(0x11b)],activeRegion=_0x43bd72?.[_0x1e4510(0x116)]??DEFAULT_LOVRABET_REGION;}export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a276_0x2ad743(0x10b)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a276_0x2ad743(0x115)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a276_0x2ad743(0x126)];function a276_0x1441(_0x1b2674,_0x3c6ebc){_0x1b2674=_0x1b2674-0x109;const _0x1bcda3=a276_0x1bcd();let _0x144122=_0x1bcda3[_0x1b2674];return _0x144122;}export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()['skill'];export const getKbDomain=()=>customKbDomain||customApiDomain||getActiveRegionDomains()['kb'];export const getKbServiceDomain=()=>{const _0x5e4ca2=a276_0x2ad743;if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;return getActiveRegionDomains()[_0x5e4ca2(0x112)];};export const getAppDomain=()=>customAppDomain||getActiveRegionDomains()[a276_0x2ad743(0x11c)];export const getActiveRegion=()=>activeRegion;export const getLocalDomain=()=>customLocalDomain;export const getCertificateDomain=()=>customCertificateDomain;export const getActiveCdn=()=>customCdn||getOfficialRoutingCdn(activeRegion);export function isIndependentDeployment(){return!!(customApiDomain||customUserDomain||customRuntimeDomain||customSkillDomain||customKbDomain||customAppDomain||customLocalDomain||customCertificateDomain);}export function getSdkClientRoutingConfig(){const _0x3385af=a276_0x2ad743;if(customRuntimeDomain&&customRuntimeDomain!==getActiveRegionDomains()[_0x3385af(0x126)])return{'runtimeDomain':customRuntimeDomain};if(activeRegion!==DEFAULT_LOVRABET_REGION)return{'runtimeDomain':getRuntimeDomain()};return{};}export const getAppBaseUrl=_0x59cf34=>{const _0x5e7ddc=a276_0x2ad743,_0x2cc554=encodeURIComponent(_0x59cf34['trim']());return isProduction(getEnv())?getAppDomain()+_0x5e7ddc(0x125)+_0x2cc554:getAppDomain()+_0x5e7ddc(0x11d)+_0x2cc554;};export const getPublishedAppDomain=_0x10bcfa=>{const _0x5a5ad9=a276_0x2ad743,_0x3713a7=new URL(getAppDomain());return _0x3713a7[_0x5a5ad9(0x10a)]=_0x10bcfa[_0x5a5ad9(0x110)]()+'.'+_0x3713a7[_0x5a5ad9(0x10a)],_0x3713a7['origin'];};
1
+ import{getEnv,isProduction}from"../constant/env.js";import{DEFAULT_LOVRABET_REGION}from"../constant/region.js";import{getOfficialRoutingCdn,getOfficialRoutingProfile}from"../constant/routing-profile.js";let customApiDomain;let customUserDomain;let customRuntimeDomain;let customSkillDomain;let customKbDomain;let customKbServiceDomain;let allowOfficialKbServiceDefault=true;let customAppDomain;let customLocalDomain;let customCertificateDomain;let customCdn;let activeRegion=DEFAULT_LOVRABET_REGION;function getActiveRegionDomains(){const profile=getOfficialRoutingProfile(activeRegion);return isProduction(getEnv())?profile.serviceDomains.production:profile.serviceDomains.daily??profile.serviceDomains.production}export function initDomains(domains){customApiDomain=domains?.apiDomain;customUserDomain=domains?.userDomain;customRuntimeDomain=domains?.runtimeDomain;customSkillDomain=domains?.skillDomain;customKbDomain=domains?.kbDomain;customKbServiceDomain=domains?.kbServiceDomain
2
+ ;allowOfficialKbServiceDefault=domains?.allowOfficialKbServiceDefault??true;customAppDomain=domains?.appDomain;customLocalDomain=domains?.localDomain;customCertificateDomain=domains?.certificateDomain;customCdn=domains?.cdn;activeRegion=domains?.region??DEFAULT_LOVRABET_REGION}export const getUserDomain=()=>customUserDomain||getActiveRegionDomains().user;export const getApiDomain=()=>customApiDomain||getActiveRegionDomains().api;export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains().runtime;export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains().skill;export const getKbDomain=()=>customKbDomain||customApiDomain||getActiveRegionDomains().kb;export const getKbServiceDomain=()=>{if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;return getActiveRegionDomains().kbService};export const getAppDomain=()=>customAppDomain||getActiveRegionDomains().app;export const getActiveRegion=()=>activeRegion
3
+ ;export const getLocalDomain=()=>customLocalDomain;export const getCertificateDomain=()=>customCertificateDomain;export const getActiveCdn=()=>customCdn||getOfficialRoutingCdn(activeRegion);export function isIndependentDeployment(){return!!(customApiDomain||customUserDomain||customRuntimeDomain||customSkillDomain||customKbDomain||customAppDomain||customLocalDomain||customCertificateDomain)}export function getSdkClientRoutingConfig(){if(customRuntimeDomain&&customRuntimeDomain!==getActiveRegionDomains().runtime){return{runtimeDomain:customRuntimeDomain}}if(activeRegion!==DEFAULT_LOVRABET_REGION){return{runtimeDomain:getRuntimeDomain()}}return{}}export const getAppBaseUrl=appCode=>{const encodedAppCode=encodeURIComponent(appCode.trim());return isProduction(getEnv())?`${getAppDomain()}/app/${encodedAppCode}`:`${getAppDomain()}/web-app/app/${encodedAppCode}`};export const getPublishedAppDomain=appCode=>{const appUrl=new URL(getAppDomain())
4
+ ;appUrl.hostname=`${appCode.trim()}.${appUrl.hostname}`;return appUrl.origin};
@@ -1 +1 @@
1
- const a277_0x504bb7=a277_0x3d26;(function(_0x1928cd,_0x48e619){const _0x2e5d35=a277_0x3d26,_0x54e69d=_0x1928cd();while(!![]){try{const _0x5c294f=-parseInt(_0x2e5d35(0x15c))/0x1*(parseInt(_0x2e5d35(0x168))/0x2)+parseInt(_0x2e5d35(0x15b))/0x3*(parseInt(_0x2e5d35(0x15a))/0x4)+parseInt(_0x2e5d35(0x162))/0x5+parseInt(_0x2e5d35(0x15e))/0x6+parseInt(_0x2e5d35(0x167))/0x7*(-parseInt(_0x2e5d35(0x161))/0x8)+-parseInt(_0x2e5d35(0x160))/0x9+parseInt(_0x2e5d35(0x15d))/0xa;if(_0x5c294f===_0x48e619)break;else _0x54e69d['push'](_0x54e69d['shift']());}catch(_0x37ccb8){_0x54e69d['push'](_0x54e69d['shift']());}}}(a277_0x3852,0xda1a1));export const RABETBASE_ENV_VALUES=['production',a277_0x504bb7(0x164)];export function normalizeEnv(_0x406f5a){const _0x2a9f7d=a277_0x504bb7;return _0x406f5a===_0x2a9f7d(0x15f)?_0x2a9f7d(0x166):_0x406f5a;}export function isProduction(_0x350039){const _0x3c57bf=a277_0x504bb7;return normalizeEnv(_0x350039)===_0x3c57bf(0x166);}function a277_0x3d26(_0x4acdc8,_0x22c393){_0x4acdc8=_0x4acdc8-0x15a;const _0x385236=a277_0x3852();let _0x3d267e=_0x385236[_0x4acdc8];return _0x3d267e;}export function isDaily(_0x58626f){const _0xb4edb8=a277_0x504bb7;return normalizeEnv(_0x58626f)===_0xb4edb8(0x164);}export function isDev(_0x4782a8){const _0x34517d=a277_0x504bb7,_0x4021f7=normalizeEnv(_0x4782a8);return _0x4021f7===_0x34517d(0x163)||_0x4021f7===_0x34517d(0x165);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');function a277_0x3852(){const _0x433642=['24357GAHEoQ','8624000jUiaOA','2000154hebasc','online','10132668ktEwLl','4395544MGhYfA','5971505xSymKz','development','daily','dev','production','7QrwboH','60ALyGEj','3637160stmZdZ','3sfkOXy'];a277_0x3852=function(){return _0x433642;};return a277_0x3852();}export function getEnv(){return env;}export function initEnv(_0xed998){env=normalizeEnv(_0xed998);}
1
+ export const RABETBASE_ENV_VALUES=["production","daily"];export function normalizeEnv(e){return e==="online"?"production":e}export function isProduction(e){return normalizeEnv(e)==="production"}export function isDaily(e){return normalizeEnv(e)==="daily"}export function isDev(e){const c=normalizeEnv(e);return c==="development"||c==="dev"}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||"production");export function getEnv(){return env}export function initEnv(_env){env=normalizeEnv(_env)}
@@ -1 +1 @@
1
- const a278_0x46f132=a278_0x129a;(function(_0x2498cf,_0x31b685){const _0x3db187=a278_0x129a,_0x3c3256=_0x2498cf();while(!![]){try{const _0x2041fd=-parseInt(_0x3db187(0x1c7))/0x1*(parseInt(_0x3db187(0x1c6))/0x2)+-parseInt(_0x3db187(0x1c8))/0x3*(-parseInt(_0x3db187(0x1c1))/0x4)+-parseInt(_0x3db187(0x1c2))/0x5+-parseInt(_0x3db187(0x1c3))/0x6*(parseInt(_0x3db187(0x1c0))/0x7)+-parseInt(_0x3db187(0x1bf))/0x8*(-parseInt(_0x3db187(0x1c4))/0x9)+-parseInt(_0x3db187(0x1ca))/0xa+parseInt(_0x3db187(0x1c9))/0xb*(parseInt(_0x3db187(0x1cb))/0xc);if(_0x2041fd===_0x31b685)break;else _0x3c3256['push'](_0x3c3256['shift']());}catch(_0x4221dd){_0x3c3256['push'](_0x3c3256['shift']());}}}(a278_0x16f2,0x6b2b4));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a278_0x46f132(0x1c5),a278_0x46f132(0x1cc),'compress'];function a278_0x129a(_0x581b59,_0x24b66a){_0x581b59=_0x581b59-0x1bf;const _0x16f2f7=a278_0x16f2();let _0x129a26=_0x16f2f7[_0x581b59];return _0x129a26;}function a278_0x16f2(){const _0x22559e=['1068220neVsrR','2259480CyphHk','pretty','6000072XujseF','43505RiPxpV','4808abhEkL','1217175YKVsCg','702clgfIF','9duptMq','json','2ndAatf','601439foYOFo','2004XaEisd','33WMsoGt'];a278_0x16f2=function(){return _0x22559e;};return a278_0x16f2();}
1
+ export const RABETBASE_OUTPUT_FORMAT_VALUES=["json","pretty","compress"];
@@ -1 +1 @@
1
- const a279_0x539b68=a279_0x110b;(function(_0x4b4e1c,_0xa9809c){const _0x426c45=a279_0x110b,_0x27d3ea=_0x4b4e1c();while(!![]){try{const _0xc0b8b4=-parseInt(_0x426c45(0x71))/0x1+-parseInt(_0x426c45(0x6f))/0x2+parseInt(_0x426c45(0x78))/0x3+parseInt(_0x426c45(0x74))/0x4*(-parseInt(_0x426c45(0x70))/0x5)+parseInt(_0x426c45(0x77))/0x6*(parseInt(_0x426c45(0x72))/0x7)+parseInt(_0x426c45(0x76))/0x8*(parseInt(_0x426c45(0x75))/0x9)+-parseInt(_0x426c45(0x73))/0xa;if(_0xc0b8b4===_0xa9809c)break;else _0x27d3ea['push'](_0x27d3ea['shift']());}catch(_0x545fc4){_0x27d3ea['push'](_0x27d3ea['shift']());}}}(a279_0x3ba2,0x72747));function a279_0x110b(_0x20bfa7,_0x3e5588){_0x20bfa7=_0x20bfa7-0x6f;const _0x3ba26b=a279_0x3ba2();let _0x110b81=_0x3ba26b[_0x20bfa7];return _0x110b81;}function a279_0x3ba2(){const _0x1a9b18=['6XbIRpa','1447257ZOHzLA','./src/api','661884DzLnaa','40VcITWr','794744jXARgs','5219151zBSDgf','305020bniwso','158196NWNZuI','1125Ffxfzb','45656usCKpN'];a279_0x3ba2=function(){return _0x1a9b18;};return a279_0x3ba2();}export const DEFAULT_API_DIR=a279_0x539b68(0x79);
1
+ export const DEFAULT_API_DIR="./src/api";
@@ -1 +1 @@
1
- (function(_0x32a3eb,_0x748c2d){const _0x29a457=a280_0x34ed,_0x159432=_0x32a3eb();while(!![]){try{const _0x3ba2ae=-parseInt(_0x29a457(0x171))/0x1+parseInt(_0x29a457(0x174))/0x2*(parseInt(_0x29a457(0x16f))/0x3)+-parseInt(_0x29a457(0x177))/0x4+parseInt(_0x29a457(0x173))/0x5+-parseInt(_0x29a457(0x175))/0x6*(-parseInt(_0x29a457(0x170))/0x7)+parseInt(_0x29a457(0x172))/0x8+-parseInt(_0x29a457(0x16d))/0x9;if(_0x3ba2ae===_0x748c2d)break;else _0x159432['push'](_0x159432['shift']());}catch(_0x2b2921){_0x159432['push'](_0x159432['shift']());}}}(a280_0x203e,0xb7e4f));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';function a280_0x203e(){const _0x26885a=['21428aMUlHw','10744192sfAnqc','2168390jdZUaF','4aJyosI','12372lfUqXK','string','3633532KOTJec','20344662rxQGWD','includes','2068761dwVFHe','2674cAkUcs'];a280_0x203e=function(){return _0x26885a;};return a280_0x203e();}export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x37ea89){const _0x2a7683=a280_0x34ed;return typeof _0x37ea89===_0x2a7683(0x176)&&LOVRABET_REGION_VALUES[_0x2a7683(0x16e)](_0x37ea89);}function a280_0x34ed(_0x156301,_0x560f65){_0x156301=_0x156301-0x16d;const _0x203e40=a280_0x203e();let _0x34ed9b=_0x203e40[_0x156301];return _0x34ed9b;}export function isEnabledLovrabetRegion(_0x256d3e){const _0x2f6f2a=a280_0x34ed;return typeof _0x256d3e==='string'&&ENABLED_LOVRABET_REGION_VALUES[_0x2f6f2a(0x16e)](_0x256d3e);}export function normalizeLovrabetRegion(_0xd49921){if(typeof _0xd49921!=='string')return undefined;const _0x3e73a0=REGION_ALIASES[_0xd49921]??_0xd49921;return isLovrabetRegion(_0x3e73a0)?_0x3e73a0:undefined;}export function isInvalidLovrabetRegion(_0x89227b){return _0x89227b!==undefined&&_0x89227b!==null&&_0x89227b!==''&&normalizeLovrabetRegion(_0x89227b)===undefined;}
1
+ import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from"../generated/official-routing.js";export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(value){return typeof value==="string"&&LOVRABET_REGION_VALUES.includes(value)}export function isEnabledLovrabetRegion(value){return typeof value==="string"&&ENABLED_LOVRABET_REGION_VALUES.includes(value)}export function normalizeLovrabetRegion(value){if(typeof value!=="string")return undefined;const normalized=REGION_ALIASES[value]??value;return isLovrabetRegion(normalized)?normalized:undefined}export function isInvalidLovrabetRegion(value){return value!==undefined&&value!==null&&value!==""&&normalizeLovrabetRegion(value)===undefined}
@@ -1 +1 @@
1
- function a281_0x468d(_0x425802,_0x257e67){_0x425802=_0x425802-0x17f;const _0x23007d=a281_0x2300();let _0x468d92=_0x23007d[_0x425802];return _0x468d92;}function a281_0x2300(){const _0x54c8c0=['357552TEqlWA','1720838tukfyp','54342CzOUlV','high-risk-write','3785IUuXzV','901176lhPWqg','830eXvNvY','3wKusHF','6PvPcFa','647259AfYuoV','110996sJwMKu','write'];a281_0x2300=function(){return _0x54c8c0;};return a281_0x2300();}const a281_0x35f244=a281_0x468d;(function(_0x1269f2,_0x1537cf){const _0x5e4287=a281_0x468d,_0xfe2d65=_0x1269f2();while(!![]){try{const _0x3bd952=parseInt(_0x5e4287(0x186))/0x1*(parseInt(_0x5e4287(0x189))/0x2)+parseInt(_0x5e4287(0x188))/0x3+-parseInt(_0x5e4287(0x17f))/0x4+-parseInt(_0x5e4287(0x183))/0x5+parseInt(_0x5e4287(0x187))/0x6*(parseInt(_0x5e4287(0x180))/0x7)+parseInt(_0x5e4287(0x184))/0x8+-parseInt(_0x5e4287(0x181))/0x9*(parseInt(_0x5e4287(0x185))/0xa);if(_0x3bd952===_0x1537cf)break;else _0xfe2d65['push'](_0xfe2d65['shift']());}catch(_0xaf898e){_0xfe2d65['push'](_0xfe2d65['shift']());}}}(a281_0x2300,0x247b5));export const RISK_LEVEL_VALUES=['read',a281_0x35f244(0x18a),a281_0x35f244(0x182)];
1
+ export const RISK_LEVEL_VALUES=["read","write","high-risk-write"];
@@ -1 +1 @@
1
- (function(_0x6875b0,_0x226dbf){const _0x1bde3e=a282_0x522f,_0x41b330=_0x6875b0();while(!![]){try{const _0x1a9cb7=-parseInt(_0x1bde3e(0x170))/0x1*(parseInt(_0x1bde3e(0x16d))/0x2)+parseInt(_0x1bde3e(0x169))/0x3*(parseInt(_0x1bde3e(0x16f))/0x4)+parseInt(_0x1bde3e(0x16a))/0x5+-parseInt(_0x1bde3e(0x16e))/0x6+parseInt(_0x1bde3e(0x167))/0x7*(-parseInt(_0x1bde3e(0x165))/0x8)+-parseInt(_0x1bde3e(0x171))/0x9*(-parseInt(_0x1bde3e(0x164))/0xa)+parseInt(_0x1bde3e(0x166))/0xb;if(_0x1a9cb7===_0x226dbf)break;else _0x41b330['push'](_0x41b330['shift']());}catch(_0x99e3c8){_0x41b330['push'](_0x41b330['shift']());}}}(a282_0x2ed4,0x3bbef));function a282_0x522f(_0x4b703b,_0x4dc6e2){_0x4b703b=_0x4b703b-0x164;const _0x2ed452=a282_0x2ed4();let _0x522fba=_0x2ed452[_0x4b703b];return _0x522fba;}import{OFFICIAL_ROUTING_PROFILES as a282_0x55e2e2,ROUTING_CATALOG_DIGEST}from'../generated/official-routing.js';export const OFFICIAL_ROUTING_PROFILES=a282_0x55e2e2;export{ROUTING_CATALOG_DIGEST};function a282_0x2ed4(){const _0x461575=['1157172nqohmH','268CcBWff','201213GaVjOr','Official\x20routing\x20for\x20region\x20\x22','10GqMgGI','16bHbBMe','7480979Kebylb','1628949QRwoTR','libraries','3sPkpsT','815500gHTvTR','cdn','lovrabet','1936RbrUrD','1111692toViTQ'];a282_0x2ed4=function(){return _0x461575;};return a282_0x2ed4();}export function getOfficialRoutingProfile(_0x24ce84){return OFFICIAL_ROUTING_PROFILES[_0x24ce84];}export function getOfficialRoutingCdn(_0x11995c){const _0x14318c=a282_0x522f,_0x1bac9b=getOfficialRoutingProfile(_0x11995c)[_0x14318c(0x16b)];if(!_0x1bac9b[_0x14318c(0x16c)])throw new Error(_0x14318c(0x172)+_0x11995c+'\x22\x20is\x20not\x20ready:\x20Lovrabet\x20CDN\x20Domain\x20is\x20not\x20configured.');return{'libraries':_0x1bac9b[_0x14318c(0x168)],'lovrabet':_0x1bac9b[_0x14318c(0x16c)]};}
1
+ import{OFFICIAL_ROUTING_PROFILES as GENERATED_OFFICIAL_ROUTING_PROFILES,ROUTING_CATALOG_DIGEST}from"../generated/official-routing.js";export const OFFICIAL_ROUTING_PROFILES=GENERATED_OFFICIAL_ROUTING_PROFILES;export{ROUTING_CATALOG_DIGEST};export function getOfficialRoutingProfile(region){return OFFICIAL_ROUTING_PROFILES[region]}export function getOfficialRoutingCdn(region){const cdn=getOfficialRoutingProfile(region).cdn;if(!cdn.lovrabet){throw new Error(`Official routing for region "${region}" is not ready: Lovrabet CDN Domain is not configured.`)}return{libraries:cdn.libraries,lovrabet:cdn.lovrabet}}