@lovrabet/rabetbase-cli 2.3.3-beta.4 → 2.3.4-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 (219) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/flags.js +1 -1
  47. package/lib/commands/common/validate.js +1 -1
  48. package/lib/commands/config/get.js +1 -1
  49. package/lib/commands/config/index.js +1 -1
  50. package/lib/commands/config/list.js +1 -1
  51. package/lib/commands/config/set.js +1 -1
  52. package/lib/commands/config/shared.js +1 -1
  53. package/lib/commands/data/filter.js +1 -1
  54. package/lib/commands/data/getOne.js +1 -1
  55. package/lib/commands/data/index.js +1 -1
  56. package/lib/commands/data/shared.js +1 -1
  57. package/lib/commands/dataset/business-group-update.js +1 -1
  58. package/lib/commands/dataset/capability.js +1 -1
  59. package/lib/commands/dataset/delete.js +1 -1
  60. package/lib/commands/dataset/detail.js +1 -1
  61. package/lib/commands/dataset/extend-update.js +1 -1
  62. package/lib/commands/dataset/field-update.js +1 -1
  63. package/lib/commands/dataset/generate.js +1 -1
  64. package/lib/commands/dataset/index.js +1 -1
  65. package/lib/commands/dataset/list.js +1 -1
  66. package/lib/commands/dataset/operations.js +1 -1
  67. package/lib/commands/dataset/relation-audit.js +1 -1
  68. package/lib/commands/dataset/relation-create.js +1 -1
  69. package/lib/commands/dataset/relation-delete.js +1 -1
  70. package/lib/commands/dataset/relation-shared.js +1 -1
  71. package/lib/commands/dataset/relation-update.js +1 -1
  72. package/lib/commands/dataset/relations.js +1 -1
  73. package/lib/commands/dataset/rename.js +1 -1
  74. package/lib/commands/dataset/restore.js +1 -1
  75. package/lib/commands/db/analyze-cancel.js +1 -1
  76. package/lib/commands/db/analyze-start.js +1 -1
  77. package/lib/commands/db/analyze-status.js +1 -1
  78. package/lib/commands/db/create.js +1 -1
  79. package/lib/commands/db/delete.js +1 -1
  80. package/lib/commands/db/detail.js +1 -1
  81. package/lib/commands/db/diff.js +1 -1
  82. package/lib/commands/db/index.js +1 -1
  83. package/lib/commands/db/list.js +1 -1
  84. package/lib/commands/db/shared.js +1 -1
  85. package/lib/commands/db/tables.js +1 -1
  86. package/lib/commands/db/test.js +1 -1
  87. package/lib/commands/db/update.js +1 -1
  88. package/lib/commands/doctor.js +1 -1
  89. package/lib/commands/init/index.js +1 -1
  90. package/lib/commands/issue/index.js +1 -1
  91. package/lib/commands/issue/nudge.js +1 -1
  92. package/lib/commands/issue/report.js +1 -1
  93. package/lib/commands/issue/shared.js +1 -1
  94. package/lib/commands/logs/index.js +1 -1
  95. package/lib/commands/menu/index.js +1 -1
  96. package/lib/commands/menu/list.js +1 -1
  97. package/lib/commands/menu/shared/compare-table.js +1 -1
  98. package/lib/commands/menu/shared/index.js +1 -1
  99. package/lib/commands/menu/shared/inquirer.js +1 -1
  100. package/lib/commands/menu/shared/local-pages.js +1 -1
  101. package/lib/commands/menu/shared/logic.js +1 -1
  102. package/lib/commands/menu/shared/service.js +1 -1
  103. package/lib/commands/menu/shared/sync-core.js +1 -1
  104. package/lib/commands/menu/shared/update-core.js +1 -1
  105. package/lib/commands/menu/shared/valid-url.js +1 -1
  106. package/lib/commands/menu/sync.js +1 -1
  107. package/lib/commands/menu/update.js +1 -1
  108. package/lib/commands/page/generate-start.js +1 -1
  109. package/lib/commands/page/generate-status.js +1 -1
  110. package/lib/commands/page/index.js +1 -1
  111. package/lib/commands/page/pull.js +1 -1
  112. package/lib/commands/page/push.js +1 -1
  113. package/lib/commands/page/relation-audit.js +1 -1
  114. package/lib/commands/page/shared.js +1 -1
  115. package/lib/commands/page/standard-page-status.js +1 -1
  116. package/lib/commands/page/sync.js +1 -1
  117. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  118. package/lib/commands/project/create/format-elapsed.js +1 -1
  119. package/lib/commands/project/create/main.js +1 -1
  120. package/lib/commands/project/create/non-interactive.js +1 -1
  121. package/lib/commands/project/create/project-template-path.js +1 -1
  122. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  123. package/lib/commands/project/create/use-format-code.js +1 -1
  124. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  125. package/lib/commands/project/index.js +1 -1
  126. package/lib/commands/project/init.js +1 -1
  127. package/lib/commands/project/upgrade.js +1 -1
  128. package/lib/commands/registry.js +1 -1
  129. package/lib/commands/run/index.js +1 -1
  130. package/lib/commands/schema.js +1 -1
  131. package/lib/commands/sql/create.js +1 -1
  132. package/lib/commands/sql/delete.js +1 -1
  133. package/lib/commands/sql/detail.js +1 -1
  134. package/lib/commands/sql/exec.js +1 -1
  135. package/lib/commands/sql/index.js +1 -1
  136. package/lib/commands/sql/list.js +1 -1
  137. package/lib/commands/sql/pull.js +1 -1
  138. package/lib/commands/sql/push.js +1 -1
  139. package/lib/commands/sql/save.js +1 -1
  140. package/lib/commands/sql/shared.js +1 -1
  141. package/lib/commands/sql/status.js +1 -1
  142. package/lib/commands/sql/validate.js +1 -1
  143. package/lib/commands/workspace/index.js +1 -1
  144. package/lib/config/schema.js +1 -1
  145. package/lib/constant/cdn.js +1 -1
  146. package/lib/constant/cli.js +1 -1
  147. package/lib/constant/defaults.js +1 -1
  148. package/lib/constant/domain.js +1 -1
  149. package/lib/constant/env.js +1 -1
  150. package/lib/constant/output.js +1 -1
  151. package/lib/constant/paths.js +1 -1
  152. package/lib/constant/risk.js +1 -1
  153. package/lib/context/app-resolver.js +1 -1
  154. package/lib/context/auth-resolver.js +1 -1
  155. package/lib/context/config-loader.js +1 -1
  156. package/lib/context.js +1 -1
  157. package/lib/core/alias-resolver.js +1 -1
  158. package/lib/core/api-client.js +1 -1
  159. package/lib/core/bff/config.js +1 -1
  160. package/lib/core/bff/file-system.js +1 -1
  161. package/lib/core/bff/hash.js +1 -1
  162. package/lib/core/bff/lock.js +1 -1
  163. package/lib/core/bff/utils.js +1 -1
  164. package/lib/core/db-resolver.js +1 -1
  165. package/lib/core/page/file-system.js +1 -1
  166. package/lib/core/page/hash.js +1 -1
  167. package/lib/core/page/lock.js +1 -1
  168. package/lib/core/sql-sync/config.js +1 -1
  169. package/lib/core/sql-sync/file-system.js +1 -1
  170. package/lib/core/sql-sync/hash.js +1 -1
  171. package/lib/core/sql-sync/lock.js +1 -1
  172. package/lib/core/sql-sync/utils.js +1 -1
  173. package/lib/core/sql-validator.js +1 -1
  174. package/lib/errors.js +1 -1
  175. package/lib/framework/build-all-flags.js +1 -1
  176. package/lib/framework/flags.js +1 -1
  177. package/lib/framework/help.js +1 -1
  178. package/lib/framework/index.js +1 -1
  179. package/lib/framework/output.js +1 -1
  180. package/lib/framework/response.js +1 -1
  181. package/lib/framework/runner-alias.js +1 -1
  182. package/lib/framework/runner.js +1 -1
  183. package/lib/framework/schema-export.js +1 -1
  184. package/lib/framework/types.js +1 -1
  185. package/lib/generated/build-info.js +1 -1
  186. package/lib/help.js +1 -1
  187. package/lib/skills/main.js +1 -1
  188. package/lib/skills/npx-skills-add.js +1 -1
  189. package/lib/telemetry/cli-command-trace.js +1 -1
  190. package/lib/telemetry/cli-help-trace.js +1 -1
  191. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  192. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  193. package/lib/telemetry/send-cli-trace-log.js +1 -1
  194. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  195. package/lib/utils/ai_config.js +1 -1
  196. package/lib/utils/apply-jq-filter.js +1 -1
  197. package/lib/utils/cdn-config.js +1 -1
  198. package/lib/utils/check-sdk-version.js +1 -1
  199. package/lib/utils/cli-version-check.js +1 -1
  200. package/lib/utils/cli-version-policy.js +1 -1
  201. package/lib/utils/config.js +1 -1
  202. package/lib/utils/copy-directory.js +1 -1
  203. package/lib/utils/entity-with-id.js +1 -1
  204. package/lib/utils/file-utils.js +1 -1
  205. package/lib/utils/guides-cdn.js +1 -1
  206. package/lib/utils/http-client.js +1 -1
  207. package/lib/utils/is-non-interactive.js +1 -1
  208. package/lib/utils/logger.js +1 -1
  209. package/lib/utils/params.js +1 -1
  210. package/lib/utils/platform.js +1 -1
  211. package/lib/utils/rules-cdn.js +1 -1
  212. package/lib/utils/sleep.js +1 -1
  213. package/lib/utils/template-replacer.js +1 -1
  214. package/lib/utils/update-notice.js +1 -1
  215. package/lib/utils/version.js +1 -1
  216. package/lib/utils/with-active-cookie.js +1 -1
  217. package/lib/utils/write-cli-side-channel.js +1 -1
  218. package/package.json +2 -2
  219. package/lib/commands/app/use.js +0 -1
@@ -1 +1 @@
1
- (function(_0x1c75ac,_0x5bd234){const _0x3a54fe=a115_0x5df5,_0x5afefb=_0x1c75ac();while(!![]){try{const _0x1f3762=-parseInt(_0x3a54fe(0xee))/0x1*(-parseInt(_0x3a54fe(0xe0))/0x2)+-parseInt(_0x3a54fe(0x13f))/0x3+-parseInt(_0x3a54fe(0xdd))/0x4+parseInt(_0x3a54fe(0x12d))/0x5*(parseInt(_0x3a54fe(0x119))/0x6)+parseInt(_0x3a54fe(0xf8))/0x7*(parseInt(_0x3a54fe(0xe5))/0x8)+parseInt(_0x3a54fe(0x15b))/0x9*(parseInt(_0x3a54fe(0x140))/0xa)+parseInt(_0x3a54fe(0x12c))/0xb*(-parseInt(_0x3a54fe(0xf2))/0xc);if(_0x1f3762===_0x5bd234)break;else _0x5afefb['push'](_0x5afefb['shift']());}catch(_0x2e6f3e){_0x5afefb['push'](_0x5afefb['shift']());}}}(a115_0x46c7,0xac2cb));import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x4eb67e){const _0xae26ed=a115_0x5df5,_0x2a2c5f=_0x4eb67e[_0xae26ed(0x11c)]('id');if(typeof _0x2a2c5f===_0xae26ed(0x14c)&&Number[_0xae26ed(0x152)](_0x2a2c5f)&&_0x2a2c5f>0x0)return _0x2a2c5f;return undefined;}export function validateDatasetSelector(_0x4f8fb6){const _0x21083b=a115_0x5df5,_0xef1115=Boolean(_0x4f8fb6['str'](_0x21083b(0xe1))),_0x44207b=Boolean(_0x4f8fb6['str'](_0x21083b(0xeb)));if(_0xef1115&&_0x44207b)throw CliErrors[_0x21083b(0xf9)](_0x21083b(0x113));if(!_0xef1115&&!_0x44207b)throw CliErrors[_0x21083b(0xf9)](_0x21083b(0x107));}export function validateGenerateOperationSelector(_0x595fa7){const _0x3d4469=a115_0x5df5,_0x305cf6=Boolean(_0x595fa7[_0x3d4469(0x13c)](_0x3d4469(0x153))),_0xf79f6d=Boolean(_0x595fa7[_0x3d4469(0x13c)]('client-operation-id'));if(_0x305cf6&&_0xf79f6d)throw CliErrors['validation'](_0x3d4469(0x138));if(!_0x305cf6&&!_0xf79f6d)throw CliErrors[_0x3d4469(0xf9)](_0x3d4469(0x10e));}export function validatePageTargetSelector(_0x1b0cb6){const _0x17036b=a115_0x5df5,_0x3602a4=getPageIdFlag(_0x1b0cb6)!==undefined,_0x1b91bd=Boolean(_0x1b0cb6['str'](_0x17036b(0xe1))||_0x1b0cb6[_0x17036b(0x13c)](_0x17036b(0xeb)));if(_0x3602a4&&_0x1b91bd)throw CliErrors[_0x17036b(0xf9)](_0x17036b(0x136));if(!_0x3602a4&&!_0x1b91bd)throw CliErrors[_0x17036b(0xf9)](_0x17036b(0xdc));if(_0x1b0cb6[_0x17036b(0x13c)]('version-tag')&&!_0x1b91bd)throw CliErrors['validation'](_0x17036b(0x15c));}export function resolveDatasetCode(_0x48c350){const _0x212526=a115_0x5df5;validateDatasetSelector(_0x48c350);const _0x3c0edf=_0x48c350[_0x212526(0x13c)](_0x212526(0xe1));if(_0x3c0edf)return _0x3c0edf;const _0x22d03a=_0x48c350['str'](_0x212526(0xeb)),_0x180eb7=resolveApiFilePath(_0x48c350[_0x212526(0x141)],_0x48c350['appCode']),_0x530505=resolveAlias(_0x48c350[_0x212526(0x141)],_0x22d03a,undefined,_0x180eb7);if(_0x530505)return _0x530505;const _0x8a5198=loadAliasMap(_0x48c350[_0x212526(0x141)],undefined,_0x180eb7),_0x348d69=_0x8a5198['length']>0x0?'Available\x20aliases:\x20'+_0x8a5198['map'](_0x1b23fd=>_0x1b23fd['alias'])[_0x212526(0x10d)](',\x20'):_0x212526(0x11b)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.';throw CliErrors['validation'](_0x212526(0x112)+_0x22d03a+_0x212526(0x123)+_0x348d69);}function a115_0x46c7(){const _0x590f5e=['menuPath','blocked_multiple_complete_sets','\x20--appcode\x20','1434WIYadJ','clientOperationId','Run\x20`','flag','stringify','datasetId','keys','CANCELING','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','\x22\x20not\x20found.\x20','\x22\x20belongs\x20to\x20app\x20\x22','\x20--format\x20json','run_generate_start','PARTIAL_SUCCESS','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','operation_pending','\x20page\x20generate-start\x20--datasetcode\x20','\x20--operation-id\x20','11tjPYEy','4495wpMaIj','residualPages','CANCELLED','no_standard_pages_found','\x20app\x20use\x20<name>`\x20or\x20pass\x20--appcode.','query_operation_status','isArray','complete','relatedPages','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.','completeSets','menuPages','toUpperCase','str','fields','status','735432PxIJjQ','7038550ejvHUK','apiDir','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','pages','appCode','standard-page-status','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','unknown_reconcile_failed','RUNNING','get','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','relatedPageInfoList','number','filter','set','Version\x20tag\x20\x22','hasMenu','successStatus','isFinite','operation-id','type','pageVersion','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','config','Switch\x20app\x20with\x20`','manual_resolution_required','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','9lOMovL','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','name','blocked_complete_plus_residual_sets','code','page-','operationId','push','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','850384QgQhhs','page-generate-','pageSets','3394CEwWje','datasetcode','Dataset\x20\x22','properties','FAILED','40juwoEg','deleted','pageId','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','modelId','\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','alias','PENDING','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','280RlPgVx','run_sync','Operation\x20finished\x20for\x20dataset\x20\x22','`\x20instead.','4112448uBqBaP','from','versionTag','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','string','__EMPTY__','156513wrlOaI','validation','length','UNKNOWN','blocked_incomplete_sets','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','SUCCESS','\x20page\x20generate-status\x20--datasetcode\x20','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','menuVisible','\x20page\x20sync\x20--datasetcode\x20','map','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','object','\x22,\x20not\x20current\x20app\x20\x22','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','fallbackUndeletedPages','datasetCode','operation_failed','datasetIds','incompleteSets','join','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','generated_complete_set','trim','totalSets','Alias\x20\x22','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','title'];a115_0x46c7=function(){return _0x590f5e;};return a115_0x46c7();}export async function loadDatasetDetailForPage(_0x20ead3){const _0x2b8151=a115_0x5df5,_0x22eef6=resolveDatasetCode(_0x20ead3),_0x1c39b0=await getDatasetDetail(_0x22eef6),_0x3b5e6e=normalizeDatasetDetail(_0x1c39b0,_0x22eef6);return ensureAppOwnership(_0x20ead3[_0x2b8151(0x144)],_0x3b5e6e['appCode'],_0x2b8151(0xe2)+_0x3b5e6e[_0x2b8151(0xd8)]+'\x22\x20belongs\x20to\x20app\x20\x22'+_0x3b5e6e[_0x2b8151(0x144)]+_0x2b8151(0x106)+_0x20ead3['appCode']+'\x22.'),_0x3b5e6e;}export async function loadPageDetailForPage(_0x471c68,_0x1f4c98){const _0xe0b67e=a115_0x5df5,_0x246ef2=await getPageDetail(_0x1f4c98),_0x53ad08=normalizePageDetail(_0x246ef2);return ensureAppOwnership(_0x471c68['appCode'],_0x53ad08[_0xe0b67e(0x144)],'Page\x20\x22'+_0x1f4c98+_0xe0b67e(0x124)+_0x53ad08['appCode']+_0xe0b67e(0x106)+_0x471c68[_0xe0b67e(0x144)]+'\x22.'),_0x53ad08;}function a115_0x5df5(_0x5ce2ee,_0x137b2a){_0x5ce2ee=_0x5ce2ee-0xd6;const _0x46c79a=a115_0x46c7();let _0x5df51a=_0x46c79a[_0x5ce2ee];return _0x5df51a;}export function getUndeletedRelatedPages(_0x40a7df){const _0x4f592b=a115_0x5df5;return _0x40a7df[_0x4f592b(0x135)][_0x4f592b(0x14d)](_0x163be8=>!_0x163be8['deleted']);}export function buildPageGenerateOperationStatusQueryCommand(_0x153133,_0x157532){const _0x240e75=a115_0x5df5,_0x463f4c=_0x157532?.[_0x240e75(0x144)]&&_0x157532['appCode']['trim']()!==''?_0x240e75(0x118)+_0x157532[_0x240e75(0x144)]:'',_0x5e7693=_0x157532?.[_0x240e75(0xda)]&&_0x157532['operationId'][_0x240e75(0x110)]()!==''?_0x240e75(0x12b)+_0x157532[_0x240e75(0xda)]:_0x157532?.['clientOperationId']&&_0x157532[_0x240e75(0x11a)][_0x240e75(0x110)]()!==''?'\x20--client-operation-id\x20'+_0x157532[_0x240e75(0x11a)]:'';return CLI_BIN_NAME+'\x20page\x20generate-status\x20--datasetcode\x20'+_0x153133+_0x463f4c+_0x5e7693+_0x240e75(0x125);}export function createPageGenerateClientOperationId(){const _0x54e49d=a115_0x5df5;return _0x54e49d(0xde)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x5e9319,_0x2002aa){const _0x482404=a115_0x5df5,_0x258adc=_0x2002aa&&_0x2002aa[_0x482404(0x110)]()!==''?_0x482404(0x118)+_0x2002aa:'';return CLI_BIN_NAME+'\x20page\x20standard-page-status\x20--datasetcode\x20'+_0x5e9319+_0x258adc+_0x482404(0x125);}export function prepareDatasetAction(_0xfa2569,_0x342d64){const _0x7a47dd=a115_0x5df5,_0x53b125=getUndeletedRelatedPages(_0xfa2569);if(_0x342d64==='generate'&&_0x53b125['length']>0x0)throw CliErrors[_0x7a47dd(0xf9)]('Dataset\x20\x22'+_0xfa2569[_0x7a47dd(0xd8)]+'\x22\x20already\x20has\x20undeleted\x20related\x20pages.',_0x7a47dd(0x11b)+CLI_BIN_NAME+_0x7a47dd(0x102)+_0xfa2569['code']+_0x7a47dd(0xf1));if(_0x342d64==='sync'&&_0x53b125[_0x7a47dd(0xfa)]===0x0)throw CliErrors[_0x7a47dd(0xf9)](_0x7a47dd(0xe2)+_0xfa2569[_0x7a47dd(0xd8)]+_0x7a47dd(0xe8),_0x7a47dd(0x11b)+CLI_BIN_NAME+_0x7a47dd(0x12a)+_0xfa2569['code']+'`\x20first,\x20then\x20poll\x20`'+CLI_BIN_NAME+_0x7a47dd(0xff)+_0xfa2569[_0x7a47dd(0xd8)]+'\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.');return{'dataset':_0xfa2569,'undeletedPages':_0x53b125};}export function prepareGenerateDatasetAction(_0x2a0033,_0x4fe505){const _0x1b2e9c=a115_0x5df5,_0x2a595c=getUndeletedRelatedPages(_0x2a0033);if(!_0x4fe505){if(_0x2a595c[_0x1b2e9c(0xfa)]>0x0)throw CliErrors[_0x1b2e9c(0xf9)](_0x1b2e9c(0xe2)+_0x2a0033['code']+_0x1b2e9c(0x104),'Run\x20`'+CLI_BIN_NAME+_0x1b2e9c(0x102)+_0x2a0033['code']+_0x1b2e9c(0xf1));return{'dataset':_0x2a0033,'undeletedPages':_0x2a595c,'standardPageStatus':null};}const _0x49f342=_0x4fe505[_0x1b2e9c(0x139)],_0x5db337=_0x4fe505[_0x1b2e9c(0x10c)],_0x4cff08=_0x4fe505[_0x1b2e9c(0x12e)][_0x1b2e9c(0xfa)];if(_0x49f342===0x0&&_0x5db337===0x0&&_0x4cff08===0x0)return{'dataset':_0x2a0033,'undeletedPages':_0x2a595c,'standardPageStatus':_0x4fe505};if(_0x49f342===0x1&&_0x5db337===0x0&&_0x4cff08===0x0)throw CliErrors[_0x1b2e9c(0xf9)]('Dataset\x20\x22'+_0x2a0033[_0x1b2e9c(0xd8)]+_0x1b2e9c(0x146),_0x1b2e9c(0x11b)+CLI_BIN_NAME+_0x1b2e9c(0x102)+_0x2a0033[_0x1b2e9c(0xd8)]+_0x1b2e9c(0xf1));throw CliErrors[_0x1b2e9c(0xf9)](_0x1b2e9c(0xe2)+_0x2a0033['code']+_0x1b2e9c(0xea),_0x1b2e9c(0x142));}export function assessStandardPageState(_0x5d3bde,_0x306a09,_0x18206e){const _0x23ba39=a115_0x5df5,_0x19bb0b=_0x18206e?.[_0x23ba39(0x151)]??'already_exists_complete_set',_0x2c2b35=_0x18206e?.[_0x23ba39(0x108)]??[];if(!_0x306a09){if(_0x2c2b35[_0x23ba39(0xfa)]>0x0)return{'status':_0x23ba39(0xfc),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x23ba39(0xe2)+_0x5d3bde+_0x23ba39(0xf5),'nextAction':_0x23ba39(0x159)};return{'status':_0x23ba39(0x130),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x23ba39(0xe2)+_0x5d3bde+'\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','nextAction':'run_generate_start'};}const _0x620ffb=_0x306a09[_0x23ba39(0x139)],_0x9ed63f=_0x306a09[_0x23ba39(0x10c)],_0x561f3c=_0x306a09[_0x23ba39(0x12e)][_0x23ba39(0xfa)];if(_0x620ffb===0x0&&_0x9ed63f===0x0&&_0x561f3c===0x0)return{'status':_0x23ba39(0x130),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x23ba39(0xe2)+_0x5d3bde+_0x23ba39(0x114),'nextAction':_0x23ba39(0x126)};if(_0x620ffb>0x1)return{'status':_0x23ba39(0x117),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x23ba39(0xe2)+_0x5d3bde+'\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','nextAction':_0x23ba39(0x159)};if(_0x9ed63f>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x5d3bde+_0x23ba39(0x122),'nextAction':_0x23ba39(0x159)};if(_0x620ffb===0x1&&_0x561f3c>0x0)return{'status':_0x23ba39(0xd7),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x23ba39(0xe2)+_0x5d3bde+_0x23ba39(0xed),'nextAction':'manual_resolution_required'};if(_0x620ffb===0x1)return{'status':_0x19bb0b,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x19bb0b==='generated_complete_set'?'Dataset\x20\x22'+_0x5d3bde+_0x23ba39(0x15a):_0x23ba39(0xe2)+_0x5d3bde+_0x23ba39(0x146),'nextAction':_0x19bb0b===_0x23ba39(0x10f)?undefined:_0x23ba39(0xef)};return{'status':_0x23ba39(0x147),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x23ba39(0xe2)+_0x5d3bde+_0x23ba39(0x14a),'nextAction':_0x23ba39(0x132)};}export function assessGenerateOperationState(_0x5bd216,_0x56498c,_0x5a9f79){const _0x20ec21=a115_0x5df5,_0x763e69=String(_0x56498c||'')[_0x20ec21(0x110)]()[_0x20ec21(0x13b)]();if(_0x763e69===_0x20ec21(0xec))return{'status':_0x20ec21(0x129),'manualResolutionRequired':![],'message':_0x20ec21(0x156)+_0x5bd216+'\x22.','nextAction':'query_operation_status'};if(_0x763e69===_0x20ec21(0x148)||_0x763e69==='RETRYING'||_0x763e69===_0x20ec21(0x120))return{'status':'operation_running','manualResolutionRequired':![],'message':_0x20ec21(0x100)+_0x5bd216+'\x22.','nextAction':'query_operation_status'};if(_0x763e69===_0x20ec21(0xfe)||_0x763e69===_0x20ec21(0x127)){if(!_0x5a9f79)return{'status':_0x20ec21(0x147),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0x5bd216+_0x20ec21(0x121),'nextAction':_0x20ec21(0x132)};const _0x11212c=assessStandardPageState(_0x5bd216,_0x5a9f79,{'successStatus':_0x20ec21(0x10f)});if(_0x11212c[_0x20ec21(0x13e)]===_0x20ec21(0x130))return{'status':_0x20ec21(0x147),'manualResolutionRequired':![],'message':_0x20ec21(0xf0)+_0x5bd216+'\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','nextAction':_0x20ec21(0x132)};return _0x11212c;}if(_0x763e69===_0x20ec21(0xe4)||_0x763e69===_0x20ec21(0x12f)||_0x763e69==='')return{'status':_0x20ec21(0x10a),'manualResolutionRequired':![],'message':'Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22'+_0x5bd216+'\x22.','nextAction':_0x20ec21(0x132)};return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x20ec21(0xe2)+_0x5bd216+_0x20ec21(0x128)+_0x763e69+'\x22.','nextAction':_0x20ec21(0x132)};}export function normalizePageDetail(_0x3c29f6){const _0x100e86=a115_0x5df5;return{'pageId':Number(_0x3c29f6[_0x100e86(0xe7)]),'appCode':_0x3c29f6[_0x100e86(0x144)],'name':_0x3c29f6[_0x100e86(0xd6)]||_0x100e86(0xd9)+_0x3c29f6[_0x100e86(0xe7)],'code':_0x3c29f6[_0x100e86(0xd8)]||'','type':_0x3c29f6[_0x100e86(0x154)]?String(_0x3c29f6[_0x100e86(0x154)]):_0x100e86(0xfb),'datasetIds':Array[_0x100e86(0x133)](_0x3c29f6[_0x100e86(0x10b)])?_0x3c29f6['datasetIds'][_0x100e86(0x103)](_0x2bff8b=>Number(_0x2bff8b))[_0x100e86(0x14d)](_0x322a86=>Number[_0x100e86(0x152)](_0x322a86)):[],'pageVersion':_0x3c29f6[_0x100e86(0x157)]&&typeof _0x3c29f6['config'][_0x100e86(0x155)]===_0x100e86(0x14c)?_0x3c29f6['config'][_0x100e86(0x155)]:null,'versionTag':_0x3c29f6[_0x100e86(0x157)]&&typeof _0x3c29f6[_0x100e86(0x157)][_0x100e86(0xf4)]===_0x100e86(0xf6)&&_0x3c29f6[_0x100e86(0x157)][_0x100e86(0xf4)][_0x100e86(0x110)]()!==''?_0x3c29f6[_0x100e86(0x157)][_0x100e86(0xf4)]:null,'relatedPages':normalizeRelatedPages(_0x3c29f6['relatedPageInfoList']),'raw':_0x3c29f6};}export function serializeDryRunDescription(_0x151187){const _0x1b1057=a115_0x5df5;return JSON[_0x1b1057(0x11d)](_0x151187,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x2ebfc5,_0x4aebfe){const _0x43e408=a115_0x5df5,_0x4e6851=await tryGetStandardPageStatus(_0x2ebfc5[_0x43e408(0x144)],_0x4aebfe);if(!_0x4e6851)return null;return normalizeStandardPageStatus(_0x4e6851,_0x4aebfe);}export function selectVersionTagGroup(_0x38c876,_0x50a0a9,_0x264a8b){const _0x82f486=a115_0x5df5,_0x2f0841=new Map();for(const _0x3d39eb of _0x38c876){const _0x3d1f1b=normalizeVersionTag(_0x50a0a9(_0x3d39eb)),_0x4865f3=_0x2f0841[_0x82f486(0x149)](_0x3d1f1b)??[];_0x4865f3[_0x82f486(0xdb)](_0x3d39eb),_0x2f0841[_0x82f486(0x14e)](_0x3d1f1b,_0x4865f3);}const _0x34b9f3=Array[_0x82f486(0xf3)](_0x2f0841[_0x82f486(0x11f)]());if(_0x34b9f3['length']<=0x1&&!_0x264a8b)return{'items':_0x38c876,'availableTags':_0x34b9f3};if(_0x264a8b){const _0x402951=normalizeVersionTag(_0x264a8b),_0x432373=_0x2f0841['get'](_0x402951);if(!_0x432373)throw CliErrors['validation'](_0x82f486(0x14f)+_0x264a8b+'\x22\x20not\x20found.',buildVersionTagHint(_0x34b9f3));return{'items':_0x432373,'availableTags':_0x34b9f3};}throw CliErrors[_0x82f486(0xf9)](_0x82f486(0xfd),buildVersionTagHint(_0x34b9f3));}function normalizeDatasetDetail(_0x5d15fb,_0xf22cf6){const _0x4b42ba=a115_0x5df5,_0x3db00e=Array['isArray'](_0x5d15fb[_0x4b42ba(0x13d)])?_0x5d15fb['fields']:Array[_0x4b42ba(0x133)](_0x5d15fb[_0x4b42ba(0xe3)])?_0x5d15fb[_0x4b42ba(0xe3)]:[];return{'id':Number(_0x5d15fb['id']??_0x5d15fb[_0x4b42ba(0xe9)]??0x0),'code':String(_0x5d15fb['code']||_0x5d15fb['modelCode']||_0xf22cf6),'name':String(_0x5d15fb[_0x4b42ba(0xd6)]||_0xf22cf6),'appCode':_0x5d15fb[_0x4b42ba(0x144)]||_0x5d15fb['dataset']?.[_0x4b42ba(0x144)],'fieldCount':_0x3db00e[_0x4b42ba(0xfa)],'relatedPages':normalizeRelatedPages(_0x5d15fb[_0x4b42ba(0x14b)]),'raw':_0x5d15fb};}function normalizeStandardPageStatus(_0x2f4b34,_0x45a611){const _0x363001=a115_0x5df5,_0x5d0a51=_0x37e167=>({'pageId':Number(_0x37e167['pageId']??_0x37e167['id']??0x0),'title':String(_0x37e167[_0x363001(0x115)]||_0x37e167[_0x363001(0xd6)]||'page-'+(_0x37e167[_0x363001(0xe7)]??_0x37e167['id']??'unknown')),'type':_0x37e167[_0x363001(0x154)]?String(_0x37e167[_0x363001(0x154)]):'UNKNOWN','deleted':_0x37e167['deleted']===!![],'hasMenu':_0x37e167[_0x363001(0x150)]===!![],'menuVisible':typeof _0x37e167[_0x363001(0x101)]==='boolean'?_0x37e167[_0x363001(0x101)]:null,'menuPath':typeof _0x37e167[_0x363001(0x116)]==='string'&&_0x37e167[_0x363001(0x116)][_0x363001(0x110)]()!==''?_0x37e167['menuPath']:null}),_0x1a04c5=Array['isArray'](_0x2f4b34[_0x363001(0xdf)])?_0x2f4b34[_0x363001(0xdf)][_0x363001(0x103)](_0x3a603f=>({'versionTag':typeof _0x3a603f[_0x363001(0xf4)]===_0x363001(0xf6)&&_0x3a603f['versionTag'][_0x363001(0x110)]()!==''?_0x3a603f['versionTag']:null,'complete':_0x3a603f[_0x363001(0x134)]===!![],'pages':Array[_0x363001(0x133)](_0x3a603f['pages'])?_0x3a603f['pages']['map'](_0x5d0a51):[]})):[];return{'datasetId':typeof _0x2f4b34['datasetId']==='number'&&Number[_0x363001(0x152)](_0x2f4b34['datasetId'])?_0x2f4b34[_0x363001(0x11e)]:null,'datasetCode':typeof _0x2f4b34[_0x363001(0x109)]===_0x363001(0xf6)&&_0x2f4b34[_0x363001(0x109)][_0x363001(0x110)]()!==''?_0x2f4b34[_0x363001(0x109)]:_0x45a611,'pageSets':_0x1a04c5,'totalSets':typeof _0x2f4b34['totalSets']===_0x363001(0x14c)&&Number[_0x363001(0x152)](_0x2f4b34['totalSets'])?_0x2f4b34[_0x363001(0x111)]:_0x1a04c5[_0x363001(0xfa)],'completeSets':typeof _0x2f4b34[_0x363001(0x139)]==='number'&&Number['isFinite'](_0x2f4b34[_0x363001(0x139)])?_0x2f4b34[_0x363001(0x139)]:_0x1a04c5[_0x363001(0x14d)](_0x3589ad=>_0x3589ad[_0x363001(0x134)])['length'],'incompleteSets':typeof _0x2f4b34[_0x363001(0x10c)]===_0x363001(0x14c)&&Number[_0x363001(0x152)](_0x2f4b34[_0x363001(0x10c)])?_0x2f4b34[_0x363001(0x10c)]:_0x1a04c5[_0x363001(0x14d)](_0x4b5aaf=>!_0x4b5aaf['complete']&&_0x4b5aaf[_0x363001(0x143)][_0x363001(0xfa)]>0x0)[_0x363001(0xfa)],'residualPages':Array[_0x363001(0x133)](_0x2f4b34[_0x363001(0x12e)])?_0x2f4b34[_0x363001(0x12e)][_0x363001(0x103)](_0x5d0a51):[],'menuPages':Array[_0x363001(0x133)](_0x2f4b34[_0x363001(0x13a)])?_0x2f4b34['menuPages'][_0x363001(0x103)](_0x5d0a51):[],'source':_0x363001(0x145)};}function normalizeRelatedPages(_0x19c407){const _0xd99a82=a115_0x5df5;if(!Array[_0xd99a82(0x133)](_0x19c407))return[];return _0x19c407[_0xd99a82(0x14d)](_0x1f5c4e=>_0x1f5c4e&&typeof _0x1f5c4e===_0xd99a82(0x105))['map'](_0x43171d=>({'id':Number(_0x43171d['id']),'type':_0x43171d['type']?String(_0x43171d['type']):_0xd99a82(0xfb),'code':_0x43171d['code']||undefined,'title':_0x43171d[_0xd99a82(0x115)]||_0x43171d['name']||_0xd99a82(0xd9)+_0x43171d['id'],'deleted':_0x43171d[_0xd99a82(0xe6)]===!![]}))[_0xd99a82(0x14d)](_0x571efc=>Number['isFinite'](_0x571efc['id']));}function ensureAppOwnership(_0x5ba96a,_0x1b8004,_0x52a44f){const _0x112af0=a115_0x5df5;if(!_0x1b8004)return;if(_0x1b8004!==_0x5ba96a)throw CliErrors[_0x112af0(0xf9)](_0x52a44f,_0x112af0(0x158)+CLI_BIN_NAME+_0x112af0(0x131));}function normalizeVersionTag(_0x212a48){const _0xe900f8=a115_0x5df5;return _0x212a48&&_0x212a48[_0xe900f8(0x110)]()!==''?_0x212a48:_0xe900f8(0xf7);}function buildVersionTagHint(_0x547d59){const _0x312c5f=a115_0x5df5,_0x5f382c=_0x547d59[_0x312c5f(0x103)](_0x18f32e=>_0x18f32e==='__EMPTY__'?'<empty>':_0x18f32e)['join'](',\x20');return _0x312c5f(0x137)+_0x5f382c;}
1
+ (function(_0x13f28d,_0x130f96){const _0x335f08=a114_0x74c9,_0x245ef2=_0x13f28d();while(!![]){try{const _0x23c188=-parseInt(_0x335f08(0x175))/0x1*(parseInt(_0x335f08(0x149))/0x2)+-parseInt(_0x335f08(0x17f))/0x3+parseInt(_0x335f08(0x17a))/0x4+parseInt(_0x335f08(0x18d))/0x5+-parseInt(_0x335f08(0x1b7))/0x6+parseInt(_0x335f08(0x17b))/0x7+-parseInt(_0x335f08(0x144))/0x8*(-parseInt(_0x335f08(0x13b))/0x9);if(_0x23c188===_0x130f96)break;else _0x245ef2['push'](_0x245ef2['shift']());}catch(_0x10c551){_0x245ef2['push'](_0x245ef2['shift']());}}}(a114_0x5254,0xf31f8));import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x11b518){const _0xa951ab=a114_0x74c9,_0x402fc7=_0x11b518[_0xa951ab(0x19a)]('id');if(typeof _0x402fc7===_0xa951ab(0x1b9)&&Number['isFinite'](_0x402fc7)&&_0x402fc7>0x0)return _0x402fc7;return undefined;}export function validateDatasetSelector(_0x4b206d){const _0x3a8734=a114_0x74c9,_0x3cc328=Boolean(_0x4b206d[_0x3a8734(0x16c)]('datasetcode')),_0x2a5f6f=Boolean(_0x4b206d['str'](_0x3a8734(0x192)));if(_0x3cc328&&_0x2a5f6f)throw CliErrors[_0x3a8734(0x1b0)](_0x3a8734(0x1bc));if(!_0x3cc328&&!_0x2a5f6f)throw CliErrors[_0x3a8734(0x1b0)](_0x3a8734(0x1ab));}export function validateGenerateOperationSelector(_0x1fbdbd){const _0x3ccae5=a114_0x74c9,_0x3376a8=Boolean(_0x1fbdbd[_0x3ccae5(0x16c)](_0x3ccae5(0x197))),_0x11a5a8=Boolean(_0x1fbdbd[_0x3ccae5(0x16c)](_0x3ccae5(0x171)));if(_0x3376a8&&_0x11a5a8)throw CliErrors[_0x3ccae5(0x1b0)](_0x3ccae5(0x188));if(!_0x3376a8&&!_0x11a5a8)throw CliErrors[_0x3ccae5(0x1b0)](_0x3ccae5(0x169));}export function validatePageTargetSelector(_0xb3a875){const _0x5a12e8=a114_0x74c9,_0x586006=getPageIdFlag(_0xb3a875)!==undefined,_0x5dbb17=Boolean(_0xb3a875[_0x5a12e8(0x16c)](_0x5a12e8(0x152))||_0xb3a875[_0x5a12e8(0x16c)]('alias'));if(_0x586006&&_0x5dbb17)throw CliErrors['validation'](_0x5a12e8(0x148));if(!_0x586006&&!_0x5dbb17)throw CliErrors[_0x5a12e8(0x1b0)](_0x5a12e8(0x1b6));if(_0xb3a875[_0x5a12e8(0x16c)](_0x5a12e8(0x168))&&!_0x5dbb17)throw CliErrors[_0x5a12e8(0x1b0)]('--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.');}export function resolveDatasetCode(_0x434ef0){const _0x37aea4=a114_0x74c9;validateDatasetSelector(_0x434ef0);const _0x470aac=_0x434ef0[_0x37aea4(0x16c)](_0x37aea4(0x152));if(_0x470aac)return _0x470aac;const _0x1dd20c=_0x434ef0['str'](_0x37aea4(0x192)),_0x9f097f=resolveApiFilePath(_0x434ef0[_0x37aea4(0x18a)],_0x434ef0[_0x37aea4(0x156)]),_0x1f1611=resolveAlias(_0x434ef0[_0x37aea4(0x18a)],_0x1dd20c,undefined,_0x9f097f);if(_0x1f1611)return _0x1f1611;const _0x36584c=loadAliasMap(_0x434ef0[_0x37aea4(0x18a)],undefined,_0x9f097f),_0x208b32=_0x36584c[_0x37aea4(0x1a2)]>0x0?_0x37aea4(0x166)+_0x36584c[_0x37aea4(0x1a9)](_0x1668a6=>_0x1668a6[_0x37aea4(0x192)])[_0x37aea4(0x1a5)](',\x20'):_0x37aea4(0x151)+CLI_BIN_NAME+_0x37aea4(0x15e);throw CliErrors[_0x37aea4(0x1b0)](_0x37aea4(0x1ac)+_0x1dd20c+'\x22\x20not\x20found.\x20'+_0x208b32);}function a114_0x74c9(_0xe5b019,_0x4769fe){_0xe5b019=_0xe5b019-0x135;const _0x52544a=a114_0x5254();let _0x74c912=_0x52544a[_0xe5b019];return _0x74c912;}export async function loadDatasetDetailForPage(_0xf139cc){const _0x5c4e5e=a114_0x74c9,_0xaecf47=resolveDatasetCode(_0xf139cc),_0x5c37dc=await getDatasetDetail(_0xaecf47),_0x39ab35=normalizeDatasetDetail(_0x5c37dc,_0xaecf47);return ensureAppOwnership(_0xf139cc[_0x5c4e5e(0x156)],_0x39ab35[_0x5c4e5e(0x156)],_0x5c4e5e(0x143)+_0x39ab35['code']+'\x22\x20belongs\x20to\x20app\x20\x22'+_0x39ab35[_0x5c4e5e(0x156)]+_0x5c4e5e(0x138)+_0xf139cc['appCode']+'\x22.'),_0x39ab35;}export async function loadPageDetailForPage(_0x298d05,_0x9b2968){const _0x3159bd=a114_0x74c9,_0x3a6e2a=await getPageDetail(_0x9b2968),_0x234e4b=normalizePageDetail(_0x3a6e2a);return ensureAppOwnership(_0x298d05[_0x3159bd(0x156)],_0x234e4b['appCode'],'Page\x20\x22'+_0x9b2968+_0x3159bd(0x18f)+_0x234e4b[_0x3159bd(0x156)]+_0x3159bd(0x138)+_0x298d05['appCode']+'\x22.'),_0x234e4b;}export function getUndeletedRelatedPages(_0x40c842){const _0x20f159=a114_0x74c9;return _0x40c842['relatedPages'][_0x20f159(0x14e)](_0x55d95d=>!_0x55d95d[_0x20f159(0x1b1)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x475c8a,_0x2d549a){const _0x7530f0=a114_0x74c9,_0x35ca48=_0x2d549a?.[_0x7530f0(0x156)]&&_0x2d549a[_0x7530f0(0x156)][_0x7530f0(0x199)]()!==''?_0x7530f0(0x185)+_0x2d549a['appCode']:'',_0x29c902=_0x2d549a?.[_0x7530f0(0x182)]&&_0x2d549a[_0x7530f0(0x182)][_0x7530f0(0x199)]()!==''?'\x20--operation-id\x20'+_0x2d549a[_0x7530f0(0x182)]:_0x2d549a?.[_0x7530f0(0x173)]&&_0x2d549a['clientOperationId'][_0x7530f0(0x199)]()!==''?'\x20--client-operation-id\x20'+_0x2d549a[_0x7530f0(0x173)]:'';return CLI_BIN_NAME+_0x7530f0(0x179)+_0x475c8a+_0x35ca48+_0x29c902+_0x7530f0(0x1ba);}export function createPageGenerateClientOperationId(){const _0x32db86=a114_0x74c9;return _0x32db86(0x176)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x37ef0b,_0x2380a3){const _0x5b2b90=a114_0x74c9,_0x2c21a0=_0x2380a3&&_0x2380a3['trim']()!==''?_0x5b2b90(0x185)+_0x2380a3:'';return CLI_BIN_NAME+_0x5b2b90(0x198)+_0x37ef0b+_0x2c21a0+'\x20--format\x20json';}export function prepareDatasetAction(_0x26a488,_0x3e37cf){const _0x899180=a114_0x74c9,_0x29b6fc=getUndeletedRelatedPages(_0x26a488);if(_0x3e37cf===_0x899180(0x1a3)&&_0x29b6fc[_0x899180(0x1a2)]>0x0)throw CliErrors['validation'](_0x899180(0x143)+_0x26a488[_0x899180(0x15a)]+_0x899180(0x196),'Run\x20`'+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x26a488['code']+_0x899180(0x145));if(_0x3e37cf===_0x899180(0x186)&&_0x29b6fc['length']===0x0)throw CliErrors[_0x899180(0x1b0)](_0x899180(0x143)+_0x26a488[_0x899180(0x15a)]+_0x899180(0x1a8),_0x899180(0x151)+CLI_BIN_NAME+_0x899180(0x153)+_0x26a488[_0x899180(0x15a)]+_0x899180(0x184)+CLI_BIN_NAME+_0x899180(0x179)+_0x26a488[_0x899180(0x15a)]+_0x899180(0x1a0));return{'dataset':_0x26a488,'undeletedPages':_0x29b6fc};}export function prepareGenerateDatasetAction(_0x1b73f1,_0x24eae5){const _0x8639c3=a114_0x74c9,_0x33eb20=getUndeletedRelatedPages(_0x1b73f1);if(!_0x24eae5){if(_0x33eb20[_0x8639c3(0x1a2)]>0x0)throw CliErrors['validation'](_0x8639c3(0x143)+_0x1b73f1['code']+'\x22\x20already\x20has\x20undeleted\x20related\x20pages.',_0x8639c3(0x151)+CLI_BIN_NAME+_0x8639c3(0x14c)+_0x1b73f1[_0x8639c3(0x15a)]+_0x8639c3(0x145));return{'dataset':_0x1b73f1,'undeletedPages':_0x33eb20,'standardPageStatus':null};}const _0x233a03=_0x24eae5[_0x8639c3(0x19f)],_0x3f1ca3=_0x24eae5['incompleteSets'],_0x26dd0c=_0x24eae5['residualPages']['length'];if(_0x233a03===0x0&&_0x3f1ca3===0x0&&_0x26dd0c===0x0)return{'dataset':_0x1b73f1,'undeletedPages':_0x33eb20,'standardPageStatus':_0x24eae5};if(_0x233a03===0x1&&_0x3f1ca3===0x0&&_0x26dd0c===0x0)throw CliErrors[_0x8639c3(0x1b0)](_0x8639c3(0x143)+_0x1b73f1[_0x8639c3(0x15a)]+_0x8639c3(0x13c),_0x8639c3(0x151)+CLI_BIN_NAME+_0x8639c3(0x14c)+_0x1b73f1[_0x8639c3(0x15a)]+_0x8639c3(0x145));throw CliErrors[_0x8639c3(0x1b0)](_0x8639c3(0x143)+_0x1b73f1[_0x8639c3(0x15a)]+'\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.',_0x8639c3(0x17c));}export function assessStandardPageState(_0x3dbf9f,_0x27180d,_0x3963ff){const _0x33dfe9=a114_0x74c9,_0x573c82=_0x3963ff?.[_0x33dfe9(0x159)]??_0x33dfe9(0x1af),_0xb76c99=_0x3963ff?.[_0x33dfe9(0x16b)]??[];if(!_0x27180d){if(_0xb76c99[_0x33dfe9(0x1a2)]>0x0)return{'status':_0x33dfe9(0x150),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x33dfe9(0x143)+_0x3dbf9f+'\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','nextAction':_0x33dfe9(0x1a1)};return{'status':_0x33dfe9(0x190),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x33dfe9(0x143)+_0x3dbf9f+_0x33dfe9(0x157),'nextAction':_0x33dfe9(0x177)};}const _0x1029d9=_0x27180d[_0x33dfe9(0x19f)],_0x4f12b5=_0x27180d[_0x33dfe9(0x1aa)],_0x436f04=_0x27180d[_0x33dfe9(0x1ad)][_0x33dfe9(0x1a2)];if(_0x1029d9===0x0&&_0x4f12b5===0x0&&_0x436f04===0x0)return{'status':_0x33dfe9(0x190),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x33dfe9(0x143)+_0x3dbf9f+_0x33dfe9(0x157),'nextAction':'run_generate_start'};if(_0x1029d9>0x1)return{'status':_0x33dfe9(0x189),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x33dfe9(0x143)+_0x3dbf9f+_0x33dfe9(0x163),'nextAction':'manual_resolution_required'};if(_0x4f12b5>0x0)return{'status':_0x33dfe9(0x150),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x3dbf9f+_0x33dfe9(0x181),'nextAction':'manual_resolution_required'};if(_0x1029d9===0x1&&_0x436f04>0x0)return{'status':_0x33dfe9(0x161),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x33dfe9(0x143)+_0x3dbf9f+_0x33dfe9(0x17e),'nextAction':'manual_resolution_required'};if(_0x1029d9===0x1)return{'status':_0x573c82,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x573c82===_0x33dfe9(0x142)?_0x33dfe9(0x143)+_0x3dbf9f+_0x33dfe9(0x154):_0x33dfe9(0x143)+_0x3dbf9f+_0x33dfe9(0x13c),'nextAction':_0x573c82==='generated_complete_set'?undefined:_0x33dfe9(0x1b2)};return{'status':'unknown_reconcile_failed','allowGenerate':![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x3dbf9f+_0x33dfe9(0x16f),'nextAction':_0x33dfe9(0x135)};}export function assessGenerateOperationState(_0x2550bf,_0x14b4b9,_0x3add65){const _0x48136f=a114_0x74c9,_0x928f6=String(_0x14b4b9||'')[_0x48136f(0x199)]()[_0x48136f(0x167)]();if(_0x928f6==='PENDING')return{'status':_0x48136f(0x139),'manualResolutionRequired':![],'message':'Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22'+_0x2550bf+'\x22.','nextAction':_0x48136f(0x135)};if(_0x928f6===_0x48136f(0x18b)||_0x928f6===_0x48136f(0x18c)||_0x928f6===_0x48136f(0x13d))return{'status':'operation_running','manualResolutionRequired':![],'message':_0x48136f(0x13f)+_0x2550bf+'\x22.','nextAction':_0x48136f(0x135)};if(_0x928f6===_0x48136f(0x13a)||_0x928f6===_0x48136f(0x194)){if(!_0x3add65)return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x48136f(0x1a7)+_0x2550bf+_0x48136f(0x15f),'nextAction':_0x48136f(0x135)};const _0x574f15=assessStandardPageState(_0x2550bf,_0x3add65,{'successStatus':'generated_complete_set'});if(_0x574f15[_0x48136f(0x170)]==='no_standard_pages_found')return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x48136f(0x1a7)+_0x2550bf+_0x48136f(0x180),'nextAction':_0x48136f(0x135)};return _0x574f15;}if(_0x928f6===_0x48136f(0x183)||_0x928f6===_0x48136f(0x1a6)||_0x928f6==='')return{'status':_0x48136f(0x16d),'manualResolutionRequired':![],'message':_0x48136f(0x15b)+_0x2550bf+'\x22.','nextAction':_0x48136f(0x135)};return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x48136f(0x143)+_0x2550bf+_0x48136f(0x164)+_0x928f6+'\x22.','nextAction':_0x48136f(0x135)};}export function normalizePageDetail(_0x5ca451){const _0x333fc9=a114_0x74c9;return{'pageId':Number(_0x5ca451[_0x333fc9(0x140)]),'appCode':_0x5ca451[_0x333fc9(0x156)],'name':_0x5ca451[_0x333fc9(0x18e)]||'page-'+_0x5ca451['pageId'],'code':_0x5ca451[_0x333fc9(0x15a)]||'','type':_0x5ca451[_0x333fc9(0x14a)]?String(_0x5ca451[_0x333fc9(0x14a)]):'UNKNOWN','datasetIds':Array[_0x333fc9(0x15c)](_0x5ca451[_0x333fc9(0x191)])?_0x5ca451['datasetIds'][_0x333fc9(0x1a9)](_0x2b15fc=>Number(_0x2b15fc))[_0x333fc9(0x14e)](_0xa29dc0=>Number[_0x333fc9(0x14b)](_0xa29dc0)):[],'pageVersion':_0x5ca451[_0x333fc9(0x1b4)]&&typeof _0x5ca451[_0x333fc9(0x1b4)][_0x333fc9(0x193)]===_0x333fc9(0x1b9)?_0x5ca451[_0x333fc9(0x1b4)][_0x333fc9(0x193)]:null,'versionTag':_0x5ca451['config']&&typeof _0x5ca451[_0x333fc9(0x1b4)][_0x333fc9(0x146)]===_0x333fc9(0x15d)&&_0x5ca451['config'][_0x333fc9(0x146)]['trim']()!==''?_0x5ca451[_0x333fc9(0x1b4)][_0x333fc9(0x146)]:null,'relatedPages':normalizeRelatedPages(_0x5ca451[_0x333fc9(0x14d)]),'raw':_0x5ca451};}export function serializeDryRunDescription(_0x1e1b7f){const _0x46e6cf=a114_0x74c9;return JSON[_0x46e6cf(0x158)](_0x1e1b7f,null,0x2);}export async function loadStandardPageStatusForGenerate(_0xa52e2e,_0x3b5d0c){const _0x4a57a2=a114_0x74c9,_0x5b3d69=await tryGetStandardPageStatus(_0xa52e2e[_0x4a57a2(0x156)],_0x3b5d0c);if(!_0x5b3d69)return null;return normalizeStandardPageStatus(_0x5b3d69,_0x3b5d0c);}export function selectVersionTagGroup(_0x2b6a4f,_0x1989b1,_0x23eb66){const _0x35fa0e=a114_0x74c9,_0x1a1617=new Map();for(const _0x2125f7 of _0x2b6a4f){const _0x378763=normalizeVersionTag(_0x1989b1(_0x2125f7)),_0x1c3c98=_0x1a1617[_0x35fa0e(0x160)](_0x378763)??[];_0x1c3c98[_0x35fa0e(0x172)](_0x2125f7),_0x1a1617['set'](_0x378763,_0x1c3c98);}const _0x325224=Array['from'](_0x1a1617[_0x35fa0e(0x155)]());if(_0x325224[_0x35fa0e(0x1a2)]<=0x1&&!_0x23eb66)return{'items':_0x2b6a4f,'availableTags':_0x325224};if(_0x23eb66){const _0x9584e5=normalizeVersionTag(_0x23eb66),_0x279379=_0x1a1617[_0x35fa0e(0x160)](_0x9584e5);if(!_0x279379)throw CliErrors[_0x35fa0e(0x1b0)]('Version\x20tag\x20\x22'+_0x23eb66+_0x35fa0e(0x141),buildVersionTagHint(_0x325224));return{'items':_0x279379,'availableTags':_0x325224};}throw CliErrors[_0x35fa0e(0x1b0)]('Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.',buildVersionTagHint(_0x325224));}function a114_0x5254(){const _0x17f5b3=['isFinite','\x20page\x20sync\x20--datasetcode\x20','relatedPageInfoList','filter','menuPath','blocked_incomplete_sets','Run\x20`','datasetcode','\x20page\x20generate-start\x20--datasetcode\x20','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','keys','appCode','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','stringify','successStatus','code','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','isArray','string','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','get','blocked_complete_plus_residual_sets','complete','\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','__EMPTY__','Available\x20aliases:\x20','toUpperCase','version-tag','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','datasetId','fallbackUndeletedPages','str','operation_failed','datasetCode','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','status','client-operation-id','push','clientOperationId','dataset','1XjdDOo','page-generate-','run_generate_start','<empty>','\x20page\x20generate-status\x20--datasetcode\x20','2035380bxLbLW','10856734FDBxnz','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','UNKNOWN','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','5791233TqxrGf','\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','operationId','FAILED','`\x20first,\x20then\x20poll\x20`','\x20--appcode\x20','sync','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.','blocked_multiple_complete_sets','apiDir','RUNNING','RETRYING','1804610zRHIfK','name','\x22\x20belongs\x20to\x20app\x20\x22','no_standard_pages_found','datasetIds','alias','pageVersion','PARTIAL_SUCCESS','standard-page-status','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','operation-id','\x20page\x20standard-page-status\x20--datasetcode\x20','trim','flag','modelCode','totalSets','pageSets','title','completeSets','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','manual_resolution_required','length','generate','page-','join','CANCELLED','Operation\x20finished\x20for\x20dataset\x20\x22','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','map','incompleteSets','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','Alias\x20\x22','residualPages','fields','already_exists_complete_set','validation','deleted','run_sync','menuPages','config','menuVisible','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','7163610MqMQlr','Switch\x20app\x20with\x20`','number','\x20--format\x20json','boolean','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','query_operation_status','hasMenu','pages','\x22,\x20not\x20current\x20app\x20\x22','operation_pending','SUCCESS','1395018DHHatb','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','CANCELING','properties','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','pageId','\x22\x20not\x20found.','generated_complete_set','Dataset\x20\x22','88XhoAnR','`\x20instead.','versionTag','modelId','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','11146kJHAPJ','type'];a114_0x5254=function(){return _0x17f5b3;};return a114_0x5254();}function normalizeDatasetDetail(_0xe15213,_0x410541){const _0x500872=a114_0x74c9,_0x369042=Array[_0x500872(0x15c)](_0xe15213[_0x500872(0x1ae)])?_0xe15213[_0x500872(0x1ae)]:Array[_0x500872(0x15c)](_0xe15213[_0x500872(0x13e)])?_0xe15213[_0x500872(0x13e)]:[];return{'id':Number(_0xe15213['id']??_0xe15213[_0x500872(0x147)]??0x0),'code':String(_0xe15213[_0x500872(0x15a)]||_0xe15213[_0x500872(0x19b)]||_0x410541),'name':String(_0xe15213['name']||_0x410541),'appCode':_0xe15213['appCode']||_0xe15213[_0x500872(0x174)]?.['appCode'],'fieldCount':_0x369042[_0x500872(0x1a2)],'relatedPages':normalizeRelatedPages(_0xe15213['relatedPageInfoList']),'raw':_0xe15213};}function normalizeStandardPageStatus(_0x33207a,_0x590283){const _0x527447=a114_0x74c9,_0x27582d=_0x125356=>({'pageId':Number(_0x125356[_0x527447(0x140)]??_0x125356['id']??0x0),'title':String(_0x125356[_0x527447(0x19e)]||_0x125356[_0x527447(0x18e)]||_0x527447(0x1a4)+(_0x125356[_0x527447(0x140)]??_0x125356['id']??'unknown')),'type':_0x125356[_0x527447(0x14a)]?String(_0x125356['type']):_0x527447(0x17d),'deleted':_0x125356['deleted']===!![],'hasMenu':_0x125356[_0x527447(0x136)]===!![],'menuVisible':typeof _0x125356['menuVisible']===_0x527447(0x1bb)?_0x125356[_0x527447(0x1b5)]:null,'menuPath':typeof _0x125356[_0x527447(0x14f)]===_0x527447(0x15d)&&_0x125356['menuPath']['trim']()!==''?_0x125356['menuPath']:null}),_0x2de02b=Array[_0x527447(0x15c)](_0x33207a[_0x527447(0x19d)])?_0x33207a['pageSets']['map'](_0x77d70=>({'versionTag':typeof _0x77d70['versionTag']===_0x527447(0x15d)&&_0x77d70[_0x527447(0x146)][_0x527447(0x199)]()!==''?_0x77d70[_0x527447(0x146)]:null,'complete':_0x77d70[_0x527447(0x162)]===!![],'pages':Array['isArray'](_0x77d70[_0x527447(0x137)])?_0x77d70[_0x527447(0x137)][_0x527447(0x1a9)](_0x27582d):[]})):[];return{'datasetId':typeof _0x33207a['datasetId']===_0x527447(0x1b9)&&Number['isFinite'](_0x33207a[_0x527447(0x16a)])?_0x33207a['datasetId']:null,'datasetCode':typeof _0x33207a[_0x527447(0x16e)]===_0x527447(0x15d)&&_0x33207a['datasetCode'][_0x527447(0x199)]()!==''?_0x33207a[_0x527447(0x16e)]:_0x590283,'pageSets':_0x2de02b,'totalSets':typeof _0x33207a[_0x527447(0x19c)]===_0x527447(0x1b9)&&Number['isFinite'](_0x33207a[_0x527447(0x19c)])?_0x33207a[_0x527447(0x19c)]:_0x2de02b[_0x527447(0x1a2)],'completeSets':typeof _0x33207a[_0x527447(0x19f)]===_0x527447(0x1b9)&&Number[_0x527447(0x14b)](_0x33207a[_0x527447(0x19f)])?_0x33207a[_0x527447(0x19f)]:_0x2de02b['filter'](_0x2afb2f=>_0x2afb2f[_0x527447(0x162)])[_0x527447(0x1a2)],'incompleteSets':typeof _0x33207a[_0x527447(0x1aa)]==='number'&&Number[_0x527447(0x14b)](_0x33207a[_0x527447(0x1aa)])?_0x33207a[_0x527447(0x1aa)]:_0x2de02b[_0x527447(0x14e)](_0x505726=>!_0x505726[_0x527447(0x162)]&&_0x505726[_0x527447(0x137)][_0x527447(0x1a2)]>0x0)['length'],'residualPages':Array[_0x527447(0x15c)](_0x33207a[_0x527447(0x1ad)])?_0x33207a[_0x527447(0x1ad)][_0x527447(0x1a9)](_0x27582d):[],'menuPages':Array['isArray'](_0x33207a[_0x527447(0x1b3)])?_0x33207a[_0x527447(0x1b3)][_0x527447(0x1a9)](_0x27582d):[],'source':_0x527447(0x195)};}function normalizeRelatedPages(_0x54b084){const _0x4dc797=a114_0x74c9;if(!Array['isArray'](_0x54b084))return[];return _0x54b084['filter'](_0x46494a=>_0x46494a&&typeof _0x46494a==='object')[_0x4dc797(0x1a9)](_0x178988=>({'id':Number(_0x178988['id']),'type':_0x178988[_0x4dc797(0x14a)]?String(_0x178988[_0x4dc797(0x14a)]):_0x4dc797(0x17d),'code':_0x178988[_0x4dc797(0x15a)]||undefined,'title':_0x178988[_0x4dc797(0x19e)]||_0x178988['name']||'page-'+_0x178988['id'],'deleted':_0x178988[_0x4dc797(0x1b1)]===!![]}))[_0x4dc797(0x14e)](_0x203b96=>Number[_0x4dc797(0x14b)](_0x203b96['id']));}function ensureAppOwnership(_0x2c2538,_0x18c00d,_0x49a26b){const _0x17cc41=a114_0x74c9;if(!_0x18c00d)return;if(_0x18c00d!==_0x2c2538)throw CliErrors[_0x17cc41(0x1b0)](_0x49a26b,_0x17cc41(0x1b8)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`\x20or\x20pass\x20--appcode.');}function normalizeVersionTag(_0x1d0f8d){const _0x2fb329=a114_0x74c9;return _0x1d0f8d&&_0x1d0f8d[_0x2fb329(0x199)]()!==''?_0x1d0f8d:_0x2fb329(0x165);}function buildVersionTagHint(_0x39271a){const _0xb4fe99=a114_0x74c9,_0x59eb79=_0x39271a[_0xb4fe99(0x1a9)](_0x534c6d=>_0x534c6d===_0xb4fe99(0x165)?_0xb4fe99(0x178):_0x534c6d)['join'](',\x20');return _0xb4fe99(0x187)+_0x59eb79;}
@@ -1 +1 @@
1
- const a116_0xacdd83=a116_0x4588;(function(_0x4e1c4c,_0x581555){const _0x311cc6=a116_0x4588,_0x555e98=_0x4e1c4c();while(!![]){try{const _0xe8b004=parseInt(_0x311cc6(0xbc))/0x1*(-parseInt(_0x311cc6(0xcd))/0x2)+parseInt(_0x311cc6(0xcb))/0x3*(parseInt(_0x311cc6(0xbf))/0x4)+parseInt(_0x311cc6(0xca))/0x5*(-parseInt(_0x311cc6(0xb2))/0x6)+-parseInt(_0x311cc6(0xb6))/0x7*(-parseInt(_0x311cc6(0xce))/0x8)+parseInt(_0x311cc6(0xc9))/0x9*(parseInt(_0x311cc6(0xc3))/0xa)+-parseInt(_0x311cc6(0xb7))/0xb*(parseInt(_0x311cc6(0xc5))/0xc)+parseInt(_0x311cc6(0xc0))/0xd*(parseInt(_0x311cc6(0xc6))/0xe);if(_0xe8b004===_0x581555)break;else _0x555e98['push'](_0x555e98['shift']());}catch(_0x16ca32){_0x555e98['push'](_0x555e98['shift']());}}}(a116_0x46ca,0x474e1));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a116_0x4588(_0x2d2bf8,_0x463f16){_0x2d2bf8=_0x2d2bf8-0xb1;const _0x46ca80=a116_0x46ca();let _0x4588ca=_0x46ca80[_0x2d2bf8];return _0x4588ca;}import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a116_0x46ca(){const _0x330cce=['code','source','7DYJTEB','11GSHfGq','nextAction','GET','/standard-page-status?appCode=','alias','238742fZvDBr','standard-page-status','length','4NEOwBb','10616775leTFMD','string','query-standard-page-status','2770TzrxBl','relatedPages','6794664FnWlzp','14mHNiNh','name','status','18351RSNaTj','1382735IzEyEq','450057ZnzQaK','read','2ucjlpA','949008BARQPT','manualResolutionRequired','12oKhREZ','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset'];a116_0x46ca=function(){return _0x330cce;};return a116_0x46ca();}export const pageStandardPageStatus={'service':'page','command':a116_0xacdd83(0xbd),'description':a116_0xacdd83(0xb3),'risk':a116_0xacdd83(0xcc),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a116_0xacdd83(0xbb),'type':a116_0xacdd83(0xc1),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x32ecf0){validateDatasetSelector(_0x32ecf0);},async 'dryRun'(_0x1483d7){const _0x56209f=a116_0xacdd83,_0x47b58b=await loadDatasetDetailForPage(_0x1483d7);return{'method':_0x56209f(0xb9),'url':'/smartapi/lovrabet/dataset/'+_0x47b58b[_0x56209f(0xb4)]+_0x56209f(0xba)+encodeURIComponent(_0x1483d7['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x47b58b['id'],'code':_0x47b58b[_0x56209f(0xb4)],'name':_0x47b58b[_0x56209f(0xc7)]},'action':_0x56209f(0xc2)})};},async 'execute'(_0x263e42){const _0x25726c=a116_0xacdd83,_0xceef64=await loadDatasetDetailForPage(_0x263e42),_0x35c804=await loadStandardPageStatusForGenerate(_0x263e42,_0xceef64[_0x25726c(0xb4)]),_0x3743e6=getUndeletedRelatedPages(_0xceef64),_0x363bda=assessStandardPageState(_0xceef64[_0x25726c(0xb4)],_0x35c804,{'fallbackUndeletedPages':_0x3743e6});return{'ok':!![],'data':{'datasetCode':_0xceef64['code'],'precheckSource':_0x35c804?.[_0x25726c(0xb5)]??'related-pages-fallback','status':_0x363bda[_0x25726c(0xc8)],'manualResolutionRequired':_0x363bda[_0x25726c(0xb1)],'nextAction':_0x363bda[_0x25726c(0xb8)],'standardPageStatus':_0x35c804,'relatedPages':{'total':_0xceef64[_0x25726c(0xc4)]['length'],'undeletedCount':_0x3743e6[_0x25726c(0xbe)]}}};}};
1
+ const a115_0x5e9194=a115_0x4179;(function(_0x49d29f,_0x152e02){const _0x508280=a115_0x4179,_0x20610b=_0x49d29f();while(!![]){try{const _0x557c3a=parseInt(_0x508280(0x19b))/0x1+parseInt(_0x508280(0x199))/0x2*(parseInt(_0x508280(0x192))/0x3)+-parseInt(_0x508280(0x194))/0x4+-parseInt(_0x508280(0x195))/0x5+parseInt(_0x508280(0x193))/0x6*(parseInt(_0x508280(0x18b))/0x7)+parseInt(_0x508280(0x191))/0x8+-parseInt(_0x508280(0x18e))/0x9;if(_0x557c3a===_0x152e02)break;else _0x20610b['push'](_0x20610b['shift']());}catch(_0xbdf2e4){_0x20610b['push'](_0x20610b['shift']());}}}(a115_0x5b03,0xe5e89));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a115_0x4179(_0x4339ce,_0x537bf9){_0x4339ce=_0x4339ce-0x187;const _0x5b03b6=a115_0x5b03();let _0x417963=_0x5b03b6[_0x4339ce];return _0x417963;}import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a115_0x5e9194(0x1a0),'command':a115_0x5e9194(0x1a2),'description':a115_0x5e9194(0x1a1),'risk':a115_0x5e9194(0x18f),'defaultOutputFormat':a115_0x5e9194(0x18a),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a115_0x5e9194(0x19d),'type':a115_0x5e9194(0x19e),'description':a115_0x5e9194(0x18d)}],async 'validate'(_0x1c70db){validateDatasetSelector(_0x1c70db);},async 'dryRun'(_0x3a9d5d){const _0x333415=a115_0x5e9194,_0x1aeb21=await loadDatasetDetailForPage(_0x3a9d5d);return{'method':_0x333415(0x196),'url':_0x333415(0x19c)+_0x1aeb21[_0x333415(0x188)]+_0x333415(0x19a)+encodeURIComponent(_0x3a9d5d[_0x333415(0x190)]),'description':serializeDryRunDescription({'dataset':{'id':_0x1aeb21['id'],'code':_0x1aeb21['code'],'name':_0x1aeb21[_0x333415(0x187)]},'action':_0x333415(0x197)})};},async 'execute'(_0x1bfa50){const _0x59232f=a115_0x5e9194,_0x36b9ee=await loadDatasetDetailForPage(_0x1bfa50),_0x538142=await loadStandardPageStatusForGenerate(_0x1bfa50,_0x36b9ee[_0x59232f(0x188)]),_0x5244c9=getUndeletedRelatedPages(_0x36b9ee),_0x7c6b56=assessStandardPageState(_0x36b9ee[_0x59232f(0x188)],_0x538142,{'fallbackUndeletedPages':_0x5244c9});return{'ok':!![],'data':{'datasetCode':_0x36b9ee[_0x59232f(0x188)],'precheckSource':_0x538142?.[_0x59232f(0x189)]??_0x59232f(0x198),'status':_0x7c6b56[_0x59232f(0x19f)],'manualResolutionRequired':_0x7c6b56['manualResolutionRequired'],'nextAction':_0x7c6b56['nextAction'],'standardPageStatus':_0x538142,'relatedPages':{'total':_0x36b9ee['relatedPages'][_0x59232f(0x18c)],'undeletedCount':_0x5244c9[_0x59232f(0x18c)]}}};}};function a115_0x5b03(){const _0x12ee5e=['appCode','3555776LBpgEn','54wQWTaj','24cCnidn','5007920eADSkO','8042270ElsyAs','GET','query-standard-page-status','related-pages-fallback','163304LDUrjI','/standard-page-status?appCode=','597874DReoxC','/smartapi/lovrabet/dataset/','alias','string','status','page','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','standard-page-status','name','code','source','compress','2927393qNDrOg','length','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','3444651qOkUnw','read'];a115_0x5b03=function(){return _0x12ee5e;};return a115_0x5b03();}
@@ -1 +1 @@
1
- const a117_0x28aa9e=a117_0x4dd0;(function(_0x1c020e,_0x2e21f8){const _0x48880a=a117_0x4dd0,_0x37abe6=_0x1c020e();while(!![]){try{const _0x1a5834=-parseInt(_0x48880a(0x12b))/0x1*(parseInt(_0x48880a(0x138))/0x2)+parseInt(_0x48880a(0x134))/0x3+parseInt(_0x48880a(0x13c))/0x4*(parseInt(_0x48880a(0x129))/0x5)+-parseInt(_0x48880a(0x13a))/0x6*(-parseInt(_0x48880a(0x12a))/0x7)+parseInt(_0x48880a(0x12f))/0x8+parseInt(_0x48880a(0x12e))/0x9+parseInt(_0x48880a(0x121))/0xa*(-parseInt(_0x48880a(0x133))/0xb);if(_0x1a5834===_0x2e21f8)break;else _0x37abe6['push'](_0x37abe6['shift']());}catch(_0x2e0919){_0x37abe6['push'](_0x37abe6['shift']());}}}(a117_0x2afd,0xa6a7e));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a117_0x4dd0(_0x28e559,_0x16a9be){_0x28e559=_0x28e559-0x11f;const _0x2afd34=a117_0x2afd();let _0x4dd00c=_0x2afd34[_0x28e559];return _0x4dd00c;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':'page','command':a117_0x28aa9e(0x13d),'description':a117_0x28aa9e(0x124),'risk':a117_0x28aa9e(0x13b),'defaultOutputFormat':a117_0x28aa9e(0x125),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a117_0x28aa9e(0x128),'type':a117_0x28aa9e(0x11f),'description':a117_0x28aa9e(0x131)}],async 'validate'(_0x3abe18){validateDatasetSelector(_0x3abe18);},async 'dryRun'(_0x57580d){const _0x2ee4fc=a117_0x28aa9e,_0x2f648f=await prepare(_0x57580d);return{'method':_0x2ee4fc(0x136),'url':_0x2ee4fc(0x139)+_0x2f648f[_0x2ee4fc(0x12d)][_0x2ee4fc(0x132)]+_0x2ee4fc(0x127),'body':{'appCode':_0x57580d[_0x2ee4fc(0x120)]},'description':serializeDryRunDescription({'dataset':{'id':_0x2f648f['dataset']['id'],'code':_0x2f648f[_0x2ee4fc(0x12d)][_0x2ee4fc(0x132)],'name':_0x2f648f[_0x2ee4fc(0x12d)][_0x2ee4fc(0x122)],'fieldCount':_0x2f648f[_0x2ee4fc(0x12d)]['fieldCount']},'relatedPages':{'total':_0x2f648f[_0x2ee4fc(0x12d)]['relatedPages'][_0x2ee4fc(0x123)],'undeletedCount':_0x2f648f[_0x2ee4fc(0x135)][_0x2ee4fc(0x123)]},'action':_0x2ee4fc(0x13d),'reason':_0x2f648f['undeletedPages'][_0x2ee4fc(0x123)]+_0x2ee4fc(0x126)})};},async 'execute'(_0x12aa0d){const _0x544ca9=a117_0x28aa9e,_0x456aac=await prepare(_0x12aa0d),_0x1afa9a=await syncStandardPages(_0x12aa0d[_0x544ca9(0x120)],_0x456aac[_0x544ca9(0x12d)][_0x544ca9(0x132)]),_0x2cebb3=Array['isArray'](_0x1afa9a['failedPages'])&&_0x1afa9a[_0x544ca9(0x137)][_0x544ca9(0x123)]>0x0,_0x450c2e=_0x2cebb3?_0x544ca9(0x12c):_0x544ca9(0x130);return{'ok':!![],'message':_0x450c2e,'data':{'datasetCode':_0x456aac['dataset'][_0x544ca9(0x132)],..._0x1afa9a}};}};function a117_0x2afd(){const _0x2f72db=['9781680lRdMpW','同步成功','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','code','32959289xeaKsk','3527520STfosM','undeletedPages','POST','failedPages','1996578BGyYsM','/smartapi/lovrabet/dataset/','2946jueebR','write','8108IbWViH','sync','string','appCode','10ZCBiAW','name','length','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','compress','\x20undeleted\x20related\x20page(s)\x20found','/sync-to-pages','alias','3035SQDfqL','2289NqYMiC','1SLEmou','部分页面同步失败','dataset','7989426RzFJWQ'];a117_0x2afd=function(){return _0x2f72db;};return a117_0x2afd();}async function prepare(_0x516190){const _0x20be6d=a117_0x28aa9e,_0x14f597=await loadDatasetDetailForPage(_0x516190);return prepareDatasetAction(_0x14f597,_0x20be6d(0x13d));}
1
+ const a116_0x1eef9e=a116_0x523f;function a116_0x523f(_0xcd8c8a,_0x51f660){_0xcd8c8a=_0xcd8c8a-0x178;const _0x439459=a116_0x4394();let _0x523ff3=_0x439459[_0xcd8c8a];return _0x523ff3;}(function(_0x4d2cbc,_0x2fadc5){const _0x179975=a116_0x523f,_0x2fce86=_0x4d2cbc();while(!![]){try{const _0x27bd8d=parseInt(_0x179975(0x194))/0x1*(-parseInt(_0x179975(0x184))/0x2)+-parseInt(_0x179975(0x17c))/0x3*(parseInt(_0x179975(0x189))/0x4)+parseInt(_0x179975(0x17e))/0x5+-parseInt(_0x179975(0x18c))/0x6+parseInt(_0x179975(0x190))/0x7*(parseInt(_0x179975(0x17a))/0x8)+-parseInt(_0x179975(0x188))/0x9+-parseInt(_0x179975(0x18b))/0xa*(-parseInt(_0x179975(0x18a))/0xb);if(_0x27bd8d===_0x2fadc5)break;else _0x2fce86['push'](_0x2fce86['shift']());}catch(_0x2ea3f3){_0x2fce86['push'](_0x2fce86['shift']());}}}(a116_0x4394,0xc8f11));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a116_0x4394(){const _0x480821=['fieldCount','\x20undeleted\x20related\x20page(s)\x20found','name','部分页面同步失败','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','2110BOIFLE','write','POST','同步成功','12423474foxMhS','648888cEgLyt','11RskOXK','27000260igjzgQ','437508fSKRDB','compress','string','/sync-to-pages','847lJuJAb','dataset','code','isArray','1409dfGVbj','appCode','sync','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','4040fDmTii','page','9PXnFEX','length','7441955XWNSzp'];a116_0x4394=function(){return _0x480821;};return a116_0x4394();}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a116_0x1eef9e(0x17b),'command':a116_0x1eef9e(0x178),'description':a116_0x1eef9e(0x183),'risk':a116_0x1eef9e(0x185),'defaultOutputFormat':a116_0x1eef9e(0x18d),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a116_0x1eef9e(0x18e),'description':a116_0x1eef9e(0x179)}],async 'validate'(_0xe94e02){validateDatasetSelector(_0xe94e02);},async 'dryRun'(_0xcabdba){const _0x4aac2d=a116_0x1eef9e,_0x282e42=await prepare(_0xcabdba);return{'method':_0x4aac2d(0x186),'url':'/smartapi/lovrabet/dataset/'+_0x282e42[_0x4aac2d(0x191)]['code']+_0x4aac2d(0x18f),'body':{'appCode':_0xcabdba[_0x4aac2d(0x195)]},'description':serializeDryRunDescription({'dataset':{'id':_0x282e42[_0x4aac2d(0x191)]['id'],'code':_0x282e42[_0x4aac2d(0x191)][_0x4aac2d(0x192)],'name':_0x282e42['dataset'][_0x4aac2d(0x181)],'fieldCount':_0x282e42['dataset'][_0x4aac2d(0x17f)]},'relatedPages':{'total':_0x282e42['dataset']['relatedPages']['length'],'undeletedCount':_0x282e42['undeletedPages']['length']},'action':_0x4aac2d(0x178),'reason':_0x282e42['undeletedPages'][_0x4aac2d(0x17d)]+_0x4aac2d(0x180)})};},async 'execute'(_0x5ecf75){const _0x4b98b0=a116_0x1eef9e,_0x18e840=await prepare(_0x5ecf75),_0x1cd83=await syncStandardPages(_0x5ecf75[_0x4b98b0(0x195)],_0x18e840[_0x4b98b0(0x191)][_0x4b98b0(0x192)]),_0xc277da=Array[_0x4b98b0(0x193)](_0x1cd83['failedPages'])&&_0x1cd83['failedPages'][_0x4b98b0(0x17d)]>0x0,_0x370929=_0xc277da?_0x4b98b0(0x182):_0x4b98b0(0x187);return{'ok':!![],'message':_0x370929,'data':{'datasetCode':_0x18e840[_0x4b98b0(0x191)][_0x4b98b0(0x192)],..._0x1cd83}};}};async function prepare(_0x504329){const _0x1916a0=a116_0x1eef9e,_0xd59065=await loadDatasetDetailForPage(_0x504329);return prepareDatasetAction(_0xd59065,_0x1916a0(0x178));}
@@ -1 +1 @@
1
- function a118_0x5903(){const _0x51811a=['No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','1221138iUrKSA','24095SBahLF','\x22\x20already\x20exists','log','Logged\x20in','1JlUVqq','test','resolve','green','7665740PpYToC','1678856AwIxSC','trim','√\x20Project\x20Name:\x20','1319406Pypxud','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','14422364NvEIxn','env','my-app','1464pEqkDz','cwd','cyan','9YxCFXe','Login\x20failed','√\x20Login\x20status:\x20','string','16HEVBtW','length','production','Skipped','Project\x20name:','16373YmWKtu'];a118_0x5903=function(){return _0x51811a;};return a118_0x5903();}(function(_0x15bcb7,_0x12d99f){const _0x24606b=a118_0x5618,_0x52b93f=_0x15bcb7();while(!![]){try{const _0x48f2d0=parseInt(_0x24606b(0x160))/0x1*(parseInt(_0x24606b(0x15b))/0x2)+-parseInt(_0x24606b(0x168))/0x3+-parseInt(_0x24606b(0x154))/0x4*(parseInt(_0x24606b(0x15c))/0x5)+-parseInt(_0x24606b(0x16d))/0x6*(-parseInt(_0x24606b(0x159))/0x7)+parseInt(_0x24606b(0x165))/0x8*(parseInt(_0x24606b(0x170))/0x9)+parseInt(_0x24606b(0x164))/0xa+-parseInt(_0x24606b(0x16a))/0xb;if(_0x48f2d0===_0x12d99f)break;else _0x52b93f['push'](_0x52b93f['shift']());}catch(_0xa0dc81){_0x52b93f['push'](_0x52b93f['shift']());}}}(a118_0x5903,0x5e9ba));import{existsSync}from'node:fs';import a118_0x3e24b1 from'node:path';import a118_0x1e2fd6 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a118_0x5618(_0x2cf512,_0x3f13f7){_0x2cf512=_0x2cf512-0x154;const _0x590364=a118_0x5903();let _0x561810=_0x590364[_0x2cf512];return _0x561810;}export async function guidedCreateProject(_0x404cb0,_0x1f81ee,_0x44bb8b){const _0x19402b=a118_0x5618,_0x1d331b=_0x19402b(0x16c),_0xadaf1b=readConfig(),_0x4fc2d3=typeof _0xadaf1b['env']===_0x19402b(0x173)?_0xadaf1b[_0x19402b(0x16b)]:undefined,_0x3480b1=await input({'message':_0x19402b(0x158),'default':_0x1d331b,'validate':_0x4a208e=>{const _0x3993d5=_0x19402b,_0x2b69e2=_0x4a208e[_0x3993d5(0x166)]()||_0x1d331b;if(_0x2b69e2[_0x3993d5(0x155)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x224518=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x2b69e2&&!_0x224518[_0x3993d5(0x161)](_0x2b69e2))return _0x3993d5(0x169);const _0x535c8b=a118_0x3e24b1[_0x3993d5(0x162)](process[_0x3993d5(0x16e)](),_0x2b69e2);if(existsSync(_0x535c8b))return'Directory\x20\x22'+_0x2b69e2+_0x3993d5(0x15d);return!![];}});console['log'](a118_0x1e2fd6[_0x19402b(0x163)](_0x19402b(0x167)+a118_0x1e2fd6[_0x19402b(0x16f)](_0x3480b1)));const _0x4757d6=await selectSingleAppcode(_0x44bb8b);console[_0x19402b(0x15e)](a118_0x1e2fd6[_0x19402b(0x163)]('√\x20App\x20Code:\x20'+a118_0x1e2fd6['cyan'](_0x4757d6||'Not\x20set')));if(_0x4757d6){const _0x2167c8=await getIsSessionValid();if(!_0x2167c8){const _0x46d122=await confirm({'message':_0x19402b(0x15a),'default':!![]});if(_0x46d122){const _0x49e62b=await authServer({'silent':!![]});console[_0x19402b(0x15e)](a118_0x1e2fd6[_0x19402b(0x163)](_0x19402b(0x172)+a118_0x1e2fd6[_0x19402b(0x16f)](_0x49e62b?_0x19402b(0x15f):_0x19402b(0x171))));}else console[_0x19402b(0x15e)](a118_0x1e2fd6[_0x19402b(0x163)](_0x19402b(0x172)+a118_0x1e2fd6[_0x19402b(0x16f)](_0x19402b(0x157))));}await _0x404cb0({'projectName':_0x3480b1,'appCode':_0x4757d6,'env':_0x1f81ee||_0x4fc2d3||_0x19402b(0x156)});}else await _0x404cb0({'projectName':_0x3480b1,'env':_0x1f81ee||_0x4fc2d3||_0x19402b(0x156)});}
1
+ (function(_0x400b5d,_0x1052d6){const _0x27fa8a=a117_0x10b4,_0x2920a3=_0x400b5d();while(!![]){try{const _0x181210=parseInt(_0x27fa8a(0x165))/0x1+parseInt(_0x27fa8a(0x179))/0x2+-parseInt(_0x27fa8a(0x169))/0x3+parseInt(_0x27fa8a(0x15e))/0x4*(-parseInt(_0x27fa8a(0x15d))/0x5)+-parseInt(_0x27fa8a(0x177))/0x6*(-parseInt(_0x27fa8a(0x161))/0x7)+-parseInt(_0x27fa8a(0x162))/0x8+-parseInt(_0x27fa8a(0x16c))/0x9*(-parseInt(_0x27fa8a(0x167))/0xa);if(_0x181210===_0x1052d6)break;else _0x2920a3['push'](_0x2920a3['shift']());}catch(_0x454951){_0x2920a3['push'](_0x2920a3['shift']());}}}(a117_0x3735,0x4fe60));import{existsSync}from'node:fs';import a117_0x353d8f from'node:path';import a117_0x1f20c0 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a117_0x10b4(_0xc42016,_0x1b0760){_0xc42016=_0xc42016-0x15c;const _0x373545=a117_0x3735();let _0x10b4df=_0x373545[_0xc42016];return _0x10b4df;}function a117_0x3735(){const _0x3a5e89=['production','\x22\x20already\x20exists','266SQtDGm','495888yKJXGN','my-app','Logged\x20in','85968AgmxHr','Project\x20name:','10OjXcRh','env','764418uxwPEp','green','resolve','7465293fvwdWd','cwd','length','√\x20Project\x20Name:\x20','√\x20App\x20Code:\x20','Skipped','cyan','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','√\x20Login\x20status:\x20','Not\x20set','test','36114oonxBF','string','52938DPmGuA','log','Project\x20name\x20cannot\x20exceed\x2050\x20characters','263290GSRRit','40BjAiUN'];a117_0x3735=function(){return _0x3a5e89;};return a117_0x3735();}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0xc49bb5,_0x589cf6,_0x529500){const _0x322772=a117_0x10b4,_0x57229f=_0x322772(0x163),_0x256e4f=readConfig(),_0x577aa5=typeof _0x256e4f[_0x322772(0x168)]===_0x322772(0x178)?_0x256e4f['env']:undefined,_0x214f68=await input({'message':_0x322772(0x166),'default':_0x57229f,'validate':_0x2e2d67=>{const _0x17861a=_0x322772,_0x3194bb=_0x2e2d67['trim']()||_0x57229f;if(_0x3194bb[_0x17861a(0x16e)]>0x32)return _0x17861a(0x15c);const _0x12c048=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x3194bb&&!_0x12c048[_0x17861a(0x176)](_0x3194bb))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x4237ea=a117_0x353d8f[_0x17861a(0x16b)](process[_0x17861a(0x16d)](),_0x3194bb);if(existsSync(_0x4237ea))return'Directory\x20\x22'+_0x3194bb+_0x17861a(0x160);return!![];}});console[_0x322772(0x17a)](a117_0x1f20c0[_0x322772(0x16a)](_0x322772(0x16f)+a117_0x1f20c0[_0x322772(0x172)](_0x214f68)));const _0x36dace=await selectSingleAppcode(_0x529500);console[_0x322772(0x17a)](a117_0x1f20c0[_0x322772(0x16a)](_0x322772(0x170)+a117_0x1f20c0[_0x322772(0x172)](_0x36dace||_0x322772(0x175))));if(_0x36dace){const _0x5af982=await getIsSessionValid();if(!_0x5af982){const _0x20b015=await confirm({'message':_0x322772(0x173),'default':!![]});if(_0x20b015){const _0x3888ce=await authServer({'silent':!![]});console['log'](a117_0x1f20c0[_0x322772(0x16a)](_0x322772(0x174)+a117_0x1f20c0[_0x322772(0x172)](_0x3888ce?_0x322772(0x164):'Login\x20failed')));}else console[_0x322772(0x17a)](a117_0x1f20c0[_0x322772(0x16a)](_0x322772(0x174)+a117_0x1f20c0[_0x322772(0x172)](_0x322772(0x171))));}await _0xc49bb5({'projectName':_0x214f68,'appCode':_0x36dace,'env':_0x589cf6||_0x577aa5||_0x322772(0x15f)});}else await _0xc49bb5({'projectName':_0x214f68,'env':_0x589cf6||_0x577aa5||_0x322772(0x15f)});}
@@ -1 +1 @@
1
- function a119_0x12f1(_0x5066fa,_0x21c574){_0x5066fa=_0x5066fa-0x16b;const _0xee5ba2=a119_0xee5b();let _0x12f18d=_0xee5ba2[_0x5066fa];return _0x12f18d;}(function(_0x3007e4,_0x2a3b2e){const _0x442cee=a119_0x12f1,_0x3edacd=_0x3007e4();while(!![]){try{const _0x4d925f=-parseInt(_0x442cee(0x171))/0x1*(-parseInt(_0x442cee(0x172))/0x2)+parseInt(_0x442cee(0x176))/0x3+parseInt(_0x442cee(0x16c))/0x4+-parseInt(_0x442cee(0x16f))/0x5+-parseInt(_0x442cee(0x174))/0x6+-parseInt(_0x442cee(0x170))/0x7*(-parseInt(_0x442cee(0x16e))/0x8)+parseInt(_0x442cee(0x16d))/0x9;if(_0x4d925f===_0x2a3b2e)break;else _0x3edacd['push'](_0x3edacd['shift']());}catch(_0x385915){_0x3edacd['push'](_0x3edacd['shift']());}}}(a119_0xee5b,0xd70a8));export function formatElapsed(_0x4f2c5f){const _0x5afa1d=a119_0x12f1,_0x79d224=Date[_0x5afa1d(0x175)]()-_0x4f2c5f;if(_0x79d224<0x3e8)return _0x79d224+'ms';const _0x1364bd=(_0x79d224/0x3e8)[_0x5afa1d(0x173)](0x2),_0x426e98=_0x1364bd[_0x5afa1d(0x16b)](/\.?0+$/u,'');return _0x426e98+'s';}function a119_0xee5b(){const _0xf36f9b=['replace','904632kmSeNF','679302KRHZJz','24ydIUAt','5685440rYnTPY','1651321beNDhr','210179cQhoVW','14VvHlsB','toFixed','5938242WdIDYQ','now','1581015DdwDTT'];a119_0xee5b=function(){return _0xf36f9b;};return a119_0xee5b();}
1
+ (function(_0x48c574,_0x114d41){const _0x1611e0=a118_0x3ada,_0x5b586d=_0x48c574();while(!![]){try{const _0x7c85b0=-parseInt(_0x1611e0(0x1a9))/0x1+-parseInt(_0x1611e0(0x1aa))/0x2+-parseInt(_0x1611e0(0x1b1))/0x3*(-parseInt(_0x1611e0(0x1a8))/0x4)+parseInt(_0x1611e0(0x1ac))/0x5+-parseInt(_0x1611e0(0x1ad))/0x6*(parseInt(_0x1611e0(0x1b2))/0x7)+-parseInt(_0x1611e0(0x1b0))/0x8*(-parseInt(_0x1611e0(0x1a7))/0x9)+parseInt(_0x1611e0(0x1ae))/0xa;if(_0x7c85b0===_0x114d41)break;else _0x5b586d['push'](_0x5b586d['shift']());}catch(_0x3a71ec){_0x5b586d['push'](_0x5b586d['shift']());}}}(a118_0x5cb3,0x2f1f1));export function formatElapsed(_0x315e90){const _0x13caf7=a118_0x3ada,_0x13efa7=Date[_0x13caf7(0x1a6)]()-_0x315e90;if(_0x13efa7<0x3e8)return _0x13efa7+'ms';const _0x54afd=(_0x13efa7/0x3e8)[_0x13caf7(0x1ab)](0x2),_0x22e280=_0x54afd[_0x13caf7(0x1af)](/\.?0+$/u,'');return _0x22e280+'s';}function a118_0x3ada(_0x52471a,_0x43d7b2){_0x52471a=_0x52471a-0x1a6;const _0x5cb3f9=a118_0x5cb3();let _0x3ada5e=_0x5cb3f9[_0x52471a];return _0x3ada5e;}function a118_0x5cb3(){const _0x4f1ebe=['7fzSANV','now','117ggNQUF','1165748UauHFn','113565TILwgH','113922CGixFl','toFixed','478980jvsQZM','1497582LPjVdL','2036300BKvzpO','replace','13704GUfuzY','3Xyqlft'];a118_0x5cb3=function(){return _0x4f1ebe;};return a118_0x5cb3();}
@@ -1 +1 @@
1
- (function(_0x4ea509,_0xd912e){const _0x2cd4c1=a120_0x2d91,_0xf7ef98=_0x4ea509();while(!![]){try{const _0x136f08=parseInt(_0x2cd4c1(0xb2))/0x1*(parseInt(_0x2cd4c1(0x8e))/0x2)+parseInt(_0x2cd4c1(0xb5))/0x3*(-parseInt(_0x2cd4c1(0xc3))/0x4)+-parseInt(_0x2cd4c1(0xcf))/0x5*(-parseInt(_0x2cd4c1(0x80))/0x6)+parseInt(_0x2cd4c1(0xbe))/0x7+parseInt(_0x2cd4c1(0x94))/0x8*(-parseInt(_0x2cd4c1(0x91))/0x9)+-parseInt(_0x2cd4c1(0xa4))/0xa+parseInt(_0x2cd4c1(0xaf))/0xb*(-parseInt(_0x2cd4c1(0x9c))/0xc);if(_0x136f08===_0xd912e)break;else _0xf7ef98['push'](_0xf7ef98['shift']());}catch(_0x31fd3b){_0xf7ef98['push'](_0xf7ef98['shift']());}}}(a120_0x3477,0xd488c));function a120_0x2d91(_0x223b66,_0x328aa5){_0x223b66=_0x223b66-0x7c;const _0x34778e=a120_0x3477();let _0x2d9158=_0x34778e[_0x223b66];return _0x2d9158;}import a120_0x31508c from'path';import a120_0x41170b from'fs';import a120_0x31e81f from'chalk';import a120_0x677533 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';function a120_0x3477(){const _0x422ab7=['fail','2964iqMQOd','projectName','配置应用AppCode失败','Copy\x20project\x20files','清理项目目录失败:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','cyan','parse','14804100SQbLAR','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','√\x20Pulled\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','更新\x20package.json\x20name','API\x20配置拉取异常','readFileSync','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','bold','info','\x20already\x20exists','13321cvLRaY','stringify','cwd','1fCGWEK','length','项目创建完成:\x20','3wJpaoR','\x20√\x20','API\x20configuration\x20pulled:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','utf8','package.json','\x20&&\x20','repeat','belowMinimum','5941908RWNkPH','更新\x20package.json\x20失败','cd\x20','create','cookie','2660452eBXJBO','√\x20Configuration\x20file\x20created,\x20Apps:\x20','description','green','join','version','apps','warn','projectCode','\x20model(s)','Project\x20name\x20cannot\x20be\x20empty','*\x20Pulling\x20API\x20configuration...','30985VJGrhG','1.0.0','modelCount','log','Project\x20directory\x20','resolve','\x20\x201.\x20Start\x20project:\x20','1278TivIjn','message','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','开始创建项目:\x20','test','production','🚀\x20Next\x20Steps:','\x20Generated\x20by\x20rabetbase\x20cli\x20','chdir','\x20|\x20Default:\x20','\x20api\x20pull','setLogPath','keys','env','3365868GOLWNf','CLI\x20版本检查','stop','9hKWDBv','needsUpgrade','constants','4292472FARktI','error','existsSync','\x20dataset(s),\x20generated\x20','Install\x20dependencies','appCode','toLocaleString'];a120_0x3477=function(){return _0x422ab7;};return a120_0x3477();}import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x3c0191){const _0x1a1a00=a120_0x2d91,_0x39eb4a=await checkCliVersion();(_0x39eb4a[_0x1a1a00(0x92)]||_0x39eb4a['belowMinimum'])&&(printCliUpgradeWarning(_0x39eb4a),assertCliVersionSupported(_0x39eb4a),logger[_0x1a1a00(0xad)](_0x1a1a00(0xc1),_0x1a1a00(0x8f),{'currentVersion':_0x39eb4a['currentVersion'],'stableVersion':_0x39eb4a['stableVersion'],'minimumVersion':_0x39eb4a['minimumVersion'],'needsUpgrade':_0x39eb4a[_0x1a1a00(0x92)],'belowMinimum':_0x39eb4a[_0x1a1a00(0xbd)]}));if(_0x3c0191[_0x1a1a00(0xcb)]&&_0x3c0191[_0x1a1a00(0x99)])await runCreate({'projectName':_0x3c0191['projectCode'],'appCode':_0x3c0191[_0x1a1a00(0x99)],'env':_0x3c0191[_0x1a1a00(0x8d)]},_0x3c0191);else{if(_0x3c0191['projectCode']){const _0x1d54c0=await selectSingleAppcode(_0x3c0191[_0x1a1a00(0xc2)]);await runCreate({'projectName':_0x3c0191[_0x1a1a00(0xcb)],'appCode':_0x1d54c0||undefined,'env':_0x3c0191[_0x1a1a00(0x8d)]},_0x3c0191);}else await guidedCreateProject(_0x527120=>runCreate(_0x527120,_0x3c0191),_0x3c0191['env'],_0x3c0191[_0x1a1a00(0xc2)]);}}async function runCreate(_0x4e355b,_0x393b26){const _0x40ed0e=a120_0x2d91;if(!_0x4e355b[_0x40ed0e(0x9d)]||_0x4e355b[_0x40ed0e(0x9d)]['trim']()==='')throw new Error(_0x40ed0e(0xcd));const _0x4718e1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4718e1[_0x40ed0e(0x84)](_0x4e355b[_0x40ed0e(0x9d)]))throw new Error(_0x40ed0e(0xa7));if(_0x4e355b['projectName'][_0x40ed0e(0xb3)]>0x64)throw new Error(_0x40ed0e(0xab));const _0x4eaa9a=a120_0x31508c['resolve'](process[_0x40ed0e(0xb1)](),_0x4e355b[_0x40ed0e(0x9d)]);if(a120_0x41170b['existsSync'](_0x4eaa9a))throw new Error(_0x40ed0e(0x7d)+_0x4e355b[_0x40ed0e(0x9d)]+_0x40ed0e(0xae));try{a120_0x41170b['accessSync'](a120_0x31508c['dirname'](_0x4eaa9a),a120_0x41170b[_0x40ed0e(0x93)]['W_OK']);}catch{throw new Error(_0x40ed0e(0xa5));}logger[_0x40ed0e(0x8b)](_0x4eaa9a),logger[_0x40ed0e(0xad)]('create',_0x40ed0e(0x83)+_0x4e355b['projectName'],{'projectDir':_0x4eaa9a,'appCode':_0x4e355b['appCode']}),console[_0x40ed0e(0x7c)](),console[_0x40ed0e(0x7c)](a120_0x31e81f[_0x40ed0e(0xc6)](_0x40ed0e(0xb6))+'Project\x20name:\x20'+a120_0x31e81f[_0x40ed0e(0xc6)](_0x4e355b[_0x40ed0e(0x9d)])+(_0x4e355b[_0x40ed0e(0x99)]?'\x20|\x20AppCode:\x20'+a120_0x31e81f[_0x40ed0e(0xa2)](_0x4e355b[_0x40ed0e(0x99)]):''));try{await runTask(_0x40ed0e(0x9f),()=>copyProjectTemplate(_0x4e355b[_0x40ed0e(0x9d)])),await updatePackageJsonName(_0x4e355b['projectName']),await runTask(_0x40ed0e(0x98),()=>installDependencies(_0x4e355b[_0x40ed0e(0x9d)])),await runTask('Format\x20code',()=>formatProjectCode(_0x4e355b[_0x40ed0e(0x9d)])),await configureAppCode(_0x4e355b['projectName'],_0x4e355b['appCode']||'',_0x4e355b['env']);let _0x371e6f=![];if(_0x4e355b['appCode']){console[_0x40ed0e(0x7c)](_0x40ed0e(0xce));const _0xe26d86=process[_0x40ed0e(0xb1)]();try{process['chdir'](_0x4eaa9a);const _0x4796ae=_0x4e355b[_0x40ed0e(0x8d)]||_0x40ed0e(0x85);initEnv(_0x4796ae);const {configArray:_0x318eb8}=await fetchModelList(_0x4e355b[_0x40ed0e(0x99)],_0x393b26[_0x40ed0e(0xc2)]||''),_0x56d48e=DEFAULT_API_DIR,_0x5e08c5=await generateApiFile(_0x318eb8,'',_0x4e355b[_0x40ed0e(0x99)],!![],_0x4796ae,_0x56d48e);console['log'](_0x40ed0e(0xa6)+_0x318eb8['length']+_0x40ed0e(0x97)+_0x5e08c5[_0x40ed0e(0xd1)]+_0x40ed0e(0xcc)),logger[_0x40ed0e(0xad)](_0x40ed0e(0xc1),_0x40ed0e(0xb7)+_0x4e355b[_0x40ed0e(0x99)]);}catch(_0x558553){_0x371e6f=!![],console['log'](_0x40ed0e(0xa1)),logger[_0x40ed0e(0xca)]('create',_0x40ed0e(0xa9),{'error':_0x558553 instanceof Error?_0x558553['message']:String(_0x558553)});}finally{process[_0x40ed0e(0x88)](_0xe26d86);}}logger['success'](_0x40ed0e(0xc1),_0x40ed0e(0xb4)+_0x4e355b[_0x40ed0e(0x9d)]),console['log'](),console['log'](a120_0x31e81f[_0x40ed0e(0xc6)]('─'[_0x40ed0e(0xbc)](0x3c))),console['log'](a120_0x31e81f[_0x40ed0e(0xa2)][_0x40ed0e(0xac)](_0x40ed0e(0x86))),console['log'](),console['log'](_0x40ed0e(0x7f)+a120_0x31e81f['cyan'][_0x40ed0e(0xac)](_0x40ed0e(0xc0)+_0x4e355b[_0x40ed0e(0x9d)]+_0x40ed0e(0xbb)+CLI_BIN_NAME+'\x20run\x20start')),_0x371e6f&&console[_0x40ed0e(0x7c)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a120_0x31e81f[_0x40ed0e(0xa2)][_0x40ed0e(0xac)](CLI_BIN_NAME+_0x40ed0e(0x8a))),console[_0x40ed0e(0x7c)](a120_0x31e81f[_0x40ed0e(0xc6)]('─'[_0x40ed0e(0xbc)](0x3c)));}catch(_0x5b9e1a){logger[_0x40ed0e(0x95)](_0x40ed0e(0xc1),'项目创建失败:\x20'+_0x4e355b['projectName'],{'error':_0x5b9e1a instanceof Error?_0x5b9e1a[_0x40ed0e(0x81)]:String(_0x5b9e1a)});try{a120_0x41170b[_0x40ed0e(0x96)](_0x4eaa9a)&&(console['log'](_0x40ed0e(0x82)+_0x4eaa9a),a120_0x41170b['rmSync'](_0x4eaa9a,{'recursive':!![],'force':!![]}));}catch{logger[_0x40ed0e(0xca)](_0x40ed0e(0xc1),_0x40ed0e(0xa0)+_0x4eaa9a);}throw _0x5b9e1a;}}async function runTask(_0x226827,_0x3c7990){const _0x298939=a120_0x2d91,_0x158f25=a120_0x677533(_0x226827+'...')['start']();try{const _0x27b9de=await _0x3c7990();_0x158f25[_0x298939(0x90)](),console[_0x298939(0x7c)](''+a120_0x31e81f[_0x298939(0xc6)](_0x298939(0xb6))+_0x226827+'\x20'+a120_0x31e81f['gray']('['+_0x27b9de+']'));}catch(_0x2c5eca){_0x158f25[_0x298939(0x9b)](_0x226827);throw _0x2c5eca;}}async function updatePackageJsonName(_0x48719d){const _0x559dc5=a120_0x2d91,_0x2193c7=a120_0x31508c[_0x559dc5(0x7e)](process[_0x559dc5(0xb1)](),_0x48719d),_0x2a3c11=a120_0x31508c[_0x559dc5(0xc7)](_0x2193c7,_0x559dc5(0xba));try{console[_0x559dc5(0x7c)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0xe514d4=getRabetbaseCliPackageRoot(),_0x1dc66d=a120_0x31508c['join'](_0xe514d4,'package.json');let _0x5c839a=_0x559dc5(0xd0);try{const _0x5a1401=JSON[_0x559dc5(0xa3)](a120_0x41170b['readFileSync'](_0x1dc66d,_0x559dc5(0xb9)));_0x5c839a=_0x5a1401['version']||'1.0.0';}catch{}const _0xce0cdd=a120_0x41170b[_0x559dc5(0xaa)](_0x2a3c11,_0x559dc5(0xb9)),_0x2f51aa=JSON[_0x559dc5(0xa3)](_0xce0cdd);_0x2f51aa['name']=_0x48719d,_0x2f51aa[_0x559dc5(0xc5)]=_0x48719d+_0x559dc5(0x87)+_0x5c839a,a120_0x41170b['writeFileSync'](_0x2a3c11,JSON[_0x559dc5(0xb0)](_0x2f51aa,null,0x2)+'\x0a','utf8'),console[_0x559dc5(0x7c)]('√\x20package.json\x20updated:\x20name='+_0x48719d),logger['info'](_0x559dc5(0xc1),_0x559dc5(0xa8));}catch(_0xa9cf6c){logger['error'](_0x559dc5(0xc1),_0x559dc5(0xbf));throw _0xa9cf6c;}}async function configureAppCode(_0x587639,_0x1f4ab9,_0x40c55e){const _0x2753d5=a120_0x2d91,_0x93962a=a120_0x31508c[_0x2753d5(0x7e)](process[_0x2753d5(0xb1)](),_0x587639),_0xfded58=a120_0x31508c[_0x2753d5(0xc7)](_0x93962a,NEW_CONFIG_NAME);try{_0x1f4ab9?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x587639+':\x20'+_0x1f4ab9):console['log'](_0x2753d5(0xb8)+_0x587639);const _0x461ac2=getRabetbaseCliPackageRoot(),_0x20a21e=a120_0x31508c[_0x2753d5(0xc7)](_0x461ac2,_0x2753d5(0xba));let _0x5e277a='1.0.0';try{const _0x19e7a9=JSON[_0x2753d5(0xa3)](a120_0x41170b[_0x2753d5(0xaa)](_0x20a21e,_0x2753d5(0xb9)));_0x5e277a=_0x19e7a9[_0x2753d5(0xc8)]||_0x2753d5(0xd0);}catch{}const _0x56a43f=readConfig(),_0x2a2783=typeof _0x56a43f[_0x2753d5(0x8d)]==='string'?_0x56a43f[_0x2753d5(0x8d)]:undefined,_0x440073={};for(const _0x342c92 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x56a43f[_0x342c92]!=null)_0x440073[_0x342c92]=_0x56a43f[_0x342c92];}const _0x5c2cd4=buildCanonicalProjectConfig(_0x440073,{'appCodes':_0x1f4ab9?[_0x1f4ab9]:[],'env':_0x40c55e||_0x2a2783||_0x2753d5(0x85),'metadata':{'createdAt':new Date()[_0x2753d5(0x9a)](),'version':_0x5e277a}});writeConfigFile(_0xfded58,_0x5c2cd4),_0x1f4ab9?console[_0x2753d5(0x7c)](_0x2753d5(0xc4)+Object[_0x2753d5(0x8c)](_0x5c2cd4[_0x2753d5(0xc9)]||{})['join'](',\x20')+_0x2753d5(0x89)+_0x5c2cd4['defaultApp']):console['log']('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x2753d5(0xad)](_0x2753d5(0xc1),'配置应用AppCode:\x20'+_0x1f4ab9);}catch(_0x478918){logger[_0x2753d5(0x95)](_0x2753d5(0xc1),_0x2753d5(0x9e));}}
1
+ (function(_0x4577ef,_0x1dead0){const _0x420445=a119_0x2d53,_0xf06f19=_0x4577ef();while(!![]){try{const _0x51ad06=parseInt(_0x420445(0x1f3))/0x1+parseInt(_0x420445(0x236))/0x2+-parseInt(_0x420445(0x23f))/0x3+-parseInt(_0x420445(0x23b))/0x4+-parseInt(_0x420445(0x1fd))/0x5*(parseInt(_0x420445(0x1f5))/0x6)+parseInt(_0x420445(0x1e9))/0x7*(parseInt(_0x420445(0x1f8))/0x8)+-parseInt(_0x420445(0x237))/0x9;if(_0x51ad06===_0x1dead0)break;else _0xf06f19['push'](_0xf06f19['shift']());}catch(_0x3c1af4){_0xf06f19['push'](_0xf06f19['shift']());}}}(a119_0x2384,0x6a408));import a119_0x5da4f4 from'path';import a119_0x2ffcd4 from'fs';import a119_0x3c528b from'chalk';import a119_0x507733 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a119_0x2d53(_0x52c809,_0x21b0a8){_0x52c809=_0x52c809-0x1e9;const _0x2384f9=a119_0x2384();let _0x2d5312=_0x2384f9[_0x52c809];return _0x2d5312;}import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';function a119_0x2384(){const _0x66bca=['repeat','更新\x20package.json\x20name','√\x20package.json\x20updated:\x20name=','readFileSync','minimumVersion','项目创建失败:\x20','清理项目目录失败:\x20','version','\x20already\x20exists','\x20dataset(s),\x20generated\x20','projectName','needsUpgrade','\x20Generated\x20by\x20rabetbase\x20cli\x20','writeFileSync','√\x20Pulled\x20','production','*\x20Pulling\x20API\x20configuration...','W_OK','error','trim','更新\x20package.json\x20失败','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','package.json','开始创建项目:\x20','🚀\x20Next\x20Steps:','\x20|\x20AppCode:\x20','gray','projectCode','cookie','chdir','1082262crFdGr','1016415YOcfPh','\x20api\x20pull','resolve','API\x20configuration\x20pulled:\x20','740916kOmBgI','Project\x20name\x20cannot\x20be\x20empty','CLI\x20版本检查','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','115536jnkayJ','\x20\x202.\x20Pull\x20API\x20configuration:\x20','28yvZHee','1.0.0','defaultApp','warn','create','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','info','test','\x20|\x20Default:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','329435GPXLCh','Format\x20code','413238uJlXEC','length','\x20model(s)','1180096oBnTqw','stop','message','appCode','Copy\x20project\x20files','50GWEgCi','\x20\x201.\x20Start\x20project:\x20','parse','\x20√\x20','utf8','fail','belowMinimum','green','bold','join','...','配置应用AppCode失败','\x20&&\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','cwd','description','env','cyan','cd\x20','log','stableVersion','\x20config\x20set\x20appcode\x20<app-code>\x27','\x20run\x20start','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','name','constants','existsSync'];a119_0x2384=function(){return _0x66bca;};return a119_0x2384();}export async function createApp(_0x1819ec){const _0x10e93f=a119_0x2d53,_0xa69ab0=await checkCliVersion();(_0xa69ab0[_0x10e93f(0x223)]||_0xa69ab0[_0x10e93f(0x203)])&&(printCliUpgradeWarning(_0xa69ab0),assertCliVersionSupported(_0xa69ab0),logger[_0x10e93f(0x1ef)](_0x10e93f(0x1ed),_0x10e93f(0x23d),{'currentVersion':_0xa69ab0['currentVersion'],'stableVersion':_0xa69ab0[_0x10e93f(0x211)],'minimumVersion':_0xa69ab0[_0x10e93f(0x21c)],'needsUpgrade':_0xa69ab0[_0x10e93f(0x223)],'belowMinimum':_0xa69ab0[_0x10e93f(0x203)]}));if(_0x1819ec['projectCode']&&_0x1819ec[_0x10e93f(0x1fb)])await runCreate({'projectName':_0x1819ec[_0x10e93f(0x233)],'appCode':_0x1819ec[_0x10e93f(0x1fb)],'env':_0x1819ec[_0x10e93f(0x20d)]},_0x1819ec);else{if(_0x1819ec[_0x10e93f(0x233)]){const _0x967281=await selectSingleAppcode(_0x1819ec['cookie']);await runCreate({'projectName':_0x1819ec['projectCode'],'appCode':_0x967281||undefined,'env':_0x1819ec[_0x10e93f(0x20d)]},_0x1819ec);}else await guidedCreateProject(_0x4051ee=>runCreate(_0x4051ee,_0x1819ec),_0x1819ec[_0x10e93f(0x20d)],_0x1819ec[_0x10e93f(0x234)]);}}async function runCreate(_0x1256fe,_0x43fabb){const _0x2e5fab=a119_0x2d53;if(!_0x1256fe[_0x2e5fab(0x222)]||_0x1256fe['projectName'][_0x2e5fab(0x22b)]()==='')throw new Error(_0x2e5fab(0x23c));const _0x5ec620=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5ec620[_0x2e5fab(0x1f0)](_0x1256fe[_0x2e5fab(0x222)]))throw new Error(_0x2e5fab(0x23e));if(_0x1256fe['projectName'][_0x2e5fab(0x1f6)]>0x64)throw new Error(_0x2e5fab(0x1f2));const _0x3c50ec=a119_0x5da4f4[_0x2e5fab(0x239)](process[_0x2e5fab(0x20b)](),_0x1256fe['projectName']);if(a119_0x2ffcd4[_0x2e5fab(0x217)](_0x3c50ec))throw new Error('Project\x20directory\x20'+_0x1256fe[_0x2e5fab(0x222)]+_0x2e5fab(0x220));try{a119_0x2ffcd4['accessSync'](a119_0x5da4f4['dirname'](_0x3c50ec),a119_0x2ffcd4[_0x2e5fab(0x216)][_0x2e5fab(0x229)]);}catch{throw new Error(_0x2e5fab(0x22d));}logger['setLogPath'](_0x3c50ec),logger[_0x2e5fab(0x1ef)](_0x2e5fab(0x1ed),_0x2e5fab(0x22f)+_0x1256fe['projectName'],{'projectDir':_0x3c50ec,'appCode':_0x1256fe[_0x2e5fab(0x1fb)]}),console[_0x2e5fab(0x210)](),console['log'](a119_0x3c528b[_0x2e5fab(0x204)](_0x2e5fab(0x200))+'Project\x20name:\x20'+a119_0x3c528b[_0x2e5fab(0x204)](_0x1256fe[_0x2e5fab(0x222)])+(_0x1256fe[_0x2e5fab(0x1fb)]?_0x2e5fab(0x231)+a119_0x3c528b[_0x2e5fab(0x20e)](_0x1256fe[_0x2e5fab(0x1fb)]):''));try{await runTask(_0x2e5fab(0x1fc),()=>copyProjectTemplate(_0x1256fe[_0x2e5fab(0x222)])),await updatePackageJsonName(_0x1256fe[_0x2e5fab(0x222)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x1256fe['projectName'])),await runTask(_0x2e5fab(0x1f4),()=>formatProjectCode(_0x1256fe['projectName'])),await configureAppCode(_0x1256fe[_0x2e5fab(0x222)],_0x1256fe['appCode']||'',_0x1256fe[_0x2e5fab(0x20d)]);let _0x25f37c=![];if(_0x1256fe[_0x2e5fab(0x1fb)]){console[_0x2e5fab(0x210)](_0x2e5fab(0x228));const _0x477457=process['cwd']();try{process[_0x2e5fab(0x235)](_0x3c50ec);const _0x4e6450=_0x1256fe[_0x2e5fab(0x20d)]||_0x2e5fab(0x227);initEnv(_0x4e6450);const {configArray:_0x42584b}=await fetchModelList(_0x1256fe[_0x2e5fab(0x1fb)],_0x43fabb[_0x2e5fab(0x234)]||''),_0x55aeeb=DEFAULT_API_DIR,_0x1838d3=await generateApiFile(_0x42584b,'',_0x1256fe['appCode'],!![],_0x4e6450,_0x55aeeb);console[_0x2e5fab(0x210)](_0x2e5fab(0x226)+_0x42584b[_0x2e5fab(0x1f6)]+_0x2e5fab(0x221)+_0x1838d3['modelCount']+_0x2e5fab(0x1f7)),logger[_0x2e5fab(0x1ef)]('create',_0x2e5fab(0x23a)+_0x1256fe[_0x2e5fab(0x1fb)]);}catch(_0x56eff4){_0x25f37c=!![],console[_0x2e5fab(0x210)](_0x2e5fab(0x1ee)),logger[_0x2e5fab(0x1ec)](_0x2e5fab(0x1ed),'API\x20配置拉取异常',{'error':_0x56eff4 instanceof Error?_0x56eff4[_0x2e5fab(0x1fa)]:String(_0x56eff4)});}finally{process[_0x2e5fab(0x235)](_0x477457);}}logger['success'](_0x2e5fab(0x1ed),'项目创建完成:\x20'+_0x1256fe[_0x2e5fab(0x222)]),console[_0x2e5fab(0x210)](),console['log'](a119_0x3c528b[_0x2e5fab(0x204)]('─'[_0x2e5fab(0x218)](0x3c))),console[_0x2e5fab(0x210)](a119_0x3c528b[_0x2e5fab(0x20e)][_0x2e5fab(0x205)](_0x2e5fab(0x230))),console[_0x2e5fab(0x210)](),console[_0x2e5fab(0x210)](_0x2e5fab(0x1fe)+a119_0x3c528b['cyan'][_0x2e5fab(0x205)](_0x2e5fab(0x20f)+_0x1256fe[_0x2e5fab(0x222)]+_0x2e5fab(0x209)+CLI_BIN_NAME+_0x2e5fab(0x213))),_0x25f37c&&console[_0x2e5fab(0x210)](_0x2e5fab(0x240)+a119_0x3c528b[_0x2e5fab(0x20e)][_0x2e5fab(0x205)](CLI_BIN_NAME+_0x2e5fab(0x238))),console[_0x2e5fab(0x210)](a119_0x3c528b[_0x2e5fab(0x204)]('─'[_0x2e5fab(0x218)](0x3c)));}catch(_0x24aa57){logger[_0x2e5fab(0x22a)](_0x2e5fab(0x1ed),_0x2e5fab(0x21d)+_0x1256fe[_0x2e5fab(0x222)],{'error':_0x24aa57 instanceof Error?_0x24aa57[_0x2e5fab(0x1fa)]:String(_0x24aa57)});try{a119_0x2ffcd4[_0x2e5fab(0x217)](_0x3c50ec)&&(console[_0x2e5fab(0x210)](_0x2e5fab(0x214)+_0x3c50ec),a119_0x2ffcd4['rmSync'](_0x3c50ec,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x2e5fab(0x1ed),_0x2e5fab(0x21e)+_0x3c50ec);}throw _0x24aa57;}}async function runTask(_0x543478,_0x5d8f45){const _0x32de14=a119_0x2d53,_0x3cfb15=a119_0x507733(_0x543478+_0x32de14(0x207))['start']();try{const _0x357190=await _0x5d8f45();_0x3cfb15[_0x32de14(0x1f9)](),console[_0x32de14(0x210)](''+a119_0x3c528b[_0x32de14(0x204)]('\x20√\x20')+_0x543478+'\x20'+a119_0x3c528b[_0x32de14(0x232)]('['+_0x357190+']'));}catch(_0x388740){_0x3cfb15[_0x32de14(0x202)](_0x543478);throw _0x388740;}}async function updatePackageJsonName(_0x36d12e){const _0x55f653=a119_0x2d53,_0x382fb7=a119_0x5da4f4[_0x55f653(0x239)](process[_0x55f653(0x20b)](),_0x36d12e),_0x29463a=a119_0x5da4f4[_0x55f653(0x206)](_0x382fb7,'package.json');try{console[_0x55f653(0x210)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x66a743=getRabetbaseCliPackageRoot(),_0x4faf58=a119_0x5da4f4[_0x55f653(0x206)](_0x66a743,_0x55f653(0x22e));let _0x404fcd=_0x55f653(0x1ea);try{const _0x24ac85=JSON[_0x55f653(0x1ff)](a119_0x2ffcd4[_0x55f653(0x21b)](_0x4faf58,_0x55f653(0x201)));_0x404fcd=_0x24ac85[_0x55f653(0x21f)]||'1.0.0';}catch{}const _0xa2b42e=a119_0x2ffcd4[_0x55f653(0x21b)](_0x29463a,_0x55f653(0x201)),_0x1d4752=JSON[_0x55f653(0x1ff)](_0xa2b42e);_0x1d4752[_0x55f653(0x215)]=_0x36d12e,_0x1d4752[_0x55f653(0x20c)]=_0x36d12e+_0x55f653(0x224)+_0x404fcd,a119_0x2ffcd4[_0x55f653(0x225)](_0x29463a,JSON['stringify'](_0x1d4752,null,0x2)+'\x0a',_0x55f653(0x201)),console['log'](_0x55f653(0x21a)+_0x36d12e),logger[_0x55f653(0x1ef)](_0x55f653(0x1ed),_0x55f653(0x219));}catch(_0x52494c){logger[_0x55f653(0x22a)](_0x55f653(0x1ed),_0x55f653(0x22c));throw _0x52494c;}}async function configureAppCode(_0x42fc11,_0x2728d9,_0x1e362b){const _0x34a446=a119_0x2d53,_0x593d5b=a119_0x5da4f4[_0x34a446(0x239)](process[_0x34a446(0x20b)](),_0x42fc11),_0x4a6e02=a119_0x5da4f4[_0x34a446(0x206)](_0x593d5b,NEW_CONFIG_NAME);try{_0x2728d9?console[_0x34a446(0x210)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x42fc11+':\x20'+_0x2728d9):console[_0x34a446(0x210)](_0x34a446(0x20a)+_0x42fc11);const _0x45438f=getRabetbaseCliPackageRoot(),_0x59dab6=a119_0x5da4f4['join'](_0x45438f,_0x34a446(0x22e));let _0x54ff85=_0x34a446(0x1ea);try{const _0x2a8dff=JSON['parse'](a119_0x2ffcd4[_0x34a446(0x21b)](_0x59dab6,_0x34a446(0x201)));_0x54ff85=_0x2a8dff[_0x34a446(0x21f)]||_0x34a446(0x1ea);}catch{}const _0x4999aa=readConfig(),_0x43c111=typeof _0x4999aa[_0x34a446(0x20d)]==='string'?_0x4999aa[_0x34a446(0x20d)]:undefined,_0x383b7e={};for(const _0x2aa513 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4999aa[_0x2aa513]!=null)_0x383b7e[_0x2aa513]=_0x4999aa[_0x2aa513];}const _0x138234=buildCanonicalProjectConfig(_0x383b7e,{'appCodes':_0x2728d9?[_0x2728d9]:[],'env':_0x1e362b||_0x43c111||_0x34a446(0x227),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x54ff85}});writeConfigFile(_0x4a6e02,_0x138234),_0x2728d9?console['log']('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x138234['apps']||{})[_0x34a446(0x206)](',\x20')+_0x34a446(0x1f1)+_0x138234[_0x34a446(0x1eb)]):console[_0x34a446(0x210)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x34a446(0x212)),logger[_0x34a446(0x1ef)](_0x34a446(0x1ed),'配置应用AppCode:\x20'+_0x2728d9);}catch(_0x26d3b6){logger[_0x34a446(0x22a)](_0x34a446(0x1ed),_0x34a446(0x208));}}
@@ -1 +1 @@
1
- (function(_0x1c8b9d,_0xa6b67b){const _0x127847=a121_0x2713,_0x3ed4a4=_0x1c8b9d();while(!![]){try{const _0x34c810=parseInt(_0x127847(0x189))/0x1+parseInt(_0x127847(0x15a))/0x2*(-parseInt(_0x127847(0x186))/0x3)+-parseInt(_0x127847(0x167))/0x4*(-parseInt(_0x127847(0x171))/0x5)+parseInt(_0x127847(0x165))/0x6*(-parseInt(_0x127847(0x15c))/0x7)+parseInt(_0x127847(0x16f))/0x8+-parseInt(_0x127847(0x174))/0x9*(-parseInt(_0x127847(0x16d))/0xa)+-parseInt(_0x127847(0x163))/0xb*(parseInt(_0x127847(0x183))/0xc);if(_0x34c810===_0xa6b67b)break;else _0x3ed4a4['push'](_0x3ed4a4['shift']());}catch(_0x478816){_0x3ed4a4['push'](_0x3ed4a4['shift']());}}}(a121_0x283b,0x605f8));import a121_0x5c46e5 from'path';import a121_0x281068 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';function a121_0x2713(_0x3a2f95,_0x40d5f9){_0x3a2f95=_0x3a2f95-0x156;const _0x283b04=a121_0x283b();let _0x271343=_0x283b04[_0x3a2f95];return _0x271343;}import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x360711,_0x3a6c97,_0x21bb31,_0x3186a1){const _0x39f6e5=a121_0x2713,_0x2ccbbb=await checkCliVersion();(_0x2ccbbb[_0x39f6e5(0x159)]||_0x2ccbbb[_0x39f6e5(0x17a)])&&(printCliUpgradeWarning(_0x2ccbbb),assertCliVersionSupported(_0x2ccbbb));if(!_0x360711||_0x360711[_0x39f6e5(0x166)]()==='')throw CliErrors['validation'](_0x39f6e5(0x15e));const _0x13a4fd=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x13a4fd[_0x39f6e5(0x158)](_0x360711))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.',_0x39f6e5(0x17d));if(_0x360711[_0x39f6e5(0x162)]>0x64)throw CliErrors['validation']('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x5547f4=a121_0x5c46e5[_0x39f6e5(0x185)](process[_0x39f6e5(0x187)](),_0x360711);if(existsSync(_0x5547f4))throw CliErrors[_0x39f6e5(0x156)](_0x39f6e5(0x15b)+_0x360711+_0x39f6e5(0x176),_0x39f6e5(0x160));try{const _0x16861f=a121_0x5c46e5[_0x39f6e5(0x17f)](_0x5547f4);await a121_0x281068[_0x39f6e5(0x169)](_0x16861f,a121_0x281068[_0x39f6e5(0x175)][_0x39f6e5(0x18a)]);}catch{throw CliErrors['validation']('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x39f6e5(0x178));}try{console[_0x39f6e5(0x15d)](_0x39f6e5(0x191)+_0x360711+'...');const _0x4f41c7=getSubAppReactDemoTemplateDir();await copyDirectory(_0x4f41c7,_0x5547f4),console[_0x39f6e5(0x15d)](_0x39f6e5(0x192)),await updatePackageJsonName(_0x360711),console[_0x39f6e5(0x15d)](_0x39f6e5(0x16b)),console[_0x39f6e5(0x15d)](_0x39f6e5(0x18c)),console[_0x39f6e5(0x15d)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x5547f4),console[_0x39f6e5(0x15d)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x360711,_0x21bb31,_0x3a6c97),console[_0x39f6e5(0x15d)](_0x39f6e5(0x161)),_0x21bb31&&await pullApiConfig(_0x5547f4,_0x21bb31,_0x3a6c97,_0x3186a1),console[_0x39f6e5(0x15d)](_0x39f6e5(0x17b)+_0x360711+_0x39f6e5(0x18d)),console[_0x39f6e5(0x15d)](_0x39f6e5(0x188)+_0x360711),console[_0x39f6e5(0x15d)](_0x39f6e5(0x170));}catch(_0x3af878){try{existsSync(_0x5547f4)&&await a121_0x281068['rm'](_0x5547f4,{'recursive':!![],'force':!![]});}catch{}throw _0x3af878;}}async function updatePackageJsonName(_0x1d99aa){const _0x353026=a121_0x2713,_0x583557=a121_0x5c46e5[_0x353026(0x185)](process[_0x353026(0x187)](),_0x1d99aa),_0xe34752=a121_0x5c46e5['join'](_0x583557,_0x353026(0x15f)),_0x461bbe=await a121_0x281068[_0x353026(0x157)](_0xe34752,_0x353026(0x172)),_0x3cc956=JSON[_0x353026(0x168)](_0x461bbe);_0x3cc956[_0x353026(0x16c)]=_0x1d99aa,_0x3cc956[_0x353026(0x173)]=_0x353026(0x18f),await a121_0x281068[_0x353026(0x18b)](_0xe34752,JSON[_0x353026(0x179)](_0x3cc956,null,0x2)+'\x0a');}function a121_0x283b(){const _0x24a5a8=['2264616JbxYBj','constants','\x22\x20already\x20exists.','bun\x20--version','Check\x20directory\x20permissions.','stringify','belowMinimum','\x0a√\x20Project\x20','bun\x20run\x20format','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20\x20√\x20Pulled\x20','dirname','npm','env','bun','12cMWmIo','production','resolve','11085rwBRgQ','cwd','\x0a\x20\x20cd\x20','420519OCSDKI','W_OK','writeFile','\x20\x20Installing\x20dependencies...','\x20created\x20successfully!','\x20\x20Pulling\x20API\x20configuration...','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20dataset(s),\x20generated\x20','*\x20Creating\x20project\x20','\x20\x20√\x20Project\x20template\x20created','validation','readFile','test','needsUpgrade','370lTcoUg','Project\x20directory\x20\x22','7FfHqSL','log','Project\x20name\x20cannot\x20be\x20empty.','package.json','Use\x20a\x20different\x20project\x20name.','\x20\x20√\x20Configuration\x20file\x20created','length','6139969phNlIT','chdir','1323522YbVpIA','trim','68biLJjA','parse','access','ignore','\x20\x20√\x20package.json\x20updated','name','30wvrzor','\x20model(s)','1418296uKEbUY','\x20\x20rabetbase\x20run\x20start\x0a','148355OwxqiP','utf-8','description'];a121_0x283b=function(){return _0x24a5a8;};return a121_0x283b();}function detectPackageManager(){const _0x4c24ab=a121_0x2713;try{return execSync(_0x4c24ab(0x177),{'stdio':_0x4c24ab(0x16a)}),_0x4c24ab(0x182);}catch{return _0x4c24ab(0x180);}}async function formatCode(_0x2de97d){const _0x38da0e=a121_0x2713;try{await execAsync(_0x38da0e(0x17c),{'cwd':_0x2de97d});}catch{}}async function configureProject(_0x3add13,_0x58ebda,_0xd21ef8){const _0x25cda4=a121_0x2713,_0x496f74=a121_0x5c46e5[_0x25cda4(0x185)](process['cwd'](),_0x3add13),_0x502762=a121_0x5c46e5['join'](_0x496f74,NEW_CONFIG_NAME),_0x1b34cd=readConfig(),_0x476f29=typeof _0x1b34cd[_0x25cda4(0x181)]==='string'?_0x1b34cd[_0x25cda4(0x181)]:undefined,_0x284b6a={};for(const _0x146bf4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1b34cd[_0x146bf4]!=null)_0x284b6a[_0x146bf4]=_0x1b34cd[_0x146bf4];}const _0x2e7a99=buildCanonicalProjectConfig(_0x284b6a,{'appCodes':_0x58ebda?[_0x58ebda]:[],'env':_0xd21ef8||_0x476f29||_0x25cda4(0x184),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x502762,_0x2e7a99);}async function pullApiConfig(_0x430ed2,_0x3d3cac,_0x2d7e4f,_0x112094){const _0x57fe27=a121_0x2713,_0x2aba4d=process['cwd']();try{process[_0x57fe27(0x164)](_0x430ed2);const _0x32cc40=_0x2d7e4f||_0x57fe27(0x184);initEnv(_0x32cc40),console[_0x57fe27(0x15d)](_0x57fe27(0x18e));const {configArray:_0x59b55e}=await fetchModelList(_0x3d3cac,_0x112094||''),_0x141883=await generateApiFile(_0x59b55e,'',_0x3d3cac,!![],_0x32cc40,DEFAULT_API_DIR);console[_0x57fe27(0x15d)](_0x57fe27(0x17e)+_0x59b55e[_0x57fe27(0x162)]+_0x57fe27(0x190)+_0x141883['modelCount']+_0x57fe27(0x16e));}catch(_0x2cac34){console[_0x57fe27(0x15d)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process['chdir'](_0x2aba4d);}}
1
+ (function(_0x26d369,_0x95e783){const _0x3b0d72=a120_0x437b,_0x196f5e=_0x26d369();while(!![]){try{const _0x4c6898=parseInt(_0x3b0d72(0x18e))/0x1+-parseInt(_0x3b0d72(0x190))/0x2+parseInt(_0x3b0d72(0x189))/0x3+-parseInt(_0x3b0d72(0x192))/0x4*(-parseInt(_0x3b0d72(0x180))/0x5)+parseInt(_0x3b0d72(0x1a4))/0x6*(-parseInt(_0x3b0d72(0x1a8))/0x7)+parseInt(_0x3b0d72(0x17f))/0x8*(parseInt(_0x3b0d72(0x1a6))/0x9)+parseInt(_0x3b0d72(0x1a7))/0xa*(-parseInt(_0x3b0d72(0x178))/0xb);if(_0x4c6898===_0x95e783)break;else _0x196f5e['push'](_0x196f5e['shift']());}catch(_0x172717){_0x196f5e['push'](_0x196f5e['shift']());}}}(a120_0x478d,0x49683));import a120_0x11b4cb from'path';import a120_0x4a7ea3 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);function a120_0x478d(){const _0x40a91b=['name','295884QUhZKJ','\x20model(s)','writeFile','description','package.json','551724UVdJfR','dirname','11842SoRRqd','Project\x20directory\x20\x22','4LGhkwA','\x20\x20rabetbase\x20run\x20start\x0a','utf-8','Use\x20a\x20different\x20project\x20name.','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','cwd','log','validation','access','parse','constants','belowMinimum','bun','\x20\x20√\x20package.json\x20updated','\x20created\x20successfully!','length','env','modelCount','1673076JXoDPU','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','5017095zIhlrj','40vwgDFn','14XNKAqu','\x20api\x20pull`\x20manually\x20later.','\x0a√\x20Project\x20','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','stringify','toLocaleString','chdir','\x20\x20√\x20Pulled\x20','...','Check\x20directory\x20permissions.','W_OK','bun\x20run\x20format','test','\x20\x20√\x20Project\x20template\x20created','npm','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x22\x20already\x20exists.','Project\x20name\x20cannot\x20be\x20empty.','1746217PjiMyG','needsUpgrade','resolve','join','trim','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20dataset(s),\x20generated\x20','8eIXEoX','1457345jkSzEJ','\x0a\x20\x20cd\x20','production','*\x20Creating\x20project\x20','\x20\x20Installing\x20dependencies...','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','string'];a120_0x478d=function(){return _0x40a91b;};return a120_0x478d();}export async function createProjectNonInteractive(_0x944b1d,_0x12841b,_0x5cab83,_0x13e627){const _0x4d4aae=a120_0x437b,_0x5c8f7e=await checkCliVersion();(_0x5c8f7e[_0x4d4aae(0x179)]||_0x5c8f7e[_0x4d4aae(0x19d)])&&(printCliUpgradeWarning(_0x5c8f7e),assertCliVersionSupported(_0x5c8f7e));if(!_0x944b1d||_0x944b1d[_0x4d4aae(0x17c)]()==='')throw CliErrors['validation'](_0x4d4aae(0x177));const _0x4a6950=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4a6950[_0x4d4aae(0x172)](_0x944b1d))throw CliErrors[_0x4d4aae(0x199)](_0x4d4aae(0x186),_0x4d4aae(0x17d));if(_0x944b1d[_0x4d4aae(0x1a1)]>0x64)throw CliErrors[_0x4d4aae(0x199)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x1be608=a120_0x11b4cb[_0x4d4aae(0x17a)](process[_0x4d4aae(0x197)](),_0x944b1d);if(existsSync(_0x1be608))throw CliErrors[_0x4d4aae(0x199)](_0x4d4aae(0x191)+_0x944b1d+_0x4d4aae(0x176),_0x4d4aae(0x195));try{const _0xa8e931=a120_0x11b4cb[_0x4d4aae(0x18f)](_0x1be608);await a120_0x4a7ea3[_0x4d4aae(0x19a)](_0xa8e931,a120_0x4a7ea3[_0x4d4aae(0x19c)][_0x4d4aae(0x170)]);}catch{throw CliErrors[_0x4d4aae(0x199)](_0x4d4aae(0x175),_0x4d4aae(0x16f));}try{console[_0x4d4aae(0x198)](_0x4d4aae(0x183)+_0x944b1d+_0x4d4aae(0x16e));const _0xbcd85d=getSubAppReactDemoTemplateDir();await copyDirectory(_0xbcd85d,_0x1be608),console[_0x4d4aae(0x198)](_0x4d4aae(0x173)),await updatePackageJsonName(_0x944b1d),console[_0x4d4aae(0x198)](_0x4d4aae(0x19f)),console[_0x4d4aae(0x198)](_0x4d4aae(0x184)),console[_0x4d4aae(0x198)](_0x4d4aae(0x1a5)),await formatCode(_0x1be608),console[_0x4d4aae(0x198)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x944b1d,_0x5cab83,_0x12841b),console[_0x4d4aae(0x198)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x5cab83&&await pullApiConfig(_0x1be608,_0x5cab83,_0x12841b,_0x13e627),console[_0x4d4aae(0x198)](_0x4d4aae(0x1aa)+_0x944b1d+_0x4d4aae(0x1a0)),console['log'](_0x4d4aae(0x181)+_0x944b1d),console[_0x4d4aae(0x198)](_0x4d4aae(0x193));}catch(_0x126b61){try{existsSync(_0x1be608)&&await a120_0x4a7ea3['rm'](_0x1be608,{'recursive':!![],'force':!![]});}catch{}throw _0x126b61;}}async function updatePackageJsonName(_0x56879c){const _0x41c1e0=a120_0x437b,_0x525c1e=a120_0x11b4cb['resolve'](process[_0x41c1e0(0x197)](),_0x56879c),_0x17c8a8=a120_0x11b4cb[_0x41c1e0(0x17b)](_0x525c1e,_0x41c1e0(0x18d)),_0xa20ee2=await a120_0x4a7ea3['readFile'](_0x17c8a8,_0x41c1e0(0x194)),_0x559774=JSON[_0x41c1e0(0x19b)](_0xa20ee2);_0x559774[_0x41c1e0(0x188)]=_0x56879c,_0x559774[_0x41c1e0(0x18c)]=_0x41c1e0(0x196),await a120_0x4a7ea3[_0x41c1e0(0x18b)](_0x17c8a8,JSON[_0x41c1e0(0x1ac)](_0x559774,null,0x2)+'\x0a');}function detectPackageManager(){const _0x43c505=a120_0x437b;try{return execSync(_0x43c505(0x185),{'stdio':'ignore'}),_0x43c505(0x19e);}catch{return _0x43c505(0x174);}}async function formatCode(_0x33958d){const _0x4f0a51=a120_0x437b;try{await execAsync(_0x4f0a51(0x171),{'cwd':_0x33958d});}catch{}}async function configureProject(_0x5a35e1,_0x5d2580,_0x3e1668){const _0x5c56ab=a120_0x437b,_0x490f2b=a120_0x11b4cb[_0x5c56ab(0x17a)](process['cwd'](),_0x5a35e1),_0x1d0cb2=a120_0x11b4cb[_0x5c56ab(0x17b)](_0x490f2b,NEW_CONFIG_NAME),_0x1455cd=readConfig(),_0x2d0479=typeof _0x1455cd[_0x5c56ab(0x1a2)]===_0x5c56ab(0x187)?_0x1455cd[_0x5c56ab(0x1a2)]:undefined,_0x1d1f1a={};for(const _0xf8212e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1455cd[_0xf8212e]!=null)_0x1d1f1a[_0xf8212e]=_0x1455cd[_0xf8212e];}const _0x87143d=buildCanonicalProjectConfig(_0x1d1f1a,{'appCodes':_0x5d2580?[_0x5d2580]:[],'env':_0x3e1668||_0x2d0479||'production','metadata':{'createdAt':new Date()[_0x5c56ab(0x1ad)](),'version':getCliVersion()}});writeConfigFile(_0x1d0cb2,_0x87143d);}function a120_0x437b(_0x15b163,_0x580adc){_0x15b163=_0x15b163-0x16e;const _0x478d9f=a120_0x478d();let _0x437b5e=_0x478d9f[_0x15b163];return _0x437b5e;}async function pullApiConfig(_0x5bd204,_0xf47536,_0x110918,_0x41e784){const _0x26242f=a120_0x437b,_0x253d6d=process[_0x26242f(0x197)]();try{process[_0x26242f(0x1ae)](_0x5bd204);const _0x2fcb0a=_0x110918||_0x26242f(0x182);initEnv(_0x2fcb0a),console[_0x26242f(0x198)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x23faea}=await fetchModelList(_0xf47536,_0x41e784||''),_0x4aed36=await generateApiFile(_0x23faea,'',_0xf47536,!![],_0x2fcb0a,DEFAULT_API_DIR);console[_0x26242f(0x198)](_0x26242f(0x1af)+_0x23faea[_0x26242f(0x1a1)]+_0x26242f(0x17e)+_0x4aed36[_0x26242f(0x1a3)]+_0x26242f(0x18a));}catch(_0x268c82){console[_0x26242f(0x198)](_0x26242f(0x1ab)+CLI_BIN_NAME+_0x26242f(0x1a9));}finally{process[_0x26242f(0x1ae)](_0x253d6d);}}
@@ -1 +1 @@
1
- function a122_0x3090(){const _0xe17feb=['676QgzVXV','dirname','26024JVWoFf','18BQWQoD','1737NhAzcs','../../../../','54186Mkyxur','join','191564HKcBBk','1411940orjWXx','203144Wymmub','91POKfng','resolve','1023250TgJFeM','templates','sub-app-react-demo'];a122_0x3090=function(){return _0xe17feb;};return a122_0x3090();}const a122_0xacb78c=a122_0x4efb;(function(_0x59712b,_0x2ad77d){const _0xc69de0=a122_0x4efb,_0x5c90b1=_0x59712b();while(!![]){try{const _0x1d0c8a=-parseInt(_0xc69de0(0x10f))/0x1+-parseInt(_0xc69de0(0x109))/0x2+parseInt(_0xc69de0(0x10b))/0x3*(-parseInt(_0xc69de0(0x107))/0x4)+parseInt(_0xc69de0(0x104))/0x5+-parseInt(_0xc69de0(0x10d))/0x6*(-parseInt(_0xc69de0(0x112))/0x7)+parseInt(_0xc69de0(0x111))/0x8*(-parseInt(_0xc69de0(0x10a))/0x9)+parseInt(_0xc69de0(0x110))/0xa;if(_0x1d0c8a===_0x2ad77d)break;else _0x5c90b1['push'](_0x5c90b1['shift']());}catch(_0x55e79d){_0x5c90b1['push'](_0x5c90b1['shift']());}}}(a122_0x3090,0x1add2));import a122_0x471b1a from'node:path';import{fileURLToPath}from'node:url';function a122_0x4efb(_0x4e5278,_0xdc4c1f){_0x4e5278=_0x4e5278-0x103;const _0x309029=a122_0x3090();let _0x4efb8a=_0x309029[_0x4e5278];return _0x4efb8a;}const __dirname=a122_0x471b1a[a122_0xacb78c(0x108)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5e7a6c=a122_0xacb78c;return a122_0x471b1a[_0x5e7a6c(0x103)](__dirname,_0x5e7a6c(0x10c));}export function getSubAppReactDemoTemplateDir(){const _0x481c14=a122_0xacb78c;return a122_0x471b1a[_0x481c14(0x10e)](getRabetbaseCliPackageRoot(),_0x481c14(0x105),'projects',_0x481c14(0x106));}
1
+ const a121_0x113ac6=a121_0x265a;(function(_0x216b13,_0x572198){const _0x1346fc=a121_0x265a,_0x44a066=_0x216b13();while(!![]){try{const _0x76bb66=-parseInt(_0x1346fc(0x192))/0x1*(-parseInt(_0x1346fc(0x193))/0x2)+-parseInt(_0x1346fc(0x195))/0x3*(-parseInt(_0x1346fc(0x194))/0x4)+parseInt(_0x1346fc(0x18d))/0x5+parseInt(_0x1346fc(0x190))/0x6*(parseInt(_0x1346fc(0x18f))/0x7)+parseInt(_0x1346fc(0x191))/0x8+-parseInt(_0x1346fc(0x18c))/0x9+-parseInt(_0x1346fc(0x196))/0xa*(parseInt(_0x1346fc(0x197))/0xb);if(_0x76bb66===_0x572198)break;else _0x44a066['push'](_0x44a066['shift']());}catch(_0x35e519){_0x44a066['push'](_0x44a066['shift']());}}}(a121_0x4d69,0x9e450));import a121_0x13249d from'node:path';function a121_0x265a(_0x4e84c0,_0x26c274){_0x4e84c0=_0x4e84c0-0x18a;const _0x4d6935=a121_0x4d69();let _0x265a49=_0x4d6935[_0x4e84c0];return _0x265a49;}import{fileURLToPath}from'node:url';const __dirname=a121_0x13249d[a121_0x113ac6(0x198)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x41fd62=a121_0x113ac6;return a121_0x13249d[_0x41fd62(0x18b)](__dirname,_0x41fd62(0x18e));}function a121_0x4d69(){const _0x6671f3=['2699370mjAyeW','5392740tfuIqb','../../../../','14WBnZRW','775704NsHGLn','3723976nAoRuI','12DkfPAi','7572vpyPAx','12lzbfaj','642975IIaWDt','340ZNtbXq','499147MKrzeR','dirname','sub-app-react-demo','resolve'];a121_0x4d69=function(){return _0x6671f3;};return a121_0x4d69();}export function getSubAppReactDemoTemplateDir(){const _0xc90166=a121_0x113ac6;return a121_0x13249d['join'](getRabetbaseCliPackageRoot(),'templates','projects',_0xc90166(0x18a));}
@@ -1 +1 @@
1
- function a123_0x1b77(){const _0x5ae54b=['111vWGGYg','项目模板复制失败','info','457379ldFaHc','message','159072MxcSwW','203324plMrtZ','189QsvsPG','510YgYeSN','12HKhPXl','copy','153kLpAtH','17000oRfVHg','10Zoyndt','300tiPaPj','157581ZGSxaE','90525xweqQB','now','resolve','cwd'];a123_0x1b77=function(){return _0x5ae54b;};return a123_0x1b77();}(function(_0x545274,_0x550f8f){const _0x1a9b5d=a123_0x210e,_0x313c7a=_0x545274();while(!![]){try{const _0x5b7039=-parseInt(_0x1a9b5d(0xeb))/0x1*(-parseInt(_0x1a9b5d(0xe8))/0x2)+parseInt(_0x1a9b5d(0xe0))/0x3*(parseInt(_0x1a9b5d(0xec))/0x4)+parseInt(_0x1a9b5d(0xf0))/0x5*(parseInt(_0x1a9b5d(0xe9))/0x6)+-parseInt(_0x1a9b5d(0xe7))/0x7*(-parseInt(_0x1a9b5d(0xe5))/0x8)+parseInt(_0x1a9b5d(0xef))/0x9*(-parseInt(_0x1a9b5d(0xed))/0xa)+-parseInt(_0x1a9b5d(0xe6))/0xb*(parseInt(_0x1a9b5d(0xee))/0xc)+parseInt(_0x1a9b5d(0xe3))/0xd;if(_0x5b7039===_0x550f8f)break;else _0x313c7a['push'](_0x313c7a['shift']());}catch(_0x50458f){_0x313c7a['push'](_0x313c7a['shift']());}}}(a123_0x1b77,0x4f535));import a123_0x2071d7 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a123_0x210e(_0x2cdbc9,_0x29f08c){_0x2cdbc9=_0x2cdbc9-0xe0;const _0x1b7703=a123_0x1b77();let _0x210e7c=_0x1b7703[_0x2cdbc9];return _0x210e7c;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x3265e5){const _0xc3fcf6=a123_0x210e,_0x4d325c=Date[_0xc3fcf6(0xf1)](),_0x2aff68=a123_0x2071d7[_0xc3fcf6(0xf2)](process[_0xc3fcf6(0xf3)](),_0x3265e5);try{logger[_0xc3fcf6(0xe2)](_0xc3fcf6(0xea),'开始复制项目模板',{'projectCode':_0x3265e5,'templateDir':templateDir}),await copyDirectory(templateDir,_0x2aff68);const _0x218e22=Date[_0xc3fcf6(0xf1)]()-_0x4d325c;logger['success'](_0xc3fcf6(0xea),'项目模板复制完成',_0x218e22,{'projectCode':_0x3265e5});}catch(_0x208c8a){const _0x4a5eca=Date[_0xc3fcf6(0xf1)]()-_0x4d325c;logger['error'](_0xc3fcf6(0xea),_0xc3fcf6(0xe1),{'projectCode':_0x3265e5,'error':_0x208c8a instanceof Error?_0x208c8a[_0xc3fcf6(0xe4)]:String(_0x208c8a),'duration':_0x4a5eca});throw _0x208c8a;}return formatElapsed(_0x4d325c);}
1
+ (function(_0x349cc5,_0x321fc7){const _0x53d7b8=a122_0x200e,_0x705110=_0x349cc5();while(!![]){try{const _0x359ce2=parseInt(_0x53d7b8(0xde))/0x1*(parseInt(_0x53d7b8(0xe6))/0x2)+-parseInt(_0x53d7b8(0xe4))/0x3*(-parseInt(_0x53d7b8(0xdd))/0x4)+parseInt(_0x53d7b8(0xdb))/0x5+-parseInt(_0x53d7b8(0xd9))/0x6*(-parseInt(_0x53d7b8(0xd7))/0x7)+-parseInt(_0x53d7b8(0xd8))/0x8+parseInt(_0x53d7b8(0xdf))/0x9*(parseInt(_0x53d7b8(0xe7))/0xa)+-parseInt(_0x53d7b8(0xe0))/0xb;if(_0x359ce2===_0x321fc7)break;else _0x705110['push'](_0x705110['shift']());}catch(_0xa0e9c){_0x705110['push'](_0x705110['shift']());}}}(a122_0x4054,0x471d3));import a122_0x31ed20 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a122_0x4054(){const _0x575112=['info','error','resolve','1266QtOKRT','success','2QkUWSY','600200SspuhA','copy','now','14WAxQpM','322312DmlQsv','824862LlNkoP','项目模板复制失败','819425ypjWNp','开始复制项目模板','4660haeTvZ','98349hFmIzp','18SiBTLy','8990146clpklQ'];a122_0x4054=function(){return _0x575112;};return a122_0x4054();}function a122_0x200e(_0x5d31dc,_0x57c888){_0x5d31dc=_0x5d31dc-0xd7;const _0x40548f=a122_0x4054();let _0x200ef8=_0x40548f[_0x5d31dc];return _0x200ef8;}export async function copyProjectTemplate(_0x378acc){const _0x5b9559=a122_0x200e,_0x535838=Date[_0x5b9559(0xe9)](),_0x3156e2=a122_0x31ed20[_0x5b9559(0xe3)](process['cwd'](),_0x378acc);try{logger[_0x5b9559(0xe1)](_0x5b9559(0xe8),_0x5b9559(0xdc),{'projectCode':_0x378acc,'templateDir':templateDir}),await copyDirectory(templateDir,_0x3156e2);const _0xf4e357=Date[_0x5b9559(0xe9)]()-_0x535838;logger[_0x5b9559(0xe5)](_0x5b9559(0xe8),'项目模板复制完成',_0xf4e357,{'projectCode':_0x378acc});}catch(_0x28a5b1){const _0x469730=Date['now']()-_0x535838;logger[_0x5b9559(0xe2)](_0x5b9559(0xe8),_0x5b9559(0xda),{'projectCode':_0x378acc,'error':_0x28a5b1 instanceof Error?_0x28a5b1['message']:String(_0x28a5b1),'duration':_0x469730});throw _0x28a5b1;}return formatElapsed(_0x535838);}
@@ -1 +1 @@
1
- function a124_0x528c(_0x4511ce,_0x761ff8){_0x4511ce=_0x4511ce-0x93;const _0x4bf959=a124_0x4bf9();let _0x528cb6=_0x4bf959[_0x4511ce];return _0x528cb6;}(function(_0x125750,_0x457676){const _0x5ce6a9=a124_0x528c,_0x4d0ffd=_0x125750();while(!![]){try{const _0x10f719=-parseInt(_0x5ce6a9(0x9f))/0x1*(-parseInt(_0x5ce6a9(0x9b))/0x2)+-parseInt(_0x5ce6a9(0xa1))/0x3+-parseInt(_0x5ce6a9(0x9a))/0x4+-parseInt(_0x5ce6a9(0x96))/0x5+parseInt(_0x5ce6a9(0xa0))/0x6+-parseInt(_0x5ce6a9(0x9d))/0x7+parseInt(_0x5ce6a9(0xa2))/0x8*(parseInt(_0x5ce6a9(0x9c))/0x9);if(_0x10f719===_0x457676)break;else _0x4d0ffd['push'](_0x4d0ffd['shift']());}catch(_0x10dc11){_0x4d0ffd['push'](_0x4d0ffd['shift']());}}}(a124_0x4bf9,0x4028e));function a124_0x4bf9(){const _0x416382=['npx','代码格式化失败','100672TNcMJb','94574bNnKsE','3578022LAcbrV','474796xNTsOk','开始格式化代码','1bBWxNL','1062162rnLVYQ','640320oEmwNa','16wrnmMv','error','cwd','now','success','message','format','2250980kVvIxX','info'];a124_0x4bf9=function(){return _0x416382;};return a124_0x4bf9();}import a124_0x18bf0b from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0xd453ea){const _0xb17ec2=a124_0x528c,_0x38abb3=Date[_0xb17ec2(0xa5)](),_0x325f77=a124_0x18bf0b['resolve'](process[_0xb17ec2(0xa4)](),_0xd453ea);try{logger[_0xb17ec2(0x97)](_0xb17ec2(0x95),_0xb17ec2(0x9e),{'projectCode':_0xd453ea}),await execa(resolveNpmBin(_0xb17ec2(0x98)),['prettier','--write','.'],{'cwd':_0x325f77});const _0x545e00=Date['now']()-_0x38abb3;logger[_0xb17ec2(0x93)](_0xb17ec2(0x95),'代码格式化完成',_0x545e00,{'projectCode':_0xd453ea});}catch(_0x5d0f2f){const _0x13880f=Date[_0xb17ec2(0xa5)]()-_0x38abb3;logger[_0xb17ec2(0xa3)]('format',_0xb17ec2(0x99),{'projectCode':_0xd453ea,'error':_0x5d0f2f instanceof Error?_0x5d0f2f[_0xb17ec2(0x94)]:String(_0x5d0f2f),'duration':_0x13880f});throw _0x5d0f2f;}return formatElapsed(_0x38abb3);}
1
+ (function(_0x5ecc32,_0x3ca1ea){const _0x42b426=a123_0x471f,_0x233f35=_0x5ecc32();while(!![]){try{const _0x18d264=parseInt(_0x42b426(0xd2))/0x1*(parseInt(_0x42b426(0xc4))/0x2)+-parseInt(_0x42b426(0xd0))/0x3+-parseInt(_0x42b426(0xc3))/0x4+-parseInt(_0x42b426(0xc6))/0x5+-parseInt(_0x42b426(0xcb))/0x6+-parseInt(_0x42b426(0xc9))/0x7*(-parseInt(_0x42b426(0xc7))/0x8)+parseInt(_0x42b426(0xcf))/0x9;if(_0x18d264===_0x3ca1ea)break;else _0x233f35['push'](_0x233f35['shift']());}catch(_0xb88132){_0x233f35['push'](_0x233f35['shift']());}}}(a123_0x1cd3,0x9cfd2));function a123_0x1cd3(){const _0x454ca3=['8751321zsRjHu','1254012pBQZtt','info','1czsnYL','error','success','代码格式化完成','1382412FtSpXq','1383458zNHgLj','代码格式化失败','1297975ATeJIs','28528VDpryO','cwd','371xkeOZP','开始格式化代码','1121208VAGDjV','now','prettier','format'];a123_0x1cd3=function(){return _0x454ca3;};return a123_0x1cd3();}import a123_0x3a5250 from'node:path';import{execa}from'execa';function a123_0x471f(_0x49100b,_0x1f153f){_0x49100b=_0x49100b-0xc0;const _0x1cd334=a123_0x1cd3();let _0x471ffc=_0x1cd334[_0x49100b];return _0x471ffc;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x1dbd7c){const _0x35c6c5=a123_0x471f,_0x89dad0=Date['now'](),_0xf58ea1=a123_0x3a5250['resolve'](process[_0x35c6c5(0xc8)](),_0x1dbd7c);try{logger[_0x35c6c5(0xd1)](_0x35c6c5(0xce),_0x35c6c5(0xca),{'projectCode':_0x1dbd7c}),await execa(resolveNpmBin('npx'),[_0x35c6c5(0xcd),'--write','.'],{'cwd':_0xf58ea1});const _0x19428f=Date[_0x35c6c5(0xcc)]()-_0x89dad0;logger[_0x35c6c5(0xc1)](_0x35c6c5(0xce),_0x35c6c5(0xc2),_0x19428f,{'projectCode':_0x1dbd7c});}catch(_0x171aad){const _0xb259bd=Date[_0x35c6c5(0xcc)]()-_0x89dad0;logger[_0x35c6c5(0xc0)]('format',_0x35c6c5(0xc5),{'projectCode':_0x1dbd7c,'error':_0x171aad instanceof Error?_0x171aad['message']:String(_0x171aad),'duration':_0xb259bd});throw _0x171aad;}return formatElapsed(_0x89dad0);}
@@ -1 +1 @@
1
- (function(_0x15db65,_0xf19261){const _0x596356=a125_0x27e6,_0xb73265=_0x15db65();while(!![]){try{const _0x47b76a=parseInt(_0x596356(0x1ed))/0x1+parseInt(_0x596356(0x1e9))/0x2*(-parseInt(_0x596356(0x1e2))/0x3)+parseInt(_0x596356(0x1e7))/0x4+parseInt(_0x596356(0x1ef))/0x5*(parseInt(_0x596356(0x1eb))/0x6)+parseInt(_0x596356(0x1e6))/0x7+-parseInt(_0x596356(0x1e1))/0x8+parseInt(_0x596356(0x1e5))/0x9;if(_0x47b76a===_0xf19261)break;else _0xb73265['push'](_0xb73265['shift']());}catch(_0x58ddee){_0xb73265['push'](_0xb73265['shift']());}}}(a125_0x1b2c,0x4049d));function a125_0x27e6(_0x243923,_0x8e684a){_0x243923=_0x243923-0x1e1;const _0x1b2cc0=a125_0x1b2c();let _0x27e6d6=_0x1b2cc0[_0x243923];return _0x27e6d6;}import a125_0x3e0a7f from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x360a9b){const _0x172663=a125_0x27e6,_0x476376=Date['now'](),_0x5754a0=a125_0x3e0a7f[_0x172663(0x1f3)](process['cwd'](),_0x360a9b);try{logger[_0x172663(0x1e8)](_0x172663(0x1e3),_0x172663(0x1f4),{'projectCode':_0x360a9b,'registry':_0x172663(0x1e4)}),await execa(resolveNpmBin(_0x172663(0x1ec)),[_0x172663(0x1e3),_0x172663(0x1f2),_0x172663(0x1e4)],{'cwd':_0x5754a0});const _0x2f61c4=Date[_0x172663(0x1f0)]()-_0x476376;logger['success'](_0x172663(0x1e3),'依赖安装完成',_0x2f61c4,{'projectCode':_0x360a9b});}catch(_0x26b1a4){const _0x3c3eeb=Date[_0x172663(0x1f0)]()-_0x476376;logger[_0x172663(0x1ee)]('install',_0x172663(0x1f1),{'projectCode':_0x360a9b,'error':_0x26b1a4 instanceof Error?_0x26b1a4[_0x172663(0x1ea)]:String(_0x26b1a4),'duration':_0x3c3eeb});throw _0x26b1a4;}return formatElapsed(_0x476376);}function a125_0x1b2c(){const _0x1bb925=['35rSqzXG','now','依赖安装失败','--registry','resolve','开始安装依赖','4038984wccrzQ','365487oFtQfN','install','https://registry.npmmirror.com','2265507GkEOeB','577318aKukhn','196112YemlPb','info','2QiXges','message','362172SYEPdN','npm','84268VYhmTf','error'];a125_0x1b2c=function(){return _0x1bb925;};return a125_0x1b2c();}
1
+ (function(_0x30837f,_0x1c667c){const _0x4994d7=a124_0x3525,_0x332216=_0x30837f();while(!![]){try{const _0xb7402d=-parseInt(_0x4994d7(0xb2))/0x1+-parseInt(_0x4994d7(0xb3))/0x2+-parseInt(_0x4994d7(0xac))/0x3+-parseInt(_0x4994d7(0xb8))/0x4+-parseInt(_0x4994d7(0xb7))/0x5+-parseInt(_0x4994d7(0xb6))/0x6+parseInt(_0x4994d7(0xae))/0x7;if(_0xb7402d===_0x1c667c)break;else _0x332216['push'](_0x332216['shift']());}catch(_0x63ff5a){_0x332216['push'](_0x332216['shift']());}}}(a124_0x2171,0x2376f));import a124_0x384933 from'node:path';function a124_0x3525(_0x488793,_0x55dc19){_0x488793=_0x488793-0xaa;const _0x21710c=a124_0x2171();let _0x352574=_0x21710c[_0x488793];return _0x352574;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a124_0x2171(){const _0x504a80=['resolve','235572QXsOVO','154490zDdpZq','192568ppVzGO','info','https://registry.npmmirror.com','--registry','error','success','429354GgZqwi','now','3246369nHwZnh','依赖安装完成','依赖安装失败','cwd','46147LmmCMi','21874pFjAWA','install'];a124_0x2171=function(){return _0x504a80;};return a124_0x2171();}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x302adb){const _0x225232=a124_0x3525,_0x142793=Date[_0x225232(0xad)](),_0x293cfb=a124_0x384933[_0x225232(0xb5)](process[_0x225232(0xb1)](),_0x302adb);try{logger[_0x225232(0xb9)](_0x225232(0xb4),'开始安装依赖',{'projectCode':_0x302adb,'registry':_0x225232(0xba)}),await execa(resolveNpmBin('npm'),[_0x225232(0xb4),_0x225232(0xbb),'https://registry.npmmirror.com'],{'cwd':_0x293cfb});const _0x374132=Date[_0x225232(0xad)]()-_0x142793;logger[_0x225232(0xab)](_0x225232(0xb4),_0x225232(0xaf),_0x374132,{'projectCode':_0x302adb});}catch(_0x1b2f70){const _0x4808b8=Date[_0x225232(0xad)]()-_0x142793;logger[_0x225232(0xaa)](_0x225232(0xb4),_0x225232(0xb0),{'projectCode':_0x302adb,'error':_0x1b2f70 instanceof Error?_0x1b2f70['message']:String(_0x1b2f70),'duration':_0x4808b8});throw _0x1b2f70;}return formatElapsed(_0x142793);}
@@ -1 +1 @@
1
- const a126_0x7f44bf=a126_0x413b;(function(_0x370ca1,_0x50d9a8){const _0x297623=a126_0x413b,_0x55787b=_0x370ca1();while(!![]){try{const _0xe85a06=-parseInt(_0x297623(0xe8))/0x1*(parseInt(_0x297623(0xfb))/0x2)+parseInt(_0x297623(0xe5))/0x3*(-parseInt(_0x297623(0xe1))/0x4)+-parseInt(_0x297623(0xf2))/0x5*(-parseInt(_0x297623(0xeb))/0x6)+-parseInt(_0x297623(0xe0))/0x7+-parseInt(_0x297623(0xf8))/0x8+parseInt(_0x297623(0xf1))/0x9+parseInt(_0x297623(0xfd))/0xa;if(_0xe85a06===_0x50d9a8)break;else _0x55787b['push'](_0x55787b['shift']());}catch(_0x3b49f6){_0x55787b['push'](_0x55787b['shift']());}}}(a126_0x3ec6,0x236ce));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a126_0x7f44bf(0xe6),'type':a126_0x7f44bf(0xe7),'description':'App\x20code\x20to\x20initialize'},{'name':a126_0x7f44bf(0xed),'type':a126_0x7f44bf(0xe7),'description':a126_0x7f44bf(0x103)},{'name':a126_0x7f44bf(0xee),'type':a126_0x7f44bf(0x100),'description':a126_0x7f44bf(0xf0),'default':![]}],createFlags=[{'name':a126_0x7f44bf(0xe2),'type':'string','description':'Project\x20name'},{'name':'env','type':'string','description':a126_0x7f44bf(0x103)},{'name':'appcode','type':a126_0x7f44bf(0xe7),'description':a126_0x7f44bf(0xfc)}],upgradeFlags=[{'name':'yes','type':'boolean','description':a126_0x7f44bf(0xfa),'default':![]}];export const projectDefinitions=[{'service':a126_0x7f44bf(0xef),'command':'init','description':'Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','risk':a126_0x7f44bf(0xf7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xef7122){const _0x551c20=a126_0x7f44bf;return await initConfig({'appcode':_0xef7122[_0x551c20(0xf4)](_0x551c20(0xe6))||undefined,'env':_0xef7122[_0x551c20(0xf4)]('env')||undefined,'autoYes':_0xef7122[_0x551c20(0xe3)](_0x551c20(0xee))}),{'ok':!![]};}},{'service':a126_0x7f44bf(0xef),'command':a126_0x7f44bf(0xea),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a126_0x7f44bf(0xdf),'description':a126_0x7f44bf(0xff),'required':![]}],'flags':createFlags,async 'execute'(_0x4630b1){const _0x456b8f=a126_0x7f44bf,{createApp:_0x57a192}=await import(_0x456b8f(0x101)),{createProjectNonInteractive:_0x4fe4c9}=await import(_0x456b8f(0xe4)),_0x5b8ec9=_0x4630b1[_0x456b8f(0xf4)]('name')[_0x456b8f(0xf6)]()||_0x4630b1[_0x456b8f(0x102)][0x0]?.[_0x456b8f(0xf6)](),_0x2ff93c=_0x4630b1[_0x456b8f(0xf4)](_0x456b8f(0xed))||undefined,_0x1d7c7d=_0x4630b1['str'](_0x456b8f(0xe6))||undefined;if(_0x4630b1[_0x456b8f(0xec)]){if(!_0x5b8ec9)throw CliErrors['validation'](_0x456b8f(0xf5),_0x456b8f(0xe9)+CLI_BIN_NAME+_0x456b8f(0xf9));await _0x4fe4c9(_0x5b8ec9,_0x2ff93c,_0x1d7c7d,_0x4630b1[_0x456b8f(0xf3)]);}else await _0x57a192({'projectCode':_0x5b8ec9,'appCode':_0x1d7c7d,'env':_0x2ff93c,'cookie':_0x4630b1[_0x456b8f(0xf3)]});return{'ok':!![]};}},{'service':a126_0x7f44bf(0xef),'command':a126_0x7f44bf(0xfe),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5c4397){const _0x335c25=a126_0x7f44bf;return await upgradeApp(_0x5c4397[_0x335c25(0xec)],{'yes':_0x5c4397['bool'](_0x335c25(0xee))}),{'ok':!![]};}}];function a126_0x413b(_0x15c13a,_0x1d46b6){_0x15c13a=_0x15c13a-0xdf;const _0x3ec682=a126_0x3ec6();let _0x413bb2=_0x3ec682[_0x15c13a];return _0x413bb2;}function a126_0x3ec6(){const _0x5d79f1=['\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Skip\x20confirmation\x20prompt','30mQYcPW','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','5398170pvhSDx','upgrade','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','boolean','../../commands/project/create/main.js','args','Target\x20environment','project-name','1386756IUAHZz','16YIHexG','name','bool','../../commands/project/create/non-interactive.js','192966tdkcjJ','appcode','string','12115AeSBTP','Usage:\x20','create','1727322xKFYod','nonInteractive','env','yes','project','Auto-confirm\x20prompts','1735668nbLtMA','5TukUcy','cookie','str','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','trim','write','1906664zMKwpo'];a126_0x3ec6=function(){return _0x5d79f1;};return a126_0x3ec6();}
1
+ const a125_0x246598=a125_0x4d41;(function(_0x41d84c,_0x1e9709){const _0x1a356b=a125_0x4d41,_0x415463=_0x41d84c();while(!![]){try{const _0x219aee=-parseInt(_0x1a356b(0x105))/0x1+-parseInt(_0x1a356b(0xfc))/0x2*(parseInt(_0x1a356b(0x100))/0x3)+-parseInt(_0x1a356b(0xff))/0x4*(parseInt(_0x1a356b(0x111))/0x5)+-parseInt(_0x1a356b(0xf5))/0x6*(parseInt(_0x1a356b(0xf8))/0x7)+parseInt(_0x1a356b(0x10b))/0x8*(-parseInt(_0x1a356b(0x118))/0x9)+parseInt(_0x1a356b(0xfb))/0xa*(parseInt(_0x1a356b(0x10d))/0xb)+parseInt(_0x1a356b(0xf7))/0xc*(parseInt(_0x1a356b(0x119))/0xd);if(_0x219aee===_0x1e9709)break;else _0x415463['push'](_0x415463['shift']());}catch(_0x227fc8){_0x415463['push'](_0x415463['shift']());}}}(a125_0x794e,0x8cbd0));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a125_0x4d41(_0x3df44c,_0x4329ad){_0x3df44c=_0x3df44c-0xf1;const _0x794e89=a125_0x794e();let _0x4d41c9=_0x794e89[_0x3df44c];return _0x4d41c9;}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a125_0x246598(0x115),'type':a125_0x246598(0x109),'description':a125_0x246598(0x10e)},{'name':'env','type':a125_0x246598(0x109),'description':a125_0x246598(0x116)},{'name':'yes','type':'boolean','description':a125_0x246598(0x104),'default':![]}],createFlags=[{'name':a125_0x246598(0xf6),'type':a125_0x246598(0x109),'description':a125_0x246598(0xf4)},{'name':'env','type':a125_0x246598(0x109),'description':a125_0x246598(0x116)},{'name':a125_0x246598(0x115),'type':a125_0x246598(0x109),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':'yes','type':'boolean','description':a125_0x246598(0xfe),'default':![]}];function a125_0x794e(){const _0x8b4638=['init','Project\x20name','6MWmqNC','name','36ooKLAI','1463833hcLRNv','env','Usage:\x20','1883830lRAsxu','6TCNMTc','cookie','Skip\x20confirmation\x20prompt','1756dihFiR','1129155BYqPwi','project','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Auto-confirm\x20prompts','368866bCUicy','write','Create\x20a\x20new\x20project','create','string','project-name','16KhSyME','yes','66QbTfXI','App\x20code\x20to\x20initialize','../../commands/project/create/main.js','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','1795afJGav','bool','trim','../../commands/project/create/non-interactive.js','appcode','Target\x20environment','validation','3267513oVqRmn','8827091HwdZMT','str','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.'];a125_0x794e=function(){return _0x8b4638;};return a125_0x794e();}export const projectDefinitions=[{'service':a125_0x246598(0x101),'command':a125_0x246598(0xf3),'description':'Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','risk':a125_0x246598(0x106),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3548d9){const _0x2cfdfb=a125_0x246598;return await initConfig({'appcode':_0x3548d9[_0x2cfdfb(0xf1)]('appcode')||undefined,'env':_0x3548d9[_0x2cfdfb(0xf1)](_0x2cfdfb(0xf9))||undefined,'autoYes':_0x3548d9[_0x2cfdfb(0x112)](_0x2cfdfb(0x10c))}),{'ok':!![]};}},{'service':a125_0x246598(0x101),'command':a125_0x246598(0x108),'description':a125_0x246598(0x107),'risk':a125_0x246598(0x106),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a125_0x246598(0x10a),'description':a125_0x246598(0x110),'required':![]}],'flags':createFlags,async 'execute'(_0x5dd687){const _0x8324a1=a125_0x246598,{createApp:_0x3aa291}=await import(_0x8324a1(0x10f)),{createProjectNonInteractive:_0x1bbb65}=await import(_0x8324a1(0x114)),_0x34cf38=_0x5dd687[_0x8324a1(0xf1)](_0x8324a1(0xf6))[_0x8324a1(0x113)]()||_0x5dd687['args'][0x0]?.['trim'](),_0x33369e=_0x5dd687[_0x8324a1(0xf1)](_0x8324a1(0xf9))||undefined,_0x3d056c=_0x5dd687[_0x8324a1(0xf1)](_0x8324a1(0x115))||undefined;if(_0x5dd687['nonInteractive']){if(!_0x34cf38)throw CliErrors[_0x8324a1(0x117)](_0x8324a1(0xf2),_0x8324a1(0xfa)+CLI_BIN_NAME+_0x8324a1(0x103));await _0x1bbb65(_0x34cf38,_0x33369e,_0x3d056c,_0x5dd687['cookie']);}else await _0x3aa291({'projectCode':_0x34cf38,'appCode':_0x3d056c,'env':_0x33369e,'cookie':_0x5dd687[_0x8324a1(0xfd)]});return{'ok':!![]};}},{'service':'project','command':'upgrade','description':a125_0x246598(0x102),'risk':a125_0x246598(0x106),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5e14df){const _0x17ab44=a125_0x246598;return await upgradeApp(_0x5e14df['nonInteractive'],{'yes':_0x5e14df[_0x17ab44(0x112)](_0x17ab44(0x10c))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x545491,_0x4d587a){const _0xabf14c=a127_0x5de4,_0x10e43d=_0x545491();while(!![]){try{const _0x8d82df=parseInt(_0xabf14c(0x1f2))/0x1*(parseInt(_0xabf14c(0x200))/0x2)+parseInt(_0xabf14c(0x1fd))/0x3*(parseInt(_0xabf14c(0x210))/0x4)+parseInt(_0xabf14c(0x1fa))/0x5+-parseInt(_0xabf14c(0x1f8))/0x6*(parseInt(_0xabf14c(0x20a))/0x7)+-parseInt(_0xabf14c(0x1e4))/0x8+-parseInt(_0xabf14c(0x1e8))/0x9*(parseInt(_0xabf14c(0x20b))/0xa)+parseInt(_0xabf14c(0x205))/0xb;if(_0x8d82df===_0x4d587a)break;else _0x10e43d['push'](_0x10e43d['shift']());}catch(_0x210572){_0x10e43d['push'](_0x10e43d['shift']());}}}(a127_0x5064,0xc9e57));function a127_0x5064(){const _0x4632cb=['\x20→\x20.rabetbase.json','setLogPath','package.json','.rabetbase.json','.bak','yellow','4610240NiyBig','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','\x20api\x20pull\x27','info','3321KNljFB','parse','version','Please\x20enter\x20App\x20Code:','env','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','\x20\x20Default:\x20','\x20\x20Apps:\x20','keys','从旧配置文件升级成功','119414GJDnRy','green','defaultApp','?\x20(Old\x20file\x20→\x20*.bak)','init','\x20project\x20init`\x20to\x20start\x20fresh.','960XPCffJ','Migration\x20cancelled.\x20Run\x20`','3332475BEZQcm','1.0.0','../..','824853MnsuqV','\x20\x20appcode:\x20','bold','26SwRBmp','\x20api\x20generate\x27\x20and\x20\x27','app','string','production','8395090lvbvzE','join','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','trim','toLocaleString','33656DHhWPC','29390RfdhzH','apps','utf8','appcode','cyan','4eBbjfL','Invalid\x20App\x20Code','log'];a127_0x5064=function(){return _0x4632cb;};return a127_0x5064();}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a127_0x42a4b0 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a127_0x5de4(_0x1f3507,_0x4bb28e){_0x1f3507=_0x1f3507-0x1e0;const _0x506488=a127_0x5064();let _0x5de446=_0x506488[_0x1f3507];return _0x5de446;}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x5824b9){const _0x115eb2=a127_0x5de4,{appcode:_0x57b426,env:_0xb0b92,autoYes:_0xefc360}=_0x5824b9,_0x5c3586=process['cwd']();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x5c9142;for(const _0x7aa029 of LEGACY_CONFIG_NAMES){const _0x2683f7=resolve(_0x5c3586,_0x7aa029);if(existsSync(_0x2683f7)){_0x5c9142=_0x2683f7;break;}}if(_0x5c9142){let _0x3d58a1={};try{_0x3d58a1=JSON[_0x115eb2(0x1e9)](readFileSync(_0x5c9142,_0x115eb2(0x20d)));}catch{}const _0x52a447=basename(_0x5c9142),_0x257487=_0x3d58a1?.[_0x115eb2(0x20e)]||_0x3d58a1?.[_0x115eb2(0x202)];let _0x111c68=_0xefc360;!_0xefc360&&(console[_0x115eb2(0x212)](a127_0x42a4b0[_0x115eb2(0x1e3)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a127_0x42a4b0[_0x115eb2(0x1ff)](_0x52a447))),_0x257487&&console[_0x115eb2(0x212)](a127_0x42a4b0[_0x115eb2(0x20f)](_0x115eb2(0x1fe)+_0x257487)),_0x111c68=await confirm({'message':'Upgrade\x20it\x20to\x20'+a127_0x42a4b0[_0x115eb2(0x1ff)](_0x115eb2(0x1e1))+_0x115eb2(0x1f5),'default':!![]}));if(!_0x111c68){console[_0x115eb2(0x212)](_0x115eb2(0x1f9)+CLI_BIN_NAME+_0x115eb2(0x1f7));return;}const _0x2f2429=resolve(_0x5c3586,NEW_CONFIG_NAME),_0x3ba49e=getCliVersionFromPkg(),_0x41a9f8=readRawConfig(),_0x119b4f=_0x57b426||(typeof _0x3d58a1?.['appcode']===_0x115eb2(0x203)?_0x3d58a1['appcode']:undefined)||(typeof _0x3d58a1?.[_0x115eb2(0x202)]==='string'?_0x3d58a1[_0x115eb2(0x202)]:undefined)||await askAppcode(),_0x3f39cd=typeof _0x3d58a1?.[_0x115eb2(0x1ec)]==='string'?_0x3d58a1[_0x115eb2(0x1ec)]:typeof _0x41a9f8[_0x115eb2(0x1ec)]==='string'?_0x41a9f8[_0x115eb2(0x1ec)]:'production',_0x58e1d8=buildCanonicalProjectConfig({..._0x41a9f8,..._0x3d58a1},{'appCodes':[_0x119b4f],'env':_0x3f39cd,'metadata':{'version':_0x3ba49e,'migratedAt':new Date()[_0x115eb2(0x209)](),'migratedFrom':_0x5c9142}});writeConfigFile(_0x2f2429,_0x58e1d8);const _0x1eb25b=_0x5c9142+_0x115eb2(0x1e2);renameSync(_0x5c9142,_0x1eb25b),logger[_0x115eb2(0x214)](_0x5c3586),logger[_0x115eb2(0x1e7)]('init',_0x115eb2(0x1f1),{'from':_0x5c9142,'to':_0x2f2429,'appcode':_0x119b4f,'env':_0x58e1d8[_0x115eb2(0x1ec)]}),console['log'](a127_0x42a4b0['green']('✓\x20Upgraded\x20'+_0x52a447+_0x115eb2(0x213))),console['log'](a127_0x42a4b0[_0x115eb2(0x20f)](_0x115eb2(0x1ef)+Object['keys'](_0x58e1d8[_0x115eb2(0x20c)]||{})[_0x115eb2(0x206)](',\x20'))),console['log'](a127_0x42a4b0[_0x115eb2(0x20f)](_0x115eb2(0x1ee)+_0x58e1d8[_0x115eb2(0x1f4)])),console[_0x115eb2(0x212)](a127_0x42a4b0['gray'](_0x115eb2(0x207)+_0x52a447+'.bak'));return;}const _0x40ece5=_0x57b426||await askAppcode(),_0x507fee=resolve(_0x5c3586,NEW_CONFIG_NAME),_0x5d9452=getCliVersionFromPkg(),_0x107b45=readRawConfig(),_0x250cfc=typeof _0x107b45['env']==='string'?_0x107b45[_0x115eb2(0x1ec)]:undefined,_0x2d46d5=buildCanonicalProjectConfig({},{'appCodes':[_0x40ece5],'env':_0xb0b92||_0x250cfc||_0x115eb2(0x204),'metadata':{'version':_0x5d9452,'createdAt':new Date()[_0x115eb2(0x209)]()}});writeConfigFile(_0x507fee,_0x2d46d5),logger[_0x115eb2(0x214)](_0x5c3586),logger[_0x115eb2(0x1e7)](_0x115eb2(0x1f6),'初始化项目配置文件成功',{'appcode':_0x40ece5,'env':_0x2d46d5[_0x115eb2(0x1ec)],'version':_0x2d46d5[_0x115eb2(0x1ea)],'configPath':_0x507fee}),console[_0x115eb2(0x212)](a127_0x42a4b0[_0x115eb2(0x1f3)](_0x115eb2(0x1e5))),console[_0x115eb2(0x212)](a127_0x42a4b0[_0x115eb2(0x20f)](_0x115eb2(0x1ef)+Object[_0x115eb2(0x1f0)](_0x2d46d5['apps']||{})[_0x115eb2(0x206)](',\x20'))),console[_0x115eb2(0x212)](a127_0x42a4b0[_0x115eb2(0x20f)](_0x115eb2(0x1ee)+_0x2d46d5['defaultApp'])),console['log'](_0x115eb2(0x1ed)+CLI_BIN_NAME+_0x115eb2(0x201)+CLI_BIN_NAME+_0x115eb2(0x1e6));}function askAppcode(){const _0x33177a=a127_0x5de4;return input({'message':_0x33177a(0x1eb),'validate':_0x4184b2=>{const _0x58c94a=_0x33177a;if(!_0x4184b2['trim']())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0xf00348,message:_0x1ffa21}=validateAppcode(_0x4184b2[_0x58c94a(0x208)]());return _0xf00348||_0x1ffa21||_0x58c94a(0x211);}});}function getCliVersionFromPkg(){const _0x55b494=a127_0x5de4;try{const _0xa95300=fileURLToPath(import.meta.url),_0x36ad3c=resolve(dirname(_0xa95300),_0x55b494(0x1fc)),_0x5c4b2f=JSON['parse'](readFileSync(resolve(_0x36ad3c,_0x55b494(0x1e0)),_0x55b494(0x20d)));return _0x5c4b2f[_0x55b494(0x1ea)]||_0x55b494(0x1fb);}catch{return _0x55b494(0x1fb);}}
1
+ (function(_0x364786,_0x1bd622){const _0x36a359=a126_0x4e08,_0x16a537=_0x364786();while(!![]){try{const _0x3fba30=-parseInt(_0x36a359(0x9f))/0x1+parseInt(_0x36a359(0xb2))/0x2+-parseInt(_0x36a359(0xab))/0x3*(parseInt(_0x36a359(0xcc))/0x4)+parseInt(_0x36a359(0xc0))/0x5+-parseInt(_0x36a359(0xd0))/0x6+parseInt(_0x36a359(0xa2))/0x7+parseInt(_0x36a359(0xa3))/0x8*(parseInt(_0x36a359(0xc2))/0x9);if(_0x3fba30===_0x1bd622)break;else _0x16a537['push'](_0x16a537['shift']());}catch(_0x377bf7){_0x16a537['push'](_0x16a537['shift']());}}}(a126_0x32ad,0xd5e56));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a126_0x163135 from'chalk';function a126_0x4e08(_0x554fab,_0x46f18a){_0x554fab=_0x554fab-0x9b;const _0x32aded=a126_0x32ad();let _0x4e0895=_0x32aded[_0x554fab];return _0x4e0895;}import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';function a126_0x32ad(){const _0x1a42df=['\x20\x20Apps:\x20','\x20api\x20generate\x27\x20and\x20\x27','gray','apps','\x20project\x20init`\x20to\x20start\x20fresh.','2806764TPoPXr','\x20→\x20.rabetbase.json','app','初始化项目配置文件成功','setLogPath','utf8','string','init','yellow','从旧配置文件升级成功','production','parse','1.0.0','env','5498380aiCHLN','info','315nCWSLJ','cwd','version','keys','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','Please\x20enter\x20App\x20Code:','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','?\x20(Old\x20file\x20→\x20*.bak)','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','defaultApp','380OxehiJ','log','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','join','7809324NaWZXs','toLocaleString','\x20api\x20pull\x27','trim','Migration\x20cancelled.\x20Run\x20`','1295964GbzbEL','Upgrade\x20it\x20to\x20','green','11409671IxZufE','25888IKaRJw','\x20\x20Default:\x20','.bak','appcode','../..','bold','.rabetbase.json','App\x20Code\x20cannot\x20be\x20empty','24399tHtfQS','cyan'];a126_0x32ad=function(){return _0x1a42df;};return a126_0x32ad();}import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x5f383a){const _0x1342dd=a126_0x4e08,{appcode:_0x418e3e,env:_0x266f57,autoYes:_0x57ceb0}=_0x5f383a,_0x2e8594=process[_0x1342dd(0xc3)]();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x22dcee;for(const _0x13076b of LEGACY_CONFIG_NAMES){const _0x39f084=resolve(_0x2e8594,_0x13076b);if(existsSync(_0x39f084)){_0x22dcee=_0x39f084;break;}}if(_0x22dcee){let _0x250347={};try{_0x250347=JSON[_0x1342dd(0xbd)](readFileSync(_0x22dcee,_0x1342dd(0xb7)));}catch{}const _0x492e95=basename(_0x22dcee),_0x6fb3fa=_0x250347?.[_0x1342dd(0xa6)]||_0x250347?.[_0x1342dd(0xb4)];let _0x754048=_0x57ceb0;!_0x57ceb0&&(console[_0x1342dd(0xcd)](a126_0x163135[_0x1342dd(0xba)](_0x1342dd(0xce)+a126_0x163135[_0x1342dd(0xa8)](_0x492e95))),_0x6fb3fa&&console['log'](a126_0x163135['cyan']('\x20\x20appcode:\x20'+_0x6fb3fa)),_0x754048=await confirm({'message':_0x1342dd(0xa0)+a126_0x163135[_0x1342dd(0xa8)](_0x1342dd(0xa9))+_0x1342dd(0xc9),'default':!![]}));if(!_0x754048){console[_0x1342dd(0xcd)](_0x1342dd(0x9e)+CLI_BIN_NAME+_0x1342dd(0xb1));return;}const _0x529147=resolve(_0x2e8594,NEW_CONFIG_NAME),_0x1f0168=getCliVersionFromPkg(),_0xc1baaa=readRawConfig(),_0x5ea507=_0x418e3e||(typeof _0x250347?.[_0x1342dd(0xa6)]===_0x1342dd(0xb8)?_0x250347['appcode']:undefined)||(typeof _0x250347?.['app']===_0x1342dd(0xb8)?_0x250347['app']:undefined)||await askAppcode(),_0x423dbc=typeof _0x250347?.[_0x1342dd(0xbf)]===_0x1342dd(0xb8)?_0x250347['env']:typeof _0xc1baaa[_0x1342dd(0xbf)]===_0x1342dd(0xb8)?_0xc1baaa[_0x1342dd(0xbf)]:_0x1342dd(0xbc),_0x28a7f3=buildCanonicalProjectConfig({..._0xc1baaa,..._0x250347},{'appCodes':[_0x5ea507],'env':_0x423dbc,'metadata':{'version':_0x1f0168,'migratedAt':new Date()[_0x1342dd(0x9b)](),'migratedFrom':_0x22dcee}});writeConfigFile(_0x529147,_0x28a7f3);const _0x3f6309=_0x22dcee+_0x1342dd(0xa5);renameSync(_0x22dcee,_0x3f6309),logger['setLogPath'](_0x2e8594),logger[_0x1342dd(0xc1)](_0x1342dd(0xb9),_0x1342dd(0xbb),{'from':_0x22dcee,'to':_0x529147,'appcode':_0x5ea507,'env':_0x28a7f3[_0x1342dd(0xbf)]}),console[_0x1342dd(0xcd)](a126_0x163135['green']('✓\x20Upgraded\x20'+_0x492e95+_0x1342dd(0xb3))),console['log'](a126_0x163135[_0x1342dd(0xac)](_0x1342dd(0xad)+Object[_0x1342dd(0xc5)](_0x28a7f3[_0x1342dd(0xb0)]||{})[_0x1342dd(0xcf)](',\x20'))),console['log'](a126_0x163135[_0x1342dd(0xac)](_0x1342dd(0xa4)+_0x28a7f3[_0x1342dd(0xcb)])),console[_0x1342dd(0xcd)](a126_0x163135[_0x1342dd(0xaf)](_0x1342dd(0xca)+_0x492e95+_0x1342dd(0xa5)));return;}const _0x4ec054=_0x418e3e||await askAppcode(),_0x1d8b13=resolve(_0x2e8594,NEW_CONFIG_NAME),_0x9bae35=getCliVersionFromPkg(),_0x17f621=readRawConfig(),_0xf69ff0=typeof _0x17f621[_0x1342dd(0xbf)]===_0x1342dd(0xb8)?_0x17f621['env']:undefined,_0x155c91=buildCanonicalProjectConfig({},{'appCodes':[_0x4ec054],'env':_0x266f57||_0xf69ff0||_0x1342dd(0xbc),'metadata':{'version':_0x9bae35,'createdAt':new Date()[_0x1342dd(0x9b)]()}});writeConfigFile(_0x1d8b13,_0x155c91),logger[_0x1342dd(0xb6)](_0x2e8594),logger[_0x1342dd(0xc1)](_0x1342dd(0xb9),_0x1342dd(0xb5),{'appcode':_0x4ec054,'env':_0x155c91[_0x1342dd(0xbf)],'version':_0x155c91[_0x1342dd(0xc4)],'configPath':_0x1d8b13}),console[_0x1342dd(0xcd)](a126_0x163135[_0x1342dd(0xa1)](_0x1342dd(0xc6))),console['log'](a126_0x163135[_0x1342dd(0xac)](_0x1342dd(0xad)+Object[_0x1342dd(0xc5)](_0x155c91[_0x1342dd(0xb0)]||{})[_0x1342dd(0xcf)](',\x20'))),console['log'](a126_0x163135[_0x1342dd(0xac)](_0x1342dd(0xa4)+_0x155c91[_0x1342dd(0xcb)])),console[_0x1342dd(0xcd)](_0x1342dd(0xc8)+CLI_BIN_NAME+_0x1342dd(0xae)+CLI_BIN_NAME+_0x1342dd(0x9c));}function askAppcode(){const _0x52416a=a126_0x4e08;return input({'message':_0x52416a(0xc7),'validate':_0x4548a3=>{const _0x14d54d=_0x52416a;if(!_0x4548a3[_0x14d54d(0x9d)]())return _0x14d54d(0xaa);const {valid:_0x203aff,message:_0x397b35}=validateAppcode(_0x4548a3[_0x14d54d(0x9d)]());return _0x203aff||_0x397b35||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x33b832=a126_0x4e08;try{const _0x4dcccd=fileURLToPath(import.meta.url),_0x39e057=resolve(dirname(_0x4dcccd),_0x33b832(0xa7)),_0x67cec2=JSON['parse'](readFileSync(resolve(_0x39e057,'package.json'),'utf8'));return _0x67cec2[_0x33b832(0xc4)]||_0x33b832(0xbe);}catch{return _0x33b832(0xbe);}}