@lovrabet/rabetbase-cli 2.2.4-beta.3 → 2.2.4-beta.5

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 (210) 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/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -1
  60. package/lib/commands/dataset/relation-delete.js +1 -1
  61. package/lib/commands/dataset/relation-shared.js +1 -1
  62. package/lib/commands/dataset/relation-update.js +1 -1
  63. package/lib/commands/dataset/relations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/list.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/relation-audit.js +1 -1
  104. package/lib/commands/page/shared.js +1 -1
  105. package/lib/commands/page/standard-page-status.js +1 -1
  106. package/lib/commands/page/sync.js +1 -1
  107. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  108. package/lib/commands/project/create/format-elapsed.js +1 -1
  109. package/lib/commands/project/create/main.js +1 -1
  110. package/lib/commands/project/create/non-interactive.js +1 -1
  111. package/lib/commands/project/create/project-template-path.js +1 -1
  112. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  113. package/lib/commands/project/create/use-format-code.js +1 -1
  114. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  115. package/lib/commands/project/index.js +1 -1
  116. package/lib/commands/project/init.js +1 -1
  117. package/lib/commands/project/upgrade.js +1 -1
  118. package/lib/commands/registry.js +1 -1
  119. package/lib/commands/run/index.js +1 -1
  120. package/lib/commands/schema.js +1 -1
  121. package/lib/commands/skill/index.js +1 -1
  122. package/lib/commands/sql/create.js +1 -1
  123. package/lib/commands/sql/delete.js +1 -1
  124. package/lib/commands/sql/detail.js +1 -1
  125. package/lib/commands/sql/exec.js +1 -1
  126. package/lib/commands/sql/index.js +1 -1
  127. package/lib/commands/sql/list.js +1 -1
  128. package/lib/commands/sql/pull.js +1 -1
  129. package/lib/commands/sql/push.js +1 -1
  130. package/lib/commands/sql/save.js +1 -1
  131. package/lib/commands/sql/shared.js +1 -1
  132. package/lib/commands/sql/status.js +1 -1
  133. package/lib/commands/sql/validate.js +1 -1
  134. package/lib/config/schema.js +1 -1
  135. package/lib/constant/cdn.js +1 -1
  136. package/lib/constant/cli.js +1 -1
  137. package/lib/constant/defaults.js +1 -1
  138. package/lib/constant/domain.js +1 -1
  139. package/lib/constant/env.js +1 -1
  140. package/lib/constant/output.js +1 -1
  141. package/lib/constant/paths.js +1 -1
  142. package/lib/constant/risk.js +1 -1
  143. package/lib/context/app-resolver.js +1 -0
  144. package/lib/context/auth-resolver.js +1 -0
  145. package/lib/context/config-loader.js +1 -0
  146. package/lib/context.js +1 -1
  147. package/lib/core/alias-resolver.js +1 -1
  148. package/lib/core/api-client.js +1 -1
  149. package/lib/core/bff/config.js +1 -1
  150. package/lib/core/bff/file-system.js +1 -1
  151. package/lib/core/bff/hash.js +1 -1
  152. package/lib/core/bff/lock.js +1 -1
  153. package/lib/core/bff/utils.js +1 -1
  154. package/lib/core/db-resolver.js +1 -1
  155. package/lib/core/page/file-system.js +1 -1
  156. package/lib/core/page/hash.js +1 -1
  157. package/lib/core/page/lock.js +1 -1
  158. package/lib/core/sql-sync/config.js +1 -1
  159. package/lib/core/sql-sync/file-system.js +1 -1
  160. package/lib/core/sql-sync/hash.js +1 -1
  161. package/lib/core/sql-sync/lock.js +1 -1
  162. package/lib/core/sql-sync/utils.js +1 -1
  163. package/lib/core/sql-validator.js +1 -1
  164. package/lib/errors.js +1 -1
  165. package/lib/framework/build-all-flags.js +1 -1
  166. package/lib/framework/flags.js +1 -1
  167. package/lib/framework/help.js +1 -1
  168. package/lib/framework/index.js +1 -1
  169. package/lib/framework/output.js +1 -1
  170. package/lib/framework/response.js +1 -1
  171. package/lib/framework/runner-alias.js +1 -1
  172. package/lib/framework/runner.js +1 -1
  173. package/lib/framework/schema-export.js +1 -1
  174. package/lib/framework/types.js +1 -1
  175. package/lib/generated/build-info.js +1 -1
  176. package/lib/help.js +1 -1
  177. package/lib/skills/main.js +1 -1
  178. package/lib/skills/npx-skills-add.js +1 -1
  179. package/lib/telemetry/cli-command-trace.js +1 -1
  180. package/lib/telemetry/cli-help-trace.js +1 -1
  181. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  182. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  183. package/lib/telemetry/send-cli-trace-log.js +1 -1
  184. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  185. package/lib/utils/ai_config.js +1 -1
  186. package/lib/utils/apply-jq-filter.js +1 -1
  187. package/lib/utils/cdn-config.js +1 -1
  188. package/lib/utils/check-sdk-version.js +1 -1
  189. package/lib/utils/cli-version-check.js +1 -1
  190. package/lib/utils/cli-version-policy.js +1 -1
  191. package/lib/utils/config.js +1 -1
  192. package/lib/utils/copy-directory.js +1 -1
  193. package/lib/utils/entity-with-id.js +1 -1
  194. package/lib/utils/file-utils.js +1 -1
  195. package/lib/utils/guides-cdn.js +1 -1
  196. package/lib/utils/http-client.js +1 -1
  197. package/lib/utils/is-non-interactive.js +1 -1
  198. package/lib/utils/logger.js +1 -1
  199. package/lib/utils/params.js +1 -1
  200. package/lib/utils/platform.js +1 -1
  201. package/lib/utils/rules-cdn.js +1 -1
  202. package/lib/utils/sleep.js +1 -1
  203. package/lib/utils/template-replacer.js +1 -1
  204. package/lib/utils/update-notice.js +1 -1
  205. package/lib/utils/version.js +1 -1
  206. package/lib/utils/with-active-cookie.js +1 -1
  207. package/lib/utils/write-cli-side-channel.js +1 -1
  208. package/package.json +2 -2
  209. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +1 -1
  210. package/templates/rules/lovrabet_rules.mdc.tpl +3 -1
@@ -1 +1 @@
1
- (function(_0xaf3a1c,_0xcfaf97){const _0x4c4cec=a110_0x405f,_0x4fcc54=_0xaf3a1c();while(!![]){try{const _0xe73f86=parseInt(_0x4c4cec(0x1a0))/0x1+parseInt(_0x4c4cec(0x187))/0x2*(-parseInt(_0x4c4cec(0x17a))/0x3)+-parseInt(_0x4c4cec(0x19b))/0x4+parseInt(_0x4c4cec(0x185))/0x5*(parseInt(_0x4c4cec(0x197))/0x6)+parseInt(_0x4c4cec(0x17c))/0x7*(-parseInt(_0x4c4cec(0x170))/0x8)+-parseInt(_0x4c4cec(0x1a1))/0x9+parseInt(_0x4c4cec(0x195))/0xa;if(_0xe73f86===_0xcfaf97)break;else _0x4fcc54['push'](_0x4fcc54['shift']());}catch(_0x5a754c){_0x4fcc54['push'](_0x4fcc54['shift']());}}}(a110_0x4d26,0x8bab2));import a110_0x847058 from'path';import a110_0x570f0a 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';function a110_0x405f(_0x37d973,_0x35d44a){_0x37d973=_0x37d973-0x16f;const _0x4d2661=a110_0x4d26();let _0x405fba=_0x4d2661[_0x37d973];return _0x405fba;}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';function a110_0x4d26(){const _0x21caa4=['\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','trim','validation','\x20\x20√\x20Configuration\x20file\x20created','\x20\x20Installing\x20dependencies...','\x22\x20already\x20exists.','package.json','225279pbdUYM','access','2829505cznuMd','modelCount','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','stringify','join','*\x20Creating\x20project\x20','production','resolve','cwd','5qqULYH','needsUpgrade','30VBSuGL','log','\x20\x20√\x20Pulled\x20','description','writeFile','Project\x20name\x20cannot\x20be\x20empty.','Cannot\x20create\x20project\x20in\x20current\x20directory.','dirname','env','npm','\x20\x20√\x20Code\x20formatted','\x20model(s)','\x20\x20rabetbase\x20run\x20start\x0a','Project\x20directory\x20\x22','28955160yLbXli','...','1185618jWaoAc','\x20created\x20successfully!','length','bun\x20run\x20format','2722672cnMmGO','W_OK','\x20\x20√\x20Project\x20template\x20created','\x0a√\x20Project\x20','bun','601445GIIVJD','8200836aKQLPz','string','8rZPiGJ','parse','name'];a110_0x4d26=function(){return _0x21caa4;};return a110_0x4d26();}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(_0x1698b8,_0x169fe1,_0x2945e7,_0x5f25d0){const _0x28af73=a110_0x405f,_0x5871f9=await checkCliVersion();(_0x5871f9[_0x28af73(0x186)]||_0x5871f9['belowMinimum'])&&(printCliUpgradeWarning(_0x5871f9),assertCliVersionSupported(_0x5871f9));if(!_0x1698b8||_0x1698b8[_0x28af73(0x174)]()==='')throw CliErrors[_0x28af73(0x175)](_0x28af73(0x18c));const _0x597eb8=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x597eb8['test'](_0x1698b8))throw CliErrors[_0x28af73(0x175)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x1698b8['length']>0x64)throw CliErrors[_0x28af73(0x175)](_0x28af73(0x17e));const _0x1597ea=a110_0x847058[_0x28af73(0x183)](process['cwd'](),_0x1698b8);if(existsSync(_0x1597ea))throw CliErrors[_0x28af73(0x175)](_0x28af73(0x194)+_0x1698b8+_0x28af73(0x178),'Use\x20a\x20different\x20project\x20name.');try{const _0x4db849=a110_0x847058[_0x28af73(0x18e)](_0x1597ea);await a110_0x570f0a[_0x28af73(0x17b)](_0x4db849,a110_0x570f0a['constants'][_0x28af73(0x19c)]);}catch{throw CliErrors[_0x28af73(0x175)](_0x28af73(0x18d),'Check\x20directory\x20permissions.');}try{console['log'](_0x28af73(0x181)+_0x1698b8+_0x28af73(0x196));const _0x392c15=getSubAppReactDemoTemplateDir();await copyDirectory(_0x392c15,_0x1597ea),console['log'](_0x28af73(0x19d)),await updatePackageJsonName(_0x1698b8),console[_0x28af73(0x188)]('\x20\x20√\x20package.json\x20updated'),console['log'](_0x28af73(0x177)),console['log'](_0x28af73(0x173)),await formatCode(_0x1597ea),console['log'](_0x28af73(0x191)),await configureProject(_0x1698b8,_0x2945e7,_0x169fe1),console[_0x28af73(0x188)](_0x28af73(0x176)),_0x2945e7&&await pullApiConfig(_0x1597ea,_0x2945e7,_0x169fe1,_0x5f25d0),console[_0x28af73(0x188)](_0x28af73(0x19e)+_0x1698b8+_0x28af73(0x198)),console[_0x28af73(0x188)]('\x0a\x20\x20cd\x20'+_0x1698b8),console['log'](_0x28af73(0x193));}catch(_0x4f2455){try{existsSync(_0x1597ea)&&await a110_0x570f0a['rm'](_0x1597ea,{'recursive':!![],'force':!![]});}catch{}throw _0x4f2455;}}async function updatePackageJsonName(_0x5a4fdd){const _0x53fe57=a110_0x405f,_0x5e1d0b=a110_0x847058[_0x53fe57(0x183)](process[_0x53fe57(0x184)](),_0x5a4fdd),_0x58bf4b=a110_0x847058[_0x53fe57(0x180)](_0x5e1d0b,_0x53fe57(0x179)),_0x3ec7ef=await a110_0x570f0a['readFile'](_0x58bf4b,'utf-8'),_0x5a924f=JSON[_0x53fe57(0x171)](_0x3ec7ef);_0x5a924f[_0x53fe57(0x172)]=_0x5a4fdd,_0x5a924f[_0x53fe57(0x18a)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a110_0x570f0a[_0x53fe57(0x18b)](_0x58bf4b,JSON[_0x53fe57(0x17f)](_0x5a924f,null,0x2)+'\x0a');}function detectPackageManager(){const _0xc7485a=a110_0x405f;try{return execSync('bun\x20--version',{'stdio':'ignore'}),_0xc7485a(0x19f);}catch{return _0xc7485a(0x190);}}async function formatCode(_0x557854){const _0xcad4de=a110_0x405f;try{await execAsync(_0xcad4de(0x19a),{'cwd':_0x557854});}catch{}}async function configureProject(_0x140a18,_0x2c009b,_0x5108af){const _0x5aff68=a110_0x405f,_0xb657dc=a110_0x847058['resolve'](process[_0x5aff68(0x184)](),_0x140a18),_0x3c5854=a110_0x847058[_0x5aff68(0x180)](_0xb657dc,NEW_CONFIG_NAME),_0x418aba=readConfig(),_0x1b2cf4=typeof _0x418aba[_0x5aff68(0x18f)]===_0x5aff68(0x16f)?_0x418aba[_0x5aff68(0x18f)]:undefined,_0x58581a={};for(const _0x3ad528 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x418aba[_0x3ad528]!=null)_0x58581a[_0x3ad528]=_0x418aba[_0x3ad528];}const _0x1dad32=buildCanonicalProjectConfig(_0x58581a,{'appCodes':_0x2c009b?[_0x2c009b]:[],'env':_0x5108af||_0x1b2cf4||_0x5aff68(0x182),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x3c5854,_0x1dad32);}async function pullApiConfig(_0x535c9e,_0x5320c3,_0x48eb1d,_0x306d2d){const _0x4e7699=a110_0x405f,_0x5b09d0=process[_0x4e7699(0x184)]();try{process['chdir'](_0x535c9e);const _0x4b8962=_0x48eb1d||'production';initEnv(_0x4b8962),console[_0x4e7699(0x188)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x1d8d74}=await fetchModelList(_0x5320c3,_0x306d2d||''),_0x10d960=await generateApiFile(_0x1d8d74,'',_0x5320c3,!![],_0x4b8962,DEFAULT_API_DIR);console[_0x4e7699(0x188)](_0x4e7699(0x189)+_0x1d8d74[_0x4e7699(0x199)]+'\x20dataset(s),\x20generated\x20'+_0x10d960[_0x4e7699(0x17d)]+_0x4e7699(0x192));}catch(_0x5bbafb){console['log']('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process['chdir'](_0x5b09d0);}}
1
+ function a110_0x20ee(_0x5c91cf,_0x39896e){_0x5c91cf=_0x5c91cf-0x154;const _0x4d592c=a110_0x4d59();let _0x20ee5e=_0x4d592c[_0x5c91cf];return _0x20ee5e;}(function(_0x2fd801,_0x46cbef){const _0x2acff1=a110_0x20ee,_0x37f138=_0x2fd801();while(!![]){try{const _0x455609=-parseInt(_0x2acff1(0x188))/0x1+-parseInt(_0x2acff1(0x186))/0x2*(parseInt(_0x2acff1(0x177))/0x3)+-parseInt(_0x2acff1(0x15a))/0x4+-parseInt(_0x2acff1(0x167))/0x5*(-parseInt(_0x2acff1(0x17d))/0x6)+parseInt(_0x2acff1(0x173))/0x7+-parseInt(_0x2acff1(0x155))/0x8*(parseInt(_0x2acff1(0x18a))/0x9)+-parseInt(_0x2acff1(0x166))/0xa*(-parseInt(_0x2acff1(0x17f))/0xb);if(_0x455609===_0x46cbef)break;else _0x37f138['push'](_0x37f138['shift']());}catch(_0x55dd69){_0x37f138['push'](_0x37f138['shift']());}}}(a110_0x4d59,0x222f5));import a110_0x36d0ed from'path';import a110_0x20dbe1 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 a110_0x4d59(){const _0xd6a5c2=['Project\x20name\x20cannot\x20be\x20empty.','belowMinimum','\x20\x20√\x20package.json\x20updated','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','Use\x20a\x20different\x20project\x20name.','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','ignore','\x20\x20Pulling\x20API\x20configuration...','utf-8','parse','89607PpKSKo','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','writeFile','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','6PMATwb','package.json','chdir','access','description','stringify','1806GiAiKh','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','22tMbIho','Check\x20directory\x20permissions.','\x20\x20√\x20Project\x20template\x20created','Cannot\x20create\x20project\x20in\x20current\x20directory.','name','log','needsUpgrade','148034YmhJhX','env','169211HXqrqt','\x22\x20already\x20exists.','45gAJzmY','join','\x20model(s)','bun\x20--version','resolve','271104EEhuXc','string','\x20api\x20pull`\x20manually\x20later.','\x20\x20√\x20Pulled\x20','\x0a\x20\x20cd\x20','1001040EPfuph','bun\x20run\x20format','cwd','\x20dataset(s),\x20generated\x20','validation','npm','production','constants','length','Project\x20name\x20contains\x20invalid\x20characters.','\x0a√\x20Project\x20','\x20\x20Installing\x20dependencies...','4219990PYYBEU','335aANhPj','toLocaleString'];a110_0x4d59=function(){return _0xd6a5c2;};return a110_0x4d59();}export async function createProjectNonInteractive(_0x118b9f,_0x1cf928,_0x4c92a0,_0x472e53){const _0x1e0cb5=a110_0x20ee,_0x1dba7e=await checkCliVersion();(_0x1dba7e[_0x1e0cb5(0x185)]||_0x1dba7e[_0x1e0cb5(0x16a)])&&(printCliUpgradeWarning(_0x1dba7e),assertCliVersionSupported(_0x1dba7e));if(!_0x118b9f||_0x118b9f['trim']()==='')throw CliErrors[_0x1e0cb5(0x15e)](_0x1e0cb5(0x169));const _0x24d4da=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x24d4da['test'](_0x118b9f))throw CliErrors[_0x1e0cb5(0x15e)](_0x1e0cb5(0x163),_0x1e0cb5(0x17e));if(_0x118b9f[_0x1e0cb5(0x162)]>0x64)throw CliErrors[_0x1e0cb5(0x15e)](_0x1e0cb5(0x176));const _0x1cc0d2=a110_0x36d0ed[_0x1e0cb5(0x154)](process[_0x1e0cb5(0x15c)](),_0x118b9f);if(existsSync(_0x1cc0d2))throw CliErrors['validation']('Project\x20directory\x20\x22'+_0x118b9f+_0x1e0cb5(0x189),_0x1e0cb5(0x16d));try{const _0x3db8b9=a110_0x36d0ed['dirname'](_0x1cc0d2);await a110_0x20dbe1[_0x1e0cb5(0x17a)](_0x3db8b9,a110_0x20dbe1[_0x1e0cb5(0x161)]['W_OK']);}catch{throw CliErrors[_0x1e0cb5(0x15e)](_0x1e0cb5(0x182),_0x1e0cb5(0x180));}try{console['log']('*\x20Creating\x20project\x20'+_0x118b9f+'...');const _0x3c291e=getSubAppReactDemoTemplateDir();await copyDirectory(_0x3c291e,_0x1cc0d2),console['log'](_0x1e0cb5(0x181)),await updatePackageJsonName(_0x118b9f),console[_0x1e0cb5(0x184)](_0x1e0cb5(0x16b)),console['log'](_0x1e0cb5(0x165)),console['log'](_0x1e0cb5(0x16c)),await formatCode(_0x1cc0d2),console['log']('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x118b9f,_0x4c92a0,_0x1cf928),console[_0x1e0cb5(0x184)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x4c92a0&&await pullApiConfig(_0x1cc0d2,_0x4c92a0,_0x1cf928,_0x472e53),console[_0x1e0cb5(0x184)](_0x1e0cb5(0x164)+_0x118b9f+'\x20created\x20successfully!'),console['log'](_0x1e0cb5(0x159)+_0x118b9f),console[_0x1e0cb5(0x184)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x3c4170){try{existsSync(_0x1cc0d2)&&await a110_0x20dbe1['rm'](_0x1cc0d2,{'recursive':!![],'force':!![]});}catch{}throw _0x3c4170;}}async function updatePackageJsonName(_0x440c59){const _0x2fc67b=a110_0x20ee,_0x341a00=a110_0x36d0ed[_0x2fc67b(0x154)](process['cwd'](),_0x440c59),_0x1b86a7=a110_0x36d0ed[_0x2fc67b(0x18b)](_0x341a00,_0x2fc67b(0x178)),_0x4c8d6f=await a110_0x20dbe1['readFile'](_0x1b86a7,_0x2fc67b(0x171)),_0x35c4ff=JSON[_0x2fc67b(0x172)](_0x4c8d6f);_0x35c4ff[_0x2fc67b(0x183)]=_0x440c59,_0x35c4ff[_0x2fc67b(0x17b)]=_0x2fc67b(0x16e),await a110_0x20dbe1[_0x2fc67b(0x175)](_0x1b86a7,JSON[_0x2fc67b(0x17c)](_0x35c4ff,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1de8da=a110_0x20ee;try{return execSync(_0x1de8da(0x18d),{'stdio':_0x1de8da(0x16f)}),'bun';}catch{return _0x1de8da(0x15f);}}async function formatCode(_0x3395ea){const _0x1c5d69=a110_0x20ee;try{await execAsync(_0x1c5d69(0x15b),{'cwd':_0x3395ea});}catch{}}async function configureProject(_0x5b0dff,_0x38d120,_0x13fe32){const _0x22fa3c=a110_0x20ee,_0x5406a1=a110_0x36d0ed[_0x22fa3c(0x154)](process[_0x22fa3c(0x15c)](),_0x5b0dff),_0x38be20=a110_0x36d0ed[_0x22fa3c(0x18b)](_0x5406a1,NEW_CONFIG_NAME),_0x4b4d0b=readConfig(),_0x59e43b=typeof _0x4b4d0b[_0x22fa3c(0x187)]===_0x22fa3c(0x156)?_0x4b4d0b[_0x22fa3c(0x187)]:undefined,_0x2dd58a={};for(const _0x5c674e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4b4d0b[_0x5c674e]!=null)_0x2dd58a[_0x5c674e]=_0x4b4d0b[_0x5c674e];}const _0x262575=buildCanonicalProjectConfig(_0x2dd58a,{'appCodes':_0x38d120?[_0x38d120]:[],'env':_0x13fe32||_0x59e43b||_0x22fa3c(0x160),'metadata':{'createdAt':new Date()[_0x22fa3c(0x168)](),'version':getCliVersion()}});writeConfigFile(_0x38be20,_0x262575);}async function pullApiConfig(_0x563cc9,_0x124cd6,_0x3b7112,_0x5095a3){const _0x295774=a110_0x20ee,_0x471054=process[_0x295774(0x15c)]();try{process[_0x295774(0x179)](_0x563cc9);const _0xd24b0b=_0x3b7112||_0x295774(0x160);initEnv(_0xd24b0b),console[_0x295774(0x184)](_0x295774(0x170));const {configArray:_0x138b4a}=await fetchModelList(_0x124cd6,_0x5095a3||''),_0x495524=await generateApiFile(_0x138b4a,'',_0x124cd6,!![],_0xd24b0b,DEFAULT_API_DIR);console[_0x295774(0x184)](_0x295774(0x158)+_0x138b4a[_0x295774(0x162)]+_0x295774(0x15d)+_0x495524['modelCount']+_0x295774(0x18c));}catch(_0x47a22c){console['log'](_0x295774(0x174)+CLI_BIN_NAME+_0x295774(0x157));}finally{process[_0x295774(0x179)](_0x471054);}}
@@ -1 +1 @@
1
- function a111_0x2dde(_0x4070f8,_0x1cf1a4){_0x4070f8=_0x4070f8-0x74;const _0x3f758d=a111_0x3f75();let _0x2ddee5=_0x3f758d[_0x4070f8];return _0x2ddee5;}const a111_0x31d9eb=a111_0x2dde;function a111_0x3f75(){const _0x37dca2=['sub-app-react-demo','1227NHCEAx','10129189DOrfZM','../../../../','10120746fMtuoS','10819768wyBORH','136knqnTF','join','5efywsl','48526857fZEgZB','dirname','3999060vKmsJh','989231mnvHnH','templates'];a111_0x3f75=function(){return _0x37dca2;};return a111_0x3f75();}(function(_0x269027,_0x2fe73c){const _0x3c8d48=a111_0x2dde,_0x1cde70=_0x269027();while(!![]){try{const _0xa0f83b=-parseInt(_0x3c8d48(0x76))/0x1+parseInt(_0x3c8d48(0x7e))/0x2*(parseInt(_0x3c8d48(0x79))/0x3)+parseInt(_0x3c8d48(0x75))/0x4+-parseInt(_0x3c8d48(0x80))/0x5*(parseInt(_0x3c8d48(0x7c))/0x6)+-parseInt(_0x3c8d48(0x7a))/0x7+-parseInt(_0x3c8d48(0x7d))/0x8+parseInt(_0x3c8d48(0x81))/0x9;if(_0xa0f83b===_0x2fe73c)break;else _0x1cde70['push'](_0x1cde70['shift']());}catch(_0x29660a){_0x1cde70['push'](_0x1cde70['shift']());}}}(a111_0x3f75,0xe673a));import a111_0x2d1fee from'node:path';import{fileURLToPath}from'node:url';const __dirname=a111_0x2d1fee[a111_0x31d9eb(0x74)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3bbe9d=a111_0x31d9eb;return a111_0x2d1fee['resolve'](__dirname,_0x3bbe9d(0x7b));}export function getSubAppReactDemoTemplateDir(){const _0x3a5f41=a111_0x31d9eb;return a111_0x2d1fee[_0x3a5f41(0x7f)](getRabetbaseCliPackageRoot(),_0x3a5f41(0x77),'projects',_0x3a5f41(0x78));}
1
+ function a111_0x50a7(){const _0x200b7e=['2721243gFDQNP','templates','1981704KSZpZC','2322476vGHOPw','21wrFOpt','../../../../','sub-app-react-demo','resolve','10sWAyUa','7057PIAXIM','10jLaQyR','1992033GIcRjR','projects','1994056nrUTbc','join','dirname','2646083lrhUcq','14afPCvP'];a111_0x50a7=function(){return _0x200b7e;};return a111_0x50a7();}function a111_0x18ea(_0x556f95,_0x410ed1){_0x556f95=_0x556f95-0x1e6;const _0x50a7e1=a111_0x50a7();let _0x18ea1d=_0x50a7e1[_0x556f95];return _0x18ea1d;}const a111_0x2a4f7a=a111_0x18ea;(function(_0x6d1e59,_0x28f127){const _0x3cf4aa=a111_0x18ea,_0x7d5251=_0x6d1e59();while(!![]){try{const _0x2b1625=parseInt(_0x3cf4aa(0x1e6))/0x1*(-parseInt(_0x3cf4aa(0x1ee))/0x2)+parseInt(_0x3cf4aa(0x1ef))/0x3+-parseInt(_0x3cf4aa(0x1f2))/0x4+-parseInt(_0x3cf4aa(0x1f7))/0x5*(-parseInt(_0x3cf4aa(0x1f1))/0x6)+-parseInt(_0x3cf4aa(0x1f3))/0x7*(parseInt(_0x3cf4aa(0x1ea))/0x8)+-parseInt(_0x3cf4aa(0x1e8))/0x9*(-parseInt(_0x3cf4aa(0x1e7))/0xa)+parseInt(_0x3cf4aa(0x1ed))/0xb;if(_0x2b1625===_0x28f127)break;else _0x7d5251['push'](_0x7d5251['shift']());}catch(_0x3e520c){_0x7d5251['push'](_0x7d5251['shift']());}}}(a111_0x50a7,0x9f1e6));import a111_0x4ba6c1 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a111_0x4ba6c1[a111_0x2a4f7a(0x1ec)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x259e21=a111_0x2a4f7a;return a111_0x4ba6c1[_0x259e21(0x1f6)](__dirname,_0x259e21(0x1f4));}export function getSubAppReactDemoTemplateDir(){const _0x1f7a82=a111_0x2a4f7a;return a111_0x4ba6c1[_0x1f7a82(0x1eb)](getRabetbaseCliPackageRoot(),_0x1f7a82(0x1f0),_0x1f7a82(0x1e9),_0x1f7a82(0x1f5));}
@@ -1 +1 @@
1
- (function(_0x19fb93,_0x4a3cb7){const _0x2e9206=a112_0xdcb5,_0x461034=_0x19fb93();while(!![]){try{const _0x4fb9bb=-parseInt(_0x2e9206(0xc2))/0x1+parseInt(_0x2e9206(0xbd))/0x2*(-parseInt(_0x2e9206(0xba))/0x3)+-parseInt(_0x2e9206(0xc4))/0x4+parseInt(_0x2e9206(0xb7))/0x5*(parseInt(_0x2e9206(0xbb))/0x6)+-parseInt(_0x2e9206(0xb6))/0x7*(-parseInt(_0x2e9206(0xb4))/0x8)+-parseInt(_0x2e9206(0xb9))/0x9*(-parseInt(_0x2e9206(0xb3))/0xa)+parseInt(_0x2e9206(0xb5))/0xb;if(_0x4fb9bb===_0x4a3cb7)break;else _0x461034['push'](_0x461034['shift']());}catch(_0x2637c9){_0x461034['push'](_0x461034['shift']());}}}(a112_0x1c78,0x199f0));function a112_0x1c78(){const _0x315fec=['项目模板复制完成','466344hRIXuU','info','开始复制项目模板','402430fpfdkv','60136JRYyjF','50556CjoMhk','119zjofrA','576465apJUNJ','success','27oJtkqf','345879VehMkS','6NzVSgc','error','2zlJRSq','message','now','resolve','copy','31584kzAouv'];a112_0x1c78=function(){return _0x315fec;};return a112_0x1c78();}import a112_0x25ff27 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 a112_0xdcb5(_0x471eed,_0x810844){_0x471eed=_0x471eed-0xb1;const _0x1c78e6=a112_0x1c78();let _0xdcb560=_0x1c78e6[_0x471eed];return _0xdcb560;}export async function copyProjectTemplate(_0x473ce6){const _0x142b0=a112_0xdcb5,_0xbe4d37=Date['now'](),_0x4217ce=a112_0x25ff27[_0x142b0(0xc0)](process['cwd'](),_0x473ce6);try{logger[_0x142b0(0xb1)](_0x142b0(0xc1),_0x142b0(0xb2),{'projectCode':_0x473ce6,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4217ce);const _0x3414b3=Date['now']()-_0xbe4d37;logger[_0x142b0(0xb8)](_0x142b0(0xc1),_0x142b0(0xc3),_0x3414b3,{'projectCode':_0x473ce6});}catch(_0x502b50){const _0x10bf7a=Date[_0x142b0(0xbf)]()-_0xbe4d37;logger[_0x142b0(0xbc)]('copy','项目模板复制失败',{'projectCode':_0x473ce6,'error':_0x502b50 instanceof Error?_0x502b50[_0x142b0(0xbe)]:String(_0x502b50),'duration':_0x10bf7a});throw _0x502b50;}return formatElapsed(_0xbe4d37);}
1
+ (function(_0x29a934,_0x1b509c){const _0x3ab6e0=a112_0x512d,_0xe1c9e=_0x29a934();while(!![]){try{const _0x1d37ec=-parseInt(_0x3ab6e0(0x81))/0x1*(-parseInt(_0x3ab6e0(0x8a))/0x2)+parseInt(_0x3ab6e0(0x88))/0x3+-parseInt(_0x3ab6e0(0x82))/0x4+-parseInt(_0x3ab6e0(0x85))/0x5+-parseInt(_0x3ab6e0(0x8b))/0x6+parseInt(_0x3ab6e0(0x84))/0x7+-parseInt(_0x3ab6e0(0x8c))/0x8;if(_0x1d37ec===_0x1b509c)break;else _0xe1c9e['push'](_0xe1c9e['shift']());}catch(_0x389f63){_0xe1c9e['push'](_0xe1c9e['shift']());}}}(a112_0x267d,0xeef10));import a112_0x5f0df3 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a112_0x512d(_0x46fbfc,_0xb35254){_0x46fbfc=_0x46fbfc-0x80;const _0x267daa=a112_0x267d();let _0x512dcd=_0x267daa[_0x46fbfc];return _0x512dcd;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a112_0x267d(){const _0x581f33=['62NjoHUS','11569212pkrmOY','3267200YZqhMK','now','success','cwd','62093VTcGGz','2198036SidCOZ','copy','12056814olZmAN','2341710NLpoKn','info','开始复制项目模板','2057616fEPufu','项目模板复制完成'];a112_0x267d=function(){return _0x581f33;};return a112_0x267d();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x545e3d){const _0x3062bd=a112_0x512d,_0x6fd5ad=Date[_0x3062bd(0x8d)](),_0x28717d=a112_0x5f0df3['resolve'](process[_0x3062bd(0x80)](),_0x545e3d);try{logger[_0x3062bd(0x86)]('copy',_0x3062bd(0x87),{'projectCode':_0x545e3d,'templateDir':templateDir}),await copyDirectory(templateDir,_0x28717d);const _0x370acd=Date[_0x3062bd(0x8d)]()-_0x6fd5ad;logger[_0x3062bd(0x8e)](_0x3062bd(0x83),_0x3062bd(0x89),_0x370acd,{'projectCode':_0x545e3d});}catch(_0x1de2b9){const _0x33fcf6=Date['now']()-_0x6fd5ad;logger['error'](_0x3062bd(0x83),'项目模板复制失败',{'projectCode':_0x545e3d,'error':_0x1de2b9 instanceof Error?_0x1de2b9['message']:String(_0x1de2b9),'duration':_0x33fcf6});throw _0x1de2b9;}return formatElapsed(_0x6fd5ad);}
@@ -1 +1 @@
1
- (function(_0x4feb35,_0x5e0c19){const _0x1aa850=a113_0x52d6,_0x42a210=_0x4feb35();while(!![]){try{const _0x16ea43=parseInt(_0x1aa850(0xcc))/0x1+-parseInt(_0x1aa850(0xc5))/0x2+parseInt(_0x1aa850(0xd6))/0x3*(-parseInt(_0x1aa850(0xd1))/0x4)+-parseInt(_0x1aa850(0xcf))/0x5*(-parseInt(_0x1aa850(0xc8))/0x6)+parseInt(_0x1aa850(0xc9))/0x7*(-parseInt(_0x1aa850(0xd2))/0x8)+-parseInt(_0x1aa850(0xcd))/0x9*(-parseInt(_0x1aa850(0xc7))/0xa)+parseInt(_0x1aa850(0xc1))/0xb*(parseInt(_0x1aa850(0xc2))/0xc);if(_0x16ea43===_0x5e0c19)break;else _0x42a210['push'](_0x42a210['shift']());}catch(_0x5c6aa0){_0x42a210['push'](_0x42a210['shift']());}}}(a113_0x5591,0xddbaf));import a113_0x170044 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a113_0x52d6(_0xfa0585,_0x1c5ad1){_0xfa0585=_0xfa0585-0xc1;const _0x5591eb=a113_0x5591();let _0x52d6f5=_0x5591eb[_0xfa0585];return _0x52d6f5;}function a113_0x5591(){const _0xc13c2e=['1689480ZtXDjr','npx','30XVPQOI','81318uGEycT','399eNtyuH','success','prettier','139006YORKDZ','185517zpLeya','format','5NNJvhe','开始格式化代码','40tqHqLi','240696IlzfWh','resolve','info','now','77124Ailgeb','9654117LSsThT','48QYZNYs','message','代码格式化失败'];a113_0x5591=function(){return _0xc13c2e;};return a113_0x5591();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x32c1b7){const _0xf1f698=a113_0x52d6,_0x521364=Date[_0xf1f698(0xd5)](),_0x273157=a113_0x170044[_0xf1f698(0xd3)](process['cwd'](),_0x32c1b7);try{logger[_0xf1f698(0xd4)]('format',_0xf1f698(0xd0),{'projectCode':_0x32c1b7}),await execa(resolveNpmBin(_0xf1f698(0xc6)),[_0xf1f698(0xcb),'--write','.'],{'cwd':_0x273157});const _0x301353=Date['now']()-_0x521364;logger[_0xf1f698(0xca)]('format','代码格式化完成',_0x301353,{'projectCode':_0x32c1b7});}catch(_0x184a7f){const _0x23b6af=Date[_0xf1f698(0xd5)]()-_0x521364;logger['error'](_0xf1f698(0xce),_0xf1f698(0xc4),{'projectCode':_0x32c1b7,'error':_0x184a7f instanceof Error?_0x184a7f[_0xf1f698(0xc3)]:String(_0x184a7f),'duration':_0x23b6af});throw _0x184a7f;}return formatElapsed(_0x521364);}
1
+ (function(_0x1c2b6d,_0x5f5691){const _0x2c7926=a113_0x8354,_0x3f1458=_0x1c2b6d();while(!![]){try{const _0x314adc=-parseInt(_0x2c7926(0x85))/0x1+parseInt(_0x2c7926(0x82))/0x2+parseInt(_0x2c7926(0x7a))/0x3+-parseInt(_0x2c7926(0x79))/0x4+parseInt(_0x2c7926(0x83))/0x5*(-parseInt(_0x2c7926(0x7c))/0x6)+parseInt(_0x2c7926(0x76))/0x7*(-parseInt(_0x2c7926(0x88))/0x8)+parseInt(_0x2c7926(0x7d))/0x9;if(_0x314adc===_0x5f5691)break;else _0x3f1458['push'](_0x3f1458['shift']());}catch(_0x50c5ed){_0x3f1458['push'](_0x3f1458['shift']());}}}(a113_0x5d95,0xc335a));import a113_0x5b84ae from'node:path';function a113_0x5d95(){const _0x362af5=['1501422BmZLcg','31455477wXprOj','error','resolve','开始格式化代码','prettier','1113046IhsQsH','20ADWqFb','info','1537818ijfepn','代码格式化完成','success','24608XNWwMz','1246TGoIeY','message','now','2970376snZNKc','1730670qRjYaK','format'];a113_0x5d95=function(){return _0x362af5;};return a113_0x5d95();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a113_0x8354(_0x464268,_0x3a49ba){_0x464268=_0x464268-0x76;const _0x5d959b=a113_0x5d95();let _0x8354f6=_0x5d959b[_0x464268];return _0x8354f6;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x482914){const _0x6ecbc1=a113_0x8354,_0x391c89=Date[_0x6ecbc1(0x78)](),_0x29901a=a113_0x5b84ae[_0x6ecbc1(0x7f)](process['cwd'](),_0x482914);try{logger[_0x6ecbc1(0x84)](_0x6ecbc1(0x7b),_0x6ecbc1(0x80),{'projectCode':_0x482914}),await execa(resolveNpmBin('npx'),[_0x6ecbc1(0x81),'--write','.'],{'cwd':_0x29901a});const _0x3fd9ec=Date[_0x6ecbc1(0x78)]()-_0x391c89;logger[_0x6ecbc1(0x87)](_0x6ecbc1(0x7b),_0x6ecbc1(0x86),_0x3fd9ec,{'projectCode':_0x482914});}catch(_0x40ed03){const _0x452755=Date[_0x6ecbc1(0x78)]()-_0x391c89;logger[_0x6ecbc1(0x7e)](_0x6ecbc1(0x7b),'代码格式化失败',{'projectCode':_0x482914,'error':_0x40ed03 instanceof Error?_0x40ed03[_0x6ecbc1(0x77)]:String(_0x40ed03),'duration':_0x452755});throw _0x40ed03;}return formatElapsed(_0x391c89);}
@@ -1 +1 @@
1
- (function(_0x839445,_0x11153e){const _0x57988c=a114_0x3f65,_0x1a98a8=_0x839445();while(!![]){try{const _0x16b122=parseInt(_0x57988c(0xa2))/0x1+parseInt(_0x57988c(0xaf))/0x2*(parseInt(_0x57988c(0xa6))/0x3)+parseInt(_0x57988c(0xb5))/0x4+parseInt(_0x57988c(0xae))/0x5*(-parseInt(_0x57988c(0xa1))/0x6)+parseInt(_0x57988c(0xa3))/0x7*(-parseInt(_0x57988c(0xac))/0x8)+parseInt(_0x57988c(0xb1))/0x9+-parseInt(_0x57988c(0xa9))/0xa;if(_0x16b122===_0x11153e)break;else _0x1a98a8['push'](_0x1a98a8['shift']());}catch(_0x49cb37){_0x1a98a8['push'](_0x1a98a8['shift']());}}}(a114_0xe983,0x9b4c1));function a114_0xe983(){const _0x123aea=['4745872PnExnM','--registry','resolve','18kuDsHv','45656AiuAHA','2070873hOSCHG','依赖安装完成','error','2399253YYyyzp','install','https://registry.npmmirror.com','10782080penAyA','now','message','24wJFDvT','success','531515ZKOtZB','2WDKVAx','cwd','7999704cRzykp','依赖安装失败','开始安装依赖','info'];a114_0xe983=function(){return _0x123aea;};return a114_0xe983();}import a114_0x47e5b1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a114_0x3f65(_0x3f09f1,_0x128af4){_0x3f09f1=_0x3f09f1-0x9f;const _0xe98307=a114_0xe983();let _0x3f6555=_0xe98307[_0x3f09f1];return _0x3f6555;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x535b33){const _0x592ffc=a114_0x3f65,_0x1114dd=Date[_0x592ffc(0xaa)](),_0x581b5e=a114_0x47e5b1[_0x592ffc(0xa0)](process[_0x592ffc(0xb0)](),_0x535b33);try{logger[_0x592ffc(0xb4)](_0x592ffc(0xa7),_0x592ffc(0xb3),{'projectCode':_0x535b33,'registry':_0x592ffc(0xa8)}),await execa(resolveNpmBin('npm'),['install',_0x592ffc(0x9f),_0x592ffc(0xa8)],{'cwd':_0x581b5e});const _0x25a47e=Date[_0x592ffc(0xaa)]()-_0x1114dd;logger[_0x592ffc(0xad)](_0x592ffc(0xa7),_0x592ffc(0xa4),_0x25a47e,{'projectCode':_0x535b33});}catch(_0x36d13a){const _0x53d721=Date[_0x592ffc(0xaa)]()-_0x1114dd;logger[_0x592ffc(0xa5)](_0x592ffc(0xa7),_0x592ffc(0xb2),{'projectCode':_0x535b33,'error':_0x36d13a instanceof Error?_0x36d13a[_0x592ffc(0xab)]:String(_0x36d13a),'duration':_0x53d721});throw _0x36d13a;}return formatElapsed(_0x1114dd);}
1
+ (function(_0x4855f3,_0x512d17){const _0x15326f=a114_0x2918,_0x1aea2c=_0x4855f3();while(!![]){try{const _0x3197d9=parseInt(_0x15326f(0xc9))/0x1+-parseInt(_0x15326f(0xcd))/0x2*(-parseInt(_0x15326f(0xd1))/0x3)+parseInt(_0x15326f(0xc7))/0x4*(-parseInt(_0x15326f(0xc1))/0x5)+parseInt(_0x15326f(0xc0))/0x6*(-parseInt(_0x15326f(0xc2))/0x7)+parseInt(_0x15326f(0xcc))/0x8+-parseInt(_0x15326f(0xbb))/0x9*(parseInt(_0x15326f(0xbe))/0xa)+-parseInt(_0x15326f(0xd0))/0xb;if(_0x3197d9===_0x512d17)break;else _0x1aea2c['push'](_0x1aea2c['shift']());}catch(_0x2295b5){_0x1aea2c['push'](_0x1aea2c['shift']());}}}(a114_0x56c1,0x5b7e5));function a114_0x56c1(){const _0x489bfd=['success','500358Oyeuzd','info','--registry','5387600KTwOTR','38ZSSCFJ','https://registry.npmmirror.com','message','3233406rEhWkj','31074nVJjsH','install','1134378LBQDML','开始安装依赖','依赖安装失败','10kmbcrc','now','804fSfCmB','335TcMKhM','5138CyWgGv','依赖安装完成','error','cwd','resolve','28508uGxanp'];a114_0x56c1=function(){return _0x489bfd;};return a114_0x56c1();}import a114_0x5a18d5 from'node:path';import{execa}from'execa';function a114_0x2918(_0x13c198,_0x476d84){_0x13c198=_0x13c198-0xbb;const _0x56c141=a114_0x56c1();let _0x2918b0=_0x56c141[_0x13c198];return _0x2918b0;}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(_0x4753c9){const _0x1cbc5e=a114_0x2918,_0x17ac51=Date[_0x1cbc5e(0xbf)](),_0x326040=a114_0x5a18d5[_0x1cbc5e(0xc6)](process[_0x1cbc5e(0xc5)](),_0x4753c9);try{logger[_0x1cbc5e(0xca)](_0x1cbc5e(0xd2),_0x1cbc5e(0xbc),{'projectCode':_0x4753c9,'registry':_0x1cbc5e(0xce)}),await execa(resolveNpmBin('npm'),[_0x1cbc5e(0xd2),_0x1cbc5e(0xcb),_0x1cbc5e(0xce)],{'cwd':_0x326040});const _0x49808b=Date[_0x1cbc5e(0xbf)]()-_0x17ac51;logger[_0x1cbc5e(0xc8)]('install',_0x1cbc5e(0xc3),_0x49808b,{'projectCode':_0x4753c9});}catch(_0x30aa45){const _0x360d36=Date[_0x1cbc5e(0xbf)]()-_0x17ac51;logger[_0x1cbc5e(0xc4)](_0x1cbc5e(0xd2),_0x1cbc5e(0xbd),{'projectCode':_0x4753c9,'error':_0x30aa45 instanceof Error?_0x30aa45[_0x1cbc5e(0xcf)]:String(_0x30aa45),'duration':_0x360d36});throw _0x30aa45;}return formatElapsed(_0x17ac51);}
@@ -1 +1 @@
1
- function a115_0x3fd5(_0x447f75,_0x168298){_0x447f75=_0x447f75-0x13a;const _0x5db204=a115_0x5db2();let _0x3fd511=_0x5db204[_0x447f75];return _0x3fd511;}const a115_0x10a324=a115_0x3fd5;function a115_0x5db2(){const _0x408985=['../../commands/project/create/non-interactive.js','6XzSRUJ','nonInteractive','boolean','11780pYymjG','87TdyTUb','bool','init','str','args','Skip\x20confirmation\x20prompt','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','212068FUtJvP','4759390aiINqu','74406RUGTmH','trim','11lWGDOa','yes','App\x20code\x20to\x20initialize','2448108gujPyc','../../commands/project/create/main.js','7tfoicY','9606212RhBgyf','env','project','Target\x20environment','1422qtQRdP','create','Usage:\x20','string','6074720dGYRYi','appcode','name','write','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Auto-confirm\x20prompts','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli'];a115_0x5db2=function(){return _0x408985;};return a115_0x5db2();}(function(_0x4ba085,_0x30856c){const _0x32a178=a115_0x3fd5,_0x18cd2a=_0x4ba085();while(!![]){try{const _0x100f55=parseInt(_0x32a178(0x15a))/0x1*(-parseInt(_0x32a178(0x158))/0x2)+parseInt(_0x32a178(0x14d))/0x3*(parseInt(_0x32a178(0x156))/0x4)+parseInt(_0x32a178(0x157))/0x5*(parseInt(_0x32a178(0x149))/0x6)+-parseInt(_0x32a178(0x15f))/0x7*(parseInt(_0x32a178(0x141))/0x8)+-parseInt(_0x32a178(0x13d))/0x9*(-parseInt(_0x32a178(0x14c))/0xa)+-parseInt(_0x32a178(0x160))/0xb+parseInt(_0x32a178(0x15d))/0xc;if(_0x100f55===_0x30856c)break;else _0x18cd2a['push'](_0x18cd2a['shift']());}catch(_0x45c001){_0x18cd2a['push'](_0x18cd2a['shift']());}}}(a115_0x5db2,0xcc807));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':a115_0x10a324(0x142),'type':a115_0x10a324(0x140),'description':a115_0x10a324(0x15c)},{'name':'env','type':a115_0x10a324(0x140),'description':a115_0x10a324(0x13c)},{'name':a115_0x10a324(0x15b),'type':a115_0x10a324(0x14b),'description':a115_0x10a324(0x146),'default':![]}],createFlags=[{'name':a115_0x10a324(0x143),'type':'string','description':'Project\x20name'},{'name':a115_0x10a324(0x13a),'type':'string','description':a115_0x10a324(0x13c)},{'name':a115_0x10a324(0x142),'type':a115_0x10a324(0x140),'description':a115_0x10a324(0x145)}],upgradeFlags=[{'name':a115_0x10a324(0x15b),'type':'boolean','description':a115_0x10a324(0x152),'default':![]}];export const projectDefinitions=[{'service':a115_0x10a324(0x13b),'command':a115_0x10a324(0x14f),'description':a115_0x10a324(0x153),'risk':a115_0x10a324(0x144),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xd503b5){const _0x3f1b91=a115_0x10a324;return await initConfig({'appcode':_0xd503b5[_0x3f1b91(0x150)](_0x3f1b91(0x142))||undefined,'env':_0xd503b5[_0x3f1b91(0x150)]('env')||undefined,'autoYes':_0xd503b5[_0x3f1b91(0x14e)]('yes')}),{'ok':!![]};}},{'service':'project','command':a115_0x10a324(0x13e),'description':'Create\x20a\x20new\x20project','risk':a115_0x10a324(0x144),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a115_0x10a324(0x154),'required':![]}],'flags':createFlags,async 'execute'(_0x17ae78){const _0x2644d8=a115_0x10a324,{createApp:_0x3f2fc8}=await import(_0x2644d8(0x15e)),{createProjectNonInteractive:_0xbf5385}=await import(_0x2644d8(0x148)),_0x11dee9=_0x17ae78[_0x2644d8(0x150)](_0x2644d8(0x143))['trim']()||_0x17ae78[_0x2644d8(0x151)][0x0]?.[_0x2644d8(0x159)](),_0x1bceda=_0x17ae78[_0x2644d8(0x150)](_0x2644d8(0x13a))||undefined,_0x3dbce8=_0x17ae78[_0x2644d8(0x150)](_0x2644d8(0x142))||undefined;if(_0x17ae78[_0x2644d8(0x14a)]){if(!_0x11dee9)throw CliErrors['validation'](_0x2644d8(0x155),_0x2644d8(0x13f)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0xbf5385(_0x11dee9,_0x1bceda,_0x3dbce8,_0x17ae78['cookie']);}else await _0x3f2fc8({'projectCode':_0x11dee9,'appCode':_0x3dbce8,'env':_0x1bceda,'cookie':_0x17ae78['cookie']});return{'ok':!![]};}},{'service':a115_0x10a324(0x13b),'command':'upgrade','description':a115_0x10a324(0x147),'risk':a115_0x10a324(0x144),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3d9314){const _0x5e51ea=a115_0x10a324;return await upgradeApp(_0x3d9314[_0x5e51ea(0x14a)],{'yes':_0x3d9314[_0x5e51ea(0x14e)](_0x5e51ea(0x15b))}),{'ok':!![]};}}];
1
+ function a115_0x4027(_0x3f7247,_0x2d64d3){_0x3f7247=_0x3f7247-0x106;const _0x508638=a115_0x5086();let _0x402703=_0x508638[_0x3f7247];return _0x402703;}const a115_0x357ef7=a115_0x4027;function a115_0x5086(){const _0x53acab=['cookie','8005UfJxAX','create','5424hkCfPK','208ucLFTP','../../commands/project/create/main.js','../../commands/project/create/non-interactive.js','Auto-confirm\x20prompts','upgrade','env','boolean','appcode','write','21636120kHejMU','415592rMzuOV','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','project','Target\x20environment','args','Usage:\x20','72EtsXlm','str','11707003hNxwGC','1382649BdRpLD','project-name','bool','Project\x20name','App\x20code\x20to\x20initialize','name','2109472yFjhvc','yes','Skip\x20confirmation\x20prompt','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','nonInteractive','trim','5uOKUJs','string'];a115_0x5086=function(){return _0x53acab;};return a115_0x5086();}(function(_0x28a2ac,_0x1ae36f){const _0x2edd94=a115_0x4027,_0x30d833=_0x28a2ac();while(!![]){try{const _0x27dc47=parseInt(_0x2edd94(0x128))/0x1*(parseInt(_0x2edd94(0x12b))/0x2)+parseInt(_0x2edd94(0x117))/0x3+parseInt(_0x2edd94(0x11d))/0x4+-parseInt(_0x2edd94(0x125))/0x5*(-parseInt(_0x2edd94(0x12a))/0x6)+parseInt(_0x2edd94(0x116))/0x7+-parseInt(_0x2edd94(0x10e))/0x8*(parseInt(_0x2edd94(0x114))/0x9)+-parseInt(_0x2edd94(0x10d))/0xa;if(_0x27dc47===_0x1ae36f)break;else _0x30d833['push'](_0x30d833['shift']());}catch(_0x14b05f){_0x30d833['push'](_0x30d833['shift']());}}}(a115_0x5086,0xdf5d4));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':a115_0x357ef7(0x10b),'type':a115_0x357ef7(0x126),'description':a115_0x357ef7(0x11b)},{'name':a115_0x357ef7(0x109),'type':'string','description':'Target\x20environment'},{'name':'yes','type':a115_0x357ef7(0x10a),'description':a115_0x357ef7(0x107),'default':![]}],createFlags=[{'name':a115_0x357ef7(0x11c),'type':a115_0x357ef7(0x126),'description':a115_0x357ef7(0x11a)},{'name':a115_0x357ef7(0x109),'type':a115_0x357ef7(0x126),'description':a115_0x357ef7(0x111)},{'name':a115_0x357ef7(0x10b),'type':a115_0x357ef7(0x126),'description':a115_0x357ef7(0x121)}],upgradeFlags=[{'name':'yes','type':a115_0x357ef7(0x10a),'description':a115_0x357ef7(0x11f),'default':![]}];export const projectDefinitions=[{'service':a115_0x357ef7(0x110),'command':'init','description':a115_0x357ef7(0x122),'risk':a115_0x357ef7(0x10c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x5db346){const _0x133d71=a115_0x357ef7;return await initConfig({'appcode':_0x5db346[_0x133d71(0x115)](_0x133d71(0x10b))||undefined,'env':_0x5db346[_0x133d71(0x115)]('env')||undefined,'autoYes':_0x5db346[_0x133d71(0x119)](_0x133d71(0x11e))}),{'ok':!![]};}},{'service':a115_0x357ef7(0x110),'command':a115_0x357ef7(0x129),'description':'Create\x20a\x20new\x20project','risk':a115_0x357ef7(0x10c),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a115_0x357ef7(0x118),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x141370){const _0x1f8942=a115_0x357ef7,{createApp:_0x4a44e9}=await import(_0x1f8942(0x12c)),{createProjectNonInteractive:_0x3c868c}=await import(_0x1f8942(0x106)),_0x3c9e39=_0x141370['str'](_0x1f8942(0x11c))[_0x1f8942(0x124)]()||_0x141370[_0x1f8942(0x112)][0x0]?.['trim'](),_0x1cb7cc=_0x141370[_0x1f8942(0x115)](_0x1f8942(0x109))||undefined,_0x46519b=_0x141370[_0x1f8942(0x115)](_0x1f8942(0x10b))||undefined;if(_0x141370[_0x1f8942(0x123)]){if(!_0x3c9e39)throw CliErrors['validation']('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x1f8942(0x113)+CLI_BIN_NAME+_0x1f8942(0x120));await _0x3c868c(_0x3c9e39,_0x1cb7cc,_0x46519b,_0x141370[_0x1f8942(0x127)]);}else await _0x4a44e9({'projectCode':_0x3c9e39,'appCode':_0x46519b,'env':_0x1cb7cc,'cookie':_0x141370['cookie']});return{'ok':!![]};}},{'service':a115_0x357ef7(0x110),'command':a115_0x357ef7(0x108),'description':a115_0x357ef7(0x10f),'risk':a115_0x357ef7(0x10c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xe8f591){const _0x553d72=a115_0x357ef7;return await upgradeApp(_0xe8f591[_0x553d72(0x123)],{'yes':_0xe8f591[_0x553d72(0x119)]('yes')}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x55015c,_0x1a5d0e){const _0x1bc350=a116_0x1e07,_0xd0c10d=_0x55015c();while(!![]){try{const _0x4ff213=-parseInt(_0x1bc350(0x11b))/0x1*(-parseInt(_0x1bc350(0xff))/0x2)+-parseInt(_0x1bc350(0x11a))/0x3*(parseInt(_0x1bc350(0x10b))/0x4)+parseInt(_0x1bc350(0xf7))/0x5+parseInt(_0x1bc350(0x121))/0x6*(-parseInt(_0x1bc350(0xf4))/0x7)+parseInt(_0x1bc350(0xf9))/0x8+-parseInt(_0x1bc350(0x10d))/0x9+parseInt(_0x1bc350(0x104))/0xa;if(_0x4ff213===_0x1a5d0e)break;else _0xd0c10d['push'](_0xd0c10d['shift']());}catch(_0x37c94f){_0xd0c10d['push'](_0xd0c10d['shift']());}}}(a116_0xead1,0x53e7f));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a116_0x45fc47 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 a116_0x1e07(_0xb2e46c,_0x218c37){_0xb2e46c=_0xb2e46c-0xf2;const _0xead17a=a116_0xead1();let _0x1e0704=_0xead17a[_0xb2e46c];return _0x1e0704;}import{buildCanonicalProjectConfig}from'../../config/schema.js';function a116_0xead1(){const _0x41ff8c=['.bak','init','\x20project\x20init`\x20to\x20start\x20fresh.','\x20\x20appcode:\x20','\x20\x20Default:\x20','43006lIHKuv','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','appcode','bold','2034760TrhQdm','version','\x20\x20Apps:\x20','.rabetbase.json','env','\x20→\x20.rabetbase.json','trim','614264ajJtqk','app','2295135qjsegf','defaultApp','App\x20Code\x20cannot\x20be\x20empty','Migration\x20cancelled.\x20Run\x20`','\x20api\x20generate\x27\x20and\x20\x27','string','package.json','green','✓\x20Upgraded\x20','apps','../..','Please\x20enter\x20App\x20Code:','gray','3EQkkzU','31VpSlTq','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','1.0.0','log','info','\x20api\x20pull\x27','18zxERYu','utf8','parse','join','cyan','Upgrade\x20it\x20to\x20','993132pXNzEC','从旧配置文件升级成功','toLocaleString','1378550PoFJXh','setLogPath','256872KseHpC'];a116_0xead1=function(){return _0x41ff8c;};return a116_0xead1();}export async function initConfig(_0x4cc6fa){const _0x2c2de3=a116_0x1e07,{appcode:_0x4d08a6,env:_0x3a6f99,autoYes:_0x5b8cfe}=_0x4cc6fa,_0x5bba3d=process['cwd']();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x1c3966;for(const _0x461639 of LEGACY_CONFIG_NAMES){const _0x2a4216=resolve(_0x5bba3d,_0x461639);if(existsSync(_0x2a4216)){_0x1c3966=_0x2a4216;break;}}if(_0x1c3966){let _0x1e3e2c={};try{_0x1e3e2c=JSON[_0x2c2de3(0x123)](readFileSync(_0x1c3966,_0x2c2de3(0x122)));}catch{}const _0x4e6b58=basename(_0x1c3966),_0x12ff46=_0x1e3e2c?.[_0x2c2de3(0x102)]||_0x1e3e2c?.[_0x2c2de3(0x10c)];let _0x13f6e7=_0x5b8cfe;!_0x5b8cfe&&(console[_0x2c2de3(0x11e)](a116_0x45fc47['yellow'](_0x2c2de3(0x101)+a116_0x45fc47['bold'](_0x4e6b58))),_0x12ff46&&console[_0x2c2de3(0x11e)](a116_0x45fc47[_0x2c2de3(0xf2)](_0x2c2de3(0xfd)+_0x12ff46)),_0x13f6e7=await confirm({'message':_0x2c2de3(0xf3)+a116_0x45fc47[_0x2c2de3(0x103)](_0x2c2de3(0x107))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x13f6e7){console['log'](_0x2c2de3(0x110)+CLI_BIN_NAME+_0x2c2de3(0xfc));return;}const _0x30f787=resolve(_0x5bba3d,NEW_CONFIG_NAME),_0x3262cb=getCliVersionFromPkg(),_0x3e9532=readRawConfig(),_0x3045a5=_0x4d08a6||(typeof _0x1e3e2c?.[_0x2c2de3(0x102)]===_0x2c2de3(0x112)?_0x1e3e2c['appcode']:undefined)||(typeof _0x1e3e2c?.['app']===_0x2c2de3(0x112)?_0x1e3e2c[_0x2c2de3(0x10c)]:undefined)||await askAppcode(),_0x32bf5b=typeof _0x1e3e2c?.[_0x2c2de3(0x108)]==='string'?_0x1e3e2c[_0x2c2de3(0x108)]:typeof _0x3e9532[_0x2c2de3(0x108)]===_0x2c2de3(0x112)?_0x3e9532[_0x2c2de3(0x108)]:'production',_0x4b3d97=buildCanonicalProjectConfig({..._0x3e9532,..._0x1e3e2c},{'appCodes':[_0x3045a5],'env':_0x32bf5b,'metadata':{'version':_0x3262cb,'migratedAt':new Date()[_0x2c2de3(0xf6)](),'migratedFrom':_0x1c3966}});writeConfigFile(_0x30f787,_0x4b3d97);const _0x3bb4c1=_0x1c3966+'.bak';renameSync(_0x1c3966,_0x3bb4c1),logger[_0x2c2de3(0xf8)](_0x5bba3d),logger[_0x2c2de3(0x11f)]('init',_0x2c2de3(0xf5),{'from':_0x1c3966,'to':_0x30f787,'appcode':_0x3045a5,'env':_0x4b3d97[_0x2c2de3(0x108)]}),console['log'](a116_0x45fc47['green'](_0x2c2de3(0x115)+_0x4e6b58+_0x2c2de3(0x109))),console[_0x2c2de3(0x11e)](a116_0x45fc47['cyan'](_0x2c2de3(0x106)+Object['keys'](_0x4b3d97[_0x2c2de3(0x116)]||{})['join'](',\x20'))),console['log'](a116_0x45fc47[_0x2c2de3(0xf2)]('\x20\x20Default:\x20'+_0x4b3d97[_0x2c2de3(0x10e)])),console[_0x2c2de3(0x11e)](a116_0x45fc47[_0x2c2de3(0x119)](_0x2c2de3(0x11c)+_0x4e6b58+_0x2c2de3(0xfa)));return;}const _0x12a65b=_0x4d08a6||await askAppcode(),_0xa7cbee=resolve(_0x5bba3d,NEW_CONFIG_NAME),_0x35def8=getCliVersionFromPkg(),_0x2f6533=readRawConfig(),_0x5a9793=typeof _0x2f6533[_0x2c2de3(0x108)]===_0x2c2de3(0x112)?_0x2f6533[_0x2c2de3(0x108)]:undefined,_0xa4e774=buildCanonicalProjectConfig({},{'appCodes':[_0x12a65b],'env':_0x3a6f99||_0x5a9793||'production','metadata':{'version':_0x35def8,'createdAt':new Date()[_0x2c2de3(0xf6)]()}});writeConfigFile(_0xa7cbee,_0xa4e774),logger[_0x2c2de3(0xf8)](_0x5bba3d),logger['info'](_0x2c2de3(0xfb),'初始化项目配置文件成功',{'appcode':_0x12a65b,'env':_0xa4e774[_0x2c2de3(0x108)],'version':_0xa4e774[_0x2c2de3(0x105)],'configPath':_0xa7cbee}),console[_0x2c2de3(0x11e)](a116_0x45fc47[_0x2c2de3(0x114)](_0x2c2de3(0x100))),console[_0x2c2de3(0x11e)](a116_0x45fc47[_0x2c2de3(0xf2)]('\x20\x20Apps:\x20'+Object['keys'](_0xa4e774[_0x2c2de3(0x116)]||{})[_0x2c2de3(0x124)](',\x20'))),console[_0x2c2de3(0x11e)](a116_0x45fc47[_0x2c2de3(0xf2)](_0x2c2de3(0xfe)+_0xa4e774[_0x2c2de3(0x10e)])),console[_0x2c2de3(0x11e)]('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+_0x2c2de3(0x111)+CLI_BIN_NAME+_0x2c2de3(0x120));}function askAppcode(){const _0x44fe5e=a116_0x1e07;return input({'message':_0x44fe5e(0x118),'validate':_0x431763=>{const _0x3304a1=_0x44fe5e;if(!_0x431763[_0x3304a1(0x10a)]())return _0x3304a1(0x10f);const {valid:_0x39a725,message:_0x4fb90a}=validateAppcode(_0x431763[_0x3304a1(0x10a)]());return _0x39a725||_0x4fb90a||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x38f8a7=a116_0x1e07;try{const _0x375b7d=fileURLToPath(import.meta.url),_0x5a213d=resolve(dirname(_0x375b7d),_0x38f8a7(0x117)),_0x4aec0c=JSON[_0x38f8a7(0x123)](readFileSync(resolve(_0x5a213d,_0x38f8a7(0x113)),'utf8'));return _0x4aec0c[_0x38f8a7(0x105)]||_0x38f8a7(0x11d);}catch{return _0x38f8a7(0x11d);}}
1
+ (function(_0x458c80,_0x33226c){const _0x100fd0=a116_0x4817,_0x3c7a7e=_0x458c80();while(!![]){try{const _0x188c51=-parseInt(_0x100fd0(0x72))/0x1*(-parseInt(_0x100fd0(0x6c))/0x2)+parseInt(_0x100fd0(0x93))/0x3+-parseInt(_0x100fd0(0x6e))/0x4*(parseInt(_0x100fd0(0x8c))/0x5)+-parseInt(_0x100fd0(0x65))/0x6+parseInt(_0x100fd0(0x70))/0x7+-parseInt(_0x100fd0(0x6a))/0x8*(parseInt(_0x100fd0(0x6f))/0x9)+parseInt(_0x100fd0(0x75))/0xa*(parseInt(_0x100fd0(0x8f))/0xb);if(_0x188c51===_0x33226c)break;else _0x3c7a7e['push'](_0x3c7a7e['shift']());}catch(_0x3e16ed){_0x3c7a7e['push'](_0x3c7a7e['shift']());}}}(a116_0x3f92,0xa6190));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a116_0xeb04fc 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';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a116_0x4817(_0x3ff3b9,_0x3e8aeb){_0x3ff3b9=_0x3ff3b9-0x64;const _0x3f9247=a116_0x3f92();let _0x4817d5=_0x3f9247[_0x3ff3b9];return _0x4817d5;}export async function initConfig(_0x1780eb){const _0x3a6ec4=a116_0x4817,{appcode:_0x1f02a7,env:_0x410fc5,autoYes:_0x414c76}=_0x1780eb,_0x5aa919=process[_0x3a6ec4(0x98)]();if(getProjectConfigPath())throw new Error(_0x3a6ec4(0x8e));let _0x4263b5;for(const _0x5c4d57 of LEGACY_CONFIG_NAMES){const _0x43f8f2=resolve(_0x5aa919,_0x5c4d57);if(existsSync(_0x43f8f2)){_0x4263b5=_0x43f8f2;break;}}if(_0x4263b5){let _0x5444b5={};try{_0x5444b5=JSON[_0x3a6ec4(0x78)](readFileSync(_0x4263b5,'utf8'));}catch{}const _0x3f515a=basename(_0x4263b5),_0x13bb3a=_0x5444b5?.[_0x3a6ec4(0x76)]||_0x5444b5?.[_0x3a6ec4(0x85)];let _0x982442=_0x414c76;!_0x414c76&&(console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x64)](_0x3a6ec4(0x81)+a116_0xeb04fc[_0x3a6ec4(0x7f)](_0x3f515a))),_0x13bb3a&&console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x73)]('\x20\x20appcode:\x20'+_0x13bb3a)),_0x982442=await confirm({'message':_0x3a6ec4(0x67)+a116_0xeb04fc['bold'](_0x3a6ec4(0x8b))+_0x3a6ec4(0x66),'default':!![]}));if(!_0x982442){console['log'](_0x3a6ec4(0x82)+CLI_BIN_NAME+_0x3a6ec4(0x96));return;}const _0x5be002=resolve(_0x5aa919,NEW_CONFIG_NAME),_0x202e47=getCliVersionFromPkg(),_0x574f25=readRawConfig(),_0xd3a908=_0x1f02a7||(typeof _0x5444b5?.[_0x3a6ec4(0x76)]===_0x3a6ec4(0x74)?_0x5444b5[_0x3a6ec4(0x76)]:undefined)||(typeof _0x5444b5?.[_0x3a6ec4(0x85)]==='string'?_0x5444b5[_0x3a6ec4(0x85)]:undefined)||await askAppcode(),_0x40114f=typeof _0x5444b5?.['env']==='string'?_0x5444b5[_0x3a6ec4(0x92)]:typeof _0x574f25['env']===_0x3a6ec4(0x74)?_0x574f25['env']:'production',_0x1474e6=buildCanonicalProjectConfig({..._0x574f25,..._0x5444b5},{'appCodes':[_0xd3a908],'env':_0x40114f,'metadata':{'version':_0x202e47,'migratedAt':new Date()[_0x3a6ec4(0x80)](),'migratedFrom':_0x4263b5}});writeConfigFile(_0x5be002,_0x1474e6);const _0x235967=_0x4263b5+'.bak';renameSync(_0x4263b5,_0x235967),logger[_0x3a6ec4(0x83)](_0x5aa919),logger[_0x3a6ec4(0x7d)](_0x3a6ec4(0x84),_0x3a6ec4(0x87),{'from':_0x4263b5,'to':_0x5be002,'appcode':_0xd3a908,'env':_0x1474e6[_0x3a6ec4(0x92)]}),console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x6d)](_0x3a6ec4(0x79)+_0x3f515a+_0x3a6ec4(0x97))),console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x73)](_0x3a6ec4(0x90)+Object['keys'](_0x1474e6[_0x3a6ec4(0x8d)]||{})[_0x3a6ec4(0x89)](',\x20'))),console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x73)](_0x3a6ec4(0x7e)+_0x1474e6[_0x3a6ec4(0x68)])),console['log'](a116_0xeb04fc[_0x3a6ec4(0x8a)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x3f515a+_0x3a6ec4(0x94)));return;}const _0x135200=_0x1f02a7||await askAppcode(),_0x150a17=resolve(_0x5aa919,NEW_CONFIG_NAME),_0x539adc=getCliVersionFromPkg(),_0x9798f=readRawConfig(),_0x5b2c4d=typeof _0x9798f['env']==='string'?_0x9798f[_0x3a6ec4(0x92)]:undefined,_0x5440ff=buildCanonicalProjectConfig({},{'appCodes':[_0x135200],'env':_0x410fc5||_0x5b2c4d||_0x3a6ec4(0x95),'metadata':{'version':_0x539adc,'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x150a17,_0x5440ff),logger[_0x3a6ec4(0x83)](_0x5aa919),logger[_0x3a6ec4(0x7d)](_0x3a6ec4(0x84),_0x3a6ec4(0x7b),{'appcode':_0x135200,'env':_0x5440ff['env'],'version':_0x5440ff['version'],'configPath':_0x150a17}),console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x6d)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x73)](_0x3a6ec4(0x90)+Object['keys'](_0x5440ff[_0x3a6ec4(0x8d)]||{})['join'](',\x20'))),console[_0x3a6ec4(0x86)](a116_0xeb04fc[_0x3a6ec4(0x73)](_0x3a6ec4(0x7e)+_0x5440ff['defaultApp'])),console[_0x3a6ec4(0x86)](_0x3a6ec4(0x6b)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x3a6ec4(0x71));}function askAppcode(){const _0x2286a3=a116_0x4817;return input({'message':_0x2286a3(0x88),'validate':_0x46be18=>{const _0x85acd2=_0x2286a3;if(!_0x46be18[_0x85acd2(0x77)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x3ee091,message:_0x3d49b5}=validateAppcode(_0x46be18[_0x85acd2(0x77)]());return _0x3ee091||_0x3d49b5||_0x85acd2(0x7a);}});}function getCliVersionFromPkg(){const _0x3c8fed=a116_0x4817;try{const _0x4f25ba=fileURLToPath(import.meta.url),_0xa6ad9a=resolve(dirname(_0x4f25ba),_0x3c8fed(0x69)),_0x3b37b8=JSON['parse'](readFileSync(resolve(_0xa6ad9a,_0x3c8fed(0x99)),'utf8'));return _0x3b37b8[_0x3c8fed(0x7c)]||_0x3c8fed(0x91);}catch{return _0x3c8fed(0x91);}}function a116_0x3f92(){const _0x501cea=['834666ujZRBp','?\x20(Old\x20file\x20→\x20*.bak)','Upgrade\x20it\x20to\x20','defaultApp','../..','568120bQoqcO','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','161918LQPpDb','green','168rZGDlC','153aIYYtp','6062357kXLHqh','\x20api\x20pull\x27','5ylWVjl','cyan','string','10TpmJtH','appcode','trim','parse','✓\x20Upgraded\x20','Invalid\x20App\x20Code','初始化项目配置文件成功','version','info','\x20\x20Default:\x20','bold','toLocaleString','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','Migration\x20cancelled.\x20Run\x20`','setLogPath','init','app','log','从旧配置文件升级成功','Please\x20enter\x20App\x20Code:','join','gray','.rabetbase.json','146255PGtFMr','apps','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','17148505NswEgf','\x20\x20Apps:\x20','1.0.0','env','1276329vQtfFv','.bak','production','\x20project\x20init`\x20to\x20start\x20fresh.','\x20→\x20.rabetbase.json','cwd','package.json','yellow'];a116_0x3f92=function(){return _0x501cea;};return a116_0x3f92();}
@@ -1 +1 @@
1
- function a117_0x4c5e(){const _0x518bfc=['MCP\x20config:','filter','Legacy\x20artifacts:','undefined','125880VkgfeL','yes','\x20\x20Step\x20','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','needed','join','error','needsSkillSwap','green','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','not\x20found\x20(will\x20create)','\x20→\x20','660918ffSZav','oldMcpConfig','log','utf8','length','\x20from\x20','removed\x20','cwd','not\x20found\x20or\x20already\x20at\x20latest','===\x20Upgrade\x20Summary\x20===','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','entries','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Step\x201/7:\x20Migrating\x20config...','Config\x20file:','Skill\x20swap:','label','.cursor/mcp.json','object','fields','parse','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','step','hasNewConfig','message','no\x20matching\x20entry\x20found','isDirectory','Remove\x20legacy\x20artifacts','skipped','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','string','configMigration','\x20\x20bun\x20install','@lovrabet/sdk','some','[\x22@lovrabet/sdk\x22]:\x20','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','Upgrade\x20@lovrabet/sdk','red','Step\x204/7:\x20MCP\x20config\x20—\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','6201315EHQfrR','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','inherit','Step\x204/7:\x20Cleaning\x20MCP\x20config...','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','4107936qxDayb','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Install\x20new\x20skill','gray','8haeyLZ','info','CANCEL','\x20\x20Action:\x20delete','100823NcyMji','latest','10PsNsfa','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','4uKgLOE','package.json','stringify','\x20→\x20keys:\x20','mcpServers','.bak','devDependencies','cyan','bold','Step\x205/7:\x20Removing\x20old\x20skill...','no\x20legacy\x20config\x20found','oldPath','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','keys','Config\x20migration','Upgrade\x20cancelled.','fail','path','succeed','.cursor/rules/lovrabet_rules.mdc','16kFFxtN','start','3877890mqFsWV','includes','\x20(backup:\x20','lovrabet/rabetbase','Proceed\x20with\x20upgrade?','Step\x206/7:\x20Installing\x20new\x20skill...','done','Remove\x20old\x20skill','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','already\x20exists\x20(will\x20merge)','push','sdkUpgrade','status','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Clean\x20MCP\x20config','\x20→\x20latest','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','isArray','yellow','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Remove\x20.lovrabet/','lovrabet/rabetbase\x20installed\x20globally','white','skipped\x20(no\x20legacy\x20config)','@lovrabet/sdk:','.lovrabet','\x20\x20\x20\x20\x20\x20\x20','detail','14516799rjUyMg','files','exit\x20','args','@lovrabet/dataset-mcp-server','failed'];a117_0x4c5e=function(){return _0x518bfc;};return a117_0x4c5e();}const a117_0x15b06d=a117_0x2015;(function(_0x56a9aa,_0x47fabe){const _0x54d6fc=a117_0x2015,_0x40e668=_0x56a9aa();while(!![]){try{const _0xfdd4db=-parseInt(_0x54d6fc(0x14b))/0x1+-parseInt(_0x54d6fc(0x147))/0x2*(parseInt(_0x54d6fc(0x115))/0x3)+parseInt(_0x54d6fc(0x14f))/0x4*(parseInt(_0x54d6fc(0xe3))/0x5)+-parseInt(_0x54d6fc(0x109))/0x6+-parseInt(_0x54d6fc(0x143))/0x7*(parseInt(_0x54d6fc(0xe1))/0x8)+parseInt(_0x54d6fc(0x13e))/0x9+parseInt(_0x54d6fc(0x14d))/0xa*(parseInt(_0x54d6fc(0xff))/0xb);if(_0xfdd4db===_0x47fabe)break;else _0x40e668['push'](_0x40e668['shift']());}catch(_0x4eebd1){_0x40e668['push'](_0x40e668['shift']());}}}(a117_0x4c5e,0x9456f));import a117_0x5749c7 from'chalk';import a117_0x4707bc from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a117_0x2015(_0x66bec1,_0x1ca8f4){_0x66bec1=_0x66bec1-0xdc;const _0x4c5ea0=a117_0x4c5e();let _0x2015f6=_0x4c5ea0[_0x66bec1];return _0x2015f6;}import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a117_0x15b06d(0x106)](_0x69b8e8=>_0x69b8e8!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x319b47){const _0x1825ba=a117_0x15b06d,_0x1ddb4a=[];for(const _0x33025a of Object['values'](CORE_IDE_CONFIGS)){if(_0x33025a[_0x1825ba(0x100)])for(const _0x28ea5d of _0x33025a[_0x1825ba(0x100)]){_0x1ddb4a[_0x1825ba(0xed)](resolve(_0x319b47,_0x28ea5d[_0x1825ba(0xde)]));}}return _0x1ddb4a;}function analyse(_0xd88035){const _0x30b034=a117_0x15b06d;let _0x21db6f=null;const _0x358509=resolve(_0xd88035,NEW_CONFIG_NAME),_0x52b36a=existsSync(_0x358509);for(const _0x47b471 of LEGACY_CONFIG_NAMES){const _0x59a46e=resolve(_0xd88035,_0x47b471);if(existsSync(_0x59a46e)){const _0x65043a=readConfigFile(_0x59a46e),_0x34f88f=Object[_0x30b034(0x15c)](_0x65043a)['filter'](_0x5f4501=>typeof _0x65043a[_0x5f4501]!==_0x30b034(0x108));_0x21db6f={'oldPath':_0x59a46e,'hasNewConfig':_0x52b36a,'fields':_0x34f88f};break;}}const _0x2f606b=[],_0x393148=resolve(_0xd88035,'.lovrabet');if(existsSync(_0x393148))_0x2f606b[_0x30b034(0xed)](_0x393148);const _0x251fcd=resolve(_0xd88035,_0x30b034(0xe0));if(existsSync(_0x251fcd))_0x2f606b['push'](_0x251fcd);const _0x386860=resolve(_0xd88035,'.claude/skills/lovrabet');if(existsSync(_0x386860))_0x2f606b['push'](_0x386860);for(const _0x460319 of collectIdeSkillFiles(_0xd88035)){if(existsSync(_0x460319))_0x2f606b[_0x30b034(0xed)](_0x460319);}let _0x111b60=null;const _0x44afc4=resolve(_0xd88035,_0x30b034(0x126));if(existsSync(_0x44afc4))try{const _0x14d181=JSON[_0x30b034(0x129)](readFileSync(_0x44afc4,_0x30b034(0x118)));if(_0x14d181?.[_0x30b034(0x153)]&&typeof _0x14d181[_0x30b034(0x153)]===_0x30b034(0x127)){const _0x512b42=[];for(const [_0x1c8565,_0xfc0bc5]of Object[_0x30b034(0x120)](_0x14d181[_0x30b034(0x153)])){const _0x31cb28=_0xfc0bc5;_0x31cb28?.[_0x30b034(0x102)]&&Array[_0x30b034(0xf4)](_0x31cb28['args'])&&_0x31cb28['args'][_0x30b034(0x137)](_0x3f7c7b=>typeof _0x3f7c7b===_0x30b034(0x133)&&_0x3f7c7b[_0x30b034(0xe4)](_0x30b034(0x103)))&&_0x512b42['push'](_0x1c8565);}_0x512b42[_0x30b034(0x119)]>0x0&&(_0x111b60={'path':_0x44afc4,'keys':_0x512b42});}}catch{}const _0xfbe245=_0x2f606b[_0x30b034(0x119)]>0x0||_0x21db6f!==null;let _0x2cd5ac=null;const _0x21b3ae=resolve(_0xd88035,_0x30b034(0x150));if(existsSync(_0x21b3ae))try{const _0x1e3375=JSON[_0x30b034(0x129)](readFileSync(_0x21b3ae,_0x30b034(0x118)));for(const _0x168fc7 of['dependencies',_0x30b034(0x155)]){const _0x479399=_0x1e3375?.[_0x168fc7]?.[_0x30b034(0x136)];if(typeof _0x479399===_0x30b034(0x133)){_0x479399!==_0x30b034(0x14c)&&(_0x2cd5ac={'pkgPath':_0x21b3ae,'currentVersion':_0x479399,'field':_0x168fc7});break;}}}catch{}return{'configMigration':_0x21db6f,'oldArtifacts':_0x2f606b,'oldMcpConfig':_0x111b60,'needsSkillSwap':_0xfbe245,'sdkUpgrade':_0x2cd5ac};}function printReport(_0x50bc05){const _0x69d59d=a117_0x15b06d,{configMigration:_0x18ef91,oldArtifacts:_0xa5e103,oldMcpConfig:_0x18ec55,needsSkillSwap:_0x3cef73}=_0x50bc05;console[_0x69d59d(0x117)](''),console['log'](a117_0x5749c7['bold']('===\x20Upgrade\x20Analysis\x20===')),console[_0x69d59d(0x117)]('');_0x18ef91?(console[_0x69d59d(0x117)](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0x123))+('\x20\x20'+a117_0x5749c7[_0x69d59d(0xf5)](_0x18ef91[_0x69d59d(0x15a)]))),console[_0x69d59d(0x117)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x18ef91['hasNewConfig']?a117_0x5749c7[_0x69d59d(0x111)](_0x69d59d(0xec)):a117_0x5749c7[_0x69d59d(0x146)](_0x69d59d(0x113)))),console[_0x69d59d(0x117)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x18ef91[_0x69d59d(0x128)][_0x69d59d(0x10e)](',\x20')),console[_0x69d59d(0x117)](_0x69d59d(0x112))):console['log'](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0x123))+'\x20\x20'+a117_0x5749c7[_0x69d59d(0x146)](_0x69d59d(0x159)));console[_0x69d59d(0x117)]('');if(_0xa5e103[_0x69d59d(0x119)]>0x0){console[_0x69d59d(0x117)](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0x107)));for(const _0x2b73e3 of _0xa5e103){console['log']('\x20\x20'+a117_0x5749c7[_0x69d59d(0x13b)]('FOUND')+'\x20\x20'+_0x2b73e3);}console[_0x69d59d(0x117)](_0x69d59d(0x14a));}else console['log'](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0x107))+'\x20\x20'+a117_0x5749c7[_0x69d59d(0x146)]('none\x20found'));console[_0x69d59d(0x117)]('');_0x18ec55?(console[_0x69d59d(0x117)](a117_0x5749c7[_0x69d59d(0x156)]('MCP\x20config:')+('\x20\x20'+a117_0x5749c7[_0x69d59d(0xf5)](_0x18ec55['path'])+_0x69d59d(0x152)+_0x18ec55['keys'][_0x69d59d(0x10e)](',\x20'))),console['log'](_0x69d59d(0xf6))):console[_0x69d59d(0x117)](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0x105))+'\x20\x20'+a117_0x5749c7[_0x69d59d(0x146)]('no\x20legacy\x20entry'));console[_0x69d59d(0x117)](''),console[_0x69d59d(0x117)](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0x124))+('\x20\x20'+(_0x3cef73?a117_0x5749c7['yellow'](_0x69d59d(0x10d)):a117_0x5749c7['green']('not\x20needed'))));_0x3cef73&&console[_0x69d59d(0x117)](_0x69d59d(0x15b)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x69d59d(0x117)]('');if(_0x50bc05['sdkUpgrade']){const {currentVersion:_0x4b5475,field:_0xabc0ad,pkgPath:_0x10ec1c}=_0x50bc05[_0x69d59d(0xee)];console[_0x69d59d(0x117)](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0xfb))+('\x20\x20'+a117_0x5749c7[_0x69d59d(0xf5)](_0x10ec1c))),console['log']('\x20\x20Current\x20version\x20in\x20'+_0xabc0ad+':\x20'+a117_0x5749c7[_0x69d59d(0xf5)](_0x4b5475)+'\x20→\x20'+a117_0x5749c7['green']('latest')),console[_0x69d59d(0x117)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x69d59d(0x117)](a117_0x5749c7[_0x69d59d(0x156)](_0x69d59d(0xfb))+'\x20\x20'+a117_0x5749c7[_0x69d59d(0x146)](_0x69d59d(0x11d)));console[_0x69d59d(0x117)]('');}function execConfigMigration(_0x5fd4af,_0x304dd7){const _0xd5930b=a117_0x15b06d,{configMigration:_0x2e304c}=_0x5fd4af;if(!_0x2e304c?.[_0xd5930b(0x15a)])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0xd5930b(0xfa)};const _0xd4012d=readConfigFile(_0x2e304c[_0xd5930b(0x15a)]),_0x104126=resolve(_0x304dd7,NEW_CONFIG_NAME),_0x5773a7=_0x2e304c[_0xd5930b(0x12c)]?readConfigFile(_0x104126):{};for(const [_0x176bae,_0x5bbb75]of Object[_0xd5930b(0x120)](_0xd4012d)){!(_0x176bae in _0x5773a7)&&(_0x5773a7[_0x176bae]=_0x5bbb75);}writeConfigFile(_0x104126,_0x5773a7);const _0x849e9b=_0x2e304c['oldPath']+_0xd5930b(0x154);return renameSync(_0x2e304c[_0xd5930b(0x15a)],_0x849e9b),{'step':0x1,'label':_0xd5930b(0x15d),'ok':!![],'detail':_0x2e304c[_0xd5930b(0x15a)]+_0xd5930b(0x114)+_0x104126+_0xd5930b(0xe5)+_0x849e9b+')'};}function execRemoveOldArtifacts(_0x47a3e5){const _0x525768=a117_0x15b06d,_0x1a7d60=[];for(const _0x32792e of _0x47a3e5){try{if(!existsSync(_0x32792e))continue;const _0x36116c=tryStat(_0x32792e);_0x36116c?.[_0x525768(0x12f)]()?rmSync(_0x32792e,{'recursive':!![],'force':!![]}):unlinkSync(_0x32792e);}catch(_0x469801){_0x1a7d60[_0x525768(0xed)](_0x32792e+':\x20'+_0x469801['message']);}}return{'step':0x3,'label':_0x525768(0x130),'ok':_0x1a7d60[_0x525768(0x119)]===0x0,'detail':_0x1a7d60[_0x525768(0x119)]>0x0?_0x47a3e5[_0x525768(0x119)]-_0x1a7d60[_0x525768(0x119)]+'/'+_0x47a3e5[_0x525768(0x119)]+'\x20removed\x20('+_0x1a7d60[_0x525768(0x10e)](';\x20')+')':_0x47a3e5[_0x525768(0x119)]+'\x20removed'};}function execCleanMcp(_0x51fcbf){const _0x130044=a117_0x15b06d;if(!_0x51fcbf[_0x130044(0x116)])return{'step':0x4,'label':_0x130044(0xf1),'ok':!![],'detail':_0x130044(0x131)};try{const _0x5cac2=readFileSync(_0x51fcbf['oldMcpConfig'][_0x130044(0xde)],'utf8'),_0x1e6641=JSON['parse'](_0x5cac2);if(_0x1e6641?.['mcpServers']&&typeof _0x1e6641[_0x130044(0x153)]===_0x130044(0x127)){const _0x5951fa=[];for(const [_0x588d41,_0x4de140]of Object[_0x130044(0x120)](_0x1e6641[_0x130044(0x153)])){_0x4de140?.[_0x130044(0x102)]&&Array[_0x130044(0xf4)](_0x4de140[_0x130044(0x102)])&&_0x4de140[_0x130044(0x102)]['some'](_0x14d970=>typeof _0x14d970==='string'&&_0x14d970[_0x130044(0xe4)](_0x130044(0x103)))&&_0x5951fa['push'](_0x588d41);}for(const _0x4fe154 of _0x5951fa){delete _0x1e6641[_0x130044(0x153)][_0x4fe154];}return _0x5951fa[_0x130044(0x119)]>0x0&&writeFileSync(_0x51fcbf[_0x130044(0x116)][_0x130044(0xde)],JSON[_0x130044(0x151)](_0x1e6641,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x130044(0xf1),'ok':!![],'detail':_0x130044(0x11b)+_0x5951fa[_0x130044(0x10e)](',\x20')+_0x130044(0x11a)+_0x51fcbf['oldMcpConfig'][_0x130044(0xde)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x130044(0x12e)};}catch(_0x35fb0a){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x35fb0a[_0x130044(0x12d)]};}}function execSkillsRemove(_0x2258ca,_0x5b9234){const _0x5ba326=a117_0x15b06d,_0x3828fc=runNpxSkillsRemove(_0x2258ca,{'stdio':_0x5ba326(0x140),'yes':_0x5b9234});return{'step':0x5,'label':_0x5ba326(0xea),'ok':_0x3828fc['ok'],'detail':_0x3828fc['ok']?'lovrabet/lovrabet-skill\x20removed':_0x3828fc[_0x5ba326(0x10f)]??_0x5ba326(0x101)+_0x3828fc[_0x5ba326(0xef)]};}function execSkillsAdd(_0x5e8039,_0x44d29e){const _0x286c3e=a117_0x15b06d,_0x2f6063=runNpxSkillsAddGlobal(_0x5e8039,_0x286c3e(0xe6),{'stdio':_0x286c3e(0x140),'yes':_0x44d29e});return{'step':0x6,'label':_0x286c3e(0x145),'ok':_0x2f6063['ok'],'detail':_0x2f6063['ok']?_0x286c3e(0xf8):_0x2f6063[_0x286c3e(0x10f)]??'exit\x20'+_0x2f6063['status']};}function execUpgradeSdk(_0xeb8d0b){const _0x400065=a117_0x15b06d;if(!_0xeb8d0b[_0x400065(0xee)])return{'step':0x7,'label':_0x400065(0x13a),'ok':!![],'detail':_0x400065(0x142)};const {pkgPath:_0x4de549,currentVersion:_0xfbffa9,field:_0xb67890}=_0xeb8d0b[_0x400065(0xee)];try{const _0x1c0407=readFileSync(_0x4de549,'utf8'),_0x2e7e86=JSON['parse'](_0x1c0407);return _0x2e7e86[_0xb67890]['@lovrabet/sdk']=_0x400065(0x14c),writeFileSync(_0x4de549,JSON[_0x400065(0x151)](_0x2e7e86,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x400065(0x13a),'ok':!![],'detail':_0xb67890+_0x400065(0x138)+_0xfbffa9+_0x400065(0xf2)};}catch(_0x124a42){return{'step':0x7,'label':_0x400065(0x13a),'ok':![],'detail':_0x124a42[_0x400065(0x12d)]};}}function tryStat(_0x199c74){try{return statSync(_0x199c74);}catch{return undefined;}}function printSummary(_0x74afb7){const _0x421a8e=a117_0x15b06d;console[_0x421a8e(0x117)](''),console[_0x421a8e(0x117)](a117_0x5749c7[_0x421a8e(0x157)](_0x421a8e(0x11e))),console['log']('');for(const _0x45ee97 of _0x74afb7){const _0x40d643=_0x45ee97['ok']?a117_0x5749c7[_0x421a8e(0x111)]('OK'):a117_0x5749c7['red']('FAIL');console[_0x421a8e(0x117)]('\x20\x20'+_0x40d643+_0x421a8e(0x10b)+_0x45ee97[_0x421a8e(0x12b)]+':\x20'+_0x45ee97[_0x421a8e(0x125)]);if(_0x45ee97['detail'])console[_0x421a8e(0x117)](_0x421a8e(0xfd)+a117_0x5749c7['gray'](_0x45ee97[_0x421a8e(0xfe)]));}console[_0x421a8e(0x117)]('');}export async function upgradeApp(_0x50468d,_0x4361e3){const _0x42dd3b=a117_0x15b06d,_0x41417e=process[_0x42dd3b(0x11c)](),_0x746065=analyse(_0x41417e),_0x17e527=!_0x746065[_0x42dd3b(0x134)]&&_0x746065['oldArtifacts'][_0x42dd3b(0x119)]===0x0&&!_0x746065['oldMcpConfig']&&!_0x746065[_0x42dd3b(0x110)]&&!_0x746065[_0x42dd3b(0xee)];if(_0x17e527){console[_0x42dd3b(0x117)](a117_0x5749c7[_0x42dd3b(0x111)](_0x42dd3b(0x10c)));return;}printReport(_0x746065);const _0x57f6a5=!!(_0x4361e3[_0x42dd3b(0x10a)]||_0x4361e3['Y']||_0x50468d);if(!_0x57f6a5)try{const _0x2a72fc=await askConfirm(_0x42dd3b(0xe7));if(!_0x2a72fc){console[_0x42dd3b(0x117)](a117_0x5749c7['gray'](_0x42dd3b(0xdc)));return;}}catch(_0x2b5b5e){if(_0x2b5b5e?.[_0x42dd3b(0x12d)]===_0x42dd3b(0x149)){console[_0x42dd3b(0x117)](a117_0x5749c7[_0x42dd3b(0x146)](_0x42dd3b(0xdc)));return;}throw _0x2b5b5e;}const _0x5f375e=[],_0x1a3339=a117_0x4707bc({'text':_0x42dd3b(0x122),'color':'cyan'})[_0x42dd3b(0xe2)](),_0x53b1eb=execConfigMigration(_0x746065,_0x41417e);_0x5f375e[_0x42dd3b(0xed)](_0x53b1eb),_0x1a3339[_0x53b1eb['ok']?_0x42dd3b(0xdf):_0x42dd3b(0xdd)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x53b1eb['detail']??(_0x53b1eb['ok']?_0x42dd3b(0xe9):_0x42dd3b(0x104))));const _0x5896ae=resolve(_0x41417e,_0x42dd3b(0xfc)),_0x2b407c=a117_0x4707bc({'text':_0x42dd3b(0x144),'color':_0x42dd3b(0x156)})['start']();if(existsSync(_0x5896ae))try{rmSync(_0x5896ae,{'recursive':!![],'force':!![]}),_0x2b407c[_0x42dd3b(0xdf)](_0x42dd3b(0x11f)),_0x5f375e[_0x42dd3b(0xed)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x7fdec3){_0x2b407c[_0x42dd3b(0xdd)](_0x42dd3b(0xeb)+_0x7fdec3[_0x42dd3b(0x12d)]),_0x5f375e['push']({'step':0x2,'label':_0x42dd3b(0xf7),'ok':![],'detail':_0x7fdec3['message']});}else _0x2b407c[_0x42dd3b(0x148)](_0x42dd3b(0x12a)),_0x5f375e[_0x42dd3b(0xed)]({'step':0x2,'label':_0x42dd3b(0xf7),'ok':!![],'detail':_0x42dd3b(0x131)});const _0x3e7bd0=a117_0x4707bc({'text':_0x42dd3b(0x132),'color':_0x42dd3b(0x156)})[_0x42dd3b(0xe2)](),_0x10f3d8=execRemoveOldArtifacts(_0x746065['oldArtifacts']);_0x5f375e[_0x42dd3b(0xed)](_0x10f3d8),_0x3e7bd0[_0x10f3d8['ok']?_0x42dd3b(0xdf):'fail'](_0x42dd3b(0xf0)+(_0x10f3d8[_0x42dd3b(0xfe)]??(_0x10f3d8['ok']?_0x42dd3b(0xe9):'failed')));const _0x4907a8=a117_0x4707bc({'text':_0x42dd3b(0x141),'color':_0x42dd3b(0x156)})['start'](),_0x542bdf=execCleanMcp(_0x746065);_0x5f375e[_0x42dd3b(0xed)](_0x542bdf),_0x4907a8[_0x542bdf['ok']?_0x42dd3b(0xdf):_0x42dd3b(0xdd)](_0x42dd3b(0x13c)+(_0x542bdf['detail']??(_0x542bdf['ok']?_0x42dd3b(0xe9):'failed')));const _0x10cbe5=a117_0x4707bc({'text':_0x42dd3b(0x158),'color':_0x42dd3b(0x156)})[_0x42dd3b(0xe2)](),_0x1063a4=execSkillsRemove(_0x41417e,_0x57f6a5);_0x5f375e[_0x42dd3b(0xed)](_0x1063a4),_0x10cbe5[_0x1063a4['ok']?_0x42dd3b(0xdf):_0x42dd3b(0xdd)](_0x42dd3b(0x121)+(_0x1063a4['detail']??(_0x1063a4['ok']?_0x42dd3b(0xe9):_0x42dd3b(0x104))));const _0x12239b=a117_0x4707bc({'text':_0x42dd3b(0xe8),'color':_0x42dd3b(0x156)})[_0x42dd3b(0xe2)](),_0x43a81d=execSkillsAdd(_0x41417e,_0x57f6a5);_0x5f375e[_0x42dd3b(0xed)](_0x43a81d),_0x12239b[_0x43a81d['ok']?_0x42dd3b(0xdf):_0x42dd3b(0xdd)](_0x42dd3b(0x13d)+(_0x43a81d[_0x42dd3b(0xfe)]??(_0x43a81d['ok']?'done':_0x42dd3b(0x104))));const _0x5d4277=a117_0x4707bc({'text':_0x42dd3b(0x14e),'color':_0x42dd3b(0x156)})[_0x42dd3b(0xe2)](),_0x277cb5=execUpgradeSdk(_0x746065);_0x5f375e[_0x42dd3b(0xed)](_0x277cb5),_0x5d4277[_0x277cb5['ok']?_0x42dd3b(0xdf):_0x42dd3b(0xdd)](_0x42dd3b(0x139)+(_0x277cb5['detail']??(_0x277cb5['ok']?'done':_0x42dd3b(0x104)))),printSummary(_0x5f375e);const _0x522c1f=_0x5f375e[_0x42dd3b(0x137)](_0x926e5c=>!_0x926e5c['ok']);_0x522c1f?console[_0x42dd3b(0x117)](a117_0x5749c7[_0x42dd3b(0xf5)](_0x42dd3b(0xf3))):console[_0x42dd3b(0x117)](a117_0x5749c7[_0x42dd3b(0x111)]('Upgrade\x20completed\x20successfully!')),_0x277cb5['ok']&&_0x746065[_0x42dd3b(0xee)]&&(console[_0x42dd3b(0x117)](''),console['log'](a117_0x5749c7[_0x42dd3b(0x157)][_0x42dd3b(0x156)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a117_0x5749c7[_0x42dd3b(0x156)](_0x42dd3b(0x13f))),console['log'](''),console[_0x42dd3b(0x117)](a117_0x5749c7[_0x42dd3b(0xf9)]('\x20\x20npm\x20install')),console[_0x42dd3b(0x117)](a117_0x5749c7[_0x42dd3b(0xf9)]('\x20\x20#\x20or')),console[_0x42dd3b(0x117)](a117_0x5749c7['white'](_0x42dd3b(0x135))),console[_0x42dd3b(0x117)](''));}
1
+ (function(_0x313dfd,_0x12a887){const _0x314019=a117_0x3b45,_0x5b3e87=_0x313dfd();while(!![]){try{const _0x3e2059=parseInt(_0x314019(0x183))/0x1+-parseInt(_0x314019(0x17e))/0x2*(parseInt(_0x314019(0x1c7))/0x3)+-parseInt(_0x314019(0x182))/0x4*(-parseInt(_0x314019(0x1b6))/0x5)+-parseInt(_0x314019(0x192))/0x6*(-parseInt(_0x314019(0x176))/0x7)+parseInt(_0x314019(0x1a7))/0x8+parseInt(_0x314019(0x15a))/0x9+-parseInt(_0x314019(0x18f))/0xa*(parseInt(_0x314019(0x153))/0xb);if(_0x3e2059===_0x12a887)break;else _0x5b3e87['push'](_0x5b3e87['shift']());}catch(_0x51c668){_0x5b3e87['push'](_0x5b3e87['shift']());}}}(a117_0x97ea,0xee4a9));import a117_0x45c037 from'chalk';import a117_0x51053f from'ora';function a117_0x97ea(){const _0x5319bc=['CANCEL','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20\x20New\x20config\x20(.rabetbase.json):\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','removed\x20','values','\x20\x20#\x20or','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','MCP\x20config:','Legacy\x20artifacts:','fields','@lovrabet/dataset-mcp-server','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','skipped\x20(no\x20legacy\x20config)','done','.bak','Config\x20migration','status','oldMcpConfig','Clean\x20MCP\x20config','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','cwd','fail','763084qDhtpS','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','needed','push','no\x20legacy\x20config\x20found','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x201/7:\x20Migrating\x20config...','parse','2TSEYRL','cyan','inherit','\x20\x20npm\x20install','145932CLiAKZ','1225541wgDRql','error','sdkUpgrade','stringify','yes','start','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','args','\x20\x20\x20\x20\x20\x20\x20','green','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','log','3829060ODkuGB','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Config\x20file:','18LCNjet','\x20\x20bun\x20install','\x20\x20Current\x20version\x20in\x20','lovrabet/lovrabet-skill\x20removed','===\x20Upgrade\x20Summary\x20===','Remove\x20.lovrabet/','lovrabet/rabetbase\x20installed\x20globally','string','\x20\x20Step\x20','@lovrabet/sdk:','\x20→\x20','filter','mcpServers','@lovrabet/sdk','\x20removed','files','succeed','oldPath','\x20(backup:\x20','exit\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','10123352FxJMVd','Remove\x20legacy\x20artifacts','FOUND','red','Proceed\x20with\x20upgrade?','\x20removed\x20(','isArray','isDirectory','detail','white','join','.cursor/mcp.json','Upgrade\x20@lovrabet/sdk','not\x20found\x20or\x20already\x20at\x20latest','gray','190dIrbwc','object','entries','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Upgrade\x20cancelled.','.lovrabet','dependencies','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','failed','length','utf8','\x20\x20Fields\x20to\x20migrate:\x20','not\x20needed','latest','\x20from\x20','yellow','hasNewConfig','341337sUXTNb','keys','Step\x206/7:\x20Installing\x20new\x20skill...','info','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','needsSkillSwap','Install\x20new\x20skill','undefined','step','\x20\x20Action:\x20delete','bold','includes','Step\x201/7:\x20Config\x20migration\x20—\x20','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Step\x205/7:\x20Removing\x20old\x20skill...','not\x20found\x20(will\x20create)','Step\x204/7:\x20MCP\x20config\x20—\x20','oldArtifacts','package.json','[\x22@lovrabet/sdk\x22]:\x20','some','143gurIzG','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','\x20→\x20keys:\x20','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','skipped','lovrabet/rabetbase','16769232DSHnUq','\x20→\x20latest','path','none\x20found','message'];a117_0x97ea=function(){return _0x5319bc;};return a117_0x97ea();}import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x1496d5=>_0x1496d5!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x288d8a){const _0x2f9a24=a117_0x3b45,_0x5db8a2=[];for(const _0x3612f2 of Object[_0x2f9a24(0x164)](CORE_IDE_CONFIGS)){if(_0x3612f2['files'])for(const _0x35047e of _0x3612f2[_0x2f9a24(0x1a1)]){_0x5db8a2[_0x2f9a24(0x179)](resolve(_0x288d8a,_0x35047e[_0x2f9a24(0x15c)]));}}return _0x5db8a2;}function analyse(_0x2bf729){const _0xb5ae01=a117_0x3b45;let _0x1116ee=null;const _0x3e4dfa=resolve(_0x2bf729,NEW_CONFIG_NAME),_0x5ca731=existsSync(_0x3e4dfa);for(const _0x914b0c of LEGACY_CONFIG_NAMES){const _0x37a77e=resolve(_0x2bf729,_0x914b0c);if(existsSync(_0x37a77e)){const _0x64c276=readConfigFile(_0x37a77e),_0x1aaa66=Object[_0xb5ae01(0x1c8)](_0x64c276)[_0xb5ae01(0x19d)](_0x477830=>typeof _0x64c276[_0x477830]!==_0xb5ae01(0x1ce));_0x1116ee={'oldPath':_0x37a77e,'hasNewConfig':_0x5ca731,'fields':_0x1aaa66};break;}}const _0x5da14b=[],_0x4893a1=resolve(_0x2bf729,'.lovrabet');if(existsSync(_0x4893a1))_0x5da14b[_0xb5ae01(0x179)](_0x4893a1);const _0x37b595=resolve(_0x2bf729,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x37b595))_0x5da14b[_0xb5ae01(0x179)](_0x37b595);const _0xde5aba=resolve(_0x2bf729,'.claude/skills/lovrabet');if(existsSync(_0xde5aba))_0x5da14b[_0xb5ae01(0x179)](_0xde5aba);for(const _0x44b2d1 of collectIdeSkillFiles(_0x2bf729)){if(existsSync(_0x44b2d1))_0x5da14b['push'](_0x44b2d1);}let _0x1476a8=null;const _0x12caef=resolve(_0x2bf729,_0xb5ae01(0x1b2));if(existsSync(_0x12caef))try{const _0x53a001=JSON[_0xb5ae01(0x17d)](readFileSync(_0x12caef,_0xb5ae01(0x1c0)));if(_0x53a001?.[_0xb5ae01(0x19e)]&&typeof _0x53a001[_0xb5ae01(0x19e)]===_0xb5ae01(0x1b7)){const _0x491542=[];for(const [_0x47e3b6,_0x4a5b5e]of Object[_0xb5ae01(0x1b8)](_0x53a001[_0xb5ae01(0x19e)])){const _0x17c746=_0x4a5b5e;_0x17c746?.['args']&&Array[_0xb5ae01(0x1ad)](_0x17c746[_0xb5ae01(0x18a)])&&_0x17c746[_0xb5ae01(0x18a)][_0xb5ae01(0x152)](_0x5cd4cd=>typeof _0x5cd4cd===_0xb5ae01(0x199)&&_0x5cd4cd[_0xb5ae01(0x149)](_0xb5ae01(0x16a)))&&_0x491542[_0xb5ae01(0x179)](_0x47e3b6);}_0x491542[_0xb5ae01(0x1bf)]>0x0&&(_0x1476a8={'path':_0x12caef,'keys':_0x491542});}}catch{}const _0x2b9191=_0x5da14b[_0xb5ae01(0x1bf)]>0x0||_0x1116ee!==null;let _0x10a270=null;const _0x5dffc0=resolve(_0x2bf729,_0xb5ae01(0x150));if(existsSync(_0x5dffc0))try{const _0x45ccf0=JSON[_0xb5ae01(0x17d)](readFileSync(_0x5dffc0,_0xb5ae01(0x1c0)));for(const _0x2f24c9 of[_0xb5ae01(0x1bc),'devDependencies']){const _0x38e5ad=_0x45ccf0?.[_0x2f24c9]?.[_0xb5ae01(0x19f)];if(typeof _0x38e5ad===_0xb5ae01(0x199)){_0x38e5ad!==_0xb5ae01(0x1c3)&&(_0x10a270={'pkgPath':_0x5dffc0,'currentVersion':_0x38e5ad,'field':_0x2f24c9});break;}}}catch{}return{'configMigration':_0x1116ee,'oldArtifacts':_0x5da14b,'oldMcpConfig':_0x1476a8,'needsSkillSwap':_0x2b9191,'sdkUpgrade':_0x10a270};}function printReport(_0x555f82){const _0x16d3ce=a117_0x3b45,{configMigration:_0x5baae0,oldArtifacts:_0x3e4f9a,oldMcpConfig:_0x5160f2,needsSkillSwap:_0x23603d}=_0x555f82;console[_0x16d3ce(0x18e)](''),console[_0x16d3ce(0x18e)](a117_0x45c037[_0x16d3ce(0x148)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x16d3ce(0x18e)]('');_0x5baae0?(console[_0x16d3ce(0x18e)](a117_0x45c037['cyan']('Config\x20file:')+('\x20\x20'+a117_0x45c037['yellow'](_0x5baae0[_0x16d3ce(0x1a3)]))),console[_0x16d3ce(0x18e)](_0x16d3ce(0x161)+(_0x5baae0[_0x16d3ce(0x1c6)]?a117_0x45c037['green']('already\x20exists\x20(will\x20merge)'):a117_0x45c037[_0x16d3ce(0x1b5)](_0x16d3ce(0x14d)))),console[_0x16d3ce(0x18e)](_0x16d3ce(0x1c1)+_0x5baae0[_0x16d3ce(0x169)][_0x16d3ce(0x1b1)](',\x20')),console[_0x16d3ce(0x18e)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x16d3ce(0x18e)](a117_0x45c037[_0x16d3ce(0x17f)](_0x16d3ce(0x191))+'\x20\x20'+a117_0x45c037[_0x16d3ce(0x1b5)](_0x16d3ce(0x17a)));console['log']('');if(_0x3e4f9a[_0x16d3ce(0x1bf)]>0x0){console[_0x16d3ce(0x18e)](a117_0x45c037[_0x16d3ce(0x17f)](_0x16d3ce(0x168)));for(const _0x3ac42c of _0x3e4f9a){console[_0x16d3ce(0x18e)]('\x20\x20'+a117_0x45c037['red'](_0x16d3ce(0x1a9))+'\x20\x20'+_0x3ac42c);}console[_0x16d3ce(0x18e)](_0x16d3ce(0x147));}else console[_0x16d3ce(0x18e)](a117_0x45c037[_0x16d3ce(0x17f)](_0x16d3ce(0x168))+'\x20\x20'+a117_0x45c037[_0x16d3ce(0x1b5)](_0x16d3ce(0x15d)));console[_0x16d3ce(0x18e)]('');_0x5160f2?(console['log'](a117_0x45c037[_0x16d3ce(0x17f)](_0x16d3ce(0x167))+('\x20\x20'+a117_0x45c037[_0x16d3ce(0x1c5)](_0x5160f2['path'])+_0x16d3ce(0x156)+_0x5160f2[_0x16d3ce(0x1c8)][_0x16d3ce(0x1b1)](',\x20'))),console[_0x16d3ce(0x18e)](_0x16d3ce(0x162))):console[_0x16d3ce(0x18e)](a117_0x45c037[_0x16d3ce(0x17f)]('MCP\x20config:')+'\x20\x20'+a117_0x45c037[_0x16d3ce(0x1b5)]('no\x20legacy\x20entry'));console['log'](''),console[_0x16d3ce(0x18e)](a117_0x45c037['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x23603d?a117_0x45c037['yellow'](_0x16d3ce(0x178)):a117_0x45c037['green'](_0x16d3ce(0x1c2)))));_0x23603d&&console['log'](_0x16d3ce(0x157)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x555f82[_0x16d3ce(0x185)]){const {currentVersion:_0x172eab,field:_0x103025,pkgPath:_0x33b41b}=_0x555f82[_0x16d3ce(0x185)];console[_0x16d3ce(0x18e)](a117_0x45c037[_0x16d3ce(0x17f)](_0x16d3ce(0x19b))+('\x20\x20'+a117_0x45c037[_0x16d3ce(0x1c5)](_0x33b41b))),console['log'](_0x16d3ce(0x194)+_0x103025+':\x20'+a117_0x45c037[_0x16d3ce(0x1c5)](_0x172eab)+_0x16d3ce(0x19c)+a117_0x45c037[_0x16d3ce(0x18c)](_0x16d3ce(0x1c3))),console[_0x16d3ce(0x18e)](_0x16d3ce(0x17b));}else console[_0x16d3ce(0x18e)](a117_0x45c037['cyan'](_0x16d3ce(0x19b))+'\x20\x20'+a117_0x45c037[_0x16d3ce(0x1b5)](_0x16d3ce(0x1b4)));console[_0x16d3ce(0x18e)]('');}function execConfigMigration(_0x1096af,_0x4eaf6e){const _0x21c6c8=a117_0x3b45,{configMigration:_0x253607}=_0x1096af;if(!_0x253607?.[_0x21c6c8(0x1a3)])return{'step':0x1,'label':_0x21c6c8(0x16f),'ok':!![],'detail':_0x21c6c8(0x16c)};const _0x513350=readConfigFile(_0x253607['oldPath']),_0x21ea12=resolve(_0x4eaf6e,NEW_CONFIG_NAME),_0x10fb78=_0x253607[_0x21c6c8(0x1c6)]?readConfigFile(_0x21ea12):{};for(const [_0xfb71a5,_0x35dd3c]of Object[_0x21c6c8(0x1b8)](_0x513350)){!(_0xfb71a5 in _0x10fb78)&&(_0x10fb78[_0xfb71a5]=_0x35dd3c);}writeConfigFile(_0x21ea12,_0x10fb78);const _0x1a9fb6=_0x253607[_0x21c6c8(0x1a3)]+_0x21c6c8(0x16e);return renameSync(_0x253607[_0x21c6c8(0x1a3)],_0x1a9fb6),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x253607['oldPath']+_0x21c6c8(0x19c)+_0x21ea12+_0x21c6c8(0x1a4)+_0x1a9fb6+')'};}function a117_0x3b45(_0x47df89,_0x17bfc3){_0x47df89=_0x47df89-0x146;const _0x97eaf0=a117_0x97ea();let _0x3b457a=_0x97eaf0[_0x47df89];return _0x3b457a;}function execRemoveOldArtifacts(_0x4a8c50){const _0x3fb38d=a117_0x3b45,_0x265737=[];for(const _0x16f82f of _0x4a8c50){try{if(!existsSync(_0x16f82f))continue;const _0x100508=tryStat(_0x16f82f);_0x100508?.[_0x3fb38d(0x1ae)]()?rmSync(_0x16f82f,{'recursive':!![],'force':!![]}):unlinkSync(_0x16f82f);}catch(_0x3a1e20){_0x265737[_0x3fb38d(0x179)](_0x16f82f+':\x20'+_0x3a1e20[_0x3fb38d(0x15e)]);}}return{'step':0x3,'label':_0x3fb38d(0x1a8),'ok':_0x265737['length']===0x0,'detail':_0x265737[_0x3fb38d(0x1bf)]>0x0?_0x4a8c50[_0x3fb38d(0x1bf)]-_0x265737['length']+'/'+_0x4a8c50[_0x3fb38d(0x1bf)]+_0x3fb38d(0x1ac)+_0x265737[_0x3fb38d(0x1b1)](';\x20')+')':_0x4a8c50['length']+_0x3fb38d(0x1a0)};}function execCleanMcp(_0x37c18){const _0x456ea6=a117_0x3b45;if(!_0x37c18['oldMcpConfig'])return{'step':0x4,'label':_0x456ea6(0x172),'ok':!![],'detail':_0x456ea6(0x158)};try{const _0x312a88=readFileSync(_0x37c18['oldMcpConfig'][_0x456ea6(0x15c)],_0x456ea6(0x1c0)),_0x584ce3=JSON['parse'](_0x312a88);if(_0x584ce3?.[_0x456ea6(0x19e)]&&typeof _0x584ce3[_0x456ea6(0x19e)]===_0x456ea6(0x1b7)){const _0x15eb54=[];for(const [_0x94bd45,_0x5c2523]of Object[_0x456ea6(0x1b8)](_0x584ce3['mcpServers'])){_0x5c2523?.[_0x456ea6(0x18a)]&&Array[_0x456ea6(0x1ad)](_0x5c2523['args'])&&_0x5c2523['args'][_0x456ea6(0x152)](_0x5d152b=>typeof _0x5d152b===_0x456ea6(0x199)&&_0x5d152b[_0x456ea6(0x149)](_0x456ea6(0x16a)))&&_0x15eb54[_0x456ea6(0x179)](_0x94bd45);}for(const _0x3934d6 of _0x15eb54){delete _0x584ce3[_0x456ea6(0x19e)][_0x3934d6];}return _0x15eb54[_0x456ea6(0x1bf)]>0x0&&writeFileSync(_0x37c18[_0x456ea6(0x171)]['path'],JSON[_0x456ea6(0x186)](_0x584ce3,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x456ea6(0x172),'ok':!![],'detail':_0x456ea6(0x163)+_0x15eb54[_0x456ea6(0x1b1)](',\x20')+_0x456ea6(0x1c4)+_0x37c18[_0x456ea6(0x171)]['path']};}return{'step':0x4,'label':_0x456ea6(0x172),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x2ed3f6){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x2ed3f6['message']};}}function execSkillsRemove(_0xfa435d,_0x458dec){const _0x4d3320=a117_0x3b45,_0x32698f=runNpxSkillsRemove(_0xfa435d,{'stdio':_0x4d3320(0x180),'yes':_0x458dec});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x32698f['ok'],'detail':_0x32698f['ok']?_0x4d3320(0x195):_0x32698f[_0x4d3320(0x184)]??'exit\x20'+_0x32698f[_0x4d3320(0x170)]};}function execSkillsAdd(_0x4481dd,_0x293499){const _0xb72a5c=a117_0x3b45,_0x28113d=runNpxSkillsAddGlobal(_0x4481dd,_0xb72a5c(0x159),{'stdio':_0xb72a5c(0x180),'yes':_0x293499});return{'step':0x6,'label':_0xb72a5c(0x1cd),'ok':_0x28113d['ok'],'detail':_0x28113d['ok']?_0xb72a5c(0x198):_0x28113d[_0xb72a5c(0x184)]??_0xb72a5c(0x1a5)+_0x28113d[_0xb72a5c(0x170)]};}function execUpgradeSdk(_0x2550b){const _0x3d2017=a117_0x3b45;if(!_0x2550b['sdkUpgrade'])return{'step':0x7,'label':_0x3d2017(0x1b3),'ok':!![],'detail':_0x3d2017(0x1cb)};const {pkgPath:_0x27d236,currentVersion:_0x11fc66,field:_0x1e8bab}=_0x2550b[_0x3d2017(0x185)];try{const _0x1f7cec=readFileSync(_0x27d236,_0x3d2017(0x1c0)),_0xe7d6ea=JSON[_0x3d2017(0x17d)](_0x1f7cec);return _0xe7d6ea[_0x1e8bab]['@lovrabet/sdk']='latest',writeFileSync(_0x27d236,JSON[_0x3d2017(0x186)](_0xe7d6ea,null,0x2)+'\x0a',_0x3d2017(0x1c0)),{'step':0x7,'label':_0x3d2017(0x1b3),'ok':!![],'detail':_0x1e8bab+_0x3d2017(0x151)+_0x11fc66+_0x3d2017(0x15b)};}catch(_0x38ccd6){return{'step':0x7,'label':_0x3d2017(0x1b3),'ok':![],'detail':_0x38ccd6[_0x3d2017(0x15e)]};}}function tryStat(_0x32dc7c){try{return statSync(_0x32dc7c);}catch{return undefined;}}function printSummary(_0x390aee){const _0x20bf57=a117_0x3b45;console[_0x20bf57(0x18e)](''),console[_0x20bf57(0x18e)](a117_0x45c037[_0x20bf57(0x148)](_0x20bf57(0x196))),console['log']('');for(const _0x1f7858 of _0x390aee){const _0x2b64d5=_0x1f7858['ok']?a117_0x45c037[_0x20bf57(0x18c)]('OK'):a117_0x45c037[_0x20bf57(0x1aa)]('FAIL');console[_0x20bf57(0x18e)]('\x20\x20'+_0x2b64d5+_0x20bf57(0x19a)+_0x1f7858[_0x20bf57(0x146)]+':\x20'+_0x1f7858['label']);if(_0x1f7858[_0x20bf57(0x1af)])console[_0x20bf57(0x18e)](_0x20bf57(0x18b)+a117_0x45c037[_0x20bf57(0x1b5)](_0x1f7858[_0x20bf57(0x1af)]));}console[_0x20bf57(0x18e)]('');}export async function upgradeApp(_0x1f6702,_0x482022){const _0x178762=a117_0x3b45,_0x15db0c=process[_0x178762(0x174)](),_0x4f1306=analyse(_0x15db0c),_0x338500=!_0x4f1306['configMigration']&&_0x4f1306[_0x178762(0x14f)][_0x178762(0x1bf)]===0x0&&!_0x4f1306[_0x178762(0x171)]&&!_0x4f1306[_0x178762(0x1cc)]&&!_0x4f1306[_0x178762(0x185)];if(_0x338500){console['log'](a117_0x45c037['green'](_0x178762(0x166)));return;}printReport(_0x4f1306);const _0x29ad00=!!(_0x482022[_0x178762(0x187)]||_0x482022['Y']||_0x1f6702);if(!_0x29ad00)try{const _0x366668=await askConfirm(_0x178762(0x1ab));if(!_0x366668){console['log'](a117_0x45c037[_0x178762(0x1b5)](_0x178762(0x1ba)));return;}}catch(_0x1bb8c3){if(_0x1bb8c3?.[_0x178762(0x15e)]===_0x178762(0x15f)){console[_0x178762(0x18e)](a117_0x45c037[_0x178762(0x1b5)]('Upgrade\x20cancelled.'));return;}throw _0x1bb8c3;}const _0x30fe60=[],_0x198144=a117_0x51053f({'text':_0x178762(0x17c),'color':_0x178762(0x17f)})[_0x178762(0x188)](),_0x4bac92=execConfigMigration(_0x4f1306,_0x15db0c);_0x30fe60['push'](_0x4bac92),_0x198144[_0x4bac92['ok']?_0x178762(0x1a2):_0x178762(0x175)](_0x178762(0x14a)+(_0x4bac92[_0x178762(0x1af)]??(_0x4bac92['ok']?_0x178762(0x16d):_0x178762(0x1be))));const _0xb7fa68=resolve(_0x15db0c,_0x178762(0x1bb)),_0x10c0cd=a117_0x51053f({'text':_0x178762(0x177),'color':'cyan'})[_0x178762(0x188)]();if(existsSync(_0xb7fa68))try{rmSync(_0xb7fa68,{'recursive':!![],'force':!![]}),_0x10c0cd[_0x178762(0x1a2)](_0x178762(0x1b9)),_0x30fe60[_0x178762(0x179)]({'step':0x2,'label':_0x178762(0x197),'ok':!![]});}catch(_0x9facb0){_0x10c0cd['fail'](_0x178762(0x173)+_0x9facb0[_0x178762(0x15e)]),_0x30fe60['push']({'step':0x2,'label':_0x178762(0x197),'ok':![],'detail':_0x9facb0['message']});}else _0x10c0cd[_0x178762(0x1ca)](_0x178762(0x1a6)),_0x30fe60[_0x178762(0x179)]({'step':0x2,'label':_0x178762(0x197),'ok':!![],'detail':_0x178762(0x158)});const _0x43335f=a117_0x51053f({'text':_0x178762(0x14b),'color':_0x178762(0x17f)})['start'](),_0x584e5b=execRemoveOldArtifacts(_0x4f1306[_0x178762(0x14f)]);_0x30fe60[_0x178762(0x179)](_0x584e5b),_0x43335f[_0x584e5b['ok']?_0x178762(0x1a2):_0x178762(0x175)](_0x178762(0x154)+(_0x584e5b[_0x178762(0x1af)]??(_0x584e5b['ok']?_0x178762(0x16d):'failed')));const _0x454539=a117_0x51053f({'text':_0x178762(0x190),'color':'cyan'})[_0x178762(0x188)](),_0x2495b4=execCleanMcp(_0x4f1306);_0x30fe60[_0x178762(0x179)](_0x2495b4),_0x454539[_0x2495b4['ok']?'succeed':_0x178762(0x175)](_0x178762(0x14e)+(_0x2495b4['detail']??(_0x2495b4['ok']?'done':'failed')));const _0x3b6f2e=a117_0x51053f({'text':_0x178762(0x14c),'color':_0x178762(0x17f)})[_0x178762(0x188)](),_0x393288=execSkillsRemove(_0x15db0c,_0x29ad00);_0x30fe60[_0x178762(0x179)](_0x393288),_0x3b6f2e[_0x393288['ok']?_0x178762(0x1a2):'fail'](_0x178762(0x16b)+(_0x393288['detail']??(_0x393288['ok']?_0x178762(0x16d):_0x178762(0x1be))));const _0x23a11b=a117_0x51053f({'text':_0x178762(0x1c9),'color':_0x178762(0x17f)})[_0x178762(0x188)](),_0x4d419f=execSkillsAdd(_0x15db0c,_0x29ad00);_0x30fe60[_0x178762(0x179)](_0x4d419f),_0x23a11b[_0x4d419f['ok']?_0x178762(0x1a2):_0x178762(0x175)](_0x178762(0x155)+(_0x4d419f[_0x178762(0x1af)]??(_0x4d419f['ok']?'done':_0x178762(0x1be))));const _0x1ad5a3=a117_0x51053f({'text':_0x178762(0x160),'color':_0x178762(0x17f)})[_0x178762(0x188)](),_0x4c7276=execUpgradeSdk(_0x4f1306);_0x30fe60[_0x178762(0x179)](_0x4c7276),_0x1ad5a3[_0x4c7276['ok']?_0x178762(0x1a2):_0x178762(0x175)](_0x178762(0x1bd)+(_0x4c7276[_0x178762(0x1af)]??(_0x4c7276['ok']?_0x178762(0x16d):_0x178762(0x1be)))),printSummary(_0x30fe60);const _0x30324b=_0x30fe60[_0x178762(0x152)](_0x4d1389=>!_0x4d1389['ok']);_0x30324b?console['log'](a117_0x45c037[_0x178762(0x1c5)](_0x178762(0x189))):console[_0x178762(0x18e)](a117_0x45c037[_0x178762(0x18c)]('Upgrade\x20completed\x20successfully!')),_0x4c7276['ok']&&_0x4f1306[_0x178762(0x185)]&&(console['log'](''),console[_0x178762(0x18e)](a117_0x45c037[_0x178762(0x148)][_0x178762(0x17f)](_0x178762(0x18d))),console[_0x178762(0x18e)](a117_0x45c037[_0x178762(0x17f)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x178762(0x18e)](''),console['log'](a117_0x45c037[_0x178762(0x1b0)](_0x178762(0x181))),console['log'](a117_0x45c037[_0x178762(0x1b0)](_0x178762(0x165))),console['log'](a117_0x45c037['white'](_0x178762(0x193))),console[_0x178762(0x18e)](''));}
@@ -1 +1 @@
1
- const a118_0x54b318=a118_0x1900;(function(_0x3408b4,_0x588f41){const _0x581058=a118_0x1900,_0x2ecc22=_0x3408b4();while(!![]){try{const _0x406a7e=-parseInt(_0x581058(0x95))/0x1*(-parseInt(_0x581058(0xaf))/0x2)+parseInt(_0x581058(0x9d))/0x3*(-parseInt(_0x581058(0xa2))/0x4)+parseInt(_0x581058(0xa9))/0x5+parseInt(_0x581058(0xaa))/0x6*(-parseInt(_0x581058(0x9f))/0x7)+-parseInt(_0x581058(0x91))/0x8*(parseInt(_0x581058(0x87))/0x9)+parseInt(_0x581058(0x84))/0xa+parseInt(_0x581058(0xa4))/0xb;if(_0x406a7e===_0x588f41)break;else _0x2ecc22['push'](_0x2ecc22['shift']());}catch(_0x2609a0){_0x2ecc22['push'](_0x2ecc22['shift']());}}}(a118_0x1666,0xcd3c8));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';function a118_0x1666(){const _0x55ec8d=['54zoUGrM','<script>','3514fxxlsX','command','from','172504DmBvYY','Code\x20Generation','17237374ntXRpP','preview','BFF\x20Scripts','Smart\x20List\x20Pages','run','5807270crMRiw','8994wVjTNs','description','install','defaultCommand','get','58bmBIar','Logs','Configuration','push','Dataset\x20&\x20Operations','Run\x20any\x20package.json\x20script','4893490IbcfLB','Quick\x20Start','write','27yGVAzV','Run\x20Scripts','set','create','login','risk','Schema','App\x20Management','service','length','2266792ACPKaR','wildcardDef','auth','Menu','56FkgzTW','logout','project','has','isSingleCommand','Instant\x20API','skill','values'];a118_0x1666=function(){return _0x55ec8d;};return a118_0x1666();}import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x58d138){const _0x43e1d3=a118_0x1900;for(const _0x46a478 of _0x58d138){definitions['set'](_0x46a478['service']+':'+_0x46a478[_0x43e1d3(0xa0)],_0x46a478);let _0x553b1=serviceGroups[_0x43e1d3(0xae)](_0x46a478['service']);!_0x553b1&&(_0x553b1=[],serviceGroups['set'](_0x46a478[_0x43e1d3(0x8f)],_0x553b1)),_0x553b1['push'](_0x46a478);}}function registerDeclarativeService(_0x10a58c,_0x1856a2,_0x3691a1){const _0x3fea02=a118_0x1900;registerDefinitions(_0x1856a2);_0x3691a1?.['wildcardDef']&&registerDefinitions([_0x3691a1[_0x3fea02(0x92)]]);const _0x434539=_0x5d0bfc=>_0x5d0bfc==='read'?'':_0x5d0bfc===_0x3fea02(0x86)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x47014f={'service':_0x1856a2[0x0][_0x3fea02(0x8f)],'label':_0x10a58c,'commands':_0x1856a2['map'](_0x4cd9e6=>({'command':_0x4cd9e6['command'],'description':_0x4cd9e6[_0x3fea02(0xab)],'tag':_0x434539(_0x4cd9e6[_0x3fea02(0x8c)])})),'declarative':!![],'defaultCommand':_0x3691a1?.[_0x3fea02(0xad)]??(_0x3691a1?.['isSingleCommand']?_0x1856a2[0x0]['command']:undefined),'wildcardDef':_0x3691a1?.[_0x3fea02(0x92)],'isSingleCommand':_0x3691a1?.[_0x3fea02(0x99)]};serviceRegistry[_0x3fea02(0x81)](_0x47014f),serviceByName[_0x3fea02(0x89)](_0x47014f[_0x3fea02(0x8f)],_0x47014f);}registerDeclarativeService(a118_0x54b318(0x85),initDefinitions,{'defaultCommand':a118_0x54b318(0xa8),'isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a118_0x54b318(0x8e),appDefinitions),registerDeclarativeService(a118_0x54b318(0x88),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a118_0x54b318(0x90)]-0x1];last['commands']=[{'command':a118_0x54b318(0x9e),'description':a118_0x54b318(0x83),'tag':''}];}registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a118_0x54b318(0x8b)}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a118_0x54b318(0x8d),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a118_0x54b318(0x80),configDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService('API',apiDefinitions),registerDeclarativeService(a118_0x54b318(0x94),menuDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a118_0x54b318(0x82),datasetDefinitions),registerDeclarativeService(a118_0x54b318(0xa7),pageDefinitions),registerDeclarativeService(a118_0x54b318(0x9a),dataDefinitions),registerDeclarativeService(a118_0x54b318(0xa6),bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a118_0x54b318(0xa3),codegenDefinitions),registerDeclarativeService('Skills',skillDefinitions),registerDeclarativeService(a118_0x54b318(0xb0),logsDefinitions,{'defaultCommand':'show'});function a118_0x1900(_0x289ee2,_0x26a3e4){_0x289ee2=_0x289ee2-0x80;const _0x166644=a118_0x1666();let _0x1900f7=_0x166644[_0x289ee2];return _0x1900f7;}export const deprecatedAliases={'create':{'service':a118_0x54b318(0x97),'command':a118_0x54b318(0x8a)},'start':{'service':a118_0x54b318(0xa8),'command':'start'},'build':{'service':'run','command':'build'},'preview':{'service':a118_0x54b318(0xa8),'command':a118_0x54b318(0xa5)},'logout':{'service':a118_0x54b318(0x93),'command':a118_0x54b318(0x96)},'skills':{'service':a118_0x54b318(0x9b),'command':a118_0x54b318(0xac)}};export const deprecatedSubcommands={'bff':{'new':a118_0x54b318(0x8a)},'sql':{'new':'create'}};export function resolveDeprecatedSubcommand(_0x14e7ca,_0x9598c4){return deprecatedSubcommands[_0x14e7ca]?.[_0x9598c4];}export function findDefinition(_0x2f7874,_0x57634b){const _0x3e6738=a118_0x54b318;return definitions[_0x3e6738(0xae)](_0x2f7874+':'+_0x57634b);}export function isKnownService(_0x46e991){const _0x359c27=a118_0x54b318;return serviceByName[_0x359c27(0x98)](_0x46e991);}export function isDeclarativeService(_0x440d29){const _0x1958a7=a118_0x54b318;return serviceGroups['has'](_0x440d29)||serviceByName[_0x1958a7(0xae)](_0x440d29)?.[_0x1958a7(0x92)]!==undefined;}export function getServiceEntry(_0x12d29d){const _0x44e805=a118_0x54b318;return serviceByName[_0x44e805(0xae)](_0x12d29d);}export function getLegacyHandler(_0x3c770d,_0x2e6497){return undefined;}export function getAllDefinitions(){const _0x5c2350=a118_0x54b318;return Array[_0x5c2350(0xa1)](definitions[_0x5c2350(0x9c)]());}
1
+ const a118_0x56b66a=a118_0x8e06;(function(_0x4dca95,_0x2c32e8){const _0x1eddd6=a118_0x8e06,_0x2cee8d=_0x4dca95();while(!![]){try{const _0x39f44c=-parseInt(_0x1eddd6(0x1a8))/0x1+-parseInt(_0x1eddd6(0x1a9))/0x2+-parseInt(_0x1eddd6(0x1a0))/0x3*(parseInt(_0x1eddd6(0x1cb))/0x4)+-parseInt(_0x1eddd6(0x1be))/0x5+parseInt(_0x1eddd6(0x19c))/0x6*(parseInt(_0x1eddd6(0x1b7))/0x7)+-parseInt(_0x1eddd6(0x1b1))/0x8*(-parseInt(_0x1eddd6(0x1ab))/0x9)+-parseInt(_0x1eddd6(0x1c0))/0xa*(-parseInt(_0x1eddd6(0x1b5))/0xb);if(_0x39f44c===_0x2c32e8)break;else _0x2cee8d['push'](_0x2cee8d['shift']());}catch(_0x3bab73){_0x2cee8d['push'](_0x2cee8d['shift']());}}}(a118_0x47dc,0xf2e56));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0xe5b6b7){const _0x45a296=a118_0x8e06;for(const _0x13cf21 of _0xe5b6b7){definitions[_0x45a296(0x1cd)](_0x13cf21[_0x45a296(0x199)]+':'+_0x13cf21[_0x45a296(0x1ae)],_0x13cf21);let _0x3fca35=serviceGroups['get'](_0x13cf21[_0x45a296(0x199)]);!_0x3fca35&&(_0x3fca35=[],serviceGroups[_0x45a296(0x1cd)](_0x13cf21[_0x45a296(0x199)],_0x3fca35)),_0x3fca35[_0x45a296(0x1ad)](_0x13cf21);}}function registerDeclarativeService(_0x5b1a05,_0x21ec1f,_0x66c7db){const _0x5e34e0=a118_0x8e06;registerDefinitions(_0x21ec1f);_0x66c7db?.[_0x5e34e0(0x1ca)]&&registerDefinitions([_0x66c7db[_0x5e34e0(0x1ca)]]);const _0x3eb241=_0x2aa1af=>_0x2aa1af===_0x5e34e0(0x1d0)?'':_0x2aa1af===_0x5e34e0(0x1c6)?'\x20\x20[write]':_0x5e34e0(0x1b9),_0x5c9abc={'service':_0x21ec1f[0x0][_0x5e34e0(0x199)],'label':_0x5b1a05,'commands':_0x21ec1f[_0x5e34e0(0x19b)](_0x1e6d5e=>({'command':_0x1e6d5e['command'],'description':_0x1e6d5e['description'],'tag':_0x3eb241(_0x1e6d5e['risk'])})),'declarative':!![],'defaultCommand':_0x66c7db?.[_0x5e34e0(0x1a4)]??(_0x66c7db?.[_0x5e34e0(0x19e)]?_0x21ec1f[0x0][_0x5e34e0(0x1ae)]:undefined),'wildcardDef':_0x66c7db?.[_0x5e34e0(0x1ca)],'isSingleCommand':_0x66c7db?.['isSingleCommand']};serviceRegistry['push'](_0x5c9abc),serviceByName['set'](_0x5c9abc[_0x5e34e0(0x199)],_0x5c9abc);}registerDeclarativeService(a118_0x56b66a(0x1ba),initDefinitions,{'defaultCommand':a118_0x56b66a(0x1a3),'isSingleCommand':!![]}),registerDeclarativeService(a118_0x56b66a(0x1a2),projectDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a118_0x56b66a(0x1a1),[runDefinition],{'wildcardDef':runDefinition});function a118_0x47dc(){const _0x169c40=['Run\x20any\x20package.json\x20script','6059710BXlmGV','values','1110UuegWc','BFF\x20Scripts','Self\x20Update','API','Code\x20Generation','auth','write','login','SQL\x20Queries','commands','wildcardDef','8WccSel','Authentication','set','Configuration','project','read','build','service','show','map','12jeskfl','skill','isSingleCommand','logout','2073639zNLNUH','Run\x20Scripts','Project','run','defaultCommand','get','Smart\x20List\x20Pages','length','1566814muSXCn','641634pgYnUf','from','1863TYCaOE','Logs','push','command','Database\x20Connections','preview','16728tGQIuR','create','<script>','Skills','335346kEltPF','install','5810413UWoWxQ','has','\x20\x20[high-risk-write]','Quick\x20Start','start','Menu'];a118_0x47dc=function(){return _0x169c40;};return a118_0x47dc();}{const last=serviceRegistry[serviceRegistry[a118_0x56b66a(0x1a7)]-0x1];last[a118_0x56b66a(0x1c9)]=[{'command':a118_0x56b66a(0x1b3),'description':a118_0x56b66a(0x1bd),'tag':''}];}registerDeclarativeService(a118_0x56b66a(0x1cc),authDefinitions,{'defaultCommand':a118_0x56b66a(0x1c7)}),registerDeclarativeService(a118_0x56b66a(0x1c2),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a118_0x56b66a(0x1ce),configDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a118_0x56b66a(0x1c3),apiDefinitions),registerDeclarativeService(a118_0x56b66a(0x1bc),menuDefinitions),registerDeclarativeService(a118_0x56b66a(0x1af),dbDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a118_0x56b66a(0x1a6),pageDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService(a118_0x56b66a(0x1c1),bffDefinitions),registerDeclarativeService(a118_0x56b66a(0x1c8),sqlDefinitions),registerDeclarativeService(a118_0x56b66a(0x1c4),codegenDefinitions),registerDeclarativeService(a118_0x56b66a(0x1b4),skillDefinitions),registerDeclarativeService(a118_0x56b66a(0x1ac),logsDefinitions,{'defaultCommand':a118_0x56b66a(0x19a)});export const deprecatedAliases={'create':{'service':a118_0x56b66a(0x1cf),'command':'create'},'start':{'service':a118_0x56b66a(0x1a3),'command':a118_0x56b66a(0x1bb)},'build':{'service':a118_0x56b66a(0x1a3),'command':a118_0x56b66a(0x1d1)},'preview':{'service':a118_0x56b66a(0x1a3),'command':a118_0x56b66a(0x1b0)},'logout':{'service':a118_0x56b66a(0x1c5),'command':a118_0x56b66a(0x19f)},'skills':{'service':a118_0x56b66a(0x19d),'command':a118_0x56b66a(0x1b6)}};export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a118_0x56b66a(0x1b2)}};export function resolveDeprecatedSubcommand(_0x166f31,_0x132948){return deprecatedSubcommands[_0x166f31]?.[_0x132948];}export function findDefinition(_0x42cd84,_0x121776){const _0x5e4492=a118_0x56b66a;return definitions[_0x5e4492(0x1a5)](_0x42cd84+':'+_0x121776);}export function isKnownService(_0x2195d2){const _0x525744=a118_0x56b66a;return serviceByName[_0x525744(0x1b8)](_0x2195d2);}export function isDeclarativeService(_0x4a55a1){const _0x5a7543=a118_0x56b66a;return serviceGroups[_0x5a7543(0x1b8)](_0x4a55a1)||serviceByName['get'](_0x4a55a1)?.[_0x5a7543(0x1ca)]!==undefined;}export function getServiceEntry(_0x56c4f2){const _0x11812f=a118_0x56b66a;return serviceByName[_0x11812f(0x1a5)](_0x56c4f2);}export function getLegacyHandler(_0x32ad46,_0x4b5b07){return undefined;}function a118_0x8e06(_0x126773,_0x25cd19){_0x126773=_0x126773-0x199;const _0x47dc00=a118_0x47dc();let _0x8e0625=_0x47dc00[_0x126773];return _0x8e0625;}export function getAllDefinitions(){const _0xff6d60=a118_0x56b66a;return Array[_0xff6d60(0x1aa)](definitions[_0xff6d60(0x1bf)]());}
@@ -1 +1 @@
1
- const a119_0x39cc48=a119_0x5efc;(function(_0xc5d7b3,_0x46ffc3){const _0x28faee=a119_0x5efc,_0x5c0595=_0xc5d7b3();while(!![]){try{const _0x2b1ac6=-parseInt(_0x28faee(0x1c5))/0x1+parseInt(_0x28faee(0x1c1))/0x2*(parseInt(_0x28faee(0x1de))/0x3)+parseInt(_0x28faee(0x1df))/0x4+parseInt(_0x28faee(0x1d9))/0x5*(parseInt(_0x28faee(0x1e3))/0x6)+-parseInt(_0x28faee(0x1ca))/0x7+-parseInt(_0x28faee(0x1db))/0x8+-parseInt(_0x28faee(0x1cf))/0x9*(parseInt(_0x28faee(0x1b9))/0xa);if(_0x2b1ac6===_0x46ffc3)break;else _0x5c0595['push'](_0x5c0595['shift']());}catch(_0x55968b){_0x5c0595['push'](_0x5c0595['shift']());}}}(a119_0x2c4e,0x7da7e));import{readFileSync,existsSync}from'node:fs';function a119_0x2c4e(){const _0x196bd5=['\x20run\x20build','read','preview','No\x20package.json\x20found\x20in\x20current\x20directory.','map','1034hvdVUD','\x20run\x20<script>\x0a','error','\x20run\x20','193062XKdzee','\x20run\x20preview','bool','\x0a\x20\x20Available\x20scripts:\x0a','Run\x20a\x20package.json\x20script','4383330wGPcxW','\x20\x20\x20\x20','start','keys','(none)','9MmYwzi','package.json','boolean','args','close','padEnd','Script\x20name\x20defined\x20in\x20package.json','push','bun.lockb','log','3502160CiSRJK','\x0a\x20\x20Usage:\x20','6166128GsNxbF','\x20\x20EXAMPLES','.bin','4707ZNmVta','3034264tOfTBW','length','yarn.lock','join','6rDgZdU','\x20exited\x20with\x20code\x20','vite\x20preview\x20exited\x20with\x20code\x20','utf-8','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','validation','bun','inherit','cwd','slice','bun.lock','Available:\x20','\x22\x20not\x20found\x20in\x20package.json.','run','scripts','Script\x20\x22','\x20run\x20start','entries','No\x20scripts\x20defined\x20in\x20package.json.','watch','pnpm-lock.yaml','max','--watch','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','vite','1654670pTUhAz','all','belowMinimum'];a119_0x2c4e=function(){return _0x196bd5;};return a119_0x2c4e();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';function a119_0x5efc(_0x45ac35,_0x42dcc9){_0x45ac35=_0x45ac35-0x1b6;const _0x2c4e5b=a119_0x2c4e();let _0x5efc0f=_0x2c4e5b[_0x45ac35];return _0x5efc0f;}import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a119_0x39cc48(0x1cc),'dev']);function readPackageScripts(_0x5d88d6){const _0x25cd25=a119_0x39cc48,_0x4a88cf=resolve(_0x5d88d6,_0x25cd25(0x1d0));if(!existsSync(_0x4a88cf))return null;try{const _0x40a0c1=JSON['parse'](readFileSync(_0x4a88cf,_0x25cd25(0x1e6)));return _0x40a0c1[_0x25cd25(0x1f1)]??{};}catch{return null;}}function detectPackageManager(_0x50f416){const _0x4efe0e=a119_0x39cc48;if(existsSync(resolve(_0x50f416,_0x4efe0e(0x1d7)))||existsSync(resolve(_0x50f416,_0x4efe0e(0x1ed))))return _0x4efe0e(0x1e9);if(existsSync(resolve(_0x50f416,_0x4efe0e(0x1f7))))return'pnpm';if(existsSync(resolve(_0x50f416,_0x4efe0e(0x1e1))))return'yarn';return'npm';}async function versionCheck(_0x28ea67){const _0x2944f0=a119_0x39cc48,_0x3cf554=await checkCliVersion();(_0x3cf554['needsUpgrade']||_0x3cf554[_0x2944f0(0x1bb)])&&(printCliUpgradeWarning(_0x3cf554),assertCliVersionSupported(_0x3cf554));const _0x5b54b8=await checkSdkVersion(_0x28ea67);if(_0x5b54b8['needsUpgrade'])printSdkUpgradeWarning(_0x5b54b8);}function spawnScript(_0x288b06,_0x28ed2d,_0x4da58f,_0x3d6e04){return new Promise((_0x3643dc,_0x1b1b57)=>{const _0x3a53e1=a119_0x5efc,_0xe6ae53=[_0x3a53e1(0x1f0),_0x28ed2d,..._0x4da58f],_0x5c45d2=spawn(_0x288b06,_0xe6ae53,{'cwd':_0x3d6e04,'stdio':_0x3a53e1(0x1ea),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3d6e04,'node_modules','.bin')+delimiter+process.env.PATH}});_0x5c45d2['on'](_0x3a53e1(0x1d3),_0x2154c1=>{const _0x4710c6=_0x3a53e1;if(_0x2154c1===0x0||_0x2154c1===null)_0x3643dc();else _0x1b1b57(new Error(_0x288b06+_0x4710c6(0x1c4)+_0x28ed2d+_0x4710c6(0x1e4)+_0x2154c1));}),_0x5c45d2['on'](_0x3a53e1(0x1c3),_0x1b1b57);});}function spawnViteBuildWatch(_0x362b5e){return new Promise((_0x54cad1,_0x1c1b21)=>{const _0x499265=a119_0x5efc,_0x5782e4=spawn(_0x499265(0x1b8),['build',_0x499265(0x1b6)],{'cwd':_0x362b5e,'stdio':_0x499265(0x1ea),'shell':!![],'env':{...process.env,'PATH':''+join(_0x362b5e,'node_modules',_0x499265(0x1dd))+delimiter+process.env.PATH}});_0x5782e4['on']('close',_0x332b5c=>{if(_0x332b5c===0x0||_0x332b5c===null)_0x54cad1();else _0x1c1b21(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x332b5c));}),_0x5782e4['on']('error',_0x1c1b21);});}function spawnVitePreview(_0x2b7379){return new Promise((_0x3420b6,_0x56438d)=>{const _0x1c7eb1=a119_0x5efc,_0x37ca5d=spawn(_0x1c7eb1(0x1b8),[_0x1c7eb1(0x1be)],{'cwd':_0x2b7379,'stdio':_0x1c7eb1(0x1ea),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2b7379,'node_modules','.bin')+delimiter+process.env.PATH}});_0x37ca5d['on'](_0x1c7eb1(0x1d3),_0x5c82ea=>{const _0x3dd657=_0x1c7eb1;if(_0x5c82ea===0x0||_0x5c82ea===null)_0x3420b6();else _0x56438d(new Error(_0x3dd657(0x1e5)+_0x5c82ea));}),_0x37ca5d['on'](_0x1c7eb1(0x1c3),_0x56438d);});}const runFlags=[{'name':a119_0x39cc48(0x1f6),'type':a119_0x39cc48(0x1d1),'description':'Enable\x20watch\x20mode\x20for\x20preview','default':![]}];export const runDefinition={'service':a119_0x39cc48(0x1f0),'command':a119_0x39cc48(0x1f0),'description':a119_0x39cc48(0x1c9),'risk':a119_0x39cc48(0x1bd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a119_0x39cc48(0x1d5),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3b0b40=a119_0x39cc48,_0x2b3d8a=readPackageScripts(process[_0x3b0b40(0x1eb)]()),_0x12412d=[];if(_0x2b3d8a&&Object['keys'](_0x2b3d8a)[_0x3b0b40(0x1e0)]>0x0){const _0x15db61=Object[_0x3b0b40(0x1cd)](_0x2b3d8a),_0x5d3e7c=Math[_0x3b0b40(0x1f8)](..._0x15db61[_0x3b0b40(0x1c0)](_0x5e44f4=>_0x5e44f4[_0x3b0b40(0x1e0)]));_0x12412d['push'](_0x3b0b40(0x1b7));for(const [_0x274a8e,_0x4886dc]of Object[_0x3b0b40(0x1f4)](_0x2b3d8a)){_0x12412d['push'](_0x3b0b40(0x1cb)+CLI_BIN_NAME+_0x3b0b40(0x1c4)+_0x274a8e[_0x3b0b40(0x1d4)](_0x5d3e7c+0x2)+'#\x20'+_0x4886dc);}}else _0x12412d['push'](_0x3b0b40(0x1dc)),_0x12412d[_0x3b0b40(0x1d6)](_0x3b0b40(0x1cb)+CLI_BIN_NAME+_0x3b0b40(0x1f3)),_0x12412d[_0x3b0b40(0x1d6)](_0x3b0b40(0x1cb)+CLI_BIN_NAME+_0x3b0b40(0x1bc)),_0x12412d[_0x3b0b40(0x1d6)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x3b0b40(0x1c6)),_0x12412d[_0x3b0b40(0x1d6)](_0x3b0b40(0x1cb)+CLI_BIN_NAME+_0x3b0b40(0x1e7));return _0x12412d[_0x3b0b40(0x1e2)]('\x0a');},async 'execute'(_0x2816eb){const _0x473027=a119_0x39cc48,_0x3def32=process['cwd'](),_0x2a5b89=_0x2816eb['args'][0x0],_0x2e9071=_0x2816eb[_0x473027(0x1d2)][_0x473027(0x1ec)](0x1),_0x5769cb=readPackageScripts(_0x3def32);if(!_0x5769cb)throw CliErrors[_0x473027(0x1e8)](_0x473027(0x1bf));if(!_0x2a5b89){const _0x17ce71=Object[_0x473027(0x1cd)](_0x5769cb);if(_0x17ce71['length']===0x0)console[_0x473027(0x1d8)](_0x473027(0x1f5));else{console[_0x473027(0x1d8)](_0x473027(0x1c8));const _0x496919=Math[_0x473027(0x1f8)](..._0x17ce71['map'](_0x3acc47=>_0x3acc47[_0x473027(0x1e0)]));for(const [_0x399e24,_0x401dab]of Object['entries'](_0x5769cb)){console['log']('\x20\x20\x20\x20'+_0x399e24['padEnd'](_0x496919+0x2)+_0x401dab);}console[_0x473027(0x1d8)](_0x473027(0x1da)+CLI_BIN_NAME+_0x473027(0x1c2));}return{'ok':!![]};}if(!_0x5769cb[_0x2a5b89])throw CliErrors[_0x473027(0x1e8)](_0x473027(0x1f2)+_0x2a5b89+_0x473027(0x1ef),_0x473027(0x1ee)+(Object[_0x473027(0x1cd)](_0x5769cb)[_0x473027(0x1e2)](',\x20')||_0x473027(0x1ce)));const _0x1e5b70=detectPackageManager(_0x3def32);VERSION_CHECK_SCRIPTS['has'](_0x2a5b89)&&await versionCheck(_0x3def32);if(_0x2a5b89===_0x473027(0x1be)&&_0x2816eb[_0x473027(0x1c7)](_0x473027(0x1f6)))return await Promise[_0x473027(0x1ba)]([spawnViteBuildWatch(_0x3def32),spawnVitePreview(_0x3def32)]),{'ok':!![]};return await spawnScript(_0x1e5b70,_0x2a5b89,_0x2e9071,_0x3def32),{'ok':!![]};}};
1
+ const a119_0x439739=a119_0x1136;function a119_0x1136(_0x3c8f19,_0x5a49ab){_0x3c8f19=_0x3c8f19-0x68;const _0x4c4d82=a119_0x4c4d();let _0x113692=_0x4c4d82[_0x3c8f19];return _0x113692;}(function(_0x28320f,_0x4ce881){const _0x454c34=a119_0x1136,_0x46fa20=_0x28320f();while(!![]){try{const _0x479696=-parseInt(_0x454c34(0x77))/0x1+parseInt(_0x454c34(0xa5))/0x2*(-parseInt(_0x454c34(0xa3))/0x3)+parseInt(_0x454c34(0x89))/0x4+-parseInt(_0x454c34(0x6c))/0x5*(-parseInt(_0x454c34(0x68))/0x6)+-parseInt(_0x454c34(0x84))/0x7+parseInt(_0x454c34(0x78))/0x8*(-parseInt(_0x454c34(0xac))/0x9)+parseInt(_0x454c34(0x8b))/0xa;if(_0x479696===_0x4ce881)break;else _0x46fa20['push'](_0x46fa20['shift']());}catch(_0x3a4e68){_0x46fa20['push'](_0x46fa20['shift']());}}}(a119_0x4c4d,0x3506c));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';function a119_0x4c4d(){const _0x5010c3=['Script\x20name\x20defined\x20in\x20package.json','\x20run\x20build','close','bun.lock','entries','dev','validation','vite','bun','\x20\x20\x20\x20','1086029jhZXMn','script','inherit','Available:\x20','.bin','525244JAeCCt','node_modules','6014640MPvVlZ','parse','Script\x20\x22','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','padEnd','cwd','utf-8','boolean','run','max','length','\x20run\x20start','--watch','\x0a\x20\x20Usage:\x20','scripts','\x20exited\x20with\x20code\x20','args','Enable\x20watch\x20mode\x20for\x20preview','preview','\x20run\x20','error','log','vite\x20preview\x20exited\x20with\x20code\x20','yarn.lock','3oqWQVq','\x0a\x20\x20Available\x20scripts:\x0a','446178fftKqH','join','map','\x20\x20EXAMPLES','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','keys','No\x20scripts\x20defined\x20in\x20package.json.','486zWXKSh','108EjIVma','npm','all','read','119435JEAsFd','needsUpgrade','\x22\x20not\x20found\x20in\x20package.json.','push','package.json','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','watch','has','pnpm','slice','Run\x20a\x20package.json\x20script','258807YuVdGm','45704lAhwJC','No\x20package.json\x20found\x20in\x20current\x20directory.'];a119_0x4c4d=function(){return _0x5010c3;};return a119_0x4c4d();}import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set(['start',a119_0x439739(0x7f)]);function readPackageScripts(_0x1350f1){const _0x1e929e=a119_0x439739,_0x58fd56=resolve(_0x1350f1,_0x1e929e(0x70));if(!existsSync(_0x58fd56))return null;try{const _0x4cf0c4=JSON[_0x1e929e(0x8c)](readFileSync(_0x58fd56,_0x1e929e(0x91)));return _0x4cf0c4[_0x1e929e(0x99)]??{};}catch{return null;}}function detectPackageManager(_0x11d6aa){const _0x5a83e4=a119_0x439739;if(existsSync(resolve(_0x11d6aa,'bun.lockb'))||existsSync(resolve(_0x11d6aa,_0x5a83e4(0x7d))))return _0x5a83e4(0x82);if(existsSync(resolve(_0x11d6aa,'pnpm-lock.yaml')))return _0x5a83e4(0x74);if(existsSync(resolve(_0x11d6aa,_0x5a83e4(0xa2))))return'yarn';return _0x5a83e4(0x69);}async function versionCheck(_0x509395){const _0x5259ce=a119_0x439739,_0x349606=await checkCliVersion();(_0x349606[_0x5259ce(0x6d)]||_0x349606['belowMinimum'])&&(printCliUpgradeWarning(_0x349606),assertCliVersionSupported(_0x349606));const _0x4802d5=await checkSdkVersion(_0x509395);if(_0x4802d5[_0x5259ce(0x6d)])printSdkUpgradeWarning(_0x4802d5);}function spawnScript(_0x50ea74,_0x1d5a06,_0x297484,_0xee28ca){return new Promise((_0x44af67,_0x2c7ce6)=>{const _0x188509=a119_0x1136,_0x2c89ba=[_0x188509(0x93),_0x1d5a06,..._0x297484],_0x2bb556=spawn(_0x50ea74,_0x2c89ba,{'cwd':_0xee28ca,'stdio':_0x188509(0x86),'shell':!![],'env':{...process.env,'PATH':''+join(_0xee28ca,_0x188509(0x8a),_0x188509(0x88))+delimiter+process.env.PATH}});_0x2bb556['on'](_0x188509(0x7c),_0x2146e7=>{const _0x1b7b70=_0x188509;if(_0x2146e7===0x0||_0x2146e7===null)_0x44af67();else _0x2c7ce6(new Error(_0x50ea74+_0x1b7b70(0x9e)+_0x1d5a06+_0x1b7b70(0x9a)+_0x2146e7));}),_0x2bb556['on'](_0x188509(0x9f),_0x2c7ce6);});}function spawnViteBuildWatch(_0x518a22){return new Promise((_0x26c6dc,_0x3053b4)=>{const _0x18b268=a119_0x1136,_0x2e20ea=spawn('vite',['build',_0x18b268(0x97)],{'cwd':_0x518a22,'stdio':_0x18b268(0x86),'shell':!![],'env':{...process.env,'PATH':''+join(_0x518a22,_0x18b268(0x8a),_0x18b268(0x88))+delimiter+process.env.PATH}});_0x2e20ea['on']('close',_0x4a1269=>{const _0x16d49e=_0x18b268;if(_0x4a1269===0x0||_0x4a1269===null)_0x26c6dc();else _0x3053b4(new Error(_0x16d49e(0x71)+_0x4a1269));}),_0x2e20ea['on']('error',_0x3053b4);});}function spawnVitePreview(_0x391a7e){return new Promise((_0x451b3d,_0x56d365)=>{const _0xa29804=a119_0x1136,_0x69d623=spawn(_0xa29804(0x81),[_0xa29804(0x9d)],{'cwd':_0x391a7e,'stdio':_0xa29804(0x86),'shell':!![],'env':{...process.env,'PATH':''+join(_0x391a7e,'node_modules',_0xa29804(0x88))+delimiter+process.env.PATH}});_0x69d623['on']('close',_0x2a1569=>{const _0x28ded4=_0xa29804;if(_0x2a1569===0x0||_0x2a1569===null)_0x451b3d();else _0x56d365(new Error(_0x28ded4(0xa1)+_0x2a1569));}),_0x69d623['on']('error',_0x56d365);});}const runFlags=[{'name':a119_0x439739(0x72),'type':a119_0x439739(0x92),'description':a119_0x439739(0x9c),'default':![]}];export const runDefinition={'service':a119_0x439739(0x93),'command':a119_0x439739(0x93),'description':a119_0x439739(0x76),'risk':a119_0x439739(0x6b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a119_0x439739(0x85),'description':a119_0x439739(0x7a),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x39f58c=a119_0x439739,_0x1f81ad=readPackageScripts(process[_0x39f58c(0x90)]()),_0x551570=[];if(_0x1f81ad&&Object[_0x39f58c(0xaa)](_0x1f81ad)[_0x39f58c(0x95)]>0x0){const _0x30210a=Object[_0x39f58c(0xaa)](_0x1f81ad),_0x520a2b=Math[_0x39f58c(0x94)](..._0x30210a[_0x39f58c(0xa7)](_0x96c6df=>_0x96c6df[_0x39f58c(0x95)]));_0x551570['push'](_0x39f58c(0x8e));for(const [_0x3c2e8c,_0x55c862]of Object[_0x39f58c(0x7e)](_0x1f81ad)){_0x551570[_0x39f58c(0x6f)](_0x39f58c(0x83)+CLI_BIN_NAME+_0x39f58c(0x9e)+_0x3c2e8c[_0x39f58c(0x8f)](_0x520a2b+0x2)+'#\x20'+_0x55c862);}}else _0x551570[_0x39f58c(0x6f)](_0x39f58c(0xa8)),_0x551570[_0x39f58c(0x6f)](_0x39f58c(0x83)+CLI_BIN_NAME+_0x39f58c(0x96)),_0x551570[_0x39f58c(0x6f)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x39f58c(0x7b)),_0x551570[_0x39f58c(0x6f)](_0x39f58c(0x83)+CLI_BIN_NAME+'\x20run\x20preview'),_0x551570[_0x39f58c(0x6f)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x39f58c(0xa9));return _0x551570['join']('\x0a');},async 'execute'(_0x141b82){const _0x1193f9=a119_0x439739,_0x58eb83=process[_0x1193f9(0x90)](),_0x5e24f4=_0x141b82[_0x1193f9(0x9b)][0x0],_0x29ef97=_0x141b82[_0x1193f9(0x9b)][_0x1193f9(0x75)](0x1),_0x42503f=readPackageScripts(_0x58eb83);if(!_0x42503f)throw CliErrors[_0x1193f9(0x80)](_0x1193f9(0x79));if(!_0x5e24f4){const _0x38f242=Object[_0x1193f9(0xaa)](_0x42503f);if(_0x38f242[_0x1193f9(0x95)]===0x0)console[_0x1193f9(0xa0)](_0x1193f9(0xab));else{console[_0x1193f9(0xa0)](_0x1193f9(0xa4));const _0x1daebc=Math['max'](..._0x38f242[_0x1193f9(0xa7)](_0x1a6081=>_0x1a6081[_0x1193f9(0x95)]));for(const [_0x49b51a,_0x2c61]of Object[_0x1193f9(0x7e)](_0x42503f)){console[_0x1193f9(0xa0)](_0x1193f9(0x83)+_0x49b51a[_0x1193f9(0x8f)](_0x1daebc+0x2)+_0x2c61);}console['log'](_0x1193f9(0x98)+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x42503f[_0x5e24f4])throw CliErrors[_0x1193f9(0x80)](_0x1193f9(0x8d)+_0x5e24f4+_0x1193f9(0x6e),_0x1193f9(0x87)+(Object[_0x1193f9(0xaa)](_0x42503f)[_0x1193f9(0xa6)](',\x20')||'(none)'));const _0x627008=detectPackageManager(_0x58eb83);VERSION_CHECK_SCRIPTS[_0x1193f9(0x73)](_0x5e24f4)&&await versionCheck(_0x58eb83);if(_0x5e24f4===_0x1193f9(0x9d)&&_0x141b82['bool'](_0x1193f9(0x72)))return await Promise[_0x1193f9(0x6a)]([spawnViteBuildWatch(_0x58eb83),spawnVitePreview(_0x58eb83)]),{'ok':!![]};return await spawnScript(_0x627008,_0x5e24f4,_0x29ef97,_0x58eb83),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a120_0x1b2a67=a120_0x194c;(function(_0x4a3f6b,_0x254faf){const _0x5cef94=a120_0x194c,_0x42137c=_0x4a3f6b();while(!![]){try{const _0x3c7152=parseInt(_0x5cef94(0x117))/0x1+-parseInt(_0x5cef94(0x11a))/0x2*(-parseInt(_0x5cef94(0x116))/0x3)+-parseInt(_0x5cef94(0x10e))/0x4+-parseInt(_0x5cef94(0x115))/0x5*(parseInt(_0x5cef94(0x112))/0x6)+-parseInt(_0x5cef94(0x119))/0x7*(parseInt(_0x5cef94(0x114))/0x8)+-parseInt(_0x5cef94(0x118))/0x9+parseInt(_0x5cef94(0x11b))/0xa;if(_0x3c7152===_0x254faf)break;else _0x42137c['push'](_0x42137c['shift']());}catch(_0x2e8562){_0x42137c['push'](_0x42137c['shift']());}}}(a120_0xdc87,0xa0967));function a120_0x194c(_0x489722,_0x2e6e33){_0x489722=_0x489722-0x10e;const _0xdc87be=a120_0xdc87();let _0x194c76=_0xdc87be[_0x489722];return _0x194c76;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x76f638){const _0x1fbe11=await buildSchemaPayload();return{'ok':!![],'data':_0x1fbe11};}function a120_0xdc87(){const _0x3acd45=['17695eVJMWE','162009DlXHzC','241846ceIwhB','4784121lTLJGM','21oEelYk','22whKNpQ','24043090EcRSoG','693440VziaVA','read','export','json','1590UQvUmM','Export\x20machine-readable\x20command\x20schema\x20(JSON)','2505752tyVywF'];a120_0xdc87=function(){return _0x3acd45;};return a120_0xdc87();}export const schemaDefinition={'service':'schema','command':a120_0x1b2a67(0x110),'description':a120_0x1b2a67(0x113),'risk':a120_0x1b2a67(0x10f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a120_0x1b2a67(0x111),'flags':[],'execute':execute};
1
+ const a120_0x46c5ba=a120_0x5f4d;(function(_0x8a7f2a,_0x120d1f){const _0x18598a=a120_0x5f4d,_0x53e787=_0x8a7f2a();while(!![]){try{const _0x1b868b=parseInt(_0x18598a(0x1f0))/0x1*(parseInt(_0x18598a(0x1f5))/0x2)+-parseInt(_0x18598a(0x1ea))/0x3+parseInt(_0x18598a(0x1eb))/0x4+parseInt(_0x18598a(0x1ef))/0x5+-parseInt(_0x18598a(0x1ec))/0x6*(-parseInt(_0x18598a(0x1f3))/0x7)+-parseInt(_0x18598a(0x1ed))/0x8*(-parseInt(_0x18598a(0x1f4))/0x9)+parseInt(_0x18598a(0x1f6))/0xa*(-parseInt(_0x18598a(0x1f1))/0xb);if(_0x1b868b===_0x120d1f)break;else _0x53e787['push'](_0x53e787['shift']());}catch(_0x21301c){_0x53e787['push'](_0x53e787['shift']());}}}(a120_0x424a,0x5a07c));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x38f856){const _0x4c0f27=await buildSchemaPayload();return{'ok':!![],'data':_0x4c0f27};}function a120_0x5f4d(_0x10c468,_0x49cc40){_0x10c468=_0x10c468-0x1ea;const _0x424a28=a120_0x424a();let _0x5f4d06=_0x424a28[_0x10c468];return _0x5f4d06;}export const schemaDefinition={'service':'schema','command':a120_0x46c5ba(0x1f2),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a120_0x46c5ba(0x1ee),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a120_0x46c5ba(0x1f7),'flags':[],'execute':execute};function a120_0x424a(){const _0x5f5d60=['640OJDFrh','read','3650675fBgOvX','357061pcBWOG','772354VnKKrb','export','3395HmrkaD','30546yngDIj','2dFoBVk','200mhGTTY','json','2016078mqCEAU','1771036scqQmk','7962YGIaJo'];a120_0x424a=function(){return _0x5f5d60;};return a120_0x424a();}
@@ -1 +1 @@
1
- (function(_0x2b08eb,_0x47790a){const _0xdc2b20=a121_0x2390,_0x5e23f3=_0x2b08eb();while(!![]){try{const _0x531113=parseInt(_0xdc2b20(0x1f1))/0x1*(-parseInt(_0xdc2b20(0x1f0))/0x2)+-parseInt(_0xdc2b20(0x1ea))/0x3+parseInt(_0xdc2b20(0x1f6))/0x4*(parseInt(_0xdc2b20(0x1e0))/0x5)+-parseInt(_0xdc2b20(0x1ef))/0x6*(-parseInt(_0xdc2b20(0x1de))/0x7)+-parseInt(_0xdc2b20(0x1e8))/0x8+-parseInt(_0xdc2b20(0x1ec))/0x9*(parseInt(_0xdc2b20(0x1f5))/0xa)+parseInt(_0xdc2b20(0x1e7))/0xb;if(_0x531113===_0x47790a)break;else _0x5e23f3['push'](_0x5e23f3['shift']());}catch(_0x25ebfd){_0x5e23f3['push'](_0x5e23f3['shift']());}}}(a121_0x132d,0xcee9e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a121_0x2390(_0x48bcc0,_0xd06985){_0x48bcc0=_0x48bcc0-0x1de;const _0x132d87=a121_0x132d();let _0x2390b9=_0x132d87[_0x48bcc0];return _0x2390b9;}function a121_0x132d(){const _0x4ffc7e=['apiError','info','setLogPath','Installing\x20official\x20skill\x20via\x20npx\x20(','error','25991471rDBBnv','9320880eszeJb','nonInteractive','2338161GFVutS','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','114489QThkro','cwd','lovrabet/rabetbase','732LcIqUz','4VeoQOw','528579tTxMqJ','skill-install','执行安装技能包命令(委托给\x20npx\x20skills\x20add\x20-g\x20-y)','inherit','100nEKRHc','3203132kLxKnY','log','686JAzvlW','npx\x20skills\x20add\x20failed:\x20','10kncYBH','../../skills/npx-skills-add.js'];a121_0x132d=function(){return _0x4ffc7e;};return a121_0x132d();}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../../skills/npx-skills-add.js';export const skillDefinitions=[{'service':'skill','command':'install','description':'Install\x20developer\x20skill\x20package','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4edc88){const _0x2d249b=a121_0x2390;logger[_0x2d249b(0x1e4)](process[_0x2d249b(0x1ed)]()),logger[_0x2d249b(0x1e3)](_0x2d249b(0x1f2),_0x2d249b(0x1f3));const {runNpxSkillsAddGlobal:_0xd07157}=await import(_0x2d249b(0x1e1)),_0x1788d1=_0x4edc88[_0x2d249b(0x1e9)]?'pipe':_0x2d249b(0x1f4);console[_0x2d249b(0x1f7)](_0x2d249b(0x1e5)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+')...');const _0x44ff71=_0xd07157(process[_0x2d249b(0x1ed)](),_0x2d249b(0x1ee),{'stdio':_0x1788d1});if(_0x44ff71['skipped'])console[_0x2d249b(0x1f7)](_0x2d249b(0x1eb));else{if(_0x44ff71['ok'])console[_0x2d249b(0x1f7)](CLI_BIN_NAME+'\x20skill\x20installed');else throw CliErrors[_0x2d249b(0x1e2)](_0x2d249b(0x1df)+(_0x44ff71[_0x2d249b(0x1e6)]||'unknown'),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}}];
1
+ const a121_0x4e6dac=a121_0x5356;(function(_0x33d2f7,_0x4bae65){const _0x422fe0=a121_0x5356,_0x20a0e9=_0x33d2f7();while(!![]){try{const _0x158f0e=parseInt(_0x422fe0(0x12e))/0x1+parseInt(_0x422fe0(0x117))/0x2*(-parseInt(_0x422fe0(0x113))/0x3)+-parseInt(_0x422fe0(0x11c))/0x4+parseInt(_0x422fe0(0x122))/0x5*(parseInt(_0x422fe0(0x12d))/0x6)+parseInt(_0x422fe0(0x11b))/0x7+-parseInt(_0x422fe0(0x112))/0x8*(-parseInt(_0x422fe0(0x118))/0x9)+-parseInt(_0x422fe0(0x12a))/0xa*(parseInt(_0x422fe0(0x125))/0xb);if(_0x158f0e===_0x4bae65)break;else _0x20a0e9['push'](_0x20a0e9['shift']());}catch(_0xf9cb0c){_0x20a0e9['push'](_0x20a0e9['shift']());}}}(a121_0x521a,0x95053));import{CliErrors}from'../../errors.js';function a121_0x5356(_0x311ef0,_0x50357d){_0x311ef0=_0x311ef0-0x112;const _0x521a64=a121_0x521a();let _0x5356a6=_0x521a64[_0x311ef0];return _0x5356a6;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a121_0x521a(){const _0x4cbab9=['2649325Nwuiaa','nonInteractive','unknown','8734oqRHlU','skill-install','skill','info','log','8380UakicL','lovrabet/rabetbase','apiError','6ZBFLGD','258401GIegCM','../../skills/npx-skills-add.js','pipe','16gQtdUM','2205939VeQpdn','npx\x20skills\x20add\x20failed:\x20','执行安装技能包命令(委托给\x20npx\x20skills\x20add\x20-g\x20-y)',')...','2yiYLqH','3674394qnHxaB','cwd','install','8509676dogoHs','3237576lLFgRA','\x20skill\x20installed','inherit','setLogPath','Installing\x20official\x20skill\x20via\x20npx\x20(','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.'];a121_0x521a=function(){return _0x4cbab9;};return a121_0x521a();}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../../skills/npx-skills-add.js';export const skillDefinitions=[{'service':a121_0x4e6dac(0x127),'command':a121_0x4e6dac(0x11a),'description':'Install\x20developer\x20skill\x20package','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x519f71){const _0x31e347=a121_0x4e6dac;logger[_0x31e347(0x11f)](process['cwd']()),logger[_0x31e347(0x128)](_0x31e347(0x126),_0x31e347(0x115));const {runNpxSkillsAddGlobal:_0x116ed4}=await import(_0x31e347(0x12f)),_0x5a5169=_0x519f71[_0x31e347(0x123)]?_0x31e347(0x130):_0x31e347(0x11e);console[_0x31e347(0x129)](_0x31e347(0x120)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+_0x31e347(0x116));const _0x2f1b10=_0x116ed4(process[_0x31e347(0x119)](),_0x31e347(0x12b),{'stdio':_0x5a5169});if(_0x2f1b10['skipped'])console[_0x31e347(0x129)](_0x31e347(0x121));else{if(_0x2f1b10['ok'])console['log'](CLI_BIN_NAME+_0x31e347(0x11d));else throw CliErrors[_0x31e347(0x12c)](_0x31e347(0x114)+(_0x2f1b10['error']||_0x31e347(0x124)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}}];