@lovrabet/rabetbase-cli 2.1.13 → 2.1.14-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41a727,_0x45424e){var _0x2cdd86=a172_0x7f87,_0x27b300=_0x41a727();while(!![]){try{var _0x49257e=-parseInt(_0x2cdd86(0x1ad))/0x1+-parseInt(_0x2cdd86(0x1a9))/0x2+parseInt(_0x2cdd86(0x1b0))/0x3*(-parseInt(_0x2cdd86(0x1ac))/0x4)+-parseInt(_0x2cdd86(0x1ab))/0x5+-parseInt(_0x2cdd86(0x1aa))/0x6*(parseInt(_0x2cdd86(0x1ae))/0x7)+parseInt(_0x2cdd86(0x1af))/0x8*(-parseInt(_0x2cdd86(0x1a8))/0x9)+parseInt(_0x2cdd86(0x1a7))/0xa;if(_0x49257e===_0x45424e)break;else _0x27b300['push'](_0x27b300['shift']());}catch(_0x2a8e40){_0x27b300['push'](_0x27b300['shift']());}}}(a172_0x1146,0x5cd2f));function a172_0x7f87(_0x1435fa,_0x1afdeb){_0x1435fa=_0x1435fa-0x1a7;var _0x1146dc=a172_0x1146();var _0x7f8795=_0x1146dc[_0x1435fa];return _0x7f8795;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a172_0x1146(){var _0x5b1b02=['555084ZDqxrZ','643073JSFFtR','1748831LoDpAX','376ZxFMol','6gtpEqJ','35837050KcOmeJ','108837aaxlUP','1014708BHNWWx','18EKzpuA','2288295rqKKPT'];a172_0x1146=function(){return _0x5b1b02;};return a172_0x1146();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a173_0x1cfe(_0x110a9,_0x325aa1){_0x110a9=_0x110a9-0x1a8;const _0x49ff8a=a173_0x49ff();let _0x1cfe15=_0x49ff8a[_0x110a9];return _0x1cfe15;}const a173_0x5cc5ef=a173_0x1cfe;(function(_0x351d41,_0x5a7ea2){const _0x591f9f=a173_0x1cfe,_0x4cf0fd=_0x351d41();while(!![]){try{const _0x58e1aa=parseInt(_0x591f9f(0x1b3))/0x1*(-parseInt(_0x591f9f(0x1aa))/0x2)+parseInt(_0x591f9f(0x1ac))/0x3*(parseInt(_0x591f9f(0x1ad))/0x4)+parseInt(_0x591f9f(0x1b4))/0x5+-parseInt(_0x591f9f(0x1b5))/0x6*(parseInt(_0x591f9f(0x1ae))/0x7)+-parseInt(_0x591f9f(0x1b0))/0x8*(parseInt(_0x591f9f(0x1b2))/0x9)+-parseInt(_0x591f9f(0x1a9))/0xa*(-parseInt(_0x591f9f(0x1b6))/0xb)+parseInt(_0x591f9f(0x1a8))/0xc;if(_0x58e1aa===_0x5a7ea2)break;else _0x4cf0fd['push'](_0x4cf0fd['shift']());}catch(_0x3f3957){_0x4cf0fd['push'](_0x4cf0fd['shift']());}}}(a173_0x49ff,0x3c0c0));export const VERSION=a173_0x5cc5ef(0x1b1);export const GIT_TAG=a173_0x5cc5ef(0x1af);function a173_0x49ff(){const _0x5921d4=['39378ajVICR','11KndfQW','1089336hebFGm','2315830FiUeba','2VXeJHW','2026-06-02T15:23:08.197Z','6CPJaOc','847312izyDev','196mCXsQg','v2.1.14-beta.1','1608RtrgZA','2.1.14-beta.1','12789ZkBJUq','226587XNreGd','979535ORbGbh'];a173_0x49ff=function(){return _0x5921d4;};return a173_0x49ff();}export const GIT_COMMIT='42413eb';export const BUILD_TIME=a173_0x5cc5ef(0x1ab);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a174_0x134f(_0x1abb35,_0x2741f8){_0x1abb35=_0x1abb35-0x8f;var _0x412753=a174_0x4127();var _0x134fd0=_0x412753[_0x1abb35];return _0x134fd0;}(function(_0x1ebd2c,_0x29b513){var _0x32ff09=a174_0x134f,_0x154cba=_0x1ebd2c();while(!![]){try{var _0xe50629=parseInt(_0x32ff09(0x8f))/0x1*(-parseInt(_0x32ff09(0x92))/0x2)+parseInt(_0x32ff09(0x9a))/0x3*(parseInt(_0x32ff09(0x99))/0x4)+-parseInt(_0x32ff09(0x9f))/0x5+-parseInt(_0x32ff09(0x9e))/0x6*(-parseInt(_0x32ff09(0x91))/0x7)+-parseInt(_0x32ff09(0x90))/0x8*(-parseInt(_0x32ff09(0x9d))/0x9)+-parseInt(_0x32ff09(0x94))/0xa*(-parseInt(_0x32ff09(0x9b))/0xb)+parseInt(_0x32ff09(0x9c))/0xc;if(_0xe50629===_0x29b513)break;else _0x154cba['push'](_0x154cba['shift']());}catch(_0x27a0ab){_0x154cba['push'](_0x154cba['shift']());}}}(a174_0x4127,0x6f9f9));import a174_0x32b122 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a174_0x4127(){var _0x3421f8=['log','green','\x20to\x20view\x20available\x20commands.','655492ggSWkl','3vgpumI','33yTznyt','2565312lHFKZI','53838KkehBX','4638LUgdfo','3833660SAjbzw','174WtzCyy','920YaWuvB','2471NQunUp','3766IktEJd','\x20\x20Use\x20','710450zKwsmp','\x20--help'];a174_0x4127=function(){return _0x3421f8;};return a174_0x4127();}export function showHelp(){var _0x1abd6b=a174_0x134f;console[_0x1abd6b(0x96)](),console['log'](a174_0x32b122['green']['bold']('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x1abd6b(0x96)](),console['log'](_0x1abd6b(0x93)+a174_0x32b122[_0x1abd6b(0x97)]['bold'](CLI_BIN_NAME+_0x1abd6b(0x95))+_0x1abd6b(0x98)),console['log']();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14edf2,_0x245a3a){const _0x3f180f=a175_0x6702,_0x38bb2f=_0x14edf2();while(!![]){try{const _0x566335=parseInt(_0x3f180f(0xab))/0x1*(-parseInt(_0x3f180f(0xbd))/0x2)+parseInt(_0x3f180f(0xa9))/0x3*(-parseInt(_0x3f180f(0xae))/0x4)+parseInt(_0x3f180f(0xb8))/0x5+-parseInt(_0x3f180f(0xc2))/0x6+parseInt(_0x3f180f(0xa7))/0x7*(parseInt(_0x3f180f(0xc7))/0x8)+-parseInt(_0x3f180f(0xc9))/0x9*(-parseInt(_0x3f180f(0xb9))/0xa)+-parseInt(_0x3f180f(0xbe))/0xb*(parseInt(_0x3f180f(0xb0))/0xc);if(_0x566335===_0x245a3a)break;else _0x38bb2f['push'](_0x38bb2f['shift']());}catch(_0x138f81){_0x38bb2f['push'](_0x38bb2f['shift']());}}}(a175_0x176f,0x3c5e9));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0xd168f9){const _0xd45835=a175_0x6702,_0x42574b=[];for(const [_0x255c56,_0xb9adce]of Object[_0xd45835(0xaf)](_0xd168f9)){if(_0xb9adce===!![]){const _0x19c1d4=_0x255c56[_0xd45835(0xaa)](/([A-Z])/g,'-$1')[_0xd45835(0xb5)]();_0x42574b[_0xd45835(0xc3)](_0x19c1d4);}}return _0x42574b;}export function parseDynamicFlags(){const _0x279ca2=a175_0x6702,_0x50cb61=[];for(let _0x29ca61=0x3;_0x29ca61<process[_0x279ca2(0xc0)]['length'];_0x29ca61++){const _0x7fbd00=process[_0x279ca2(0xc0)][_0x29ca61];if(_0x7fbd00&&_0x7fbd00[_0x279ca2(0xba)]('--')){const _0x5a2f6a=_0x7fbd00['slice'](0x2);_0x5a2f6a&&!_0x5a2f6a[_0x279ca2(0xc5)]('=')&&_0x50cb61[_0x279ca2(0xc3)](_0x5a2f6a);}}return _0x50cb61;}export function getAllProvidedFlags(_0x53e0be){const _0x375f83=a175_0x6702,_0x692646=camelCaseFlagsToKebab(_0x53e0be),_0x5f17a3=parseDynamicFlags(),_0x5f4400=new Set([..._0x692646,..._0x5f17a3]);return Array[_0x375f83(0xc8)](_0x5f4400);}export function normalizeLegacyBffSaveFlags(_0x8d0c46){const _0x23d24e=a175_0x6702,_0x4083e1=new Set(_0x8d0c46);return _0x4083e1[_0x23d24e(0xc4)](_0x23d24e(0xbb))&&_0x4083e1['add'](_0x23d24e(0xb2)),Array[_0x23d24e(0xc8)](_0x4083e1);}function a175_0x6702(_0x4b4b32,_0x4ee198){_0x4b4b32=_0x4b4b32-0xa7;const _0x176f92=a175_0x176f();let _0x6702ad=_0x176f92[_0x4b4b32];return _0x6702ad;}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x261111,_0x5796c6,_0x292c62){const _0x4c288d=a175_0x6702;logger[_0x4c288d(0xb3)](process[_0x4c288d(0xb4)]());if(_0x292c62?.['help']||_0x261111===_0x4c288d(0xbf)){showHelp();return;}console['error'](_0x4c288d(0xbc)+(_0x261111||_0x4c288d(0xca))),console[_0x4c288d(0xb1)](_0x4c288d(0xad)),console[_0x4c288d(0xb1)]('\x20\x20'+CLI_BIN_NAME+_0x4c288d(0xb7)),console[_0x4c288d(0xb1)]('\x20\x20'+CLI_BIN_NAME+_0x4c288d(0xb6)),console[_0x4c288d(0xb1)](''),console[_0x4c288d(0xb1)]('Equivalent\x20command:\x20'+SKILLS_INSTALL_COMMAND_LINE),logger[_0x4c288d(0xc6)](_0x4c288d(0xc1),_0x4c288d(0xac)+_0x261111),process[_0x4c288d(0xa8)](0x1);}function a175_0x176f(){const _0x3022b=['error','102024pWggjr','from','2678382iVpTqp','(empty)','147nyXhDl','exit','9aRcQzA','replace','113WoXztU','不支持的命令:\x20','\x0aAvailable\x20commands:','308892wsInsy','entries','1032NGnLdG','log','enable-bff-save','setLogPath','cwd','toLowerCase','\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','389305LSgXIy','10YaUWwn','startsWith','dangerously-bff-save','Error:\x20Unsupported\x20command:\x20','628RwKexi','7711hBLRHm','--help','argv','skill','411372ulPSfW','push','has','includes'];a175_0x176f=function(){return _0x3022b;};return a175_0x176f();}function showHelp(){const _0x42bc33=a175_0x6702;console[_0x42bc33(0xb1)]('\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+'\x20skill\x20--help\x0a\x20\x20'+CLI_BIN_NAME+'\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20'+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x4afb61=a176_0x5d5d;function a176_0x5d5d(_0x1ab040,_0xd73f68){_0x1ab040=_0x1ab040-0x150;const _0x2da22f=a176_0x2da2();let _0x5d5d16=_0x2da22f[_0x1ab040];return _0x5d5d16;}(function(_0x29d5ef,_0x5e80ec){const _0x297dd1=a176_0x5d5d,_0x1e5ba0=_0x29d5ef();while(!![]){try{const _0x5c13a8=parseInt(_0x297dd1(0x16e))/0x1+-parseInt(_0x297dd1(0x16c))/0x2+parseInt(_0x297dd1(0x162))/0x3*(parseInt(_0x297dd1(0x16a))/0x4)+-parseInt(_0x297dd1(0x166))/0x5*(-parseInt(_0x297dd1(0x151))/0x6)+-parseInt(_0x297dd1(0x15d))/0x7*(parseInt(_0x297dd1(0x15c))/0x8)+-parseInt(_0x297dd1(0x159))/0x9+parseInt(_0x297dd1(0x163))/0xa;if(_0x5c13a8===_0x5e80ec)break;else _0x1e5ba0['push'](_0x1e5ba0['shift']());}catch(_0x1ecc24){_0x1e5ba0['push'](_0x1e5ba0['shift']());}}}(a176_0x2da2,0x22cf3));function a176_0x2da2(){const _0x917b93=['137707JPsdRz','skill','48462XJWICJ','Lovrabet','yes','npx','skills','join','lovrabet/lovrabet-skill','stdio','558270heKoRM','stderr','toString','112ExIZbu','71484ujBjaD','lovrabet/rabetbase','inherit','unknown','pipe','12615fgdtPN','2069940loxmIw','stdout','--skill','5Hthmcs','exit\x20','trim','log','16EwvsSW','status','44042bbLHWK','push'];a176_0x2da2=function(){return _0x917b93;};return a176_0x2da2();}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a176_0x4afb61(0x155);export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL=a176_0x4afb61(0x165);export const RABETBASE_SKILL_SOURCE=a176_0x4afb61(0x15e);export const LEGACY_RABETBASE_SKILL_SOURCE=a176_0x4afb61(0x157);export const DEFAULT_RABETBASE_SKILL_NAME=a176_0x4afb61(0x152);export function buildNpxSkillsAddArgv(_0xc97f5e){const _0x5f0a08=a176_0x4afb61,_0x474d34=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0xc97f5e&&_0x474d34[_0x5f0a08(0x16d)](NPX_SKILLS_FLAG_SKILL,_0xc97f5e),_0x474d34;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a176_0x4afb61(0x154),...buildNpxSkillsAddArgv()][a176_0x4afb61(0x156)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a176_0x4afb61(0x154),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x5b4199,_0x45220f){const _0x189e32=a176_0x4afb61;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1fee5d=_0x45220f?.['stdio']??'inherit',_0x1a00c6=resolveNpmBin(_0x189e32(0x154)),_0x1b544d=buildNpxSkillsAddArgv(_0x45220f?.[_0x189e32(0x150)]),_0x15cb8d=[_0x189e32(0x154),..._0x1b544d][_0x189e32(0x156)]('\x20');console['log']('*\x20'+_0x15cb8d);const _0x1b7e02=spawnSync(_0x1a00c6,_0x1b544d,{'cwd':_0x5b4199,'stdio':_0x1fee5d,'env':process.env,'shell':![]}),_0x40ced4=_0x1b7e02[_0x189e32(0x16b)];if(_0x40ced4===0x0)return{'ok':!![],'status':0x0};let _0x3545ec=_0x189e32(0x167)+(_0x40ced4??_0x189e32(0x160));if(_0x1fee5d===_0x189e32(0x161)){const _0x1bacf2=_0x1b7e02[_0x189e32(0x15a)]?_0x1b7e02['stderr']['toString']()[_0x189e32(0x168)]():'',_0x10a0aa=_0x1b7e02[_0x189e32(0x164)]?_0x1b7e02[_0x189e32(0x164)][_0x189e32(0x15b)]()['trim']():'';if(_0x1bacf2)_0x3545ec=_0x1bacf2;else{if(_0x10a0aa)_0x3545ec=_0x10a0aa;}}return{'ok':![],'status':_0x40ced4??null,'error':_0x3545ec};}export function runNpxSkillsRemove(_0x1bd93c,_0x28b837,_0x277183=LEGACY_RABETBASE_SKILL_SOURCE){const _0x142eea=a176_0x4afb61;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4ea915=_0x28b837?.[_0x142eea(0x158)]??_0x142eea(0x15f),_0x5c67a3=resolveNpmBin(_0x142eea(0x154)),_0x2fd9b0=[NPX_FLAG_YES,NPX_SKILLS_CLI,'remove',_0x277183,NPX_SKILLS_FLAG_SKILL,_0x28b837?.[_0x142eea(0x150)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x28b837?.[_0x142eea(0x153)]?['-y']:[]],_0x43f323=[_0x5c67a3,..._0x2fd9b0][_0x142eea(0x156)]('\x20');console['log']('*\x20'+_0x43f323);const _0x3f9a44=spawnSync(_0x5c67a3,_0x2fd9b0,{'cwd':_0x1bd93c,'stdio':_0x4ea915,'env':process.env,'shell':![]}),_0x5be9d8=_0x3f9a44['status'];if(_0x5be9d8===0x0)return{'ok':!![],'status':0x0};let _0x121114='exit\x20'+(_0x5be9d8??_0x142eea(0x160));if(_0x4ea915===_0x142eea(0x161)){const _0x2a123c=_0x3f9a44[_0x142eea(0x15a)]?_0x3f9a44[_0x142eea(0x15a)][_0x142eea(0x15b)]()['trim']():'',_0x75960d=_0x3f9a44[_0x142eea(0x164)]?_0x3f9a44['stdout']['toString']()['trim']():'';if(_0x2a123c)_0x121114=_0x2a123c;else{if(_0x75960d)_0x121114=_0x75960d;}}return{'ok':![],'status':_0x5be9d8??null,'error':_0x121114};}export function runNpxSkillsAddGlobal(_0x16148f,_0x55b807,_0x2ceed4){const _0x3b2ac6=a176_0x4afb61;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1b4a57=_0x2ceed4?.[_0x3b2ac6(0x158)]??_0x3b2ac6(0x15f),_0x486481=resolveNpmBin('npx'),_0x41d3b4=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x55b807,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x57786=[_0x3b2ac6(0x154),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x55b807,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');console[_0x3b2ac6(0x169)]('*\x20'+_0x57786);const _0x5f45f9=spawnSync(_0x486481,_0x41d3b4,{'cwd':_0x16148f,'stdio':_0x1b4a57,'env':process.env,'shell':![]}),_0x254678=_0x5f45f9[_0x3b2ac6(0x16b)];if(_0x254678===0x0)return{'ok':!![],'status':0x0};let _0x3e37ca='exit\x20'+(_0x254678??_0x3b2ac6(0x160));if(_0x1b4a57===_0x3b2ac6(0x161)){const _0x14fa64=_0x5f45f9[_0x3b2ac6(0x15a)]?_0x5f45f9['stderr'][_0x3b2ac6(0x15b)]()['trim']():'',_0x413a9e=_0x5f45f9[_0x3b2ac6(0x164)]?_0x5f45f9[_0x3b2ac6(0x164)]['toString']()['trim']():'';if(_0x14fa64)_0x3e37ca=_0x14fa64;else{if(_0x413a9e)_0x3e37ca=_0x413a9e;}}return{'ok':![],'status':_0x254678??null,'error':_0x3e37ca};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x32ab15,_0x3e58c2){const _0x2220a0=a177_0x5daf,_0x366770=_0x32ab15();while(!![]){try{const _0x4a04b9=-parseInt(_0x2220a0(0x18f))/0x1+-parseInt(_0x2220a0(0x18e))/0x2+parseInt(_0x2220a0(0x189))/0x3*(parseInt(_0x2220a0(0x196))/0x4)+-parseInt(_0x2220a0(0x197))/0x5+-parseInt(_0x2220a0(0x195))/0x6+-parseInt(_0x2220a0(0x191))/0x7+-parseInt(_0x2220a0(0x18d))/0x8*(-parseInt(_0x2220a0(0x18c))/0x9);if(_0x4a04b9===_0x3e58c2)break;else _0x366770['push'](_0x366770['shift']());}catch(_0x27a1a0){_0x366770['push'](_0x366770['shift']());}}}(a177_0x572a,0x95459));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';function a177_0x572a(){const _0x2bbd52=['error','4748772Xxbuew','flags','stringify','durationMs','940488LmnqLF','4ZhngEB','1922500aVJmvM','some','service','548553QMQwbI','message','command','27vYOTac','9063488bsmmsV','1147098frVZIS','1177049XLakOk'];a177_0x572a=function(){return _0x2bbd52;};return a177_0x572a();}const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i];function isSensitiveKey(_0x3feab4){const _0x6764c2=a177_0x5daf;return SENSITIVE_PATTERNS[_0x6764c2(0x198)](_0x421186=>_0x421186['test'](_0x3feab4));}function sanitizeFlags(_0x577036){const _0x21aece={};for(const [_0x1bb78e,_0x1d2e66]of Object['entries'](_0x577036)){isSensitiveKey(_0x1bb78e)?_0x21aece[_0x1bb78e]=_0x1d2e66!=null&&_0x1d2e66!==''?'[REDACTED]':_0x1d2e66:_0x21aece[_0x1bb78e]=_0x1d2e66;}return _0x21aece;}function a177_0x5daf(_0x1aff8c,_0x30cf46){_0x1aff8c=_0x1aff8c-0x188;const _0x572a87=a177_0x572a();let _0x5daf74=_0x572a87[_0x1aff8c];return _0x5daf74;}export async function reportCommandTrace(_0x3c074d){const _0x4f6fd9=a177_0x5daf;try{const _0x178f71=sanitizeFlags(_0x3c074d[_0x4f6fd9(0x192)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x3c074d[_0x4f6fd9(0x188)],'command.name':_0x3c074d[_0x4f6fd9(0x18b)],'command.flags':JSON[_0x4f6fd9(0x193)](_0x178f71),..._0x3c074d[_0x4f6fd9(0x194)]!=null?{'command.duration_ms':_0x3c074d[_0x4f6fd9(0x194)]}:{},..._0x3c074d['error']?{'command.error':_0x3c074d[_0x4f6fd9(0x190)]instanceof Error?_0x3c074d['error'][_0x4f6fd9(0x18a)]:String(_0x3c074d['error'])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a178_0x5e22(_0x52cc2d,_0x497bef){_0x52cc2d=_0x52cc2d-0x64;var _0x2bc41c=a178_0x2bc4();var _0x5e225c=_0x2bc41c[_0x52cc2d];return _0x5e225c;}(function(_0x596f5c,_0x32cdab){var _0x2525d3=a178_0x5e22,_0x43035a=_0x596f5c();while(!![]){try{var _0x49e05f=parseInt(_0x2525d3(0x6e))/0x1*(-parseInt(_0x2525d3(0x64))/0x2)+parseInt(_0x2525d3(0x6b))/0x3*(-parseInt(_0x2525d3(0x6d))/0x4)+-parseInt(_0x2525d3(0x66))/0x5*(-parseInt(_0x2525d3(0x68))/0x6)+-parseInt(_0x2525d3(0x65))/0x7*(parseInt(_0x2525d3(0x6f))/0x8)+-parseInt(_0x2525d3(0x69))/0x9*(parseInt(_0x2525d3(0x71))/0xa)+parseInt(_0x2525d3(0x67))/0xb+parseInt(_0x2525d3(0x6c))/0xc;if(_0x49e05f===_0x32cdab)break;else _0x43035a['push'](_0x43035a['shift']());}catch(_0x16347b){_0x43035a['push'](_0x43035a['shift']());}}}(a178_0x2bc4,0x1e36a));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a178_0x2bc4(){var _0x3d767d=['904215ZFjHzg','2247190vqfLvs','6VNkNID','18GvIVgn','cli.help','159BuYAJU','3032004AxYyok','10916IeswwD','12197VsKSDY','40XBMvgi','service','241690lwFkhh','error','26SYmZNr','227514ZDxyqs'];a178_0x2bc4=function(){return _0x3d767d;};return a178_0x2bc4();}export async function reportCliHelpTrace(_0x1311de,_0x2f2487){var _0x15006a=a178_0x5e22;try{await sendCliTraceLog({'spanName':_0x15006a(0x6a),'logData':{'rabetbase.help.kind':_0x1311de,..._0x2f2487?.[_0x15006a(0x70)]&&{'rabetbase.help.service':_0x2f2487[_0x15006a(0x70)]}}});}catch(_0x52c131){console[_0x15006a(0x72)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x52c131);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x595f06,_0x13d8ce){const _0x441762=a179_0x1ad1,_0x316c67=_0x595f06();while(!![]){try{const _0x5bb3b6=-parseInt(_0x441762(0x10f))/0x1*(-parseInt(_0x441762(0x111))/0x2)+-parseInt(_0x441762(0x110))/0x3+parseInt(_0x441762(0x118))/0x4+parseInt(_0x441762(0x115))/0x5+-parseInt(_0x441762(0x113))/0x6+parseInt(_0x441762(0x112))/0x7+-parseInt(_0x441762(0x119))/0x8;if(_0x5bb3b6===_0x13d8ce)break;else _0x316c67['push'](_0x316c67['shift']());}catch(_0x31cc7c){_0x316c67['push'](_0x316c67['shift']());}}}(a179_0x1c55,0xa822d));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';function a179_0x1c55(){const _0x396acf=['1186948dwGFUj','13899160SfkgCo','email','username','701hdatyn','2199573DHLJqC','3586vAeFGi','8788444ivSLzG','5291880lEGgXB','user','6160645ILHqKX','nickname','tenant'];a179_0x1c55=function(){return _0x396acf;};return a179_0x1c55();}function a179_0x1ad1(_0xca1fd5,_0x27e847){_0xca1fd5=_0xca1fd5-0x10d;const _0x1c555f=a179_0x1c55();let _0x1ad18c=_0x1c555f[_0xca1fd5];return _0x1ad18c;}let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x3202e0=a179_0x1ad1,_0x1b122f=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x5577f3=_0x1b122f?.[_0x3202e0(0x114)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':'production')}),setUserContext({'id':_0x5577f3?.['id'],'username':_0x5577f3?.[_0x3202e0(0x10e)],'nickname':_0x5577f3?.[_0x3202e0(0x116)],'email':_0x5577f3?.[_0x3202e0(0x10d)],'tenantCode':_0x5577f3?.[_0x3202e0(0x117)]['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x1b122f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a180_0x1b40(){const _0x3c8d9=['exit','1422071euWPHJ','1374060aWuntS','751416Uazoex','1740kDRnxN','once','642956XMCtzV','SIGTERM','SIGINT','16991DwCbhx','151984lFJZeP','then','453ltJSrV'];a180_0x1b40=function(){return _0x3c8d9;};return a180_0x1b40();}(function(_0x19119e,_0x3c183f){const _0x3fe293=a180_0x56f4,_0x24bfd9=_0x19119e();while(!![]){try{const _0x4d50b3=parseInt(_0x3fe293(0xc1))/0x1+parseInt(_0x3fe293(0xbe))/0x2+parseInt(_0x3fe293(0xc4))/0x3*(parseInt(_0x3fe293(0xbc))/0x4)+-parseInt(_0x3fe293(0xba))/0x5+-parseInt(_0x3fe293(0xbb))/0x6+parseInt(_0x3fe293(0xc6))/0x7+-parseInt(_0x3fe293(0xc2))/0x8;if(_0x4d50b3===_0x3c183f)break;else _0x24bfd9['push'](_0x24bfd9['shift']());}catch(_0x4124b1){_0x24bfd9['push'](_0x24bfd9['shift']());}}}(a180_0x1b40,0x2df65));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}function a180_0x56f4(_0x698f1d,_0x185511){_0x698f1d=_0x698f1d-0xba;const _0x1b40b7=a180_0x1b40();let _0x56f4ad=_0x1b40b7[_0x698f1d];return _0x56f4ad;}export function registerOtelShutdownOnExit(){const _0x60f0ae=a180_0x56f4;process[_0x60f0ae(0xbd)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x161a14=()=>{const _0x24a3f1=_0x60f0ae;void flushOtelNodeIfUsed()[_0x24a3f1(0xc3)](()=>process[_0x24a3f1(0xc5)](0x0));};process['once'](_0x60f0ae(0xc0),_0x161a14),process[_0x60f0ae(0xbd)](_0x60f0ae(0xbf),_0x161a14);}export async function exitWithOtelShutdown(_0x35dd7f){const _0x2455b5=a180_0x56f4;await flushOtelNodeIfUsed(),process[_0x2455b5(0xc5)](_0x35dd7f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0x882c51=a181_0x1f39;(function(_0x470364,_0x10ecb5){const _0x248b5e=a181_0x1f39,_0x33adab=_0x470364();while(!![]){try{const _0xafa78b=parseInt(_0x248b5e(0x1ce))/0x1+-parseInt(_0x248b5e(0x1cc))/0x2*(-parseInt(_0x248b5e(0x1d9))/0x3)+parseInt(_0x248b5e(0x1d7))/0x4+-parseInt(_0x248b5e(0x1cf))/0x5*(parseInt(_0x248b5e(0x1ca))/0x6)+parseInt(_0x248b5e(0x1d6))/0x7+-parseInt(_0x248b5e(0x1d8))/0x8*(parseInt(_0x248b5e(0x1d2))/0x9)+-parseInt(_0x248b5e(0x1d4))/0xa;if(_0xafa78b===_0x10ecb5)break;else _0x33adab['push'](_0x33adab['shift']());}catch(_0x465ba6){_0x33adab['push'](_0x33adab['shift']());}}}(a181_0x58c0,0xe578e));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a181_0x1f39(_0x1705b5,_0x4ca9bc){_0x1705b5=_0x1705b5-0x1ca;const _0x58c0dd=a181_0x58c0();let _0x1f390e=_0x58c0dd[_0x1705b5];return _0x1f390e;}const DEFAULT_TRACE_NAME=a181_0x882c51(0x1d3);function a181_0x58c0(){const _0x1f1469=['spanName','268403gypQZf','1504655qgKxEX','version','logData','45DNfcnJ','rabetbase-cli','5861770EPeBSV','traceName','12392856zJrzch','6339980lhcOeV','1180552RGOwnF','30pnwzmU','36drJwLf','manual','89144NBWijJ'];a181_0x58c0=function(){return _0x1f1469;};return a181_0x58c0();}export async function sendCliTraceLog(_0x89e078){const _0xdcc62f=a181_0x882c51;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x89e078[_0xdcc62f(0x1d5)]??DEFAULT_TRACE_NAME,'version':_0x89e078[_0xdcc62f(0x1d0)]??getCliVersion(),'spanName':_0x89e078[_0xdcc62f(0x1cd)],'eventType':_0xdcc62f(0x1cb),'logData':_0x89e078[_0xdcc62f(0x1d1)],..._0x89e078['traceparent']&&{'traceparent':_0x89e078['traceparent']}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a182_0x2d33(){const _0x371802=['998184BqHfss','810251dTPSsu','216jFpcbb','9oOKLwM','redactionKinds','243807MMuktJ','title','5JJgajO','121KjNzGv','343348yhgUdN','217670ERnNRK','issue.log.collect','originalBytes','816378UerVNJ','49sZBLmq','truncated','description','redactionCount','3490120wldjBw','join','3xlNswk','sanitize'];a182_0x2d33=function(){return _0x371802;};return a182_0x2d33();}const a182_0x5b37a6=a182_0x5eb6;(function(_0x4c0a2c,_0x697315){const _0x754f24=a182_0x5eb6,_0x1daf6f=_0x4c0a2c();while(!![]){try{const _0x4d305b=parseInt(_0x754f24(0x77))/0x1+-parseInt(_0x754f24(0x72))/0x2*(-parseInt(_0x754f24(0x70))/0x3)+parseInt(_0x754f24(0x7b))/0x4*(-parseInt(_0x754f24(0x79))/0x5)+-parseInt(_0x754f24(0x7f))/0x6*(parseInt(_0x754f24(0x6a))/0x7)+-parseInt(_0x754f24(0x6e))/0x8*(parseInt(_0x754f24(0x75))/0x9)+parseInt(_0x754f24(0x7c))/0xa*(parseInt(_0x754f24(0x7a))/0xb)+parseInt(_0x754f24(0x74))/0xc*(parseInt(_0x754f24(0x73))/0xd);if(_0x4d305b===_0x697315)break;else _0x1daf6f['push'](_0x1daf6f['shift']());}catch(_0x3ded53){_0x1daf6f['push'](_0x1daf6f['shift']());}}}(a182_0x2d33,0x99baf));function a182_0x5eb6(_0x465732,_0x5ef8e4){_0x465732=_0x465732-0x6a;const _0x2d3374=a182_0x2d33();let _0x5eb6fe=_0x2d3374[_0x465732];return _0x5eb6fe;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME='platform-issue-log-collect';export const PLATFORM_ISSUE_SPAN_NAME=a182_0x5b37a6(0x7d);export async function sendPlatformIssueCollectLog(_0x52a91e){const _0x2a2691=a182_0x5b37a6;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x52a91e[_0x2a2691(0x78)],'issue.description':_0x52a91e[_0x2a2691(0x6c)],..._0x52a91e[_0x2a2691(0x71)]?{'issue.description_original_bytes':_0x52a91e[_0x2a2691(0x71)][_0x2a2691(0x7e)],'issue.description_truncated':_0x52a91e[_0x2a2691(0x71)][_0x2a2691(0x6b)],'issue.description_redactions':_0x52a91e[_0x2a2691(0x71)][_0x2a2691(0x6d)],'issue.description_redaction_kinds':_0x52a91e[_0x2a2691(0x71)][_0x2a2691(0x76)][_0x2a2691(0x6f)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x5df379=a184_0x1c39;(function(_0x536646,_0x534d6f){const _0x2e70ee=a184_0x1c39,_0x502853=_0x536646();while(!![]){try{const _0x3c7bec=parseInt(_0x2e70ee(0x115))/0x1*(parseInt(_0x2e70ee(0xed))/0x2)+parseInt(_0x2e70ee(0xf1))/0x3+-parseInt(_0x2e70ee(0xf9))/0x4+-parseInt(_0x2e70ee(0xfc))/0x5+parseInt(_0x2e70ee(0x117))/0x6*(-parseInt(_0x2e70ee(0x11d))/0x7)+parseInt(_0x2e70ee(0xf2))/0x8*(-parseInt(_0x2e70ee(0x111))/0x9)+parseInt(_0x2e70ee(0x113))/0xa;if(_0x3c7bec===_0x534d6f)break;else _0x502853['push'](_0x502853['shift']());}catch(_0x15ebdd){_0x502853['push'](_0x502853['shift']());}}}(a184_0x1caf,0x35104));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':a184_0x5df379(0x118),'folders':[a184_0x5df379(0xf5),a184_0x5df379(0xfe)],'files':[{'type':a184_0x5df379(0x101),'path':'.cursor/skills/rabetbase.md','template':'SKILL.md.tpl'}]},'windsurf':{'name':a184_0x5df379(0xfb),'description':'Windsurf\x20IDE','folders':[a184_0x5df379(0x10c)],'files':[{'type':'file','path':a184_0x5df379(0xf6),'template':a184_0x5df379(0x109)}]},'claude':{'name':a184_0x5df379(0x107),'description':a184_0x5df379(0x107),'folders':[a184_0x5df379(0xee)],'files':[{'type':a184_0x5df379(0x101),'path':a184_0x5df379(0xfd),'template':a184_0x5df379(0x109)}]},'cline':{'name':a184_0x5df379(0xf7),'description':a184_0x5df379(0x100),'folders':[a184_0x5df379(0x110)],'files':[{'type':a184_0x5df379(0x101),'path':'.cline/skills/lovrabet/SKILL.md','template':a184_0x5df379(0x109)}]},'codex':{'name':a184_0x5df379(0x11c),'description':'Codex\x20IDE','folders':['.codex'],'files':[{'type':'file','path':a184_0x5df379(0x105),'template':a184_0x5df379(0x109)}]},'opencode':{'name':a184_0x5df379(0x121),'description':a184_0x5df379(0xec),'folders':[a184_0x5df379(0x120)],'files':[{'type':a184_0x5df379(0x101),'path':a184_0x5df379(0x116),'template':a184_0x5df379(0x109)}]},'qoder':{'name':a184_0x5df379(0x11b),'description':a184_0x5df379(0x103),'folders':[a184_0x5df379(0x10b)],'files':[{'type':'file','path':'.qoder/rules/rabetbase.md','template':a184_0x5df379(0x109)},{'type':a184_0x5df379(0x101),'path':'.qoder/skills/lovrabet/SKILL.md','template':a184_0x5df379(0x109)}]},'codebuddy':{'name':a184_0x5df379(0x10d),'description':a184_0x5df379(0xfa),'folders':[a184_0x5df379(0xff)],'files':[{'type':'file','path':a184_0x5df379(0x11a),'template':a184_0x5df379(0x109)}]},'trae':{'name':a184_0x5df379(0x10e),'description':a184_0x5df379(0xef),'folders':['.trae'],'files':[{'type':a184_0x5df379(0x101),'path':a184_0x5df379(0xf4),'template':a184_0x5df379(0x109)}]}};function a184_0x1c39(_0x19ca72,_0x376897){_0x19ca72=_0x19ca72-0xec;const _0x1cafbb=a184_0x1caf();let _0x1c3963=_0x1cafbb[_0x19ca72];return _0x1c3963;}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'其他\x20(通用模板)','description':'通用模板\x20-\x20兜底方案','folders':[a184_0x5df379(0xf0)],'files':[{'type':'file','path':a184_0x5df379(0x119),'template':'SKILL.md.tpl'}]},'antigravity':{'name':a184_0x5df379(0xf8),'description':'Antigravity\x20IDE','folders':[a184_0x5df379(0xf0)],'files':[{'type':a184_0x5df379(0x101),'path':'.agent/skills/lovrabet/SKILL.md','template':a184_0x5df379(0x109)}]}};function a184_0x1caf(){const _0x25db41=['439280fEdlAp','agent','.trae/skills/lovrabet/SKILL.md','.cursorrules','.windsurf/workflows/rabetbase.md','Cline','Antigravity','541004FNIcgH','CodeBuddy\x20IDE','Windsurf','1030160tdCqwp','.claude/skills/lovrabet/SKILL.md','.cursor','.codebuddy','Cline\x20IDE','file','cline','Qoder\x20IDE','windsurf','.codex/skills/lovrabet/SKILL.md','codebuddy','Claude\x20Code','antigravity','SKILL.md.tpl','cursor','.qoder','.windsurf','CodeBuddy','Trae','claude','.cline','54KmJPVR','codex','4739540HIlTqo','opencode','31287XLohig','.opencode/skills/lovrabet/SKILL.md','84wSyRQQ','Cursor\x20IDE','.agent/skills/lovrabet/SKILL.md','.codebuddy/skills/lovrabet/SKILL.md','Qoder','Codex','187481tKaxbS','trae','qoder','.opencode','OpenCode','OpenCode\x20IDE','24IruAGR','.claude','Trae\x20IDE','.agent','1240965YAIxnT'];a184_0x1caf=function(){return _0x25db41;};return a184_0x1caf();}export const CORE_IDE_LIST=[a184_0x5df379(0x10f),'cline','codebuddy',a184_0x5df379(0x112),'cursor','opencode',a184_0x5df379(0x11f),a184_0x5df379(0x11e),a184_0x5df379(0x104)];export const IDE_LIST=[a184_0x5df379(0x108),a184_0x5df379(0x10f),a184_0x5df379(0x102),a184_0x5df379(0x106),a184_0x5df379(0x112),a184_0x5df379(0x10a),a184_0x5df379(0x114),a184_0x5df379(0x11f),a184_0x5df379(0x11e),'windsurf',a184_0x5df379(0xf3)];export const ALL_CORE_IDES=[a184_0x5df379(0x10a),'windsurf',a184_0x5df379(0x10f),a184_0x5df379(0x102),a184_0x5df379(0x112),a184_0x5df379(0x114),a184_0x5df379(0x11f),a184_0x5df379(0x106),'trae'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x11bfb6,_0x1d459b){const _0x34b4c9=a185_0xb484,_0x5c95ec=_0x11bfb6();while(!![]){try{const _0x3d945f=-parseInt(_0x34b4c9(0x168))/0x1+-parseInt(_0x34b4c9(0x167))/0x2*(-parseInt(_0x34b4c9(0x165))/0x3)+parseInt(_0x34b4c9(0x16d))/0x4+parseInt(_0x34b4c9(0x16f))/0x5*(parseInt(_0x34b4c9(0x166))/0x6)+parseInt(_0x34b4c9(0x16a))/0x7*(-parseInt(_0x34b4c9(0x16c))/0x8)+parseInt(_0x34b4c9(0x16b))/0x9*(parseInt(_0x34b4c9(0x16e))/0xa)+parseInt(_0x34b4c9(0x169))/0xb;if(_0x3d945f===_0x1d459b)break;else _0x5c95ec['push'](_0x5c95ec['shift']());}catch(_0x277472){_0x5c95ec['push'](_0x5c95ec['shift']());}}}(a185_0x3018,0x6252f));function a185_0xb484(_0x4e9aaa,_0x3a1134){_0x4e9aaa=_0x4e9aaa-0x165;const _0x301870=a185_0x3018();let _0xb4846e=_0x301870[_0x4e9aaa];return _0xb4846e;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a185_0x3018(){const _0x2a7c91=['7hbqOny','181971ZaoYzl','4857824ruGfev','1314096zeCMYn','310NAKZSp','205085SIuqSd','1268769kitZUW','6tRjyFZ','2XIJzUx','622225yhKKQR','2342285BephNc'];a185_0x3018=function(){return _0x2a7c91;};return a185_0x3018();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a186_0x1db0(_0x1da0be,_0x535b4a){_0x1da0be=_0x1da0be-0x1c3;const _0x173fbc=a186_0x173f();let _0x1db089=_0x173fbc[_0x1da0be];return _0x1db089;}(function(_0x2b7d2b,_0x5ca225){const _0x58532a=a186_0x1db0,_0x28b61a=_0x2b7d2b();while(!![]){try{const _0x276169=-parseInt(_0x58532a(0x1c3))/0x1+-parseInt(_0x58532a(0x1ce))/0x2+-parseInt(_0x58532a(0x1d5))/0x3*(-parseInt(_0x58532a(0x1cd))/0x4)+parseInt(_0x58532a(0x1c5))/0x5*(-parseInt(_0x58532a(0x1c7))/0x6)+-parseInt(_0x58532a(0x1cf))/0x7*(parseInt(_0x58532a(0x1cb))/0x8)+-parseInt(_0x58532a(0x1d2))/0x9*(-parseInt(_0x58532a(0x1c9))/0xa)+parseInt(_0x58532a(0x1ca))/0xb*(parseInt(_0x58532a(0x1d3))/0xc);if(_0x276169===_0x5ca225)break;else _0x28b61a['push'](_0x28b61a['shift']());}catch(_0x4b7956){_0x28b61a['push'](_0x28b61a['shift']());}}}(a186_0x173f,0x4e05c));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x4c4e24=a186_0x1db0,_0x32ee80=getTemplateBaseUrl(),_0x8969e=[_0x32ee80+'/config.json',_0x32ee80+_0x4c4e24(0x1c8)];for(const _0x1a81b6 of _0x8969e){try{const _0x830a49=await fetch(_0x1a81b6,{'headers':{'Accept':_0x4c4e24(0x1cc)}});if(!_0x830a49['ok'])continue;const _0x565912=await _0x830a49[_0x4c4e24(0x1d0)]();if(!_0x565912[_0x4c4e24(0x1c6)]?.['stableVersion']||!_0x565912[_0x4c4e24(0x1d1)]?.[_0x4c4e24(0x1c4)]?.[_0x4c4e24(0x1d4)])continue;return _0x565912;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x51bd64=Date['now']();if(hasCachedConfig){const _0x138ce5=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x51bd64-cacheTime<_0x138ce5)return cachedConfig;}const _0x44e600=await fetchCdnConfig();return cachedConfig=_0x44e600,cacheTime=_0x51bd64,hasCachedConfig=!![],_0x44e600;}function a186_0x173f(){const _0x2dc5b4=['3984eqlDrk','application/json','51276VWlwXh','115272DrBpfC','7833BvICZY','json','sdk','441IIKEdW','36TOBaoU','stableVersion','18BKFMLy','479805REozNt','node','1135rfWjUI','cli','8382KvigQv','/config/index.json','5010XAQiGi','5976443IeraBA'];a186_0x173f=function(){return _0x2dc5b4;};return a186_0x173f();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a187_0x14b6(){const _0x1260c6=['latest','npm\x20install\x20','stableVersion','sdk','version','2GZoqeH','\x1b[33m','↪\x20SDK\x20update\x20available','8734esIfLu','readFileSync','3493599QynXOT','some','5691753ONoyoZ','23240udafCE','@lovrabet/sdk','packageName','1.2.0','join','coerce','\x1b[0m','needsUpgrade','parse','2131843BWfbwG','existsSync','devDependencies','dependencies','node','package.json','10515PYxmUs','node_modules','log','test','all','\x20\x20\x20Stable\x20version:\x20','4084328OSdLGL','minVersion','\x1b[1m','850279aKLKbb','\x20\x20\x20Upgrade\x20command:\x20','utf-8','8CkUImh','1362mgsJDa','utf8'];a187_0x14b6=function(){return _0x1260c6;};return a187_0x14b6();}const a187_0x4b8e60=a187_0x2246;function a187_0x2246(_0x41d3e9,_0x7df0dd){_0x41d3e9=_0x41d3e9-0x1a2;const _0x14b69b=a187_0x14b6();let _0x224688=_0x14b69b[_0x41d3e9];return _0x224688;}(function(_0xe5513d,_0x445519){const _0x403c7f=a187_0x2246,_0x200c0c=_0xe5513d();while(!![]){try{const _0x157581=parseInt(_0x403c7f(0x1b2))/0x1+-parseInt(_0x403c7f(0x1bd))/0x2*(parseInt(_0x403c7f(0x1c2))/0x3)+-parseInt(_0x403c7f(0x1af))/0x4+-parseInt(_0x403c7f(0x1a9))/0x5*(-parseInt(_0x403c7f(0x1b6))/0x6)+-parseInt(_0x403c7f(0x1a3))/0x7*(-parseInt(_0x403c7f(0x1b5))/0x8)+-parseInt(_0x403c7f(0x1c4))/0x9+parseInt(_0x403c7f(0x1c5))/0xa*(parseInt(_0x403c7f(0x1c0))/0xb);if(_0x157581===_0x445519)break;else _0x200c0c['push'](_0x200c0c['shift']());}catch(_0x446ce7){_0x200c0c['push'](_0x200c0c['shift']());}}}(a187_0x14b6,0xa0fe9));import a187_0x448954 from'node:fs';import a187_0x321770 from'node:path';import a187_0x47937f from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a187_0x4b8e60(0x1c8);function isNonNumericVersion(_0x1ddd76){const _0x21ad91=a187_0x4b8e60,_0x1fa81d=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x1fa81d[_0x21ad91(0x1c3)](_0x1830b5=>_0x1830b5[_0x21ad91(0x1ac)](_0x1ddd76));}function getInstalledVersion(_0x252349,_0x209ea2){const _0x46903c=a187_0x4b8e60;try{const _0x2bc6db=a187_0x321770[_0x46903c(0x1c9)](_0x252349,_0x46903c(0x1aa),_0x209ea2,_0x46903c(0x1a8));if(a187_0x448954[_0x46903c(0x1a4)](_0x2bc6db)){const _0x51f1ba=JSON[_0x46903c(0x1a2)](a187_0x448954[_0x46903c(0x1c1)](_0x2bc6db,_0x46903c(0x1b4)));return _0x51f1ba['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x2a9f1c=a187_0x4b8e60;try{const _0x380c02=await getCdnConfig();return _0x380c02?.[_0x2a9f1c(0x1bb)]?.['node']?.[_0x2a9f1c(0x1ba)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x344cea=a187_0x4b8e60;try{const _0x1a2e66=await getCdnConfig();return _0x1a2e66?.[_0x344cea(0x1bb)]?.[_0x344cea(0x1a7)]?.[_0x344cea(0x1c7)]||_0x344cea(0x1c6);}catch{return _0x344cea(0x1c6);}}export async function checkSdkVersion(_0x26f85d){const _0x39e9ee=a187_0x4b8e60,_0x495fa0=a187_0x321770[_0x39e9ee(0x1c9)](_0x26f85d,'package.json'),[_0x5c8830,_0x1117c2]=await Promise[_0x39e9ee(0x1ad)]([getSdkStableVersion(),getSdkPackageName()]),_0x457dcb=_0x5c8830||FALLBACK_MIN_SDK_VERSION;if(!a187_0x448954[_0x39e9ee(0x1a4)](_0x495fa0))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x457dcb,'packageName':_0x1117c2,'stableVersion':_0x5c8830};try{const _0x22c51f=JSON[_0x39e9ee(0x1a2)](a187_0x448954[_0x39e9ee(0x1c1)](_0x495fa0,_0x39e9ee(0x1b7))),_0x5224d3=_0x22c51f[_0x39e9ee(0x1a6)]||{},_0x54e5d4=_0x22c51f[_0x39e9ee(0x1a5)]||{},_0x51b63c=_0x5224d3[_0x1117c2]||_0x54e5d4[_0x1117c2];if(!_0x51b63c)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x457dcb,'packageName':_0x1117c2,'stableVersion':_0x5c8830};let _0x1fec83=getInstalledVersion(_0x26f85d,_0x1117c2);!_0x1fec83&&(_0x1fec83=_0x51b63c);if(isNonNumericVersion(_0x51b63c))return{'installed':!![],'version':_0x1fec83,'needsUpgrade':![],'minVersion':_0x457dcb,'packageName':_0x1117c2,'stableVersion':_0x5c8830};const _0x4c7c2a=a187_0x47937f['coerce'](_0x1fec83),_0x334aa6=a187_0x47937f['coerce'](_0x457dcb),_0x22150f=_0x4c7c2a&&_0x334aa6?a187_0x47937f['lt'](_0x4c7c2a,_0x334aa6):![];return{'installed':!![],'version':_0x1fec83,'needsUpgrade':_0x22150f,'minVersion':_0x457dcb,'packageName':_0x1117c2,'stableVersion':_0x5c8830};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x457dcb,'packageName':_0x1117c2,'stableVersion':_0x5c8830};}}export function checkSdkVersionSync(_0x175e30){const _0x41d0aa=a187_0x4b8e60,_0x37e825=a187_0x321770['join'](_0x175e30,_0x41d0aa(0x1a8)),_0x5af2bc='@lovrabet/sdk';if(!a187_0x448954[_0x41d0aa(0x1a4)](_0x37e825))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5af2bc,'stableVersion':null};try{const _0x778198=JSON[_0x41d0aa(0x1a2)](a187_0x448954['readFileSync'](_0x37e825,'utf8')),_0x3dbd86=_0x778198[_0x41d0aa(0x1a6)]||{},_0xe781aa=_0x778198[_0x41d0aa(0x1a5)]||{},_0x260203=_0x3dbd86[_0x5af2bc]||_0xe781aa[_0x5af2bc];if(!_0x260203)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5af2bc,'stableVersion':null};let _0x3bcc55=getInstalledVersion(_0x175e30,_0x5af2bc);!_0x3bcc55&&(_0x3bcc55=_0x260203);if(isNonNumericVersion(_0x260203))return{'installed':!![],'version':_0x3bcc55,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5af2bc,'stableVersion':null};const _0x54930b=a187_0x47937f[_0x41d0aa(0x1ca)](_0x3bcc55),_0x157d9b=_0x54930b?a187_0x47937f['lt'](_0x54930b,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x3bcc55,'needsUpgrade':_0x157d9b,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5af2bc,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5af2bc,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x17b28d){const _0x1b8410=a187_0x4b8e60;if(!_0x17b28d[_0x1b8410(0x1cc)])return;const _0x11da55=_0x1b8410(0x1be),_0x1d7dfc=_0x1b8410(0x1cb),_0x28d0d3=_0x1b8410(0x1b1),_0x3b6d20=_0x17b28d[_0x1b8410(0x1c7)]||_0x1b8410(0x1c6),_0x3749ef=_0x17b28d[_0x1b8410(0x1ba)]||_0x17b28d[_0x1b8410(0x1b0)],_0x2d714b=_0x1b8410(0x1b9)+_0x3b6d20+'@'+(_0x3749ef||_0x1b8410(0x1b8));console[_0x1b8410(0x1ab)](),console[_0x1b8410(0x1ab)](''+_0x11da55+_0x28d0d3+_0x1b8410(0x1bf)+_0x1d7dfc),console['log'](_0x11da55+'\x20\x20\x20Current\x20version:\x20'+_0x3b6d20+'@'+_0x17b28d[_0x1b8410(0x1bc)]+_0x1d7dfc),console['log'](_0x11da55+_0x1b8410(0x1ae)+_0x3749ef+_0x1d7dfc),console[_0x1b8410(0x1ab)](_0x11da55+_0x1b8410(0x1b3)+_0x2d714b+_0x1d7dfc),console[_0x1b8410(0x1ab)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x9fd979,_0x68635e){const _0x3efbc5=a188_0x453b,_0x36a56d=_0x9fd979();while(!![]){try{const _0x24f211=parseInt(_0x3efbc5(0x159))/0x1+parseInt(_0x3efbc5(0x166))/0x2*(-parseInt(_0x3efbc5(0x14a))/0x3)+-parseInt(_0x3efbc5(0x150))/0x4+-parseInt(_0x3efbc5(0x15c))/0x5*(-parseInt(_0x3efbc5(0x152))/0x6)+-parseInt(_0x3efbc5(0x160))/0x7+parseInt(_0x3efbc5(0x143))/0x8+parseInt(_0x3efbc5(0x146))/0x9*(-parseInt(_0x3efbc5(0x144))/0xa);if(_0x24f211===_0x68635e)break;else _0x36a56d['push'](_0x36a56d['shift']());}catch(_0xc0fbfd){_0x36a56d['push'](_0x36a56d['shift']());}}}(a188_0x31be,0x54b39));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a188_0x4148f1 from'semver';function a188_0x31be(){const _0xf79691=['belowMinimum','\x20\x20\x20Current\x20CLI\x20version:\x20','1.0.0','\x1b[33m','latest','748592xLoiEd','\x1b[0m','186Rjgclz','package.json','\x20\x20\x20','Upgrade\x20command:\x20','minimumVersionMessage','Minimum\x20required:\x20','\x20\x20\x20Upgrade\x20command:\x20','484400ZjJwGT','\x20\x20\x20Stable\x20version:\x20','parse','104765YbVuVZ','currentVersion','stableVersion','version','4435116rrJNHy','↪\x20New\x20version\x20available','\x20\x20\x20Recommended\x20stable:\x20','log','minimumVersion','\x20\x20\x20Minimum\x20required:\x20','186PrXhmH','validation','2124328OYvJOw','170vDZzBE','upgradeMessage','120114HGbwLc','Current\x20version:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','coerce','159hYqwZH'];a188_0x31be=function(){return _0xf79691;};return a188_0x31be();}function a188_0x453b(_0x3b34ee,_0x29330e){_0x3b34ee=_0x3b34ee-0x142;const _0x31be8c=a188_0x31be();let _0x453b63=_0x31be8c[_0x3b34ee];return _0x453b63;}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x562296){const _0x572993=a188_0x453b,_0x16fbe9=_0x562296[_0x572993(0x15e)]||_0x572993(0x14f);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x16fbe9;}function getCurrentCliVersion(){const _0x2eb08a=a188_0x453b;try{const _0x15f1ce=fileURLToPath(import.meta.url),_0x522b8a=resolve(dirname(_0x15f1ce),'../..'),_0x3c4d83=resolve(_0x522b8a,_0x2eb08a(0x153)),_0x4591c1=JSON[_0x2eb08a(0x15b)](readFileSync(_0x3c4d83,'utf-8'));return _0x4591c1[_0x2eb08a(0x15f)]||_0x2eb08a(0x14d);}catch{return _0x2eb08a(0x14d);}}export async function checkCliVersion(){const _0x1db824=a188_0x453b,_0x46594=getCurrentCliVersion(),_0x57b6a6=await getCliVersionPolicy(),_0x272b3d=_0x57b6a6?.[_0x1db824(0x15e)]||null,_0x368345=_0x57b6a6?.['minimumVersion']||null;let _0x250613=![],_0x1d99f1=![];const _0x15f567=a188_0x4148f1['coerce'](_0x46594);if(_0x15f567&&_0x272b3d)try{const _0x423009=a188_0x4148f1[_0x1db824(0x149)](_0x272b3d);if(_0x423009)_0x250613=a188_0x4148f1['lt'](_0x15f567,_0x423009);}catch{}if(_0x15f567&&_0x368345)try{const _0x35c9e3=a188_0x4148f1[_0x1db824(0x149)](_0x368345);if(_0x35c9e3)_0x1d99f1=a188_0x4148f1['lt'](_0x15f567,_0x35c9e3);}catch{}return _0x1d99f1&&(_0x250613=!![]),{'currentVersion':_0x46594,'stableVersion':_0x272b3d,'minimumVersion':_0x368345,'needsUpgrade':_0x250613,'belowMinimum':_0x1d99f1,'isPreRelease':![],'upgradeMessage':_0x57b6a6?.[_0x1db824(0x145)],'minimumVersionMessage':_0x57b6a6?.[_0x1db824(0x156)]};}export function printCliUpgradeWarning(_0x24b6ef){const _0x15314e=a188_0x453b;if(!_0x24b6ef['needsUpgrade']&&!_0x24b6ef['belowMinimum'])return;const _0x4e00d5='\x1b[31m',_0x2738b0=_0x15314e(0x14e),_0x501ff7=_0x15314e(0x151),_0x16e268='\x1b[1m',_0x431867=getCliUpgradeCommand(_0x24b6ef);console[_0x15314e(0x163)](),_0x24b6ef[_0x15314e(0x14b)]?(console[_0x15314e(0x163)](''+_0x4e00d5+_0x16e268+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x501ff7),console[_0x15314e(0x163)](_0x4e00d5+_0x15314e(0x14c)+_0x24b6ef['currentVersion']+_0x501ff7),_0x24b6ef[_0x15314e(0x164)]&&console[_0x15314e(0x163)](_0x4e00d5+_0x15314e(0x165)+_0x24b6ef['minimumVersion']+_0x501ff7),_0x24b6ef[_0x15314e(0x15e)]&&_0x24b6ef[_0x15314e(0x15e)]!==_0x24b6ef['minimumVersion']&&console[_0x15314e(0x163)](_0x4e00d5+_0x15314e(0x162)+_0x24b6ef[_0x15314e(0x15e)]+_0x501ff7),_0x24b6ef['minimumVersionMessage']&&console[_0x15314e(0x163)](_0x4e00d5+_0x15314e(0x154)+_0x24b6ef['minimumVersionMessage']+_0x501ff7),console[_0x15314e(0x163)](_0x4e00d5+_0x15314e(0x158)+_0x431867+_0x501ff7)):(console[_0x15314e(0x163)](''+_0x2738b0+_0x16e268+_0x15314e(0x161)+_0x501ff7),console['log'](_0x2738b0+_0x15314e(0x14c)+_0x24b6ef[_0x15314e(0x15d)]+_0x501ff7),console[_0x15314e(0x163)](_0x2738b0+_0x15314e(0x15a)+_0x24b6ef[_0x15314e(0x15e)]+_0x501ff7),_0x24b6ef[_0x15314e(0x145)]&&console[_0x15314e(0x163)](_0x2738b0+_0x15314e(0x154)+_0x24b6ef[_0x15314e(0x145)]+_0x501ff7),console['log'](_0x2738b0+_0x15314e(0x158)+_0x431867+_0x501ff7)),console[_0x15314e(0x163)]();}export function assertCliVersionSupported(_0x22c632){const _0xe52a09=a188_0x453b;if(!_0x22c632[_0xe52a09(0x14b)])return;const _0x3ce4ff=[_0x22c632[_0xe52a09(0x156)],_0xe52a09(0x147)+_0x22c632['currentVersion'],_0x22c632[_0xe52a09(0x164)]?_0xe52a09(0x157)+_0x22c632[_0xe52a09(0x164)]:null,_0xe52a09(0x155)+getCliUpgradeCommand(_0x22c632)]['filter'](Boolean)['join']('\x0a');throw CliErrors[_0xe52a09(0x142)](_0xe52a09(0x148),_0x3ce4ff);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4aaa72,_0x10bab1){const _0x555bf1=a189_0x1a50,_0x3a9b7d=_0x4aaa72();while(!![]){try{const _0x3d6c45=-parseInt(_0x555bf1(0x159))/0x1*(parseInt(_0x555bf1(0x161))/0x2)+-parseInt(_0x555bf1(0x15f))/0x3+-parseInt(_0x555bf1(0x165))/0x4+-parseInt(_0x555bf1(0x168))/0x5+-parseInt(_0x555bf1(0x158))/0x6*(-parseInt(_0x555bf1(0x15e))/0x7)+-parseInt(_0x555bf1(0x157))/0x8+parseInt(_0x555bf1(0x167))/0x9;if(_0x3d6c45===_0x10bab1)break;else _0x3a9b7d['push'](_0x3a9b7d['shift']());}catch(_0x10a8b4){_0x3a9b7d['push'](_0x3a9b7d['shift']());}}}(a189_0x21c6,0x438a6));function a189_0x21c6(){const _0xdbd5c1=['now','object','338552vzzFnx','6iuFtmm','282yHYLwR','application/json','json','upgradeMessage','signal','1040109bnnYMs','1314207EFOiUp','minVersion','406HOItbS','stableVersion','cli','trim','1419928GwcnJt','minimumVersionMessage','11669373tEzEym','1379610ZBlRmL','latestVersion','recommendedVersion'];a189_0x21c6=function(){return _0xdbd5c1;};return a189_0x21c6();}import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x5ba2b9){const _0x504657=a189_0x1a50;return typeof _0x5ba2b9==='string'&&_0x5ba2b9[_0x504657(0x164)]()['length']>0x0?_0x5ba2b9['trim']():null;}function normalizeCliVersionPolicy(_0x234936){const _0x324bdc=a189_0x1a50;if(!_0x234936||typeof _0x234936!==_0x324bdc(0x156))return null;const _0x2fdbb5=_0x234936,_0x154699=_0x2fdbb5[_0x324bdc(0x163)]&&typeof _0x2fdbb5[_0x324bdc(0x163)]===_0x324bdc(0x156)?_0x2fdbb5[_0x324bdc(0x163)]:_0x2fdbb5,_0x5d9c7b=pickString(_0x154699[_0x324bdc(0x162)])||pickString(_0x154699[_0x324bdc(0x169)])||pickString(_0x154699[_0x324bdc(0x16a)]),_0x16d939=pickString(_0x154699['minimumVersion'])||pickString(_0x154699[_0x324bdc(0x160)]);if(!_0x5d9c7b&&!_0x16d939)return null;return{'stableVersion':_0x5d9c7b,'minimumVersion':_0x16d939,'upgradeMessage':pickString(_0x154699[_0x324bdc(0x15c)])||undefined,'minimumVersionMessage':pickString(_0x154699[_0x324bdc(0x166)])||undefined};}export async function fetchCliVersionPolicy(){const _0x55dc2e=a189_0x1a50,_0x3f4761=new AbortController(),_0x45f656=setTimeout(()=>_0x3f4761['abort'](),FETCH_TIMEOUT_MS);try{const _0x19dd9d=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x55dc2e(0x15a)},'signal':_0x3f4761[_0x55dc2e(0x15d)]});if(!_0x19dd9d['ok'])return null;const _0x1848c2=await _0x19dd9d[_0x55dc2e(0x15b)]();return normalizeCliVersionPolicy(_0x1848c2);}catch{return null;}finally{clearTimeout(_0x45f656);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x3c2c27=a189_0x1a50,_0x4b409a=Date[_0x3c2c27(0x155)]();if(hasCachedPolicy){const _0x193f9b=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x4b409a-cacheTime<_0x193f9b)return cachedPolicy;}const _0x4601c0=await fetchCliVersionPolicy();return cachedPolicy=_0x4601c0,cacheTime=_0x4b409a,hasCachedPolicy=!![],_0x4601c0;}function a189_0x1a50(_0x2e705c,_0x18b234){_0x2e705c=_0x2e705c-0x155;const _0x21c679=a189_0x21c6();let _0x1a5019=_0x21c679[_0x2e705c];return _0x1a5019;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10ef84,_0x1b8af8){const _0x32fa5b=a190_0x3f64,_0x519b72=_0x10ef84();while(!![]){try{const _0x3c9243=parseInt(_0x32fa5b(0x181))/0x1*(-parseInt(_0x32fa5b(0x17f))/0x2)+-parseInt(_0x32fa5b(0x185))/0x3*(parseInt(_0x32fa5b(0x17c))/0x4)+parseInt(_0x32fa5b(0x180))/0x5*(parseInt(_0x32fa5b(0x184))/0x6)+-parseInt(_0x32fa5b(0x183))/0x7+parseInt(_0x32fa5b(0x17d))/0x8+parseInt(_0x32fa5b(0x182))/0x9*(parseInt(_0x32fa5b(0x188))/0xa)+-parseInt(_0x32fa5b(0x186))/0xb*(parseInt(_0x32fa5b(0x187))/0xc);if(_0x3c9243===_0x1b8af8)break;else _0x519b72['push'](_0x519b72['shift']());}catch(_0x4a6c74){_0x519b72['push'](_0x519b72['shift']());}}}(a190_0x26b1,0x4940a));import{initEnv}from'../constant/env.js';function a190_0x3f64(_0x108a13,_0x491c65){_0x108a13=_0x108a13-0x17b;const _0x26b1e9=a190_0x26b1();let _0x3f6401=_0x26b1e9[_0x108a13];return _0x3f6401;}import{readRawConfig,getConfigAppCode as a190_0x5cddb9,getMultiAppConfigs as a190_0x159297,getTemplateBaseUrl as a190_0xb340d5}from'../context.js';function a190_0x26b1(){const _0x419441=['331791UVrAaL','198ZEwFzc','111828hePXVA','3040790yuDhVa','env','12emvGbm','4563664GUOlBM','string','2182XNHvUm','296095wCNmqR','12LZcntv','9wtBwKg','847623egjCIV','6oRJFzt'];a190_0x26b1=function(){return _0x419441;};return a190_0x26b1();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0xea33c5){const _0x40cc17=a190_0x3f64,_0x50f12d=readRawConfig(_0xea33c5);return _0x50f12d[_0x40cc17(0x17b)]&&typeof _0x50f12d[_0x40cc17(0x17b)]===_0x40cc17(0x17e)&&initEnv(_0x50f12d[_0x40cc17(0x17b)]),_0x50f12d;}export function getConfigAppCode(){return a190_0x5cddb9();}export function getMultiAppConfigs(_0x4e9a87='project'){return a190_0x159297(_0x4e9a87);}export function getTemplateBaseUrl(){return a190_0xb340d5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6b982d,_0x2add38){const _0x348330=a191_0x15db,_0xb63972=_0x6b982d();while(!![]){try{const _0x55b541=-parseInt(_0x348330(0x14f))/0x1+-parseInt(_0x348330(0x14d))/0x2*(-parseInt(_0x348330(0x145))/0x3)+parseInt(_0x348330(0x148))/0x4+parseInt(_0x348330(0x149))/0x5*(parseInt(_0x348330(0x142))/0x6)+parseInt(_0x348330(0x14b))/0x7*(parseInt(_0x348330(0x14c))/0x8)+-parseInt(_0x348330(0x141))/0x9*(-parseInt(_0x348330(0x14e))/0xa)+-parseInt(_0x348330(0x146))/0xb*(parseInt(_0x348330(0x143))/0xc);if(_0x55b541===_0x2add38)break;else _0xb63972['push'](_0xb63972['shift']());}catch(_0x3e8b41){_0xb63972['push'](_0xb63972['shift']());}}}(a191_0x8f0a,0xcacab));import a191_0x246f94 from'node:path';import a191_0x4eb710 from'node:fs';function a191_0x15db(_0x427759,_0x419e28){_0x427759=_0x427759-0x140;const _0x8f0af=a191_0x8f0a();let _0x15db8d=_0x8f0af[_0x427759];return _0x15db8d;}function a191_0x8f0a(){const _0x3e8c15=['isDirectory','3YFuZpi','298507WCXpFR','join','850012DsZedo','2741290pvNxLz','readdirSync','119LGYtuP','501448pyRUIx','1694434cckRhd','90670VNoTlf','1450741eTrumH','name','复制目录时出错:','copyFileSync','1620bYnVEb','18uiBUft','1380RZtlPZ'];a191_0x8f0a=function(){return _0x3e8c15;};return a191_0x8f0a();}export async function copyDirectory(_0x2e4869,_0x59e822){const _0x4fc1f0=a191_0x15db;try{const _0x259f68=a191_0x4eb710[_0x4fc1f0(0x14a)](_0x2e4869,{'withFileTypes':!![]});a191_0x4eb710['mkdirSync'](_0x59e822,{'recursive':!![]});for(const _0x1a59b4 of _0x259f68){const _0x22f14f=a191_0x246f94[_0x4fc1f0(0x147)](_0x2e4869,_0x1a59b4[_0x4fc1f0(0x150)]),_0x68a598=a191_0x246f94[_0x4fc1f0(0x147)](_0x59e822,_0x1a59b4[_0x4fc1f0(0x150)]);_0x1a59b4[_0x4fc1f0(0x144)]()?await copyDirectory(_0x22f14f,_0x68a598):a191_0x4eb710[_0x4fc1f0(0x140)](_0x22f14f,_0x68a598);}}catch(_0x1ac718){console['error'](_0x4fc1f0(0x151),_0x1ac718);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x257165,_0x203541){const _0xdcf1af=a192_0x3ebc,_0x3e3c0a=_0x257165();while(!![]){try{const _0x5d0721=-parseInt(_0xdcf1af(0xab))/0x1*(-parseInt(_0xdcf1af(0xb5))/0x2)+parseInt(_0xdcf1af(0xb9))/0x3+parseInt(_0xdcf1af(0xae))/0x4*(-parseInt(_0xdcf1af(0xb8))/0x5)+parseInt(_0xdcf1af(0xb7))/0x6*(parseInt(_0xdcf1af(0xb2))/0x7)+parseInt(_0xdcf1af(0xaf))/0x8*(-parseInt(_0xdcf1af(0xb0))/0x9)+parseInt(_0xdcf1af(0xaa))/0xa+-parseInt(_0xdcf1af(0xb3))/0xb*(parseInt(_0xdcf1af(0xad))/0xc);if(_0x5d0721===_0x203541)break;else _0x3e3c0a['push'](_0x3e3c0a['shift']());}catch(_0x271b48){_0x3e3c0a['push'](_0x3e3c0a['shift']());}}}(a192_0x11e7,0x3c72f));function a192_0x3ebc(_0x4a4648,_0x188acf){_0x4a4648=_0x4a4648-0xaa;const _0x11e756=a192_0x11e7();let _0x3ebca2=_0x11e756[_0x4a4648];return _0x3ebca2;}function toFiniteNumber(_0x1c8975){const _0x488975=a192_0x3ebc;if(typeof _0x1c8975===_0x488975(0xb6)&&Number[_0x488975(0xb1)](_0x1c8975))return _0x1c8975;if(typeof _0x1c8975===_0x488975(0xac)){const _0x2c2644=_0x1c8975['trim']();if(!_0x2c2644)return undefined;const _0x25bebd=Number(_0x2c2644);if(Number[_0x488975(0xb1)](_0x25bebd))return _0x25bebd;}return undefined;}function a192_0x11e7(){const _0x2f7294=['48AQFUfj','965435MzICcl','218523VyBHFw','1588300TYYnWb','3qpzsBB','string','1783836wcvcRq','8ixRCaV','400CrfcoX','33471oySHVB','isFinite','395843Zeqtau','11BmisZd','object','189542WDqoQT','number'];a192_0x11e7=function(){return _0x2f7294;};return a192_0x11e7();}export function normalizeEntityWithIdResponse(_0x36df7a){const _0x27ed0=a192_0x3ebc,_0x104c9f=toFiniteNumber(_0x36df7a);if(_0x104c9f!==undefined)return{'id':_0x104c9f,'entity':{'id':_0x104c9f}};if(!_0x36df7a||typeof _0x36df7a!==_0x27ed0(0xb4))return{'id':undefined,'entity':{}};const _0x3551bc={..._0x36df7a},_0x53b85d=toFiniteNumber(_0x3551bc['id']);return _0x53b85d!==undefined&&(_0x3551bc['id']=_0x53b85d),{'id':_0x53b85d,'entity':_0x3551bc};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e65b8,_0x2e3870){const _0x5428b9=a193_0x287f,_0x233423=_0x3e65b8();while(!![]){try{const _0x1f32b6=parseInt(_0x5428b9(0x1ae))/0x1*(-parseInt(_0x5428b9(0x1af))/0x2)+-parseInt(_0x5428b9(0x1ac))/0x3*(-parseInt(_0x5428b9(0x1ab))/0x4)+parseInt(_0x5428b9(0x1aa))/0x5*(parseInt(_0x5428b9(0x1a7))/0x6)+-parseInt(_0x5428b9(0x1a9))/0x7*(-parseInt(_0x5428b9(0x1ad))/0x8)+parseInt(_0x5428b9(0x1a3))/0x9+parseInt(_0x5428b9(0x1a4))/0xa*(-parseInt(_0x5428b9(0x1a6))/0xb)+-parseInt(_0x5428b9(0x1a5))/0xc;if(_0x1f32b6===_0x2e3870)break;else _0x233423['push'](_0x233423['shift']());}catch(_0x5a0521){_0x233423['push'](_0x233423['shift']());}}}(a193_0x252c,0x187cc));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x199285,_0x56a076){const _0x16d6a2=a193_0x287f,_0x4295de=statSync(_0x199285);if(_0x4295de[_0x16d6a2(0x1a8)]()){!existsSync(_0x56a076)&&mkdirSync(_0x56a076,{'recursive':!![]});const _0x26ed29=readdirSync(_0x199285);for(const _0x56e98d of _0x26ed29){await copyDir(join(_0x199285,_0x56e98d),join(_0x56a076,_0x56e98d));}}else copyFileSync(_0x199285,_0x56a076);}export function ensureDir(_0x468d51){!existsSync(_0x468d51)&&mkdirSync(_0x468d51,{'recursive':!![]});}export function pathExists(_0x572af1){return existsSync(_0x572af1);}function a193_0x287f(_0x44dded,_0x1dcd46){_0x44dded=_0x44dded-0x1a3;const _0x252c18=a193_0x252c();let _0x287fe6=_0x252c18[_0x44dded];return _0x287fe6;}function a193_0x252c(){const _0x2cf038=['129WmhavU','10640rUFstX','1HzKNsb','341872ighgRt','594972FlCDFz','57040HcExAd','126528WFlYag','209tRQJtm','142248rWfTiM','isDirectory','637RzeHVu','5bCxUuK','16680yGzNNa'];a193_0x252c=function(){return _0x2cf038;};return a193_0x252c();}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x56c787=a194_0x1cba;(function(_0x142784,_0x37b358){const _0x4dfd47=a194_0x1cba,_0x40e2ff=_0x142784();while(!![]){try{const _0x103f1f=parseInt(_0x4dfd47(0x1cf))/0x1+-parseInt(_0x4dfd47(0x1c9))/0x2+-parseInt(_0x4dfd47(0x1d4))/0x3+-parseInt(_0x4dfd47(0x1d7))/0x4*(-parseInt(_0x4dfd47(0x1c5))/0x5)+-parseInt(_0x4dfd47(0x1d2))/0x6*(parseInt(_0x4dfd47(0x1ce))/0x7)+parseInt(_0x4dfd47(0x1d6))/0x8*(parseInt(_0x4dfd47(0x1bd))/0x9)+-parseInt(_0x4dfd47(0x1c1))/0xa;if(_0x103f1f===_0x37b358)break;else _0x40e2ff['push'](_0x40e2ff['shift']());}catch(_0x461b37){_0x40e2ff['push'](_0x40e2ff['shift']());}}}(a194_0x4b02,0xdac0a));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';function a194_0x1cba(_0x2aeb7a,_0x30a074){_0x2aeb7a=_0x2aeb7a-0x1ba;const _0x4b0294=a194_0x4b02();let _0x1cbabe=_0x4b0294[_0x2aeb7a];return _0x1cbabe;}import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x4a9b58=getTemplateBaseUrl();return _0x4a9b58+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a194_0x56c787(0x1cd),'cache');export async function fetchGuidesFromCDN(){const _0xa7163=a194_0x56c787,_0xeda7a2=getGuidesCdnUrl(),_0x14fcd6=await fetch(_0xeda7a2,{'headers':{'Accept':_0xa7163(0x1ba)}});if(!_0x14fcd6['ok'])throw new Error(_0xa7163(0x1cc)+_0x14fcd6[_0xa7163(0x1c7)]+'\x20'+_0x14fcd6[_0xa7163(0x1d8)]);const _0x51c039=await _0x14fcd6['json']();if(!_0x51c039['guides']||typeof _0x51c039[_0xa7163(0x1c2)]!=='object')throw new Error(_0xa7163(0x1c3));return _0x51c039;}export function writeGuidesToProject(_0x3f257d,_0x3ea4f6,_0x3a873f=a194_0x56c787(0x1bb),_0x2296d8){const _0x5dfe2f=a194_0x56c787,_0x51f46b=join(_0x3ea4f6,_0x3a873f);mkdirSync(_0x51f46b,{'recursive':!![]});for(const [_0x4adabb,_0x8cf78]of Object[_0x5dfe2f(0x1d5)](_0x3f257d['guides'])){let _0x3dc9dd=_0x8cf78[_0x5dfe2f(0x1d3)];_0x8cf78[_0x5dfe2f(0x1cb)]&&(_0x3dc9dd=appendUpdateTime(_0x3dc9dd,_0x8cf78[_0x5dfe2f(0x1cb)])),writeFileSync(join(_0x51f46b,_0x4adabb+_0x5dfe2f(0x1bc)),_0x3dc9dd,_0x5dfe2f(0x1bf));}}export function appendUpdateTime(_0x5c064c,_0x1331b0){const _0xa8e594=a194_0x56c787;return _0x5c064c=_0x5c064c['replace'](/\n*>更新时间:.*$/m,''),_0x5c064c[_0xa8e594(0x1d0)]()+(_0xa8e594(0x1c6)+_0x1331b0);}export function getSkillTemplate(_0x54a9d7){const _0xf15514=a194_0x56c787;return _0x54a9d7[_0xf15514(0x1c0)]?.[_0xf15514(0x1d3)]||'';}function a194_0x4b02(){const _0x279005=['.lovrabet','14896wuUltI','1218151aeZUay','trimEnd','CDN\x20数据中缺少\x20skillTemplate','264gHIGmY','content','978921qkCNbC','entries','920yjMwfV','239116xnRIKY','statusText','extendContent','application/json','.lovrabet/skill/guides','.md','72531VxMGRE','keys','utf-8','skillTemplate','21043670ZhaeBu','guides','CDN\x20返回数据格式错误','join','115NfCwpO','\x0a\x0a>更新时间:','status','length','199074dlSyYp','map','lastUpdated','CDN\x20请求失败:\x20'];a194_0x4b02=function(){return _0x279005;};return a194_0x4b02();}export function appendExtendContents(_0x3a9645,_0x45d7c9,_0x3ec6bd){const _0x1255b0=a194_0x56c787,_0x1c8919=[];for(const [,_0x3fc2e3]of Object[_0x1255b0(0x1d5)](_0x45d7c9[_0x1255b0(0x1c2)])){_0x3fc2e3[_0x1255b0(0x1d9)]&&_0x1c8919['push'](_0x3fc2e3[_0x1255b0(0x1d9)][_0x1255b0(0x1d0)]());}if(_0x1c8919[_0x1255b0(0x1c8)]===0x0)return _0x3a9645;return _0x3a9645[_0x1255b0(0x1d0)]()+'\x0a\x0a'+_0x1c8919[_0x1255b0(0x1c4)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x3bc49e,_0x3d8333,_0x4c2414){const _0x23b139=a194_0x56c787,_0x49c4d9=getSkillTemplate(_0x3bc49e);if(!_0x49c4d9)throw new Error(_0x23b139(0x1d1));const _0x4eda=dirname(_0x3d8333);mkdirSync(_0x4eda,{'recursive':!![]});let _0x2d9907=_0x49c4d9['replace'](/\{\{IDE_NAME\}\}/g,_0x4c2414);_0x2d9907=appendExtendContents(_0x2d9907,_0x3bc49e),_0x3bc49e[_0x23b139(0x1c0)][_0x23b139(0x1cb)]&&(_0x2d9907=appendUpdateTime(_0x2d9907,_0x3bc49e[_0x23b139(0x1c0)]['lastUpdated'])),writeFileSync(_0x3d8333,_0x2d9907,_0x23b139(0x1bf));}export async function installGuides(_0x1be47d){const _0x489bf4=a194_0x56c787,_0x217194=await fetchGuidesFromCDN();return writeGuidesToProject(_0x217194,_0x1be47d),Object[_0x489bf4(0x1be)](_0x217194['guides'])['length'];}export function getGuidesSummary(_0x10db91){const _0x566826=a194_0x56c787;return Object['entries'](_0x10db91['guides'])[_0x566826(0x1ca)](([_0x1baaa4,_0x4d0419])=>({'key':_0x1baaa4,'title':_0x4d0419['title'],'path':_0x4d0419['path']}));}
|