@lovrabet/rabetbase-cli 2.3.6 → 2.3.7-beta.2
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.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-skill/index.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -0
- 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/business-group-update.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 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -0
- package/lib/commands/db/analyze-batch-plan.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/file/index.js +1 -0
- 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/list.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/relation-audit.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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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/update-notice.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/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a210_0x2e0fb6=a210_0x10ef;(function(_0x34071e,_0x41ce85){const _0x266d83=a210_0x10ef,_0x50b21a=_0x34071e();while(!![]){try{const _0x5397dd=-parseInt(_0x266d83(0x173))/0x1*(-parseInt(_0x266d83(0x152))/0x2)+parseInt(_0x266d83(0x166))/0x3+parseInt(_0x266d83(0x150))/0x4*(parseInt(_0x266d83(0x16d))/0x5)+parseInt(_0x266d83(0x175))/0x6+-parseInt(_0x266d83(0x161))/0x7+parseInt(_0x266d83(0x155))/0x8+parseInt(_0x266d83(0x187))/0x9*(-parseInt(_0x266d83(0x15c))/0xa);if(_0x5397dd===_0x41ce85)break;else _0x50b21a['push'](_0x50b21a['shift']());}catch(_0x19e636){_0x50b21a['push'](_0x50b21a['shift']());}}}(a210_0x2453,0x3d733));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a210_0x52a5a1}from'../utils/is-non-interactive.js';function a210_0x2453(){const _0xad79d6=['pretty','format','object','644454EnkkmG','has','trim','apps','configMissing','defaultVerbose','apiDir','1298090JZIwwY','filter','hasFormat','explicitAppName','verbose','command','1pteoCu','rawFlags','805890utKLBe','defaultPageSize','validation','selectedAppName','service','resolveApiDomain','execute','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','cancelled','name','appCode','_notice','schema','none','⚠\x20\x20High-risk\x20operation:\x20','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','required','pageSize','81wgwXzF','\x20\x20\x20Continue?\x20[y/N]\x20','string','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','4hrkeQd','value','664854lFKqjQ','nonInteractive','riskLevel','88448uMzjiP','Current\x20resolved\x20appcode\x20is\x20\x22','map','RABETBASE_APPCODE','requiresAppCode','cookie','catch','759830vsPdjh','resolveCookie','LOVRABET_APPCODE','isNonInteractive','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','116816Zfcppi','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20'];a210_0x2453=function(){return _0xad79d6;};return a210_0x2453();}import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function a210_0x10ef(_0x1859bf,_0x10b1b6){_0x1859bf=_0x1859bf-0x14e;const _0x245358=a210_0x2453();let _0x10ef9b=_0x245358[_0x1859bf];return _0x10ef9b;}function stringFlag(_0x39f57b){const _0x1959c4=a210_0x10ef;return typeof _0x39f57b===_0x1959c4(0x14e)&&_0x39f57b['trim']()?_0x39f57b[_0x1959c4(0x168)]():undefined;}function resolveEnvAppCode(){const _0x324549=a210_0x10ef,_0xb150fd=stringFlag(process.env.RABETBASE_APPCODE);if(_0xb150fd)return{'name':_0x324549(0x158),'value':_0xb150fd};const _0x215c61=stringFlag(process.env.LOVRABET_APPCODE);if(_0x215c61)return{'name':_0x324549(0x15e),'value':_0x215c61};return undefined;}function hasExplicitAppCode(_0x5def0a,_0x378ab7){return!!(stringFlag(_0x5def0a['appcode'])||stringFlag(_0x378ab7['appcode']));}function assertEnvAppCodeNotIgnored(_0x4c8112,_0x3d8304,_0x32a5a4){const _0x2c8425=a210_0x10ef;if(!_0x3d8304||_0x32a5a4||_0x4c8112===_0x3d8304[_0x2c8425(0x151)])return;const _0x3f60fe=_0x4c8112?_0x2c8425(0x156)+_0x4c8112+'\x22.':_0x2c8425(0x14f);throw CliErrors['validation'](_0x3d8304['name']+'='+_0x3d8304[_0x2c8425(0x151)]+_0x2c8425(0x162)+_0x3f60fe+'\x20'+(_0x2c8425(0x17c)+_0x3d8304[_0x2c8425(0x17e)]+'\x22.'));}export function createPipelineEnv(_0x533d57,_0x40d5ea,_0x44834c=[]){const _0x10e9d2=a210_0x10ef;return{'rawFlags':_0x40d5ea,'args':_0x44834c,'resolveAppCode':()=>_0x533d57[_0x10e9d2(0x17f)],'resolveCookie':()=>_0x533d57[_0x10e9d2(0x15a)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a210_0x52a5a1(_0x40d5ea),'defaultFormat':_0x533d57[_0x10e9d2(0x164)],'defaultPageSize':_0x533d57[_0x10e9d2(0x186)],'defaultVerbose':_0x533d57[_0x10e9d2(0x171)],'apiDir':_0x533d57[_0x10e9d2(0x16c)],'riskLevel':_0x533d57[_0x10e9d2(0x154)],'selectedAppName':_0x533d57[_0x10e9d2(0x170)],'mergedCli':{'defaultApp':_0x533d57['defaultApp'],'currentApp':_0x533d57['currentApp'],'appCode':_0x533d57[_0x10e9d2(0x17f)],'apps':_0x533d57[_0x10e9d2(0x169)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a210_0x2e0fb6(0x16e)](_0x3076e8=>PIPELINE_FLAG_NAMES[a210_0x2e0fb6(0x167)](_0x3076e8[a210_0x2e0fb6(0x17e)]))[a210_0x2e0fb6(0x157)](({name:_0x2574c8,type:_0x475489,description:_0x127f98})=>({'name':_0x2574c8,'type':_0x475489,'description':_0x127f98})),'formatOutput':formatOutput,'getCommandLabel'(_0x3d795f){const _0x417436=a210_0x2e0fb6;return CLI_BIN_NAME+'\x20'+_0x3d795f[_0x417436(0x179)]+'\x20'+_0x3d795f[_0x417436(0x172)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x4bc96c){const _0x5843dc=a210_0x2e0fb6;return CliErrors[_0x5843dc(0x177)](_0x4bc96c);}},async 'prepare'(_0x5c6067,_0x4753e1,_0x3caddd,_0x36c6f8){const _0x1777c4=a210_0x2e0fb6,_0xad74d=_0x4753e1[_0x1777c4(0x16c)]||DEFAULT_API_DIR;resolveAliasToCode(_0x5c6067,_0x3caddd,_0xad74d,_0x36c6f8);const _0x1565f8=resolveCommandAuthMode(_0x5c6067);let _0x42884a='';if(_0x1565f8!==_0x1777c4(0x182)){_0x42884a=_0x4753e1[_0x1777c4(0x15d)]()||'';if(!_0x42884a){if(_0x1565f8===_0x1777c4(0x185))throw CliErrors['authRequired']();}else{const {setActiveCookie:_0x46ad41}=await import('../core/api-client.js');_0x46ad41(_0x42884a);}}const _0x40ae3b=_0x4753e1['resolveAppCode']()??'';if(_0x5c6067[_0x1777c4(0x159)]!==![]){assertEnvAppCodeNotIgnored(_0x40ae3b,resolveEnvAppCode(),hasExplicitAppCode(_0x3caddd,_0x4753e1[_0x1777c4(0x174)]));if(!_0x40ae3b)throw CliErrors[_0x1777c4(0x16a)]('Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+_0x1777c4(0x184));}return{'defaults':{'booleans':{'verbose':_0x4753e1[_0x1777c4(0x16b)]},'numbers':{'pagesize':_0x4753e1[_0x1777c4(0x176)]}},'extras':{'appCode':_0x40ae3b,'cookie':_0x42884a,'apiDomain':_0x4753e1[_0x1777c4(0x17a)](),'apiDir':_0xad74d,'selectedAppName':_0x4753e1[_0x1777c4(0x178)],'mergedCli':_0x4753e1['mergedCli']}};},async 'confirmHighRisk'({env:_0xff756,commandLabel:_0x519a69}){const _0x662e86=a210_0x2e0fb6;if(_0xff756[_0x662e86(0x15f)])throw CliErrors['validation']('High-risk\x20operation\x20`'+_0x519a69+_0x662e86(0x160));await requireConfirmationPrompt({'lines':[_0x662e86(0x183)+_0x519a69,_0x662e86(0x188)],'createCancelledError':_0x5bfa1b=>CliErrors[_0x662e86(0x17d)](_0x5bfa1b)});},async 'finalize'(){const {clearActiveCookie:_0x3705ed}=await import('../core/api-client.js');_0x3705ed();}};export async function runCommand(_0x525dcd,_0x1eb9d6){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x525dcd)?withUpdateNotice(_0x525dcd):_0x525dcd,_0x1eb9d6,runnerAdapter);}function shouldAttachUpdateNotice(_0x18faea){const _0x2df3fa=a210_0x2e0fb6;if(_0x18faea[_0x2df3fa(0x16f)]===![])return![];return!['update',_0x2df3fa(0x181),'doctor']['includes'](_0x18faea[_0x2df3fa(0x179)]);}function withUpdateNotice(_0x4de77c){return{..._0x4de77c,async 'execute'(_0x101afb){const _0x29ed82=a210_0x10ef,_0x587d07=shouldResolveUpdateNotice(_0x101afb)?resolveLatestUpdateNotice()[_0x29ed82(0x15b)](()=>null):Promise['resolve'](null),_0x3ca825=await _0x4de77c[_0x29ed82(0x17b)](_0x101afb);return attachUpdateNotice(_0x3ca825,await _0x587d07);}};}function shouldResolveUpdateNotice(_0x6a6366){const _0x16c389=a210_0x2e0fb6;return _0x6a6366[_0x16c389(0x164)]===_0x16c389(0x163)&&!_0x6a6366[_0x16c389(0x153)];}function attachUpdateNotice(_0x1395a6,_0x55f564){const _0x17f46b=a210_0x2e0fb6;if(!_0x55f564||!_0x1395a6||typeof _0x1395a6!==_0x17f46b(0x165))return _0x1395a6;const _0xf12cc6=_0x1395a6,_0x85d1dd=typeof _0xf12cc6['_notice']===_0x17f46b(0x165)&&_0xf12cc6[_0x17f46b(0x180)]!==null?_0xf12cc6[_0x17f46b(0x180)]:{};return{..._0xf12cc6,'_notice':{..._0x85d1dd,'update':_0x55f564}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7f729,_0x4ca48a){const _0x2f9349=a211_0x1003,_0x148a0f=_0x7f729();while(!![]){try{const _0x200631=parseInt(_0x2f9349(0xd2))/0x1+parseInt(_0x2f9349(0xd0))/0x2*(parseInt(_0x2f9349(0xd7))/0x3)+parseInt(_0x2f9349(0xd1))/0x4+-parseInt(_0x2f9349(0xd5))/0x5*(-parseInt(_0x2f9349(0xd6))/0x6)+parseInt(_0x2f9349(0xcd))/0x7+-parseInt(_0x2f9349(0xcf))/0x8*(parseInt(_0x2f9349(0xce))/0x9)+-parseInt(_0x2f9349(0xd3))/0xa;if(_0x200631===_0x4ca48a)break;else _0x148a0f['push'](_0x148a0f['shift']());}catch(_0x543579){_0x148a0f['push'](_0x148a0f['shift']());}}}(a211_0x4d86,0xd5bbe));import{buildSchemaPayload as a211_0x33f999}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a211_0x4d86(){const _0x2a2719=['1191678nhxvhO','3486891eQuGML','9778293YIMDhm','5301gNjOTj','5360trmNeO','2wOsxvw','540412RsWBxT','382453NiYfEr','22038940UdXhId','../commands/registry.js','10OAZNki'];a211_0x4d86=function(){return _0x2a2719;};return a211_0x4d86();}function a211_0x1003(_0x4ce0a8,_0x5e3d9c){_0x4ce0a8=_0x4ce0a8-0xcd;const _0x4d86e0=a211_0x4d86();let _0x1003c0=_0x4d86e0[_0x4ce0a8];return _0x1003c0;}import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x3e67b9=a211_0x1003,{serviceRegistry:_0x36ca47,findDefinition:_0x33c20e}=await import(_0x3e67b9(0xd4));return a211_0x33f999({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x36ca47,'buildAllFlags':buildAllFlags,'findDefinition':_0x33c20e});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a212_0x5e05(_0x51473f,_0x2af9bb){_0x51473f=_0x51473f-0x1ce;var _0x327030=a212_0x3270();var _0x5e05ba=_0x327030[_0x51473f];return _0x5e05ba;}function a212_0x3270(){var _0x2102d3=['196749bVopsp','144LNZXsk','322289WScbln','66820tHdUAU','1688036MUUUdX','11623912PQybEI','1857783dBoJTW','177924BeadYJ'];a212_0x3270=function(){return _0x2102d3;};return a212_0x3270();}(function(_0x554399,_0x55da3f){var _0x4e2a36=a212_0x5e05,_0x1d18c2=_0x554399();while(!![]){try{var _0xc99d49=-parseInt(_0x4e2a36(0x1d2))/0x1+-parseInt(_0x4e2a36(0x1cf))/0x2+-parseInt(_0x4e2a36(0x1ce))/0x3+-parseInt(_0x4e2a36(0x1d4))/0x4+parseInt(_0x4e2a36(0x1d3))/0x5*(parseInt(_0x4e2a36(0x1d1))/0x6)+parseInt(_0x4e2a36(0x1d0))/0x7+parseInt(_0x4e2a36(0x1d5))/0x8;if(_0xc99d49===_0x55da3f)break;else _0x1d18c2['push'](_0x1d18c2['shift']());}catch(_0x379260){_0x1d18c2['push'](_0x1d18c2['shift']());}}}(a212_0x3270,0x5547f));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a213_0x440fc7=a213_0x148d;(function(_0x2d3f05,_0x271586){const _0x2dfeb9=a213_0x148d,_0x5f4ced=_0x2d3f05();while(!![]){try{const _0x3c07fc=parseInt(_0x2dfeb9(0x1e3))/0x1*(-parseInt(_0x2dfeb9(0x1d9))/0x2)+-parseInt(_0x2dfeb9(0x1da))/0x3*(-parseInt(_0x2dfeb9(0x1e0))/0x4)+-parseInt(_0x2dfeb9(0x1db))/0x5+-parseInt(_0x2dfeb9(0x1df))/0x6+parseInt(_0x2dfeb9(0x1e2))/0x7*(parseInt(_0x2dfeb9(0x1dd))/0x8)+-parseInt(_0x2dfeb9(0x1d7))/0x9*(parseInt(_0x2dfeb9(0x1d8))/0xa)+parseInt(_0x2dfeb9(0x1de))/0xb;if(_0x3c07fc===_0x271586)break;else _0x5f4ced['push'](_0x5f4ced['shift']());}catch(_0x165114){_0x5f4ced['push'](_0x5f4ced['shift']());}}}(a213_0xd5a0,0xb39d0));export const VERSION='2.3.7-beta.2';export const GIT_TAG=a213_0x440fc7(0x1e1);function a213_0x148d(_0x28cd40,_0x28c3d3){_0x28cd40=_0x28cd40-0x1d6;const _0xd5a0db=a213_0xd5a0();let _0x148d38=_0xd5a0db[_0x28cd40];return _0x148d38;}function a213_0xd5a0(){const _0x4e0aab=['24wGVMTt','44203280GZaSrB','5219742ubKFWc','15220nnTWaO','v2.3.7-beta.2','433923xrsbvh','6558nlPqnS','2026-07-18T08:56:50.915Z','17622MMWpAg','2830LZrvKk','426bGhpNm','15ygWeVu','3334255axuMzH','e04430a'];a213_0xd5a0=function(){return _0x4e0aab;};return a213_0xd5a0();}export const GIT_COMMIT=a213_0x440fc7(0x1dc);export const BUILD_TIME=a213_0x440fc7(0x1d6);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4098ef,_0xb084a4){var _0x888587=a214_0x5255,_0x1f08bb=_0x4098ef();while(!![]){try{var _0x36e003=parseInt(_0x888587(0xdc))/0x1*(parseInt(_0x888587(0xe0))/0x2)+-parseInt(_0x888587(0xdb))/0x3+-parseInt(_0x888587(0xe1))/0x4+parseInt(_0x888587(0xd8))/0x5+parseInt(_0x888587(0xdf))/0x6*(-parseInt(_0x888587(0xdd))/0x7)+-parseInt(_0x888587(0xd9))/0x8*(parseInt(_0x888587(0xde))/0x9)+-parseInt(_0x888587(0xda))/0xa*(-parseInt(_0x888587(0xe3))/0xb);if(_0x36e003===_0xb084a4)break;else _0x1f08bb['push'](_0x1f08bb['shift']());}catch(_0x1506e9){_0x1f08bb['push'](_0x1f08bb['shift']());}}}(a214_0x2e37,0x6bc55));import a214_0x5655e7 from'chalk';function a214_0x5255(_0x1c12c6,_0x29ef86){_0x1c12c6=_0x1c12c6-0xd8;var _0x2e37b3=a214_0x2e37();var _0x525579=_0x2e37b3[_0x1c12c6];return _0x525579;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x4890ba=a214_0x5255;console[_0x4890ba(0xe7)](),console[_0x4890ba(0xe7)](a214_0x5655e7['green'][_0x4890ba(0xe6)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x4890ba(0xe7)](),console[_0x4890ba(0xe7)]('\x20\x20Use\x20'+a214_0x5655e7[_0x4890ba(0xe2)][_0x4890ba(0xe6)](CLI_BIN_NAME+_0x4890ba(0xe5))+_0x4890ba(0xe4)),console['log']();}function a214_0x2e37(){var _0x16e7d5=['552YbleEw','11930xSnkED','2987976ArnBxL','green','12393117IqXzvE','\x20to\x20view\x20available\x20commands.','\x20--help','bold','log','2121050KVSeUp','56168eEpYzs','10AZgndy','622548TsmAuW','61tcwakQ','37870BWRjlZ','27ziUUCU'];a214_0x2e37=function(){return _0x16e7d5;};return a214_0x2e37();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x2cee97,_0x7f55d3){const _0x4839ac=a215_0x2e23,_0x4ff212=_0x2cee97();while(!![]){try{const _0x325a71=-parseInt(_0x4839ac(0x1b0))/0x1+parseInt(_0x4839ac(0x1a7))/0x2*(-parseInt(_0x4839ac(0x1ac))/0x3)+parseInt(_0x4839ac(0x1ad))/0x4+-parseInt(_0x4839ac(0x196))/0x5*(parseInt(_0x4839ac(0x19e))/0x6)+parseInt(_0x4839ac(0x197))/0x7+parseInt(_0x4839ac(0x195))/0x8+-parseInt(_0x4839ac(0x1a3))/0x9*(-parseInt(_0x4839ac(0x1ae))/0xa);if(_0x325a71===_0x7f55d3)break;else _0x4ff212['push'](_0x4ff212['shift']());}catch(_0x2affcc){_0x4ff212['push'](_0x4ff212['shift']());}}}(a215_0x1feb,0x7cb09));function a215_0x1feb(){const _0x1c6d2e=['486332SEPfFG','enable-bff-save','length','log','from','7058024gTFPDz','5YseYUk','3901800WCPIGH','--help','argv','setLogPath','Equivalent\x20command:\x20','includes','slice','5442852LCFcrH','startsWith','add','skill','\x0aAvailable\x20commands:','9706014UQrqZB','error','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/rabetbase/guides/.\x0a','dangerously-bff-save','6hRyiHd','entries','Error:\x20Unsupported\x20command:\x20','cwd','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','735603JJsDsh','486828ZGxWDp','10SjwUpF','-$1'];a215_0x1feb=function(){return _0x1c6d2e;};return a215_0x1feb();}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(_0x25ad34){const _0x2003d5=a215_0x2e23,_0x588111=[];for(const [_0x365dcc,_0x2ae9a7]of Object[_0x2003d5(0x1a8)](_0x25ad34)){if(_0x2ae9a7===!![]){const _0x41c24e=_0x365dcc['replace'](/([A-Z])/g,_0x2003d5(0x1af))['toLowerCase']();_0x588111['push'](_0x41c24e);}}return _0x588111;}export function parseDynamicFlags(){const _0x28c3c0=a215_0x2e23,_0x598157=[];for(let _0x34a310=0x3;_0x34a310<process[_0x28c3c0(0x199)][_0x28c3c0(0x1b2)];_0x34a310++){const _0x3c23eb=process[_0x28c3c0(0x199)][_0x34a310];if(_0x3c23eb&&_0x3c23eb[_0x28c3c0(0x19f)]('--')){const _0x500c4d=_0x3c23eb[_0x28c3c0(0x19d)](0x2);_0x500c4d&&!_0x500c4d[_0x28c3c0(0x19c)]('=')&&_0x598157['push'](_0x500c4d);}}return _0x598157;}export function getAllProvidedFlags(_0x4005e3){const _0x1544e1=a215_0x2e23,_0x3c9880=camelCaseFlagsToKebab(_0x4005e3),_0x114545=parseDynamicFlags(),_0x3c81c0=new Set([..._0x3c9880,..._0x114545]);return Array[_0x1544e1(0x194)](_0x3c81c0);}export function normalizeLegacyBffSaveFlags(_0x7497d){const _0x354863=a215_0x2e23,_0x203e2c=new Set(_0x7497d);return _0x203e2c['has'](_0x354863(0x1a6))&&_0x203e2c[_0x354863(0x1a0)](_0x354863(0x1b1)),Array['from'](_0x203e2c);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a215_0x2e23(_0x44eb0c,_0x1d22d9){_0x44eb0c=_0x44eb0c-0x193;const _0x1feb17=a215_0x1feb();let _0x2e2318=_0x1feb17[_0x44eb0c];return _0x2e2318;}export async function skillsCommand(_0x1502ea,_0x52ee39,_0x36d3eb){const _0x5e0455=a215_0x2e23;logger[_0x5e0455(0x19a)](process[_0x5e0455(0x1aa)]());if(_0x36d3eb?.['help']||_0x1502ea===_0x5e0455(0x198)){showHelp();return;}console[_0x5e0455(0x1a4)](_0x5e0455(0x1a9)+(_0x1502ea||'(empty)')),console['log'](_0x5e0455(0x1a2)),console[_0x5e0455(0x193)]('\x20\x20'+CLI_BIN_NAME+_0x5e0455(0x1ab)),console['log'](''),console['log'](_0x5e0455(0x19b)+SKILLS_INSTALL_COMMAND_LINE),logger['error'](_0x5e0455(0x1a1),'不支持的命令:\x20'+_0x1502ea),process['exit'](0x1);}function showHelp(){const _0x1d3dd3=a215_0x2e23;console[_0x1d3dd3(0x193)]('\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+'\x20cli-skill\x20install\x0a\x0aEquivalent\x20command:\x20'+SKILLS_INSTALL_COMMAND_LINE+_0x1d3dd3(0x1a5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a216_0x49b05d=a216_0x4442;(function(_0x122f74,_0x5b843b){const _0x248179=a216_0x4442,_0x481228=_0x122f74();while(!![]){try{const _0x55b133=-parseInt(_0x248179(0x1c2))/0x1+parseInt(_0x248179(0x1c0))/0x2+-parseInt(_0x248179(0x1b3))/0x3*(parseInt(_0x248179(0x1bb))/0x4)+-parseInt(_0x248179(0x1be))/0x5*(-parseInt(_0x248179(0x1b7))/0x6)+parseInt(_0x248179(0x1cf))/0x7*(-parseInt(_0x248179(0x1b5))/0x8)+-parseInt(_0x248179(0x1c3))/0x9*(-parseInt(_0x248179(0x1cd))/0xa)+-parseInt(_0x248179(0x1c4))/0xb*(parseInt(_0x248179(0x1b8))/0xc);if(_0x55b133===_0x5b843b)break;else _0x481228['push'](_0x481228['shift']());}catch(_0x1f869e){_0x481228['push'](_0x481228['shift']());}}}(a216_0x2664,0xc619d));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=a216_0x49b05d(0x1c9);export const NPX_SKILLS_SUBCOMMAND_ADD='add';function a216_0x2664(){const _0x19a62e=['join','4REQLKm','status','unknown','3322090hzpUUl','lovrabet/rabetbase','2080704smgxXK','push','498060XlmWIz','2425455TdyIwy','2119293hIQSHl','stdout','inherit','pipe','npx','skills','stdio','exit\x20','trim','50MRkQnD','lovrabet/lovrabet-skill','797622gqAZzh','remove','156855SRqgqL','toString','24aIkjDe','skill','6sfnbLf','84aAPZBR','stderr'];a216_0x2664=function(){return _0x19a62e;};return a216_0x2664();}export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a216_0x49b05d(0x1bf);export const LEGACY_RABETBASE_SKILL_SOURCE=a216_0x49b05d(0x1ce);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export function buildNpxSkillsAddArgv(_0x10d0f8){const _0x527444=a216_0x49b05d,_0x2b2003=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x10d0f8&&_0x2b2003[_0x527444(0x1c1)](NPX_SKILLS_FLAG_SKILL,_0x10d0f8),_0x2b2003;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a216_0x49b05d(0x1c8),...buildNpxSkillsAddArgv()][a216_0x49b05d(0x1ba)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a216_0x49b05d(0x1c8),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a216_0x49b05d(0x1ba)]('\x20');function a216_0x4442(_0x5930dc,_0x20474c){_0x5930dc=_0x5930dc-0x1b3;const _0x2664d7=a216_0x2664();let _0x44424a=_0x2664d7[_0x5930dc];return _0x44424a;}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0xca5c61,_0x49a7ee){const _0x238494=a216_0x49b05d;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1d2fe2=_0x49a7ee?.[_0x238494(0x1ca)]??'inherit',_0x160ab6=resolveNpmBin(_0x238494(0x1c8)),_0x52a5a4=buildNpxSkillsAddArgv(_0x49a7ee?.[_0x238494(0x1b6)]),_0x538535=['npx',..._0x52a5a4]['join']('\x20');console['log']('*\x20'+_0x538535);const _0x1ae416=spawnSync(_0x160ab6,_0x52a5a4,{'cwd':_0xca5c61,'stdio':_0x1d2fe2,'env':process.env,'shell':![]}),_0x43036c=_0x1ae416['status'];if(_0x43036c===0x0)return{'ok':!![],'status':0x0};let _0x309517=_0x238494(0x1cb)+(_0x43036c??_0x238494(0x1bd));if(_0x1d2fe2===_0x238494(0x1c7)){const _0x4736b6=_0x1ae416[_0x238494(0x1b9)]?_0x1ae416['stderr'][_0x238494(0x1b4)]()[_0x238494(0x1cc)]():'',_0x45ffdb=_0x1ae416[_0x238494(0x1c5)]?_0x1ae416['stdout'][_0x238494(0x1b4)]()['trim']():'';if(_0x4736b6)_0x309517=_0x4736b6;else{if(_0x45ffdb)_0x309517=_0x45ffdb;}}return{'ok':![],'status':_0x43036c??null,'error':_0x309517};}export function runNpxSkillsRemove(_0x5e78c3,_0x5eb7b9,_0x2286a5=LEGACY_RABETBASE_SKILL_SOURCE){const _0x60818b=a216_0x49b05d;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1b0b58=_0x5eb7b9?.[_0x60818b(0x1ca)]??_0x60818b(0x1c6),_0x4a01d4=resolveNpmBin(_0x60818b(0x1c8)),_0x4e105f=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x60818b(0x1d0),_0x2286a5,NPX_SKILLS_FLAG_SKILL,_0x5eb7b9?.[_0x60818b(0x1b6)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x5eb7b9?.['yes']?['-y']:[]],_0x313b1a=[_0x4a01d4,..._0x4e105f]['join']('\x20');console['log']('*\x20'+_0x313b1a);const _0x582119=spawnSync(_0x4a01d4,_0x4e105f,{'cwd':_0x5e78c3,'stdio':_0x1b0b58,'env':process.env,'shell':![]}),_0xbfd445=_0x582119[_0x60818b(0x1bc)];if(_0xbfd445===0x0)return{'ok':!![],'status':0x0};let _0x1c21ba=_0x60818b(0x1cb)+(_0xbfd445??'unknown');if(_0x1b0b58==='pipe'){const _0x2673e8=_0x582119[_0x60818b(0x1b9)]?_0x582119['stderr'][_0x60818b(0x1b4)]()['trim']():'',_0x379bc2=_0x582119[_0x60818b(0x1c5)]?_0x582119[_0x60818b(0x1c5)][_0x60818b(0x1b4)]()[_0x60818b(0x1cc)]():'';if(_0x2673e8)_0x1c21ba=_0x2673e8;else{if(_0x379bc2)_0x1c21ba=_0x379bc2;}}return{'ok':![],'status':_0xbfd445??null,'error':_0x1c21ba};}export function runNpxSkillsAddGlobal(_0x495dcd,_0x114465,_0x4833f1){const _0x52d5af=a216_0x49b05d;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1a48c3=_0x4833f1?.[_0x52d5af(0x1ca)]??_0x52d5af(0x1c6),_0x4025c8=resolveNpmBin(_0x52d5af(0x1c8)),_0x449dd9=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x114465,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x35e2b8=[_0x52d5af(0x1c8),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x114465,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x52d5af(0x1ba)]('\x20');console['log']('*\x20'+_0x35e2b8);const _0x4578fa=spawnSync(_0x4025c8,_0x449dd9,{'cwd':_0x495dcd,'stdio':_0x1a48c3,'env':process.env,'shell':![]}),_0x1596f5=_0x4578fa[_0x52d5af(0x1bc)];if(_0x1596f5===0x0)return{'ok':!![],'status':0x0};let _0xa0f3a3=_0x52d5af(0x1cb)+(_0x1596f5??_0x52d5af(0x1bd));if(_0x1a48c3===_0x52d5af(0x1c7)){const _0x5094bf=_0x4578fa['stderr']?_0x4578fa['stderr'][_0x52d5af(0x1b4)]()[_0x52d5af(0x1cc)]():'',_0x4dccce=_0x4578fa['stdout']?_0x4578fa['stdout']['toString']()[_0x52d5af(0x1cc)]():'';if(_0x5094bf)_0xa0f3a3=_0x5094bf;else{if(_0x4dccce)_0xa0f3a3=_0x4dccce;}}return{'ok':![],'status':_0x1596f5??null,'error':_0xa0f3a3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a38c6,_0xbeb538){const _0x4fdaf9=a217_0x235e,_0x1f7cf3=_0x5a38c6();while(!![]){try{const _0x4d6b54=parseInt(_0x4fdaf9(0x1dc))/0x1*(-parseInt(_0x4fdaf9(0x1d6))/0x2)+-parseInt(_0x4fdaf9(0x1d8))/0x3*(-parseInt(_0x4fdaf9(0x1d5))/0x4)+-parseInt(_0x4fdaf9(0x1cd))/0x5+-parseInt(_0x4fdaf9(0x1d3))/0x6+parseInt(_0x4fdaf9(0x1c7))/0x7*(parseInt(_0x4fdaf9(0x1c8))/0x8)+-parseInt(_0x4fdaf9(0x1cf))/0x9*(parseInt(_0x4fdaf9(0x1d0))/0xa)+-parseInt(_0x4fdaf9(0x1d9))/0xb*(-parseInt(_0x4fdaf9(0x1cc))/0xc);if(_0x4d6b54===_0xbeb538)break;else _0x1f7cf3['push'](_0x1f7cf3['shift']());}catch(_0x1b9c09){_0x1f7cf3['push'](_0x1f7cf3['shift']());}}}(a217_0x10d0,0x8c477));function a217_0x10d0(){const _0x29417b=['service','test','5311422PtxCzc','[REDACTED]','168968EfbtQy','1812lefTuU','rabetbase.command','51NLPcYX','651189ZxcEXa','error','entries','762YfqwGm','durationMs','2582167xSIZhc','8FyZKmL','message','command','stringify','336SxhdmM','2891665EZxVbQ','some','11106HSfupC','130PCjHjF'];a217_0x10d0=function(){return _0x29417b;};return a217_0x10d0();}function a217_0x235e(_0x5e7226,_0x22c670){_0x5e7226=_0x5e7226-0x1c6;const _0x10d0b3=a217_0x10d0();let _0x235e8f=_0x10d0b3[_0x5e7226];return _0x235e8f;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x1703f0){const _0x182f7f=a217_0x235e;return SENSITIVE_PATTERNS[_0x182f7f(0x1ce)](_0x43e434=>_0x43e434[_0x182f7f(0x1d2)](_0x1703f0));}function sanitizeFlags(_0x19746f){const _0x1c7918=a217_0x235e,_0x95e85d={};for(const [_0x23a9ce,_0x2146d8]of Object[_0x1c7918(0x1db)](_0x19746f)){isSensitiveKey(_0x23a9ce)?_0x95e85d[_0x23a9ce]=_0x2146d8!=null&&_0x2146d8!==''?_0x1c7918(0x1d4):_0x2146d8:_0x95e85d[_0x23a9ce]=_0x2146d8;}return _0x95e85d;}export async function reportCommandTrace(_0xd8ba26){const _0xb7244d=a217_0x235e;try{const _0x5de7f8=sanitizeFlags(_0xd8ba26['flags']);await sendCliTraceLog({'spanName':_0xb7244d(0x1d7),'logData':{'command.cli_version':getCliVersion(),'command.service':_0xd8ba26[_0xb7244d(0x1d1)],'command.name':_0xd8ba26[_0xb7244d(0x1ca)],'command.flags':JSON[_0xb7244d(0x1cb)](_0x5de7f8),..._0xd8ba26[_0xb7244d(0x1c6)]!=null?{'command.duration_ms':_0xd8ba26[_0xb7244d(0x1c6)]}:{},..._0xd8ba26['error']?{'command.error':_0xd8ba26['error']instanceof Error?_0xd8ba26[_0xb7244d(0x1da)][_0xb7244d(0x1c9)]:String(_0xd8ba26['error'])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d2d56,_0x252be8){var _0x159310=a218_0x2e53,_0xdd88c9=_0x5d2d56();while(!![]){try{var _0x114d3a=parseInt(_0x159310(0x1ab))/0x1*(parseInt(_0x159310(0x1b0))/0x2)+parseInt(_0x159310(0x1b3))/0x3*(parseInt(_0x159310(0x1b2))/0x4)+-parseInt(_0x159310(0x1ae))/0x5*(-parseInt(_0x159310(0x1ac))/0x6)+parseInt(_0x159310(0x1a9))/0x7*(-parseInt(_0x159310(0x1b4))/0x8)+parseInt(_0x159310(0x1a5))/0x9*(parseInt(_0x159310(0x1b1))/0xa)+-parseInt(_0x159310(0x1aa))/0xb*(parseInt(_0x159310(0x1a6))/0xc)+-parseInt(_0x159310(0x1a8))/0xd;if(_0x114d3a===_0x252be8)break;else _0xdd88c9['push'](_0xdd88c9['shift']());}catch(_0x45d77d){_0xdd88c9['push'](_0xdd88c9['shift']());}}}(a218_0x3130,0x5b85a));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a218_0x3130(){var _0x49ecd9=['error','41630JcKxxe','Failed\x20to\x20report\x20CLI\x20help\x20trace:','36fQyUNU','611090ucAaCp','4ZVbQET','1902378fwdxDp','539992uteInY','108FcGqIi','220332AIfajZ','service','27047696srieUJ','7tnVorw','99TqUvTU','38685KSyJlD','450EcOkyM'];a218_0x3130=function(){return _0x49ecd9;};return a218_0x3130();}function a218_0x2e53(_0x263ef3,_0x14f19d){_0x263ef3=_0x263ef3-0x1a5;var _0x313040=a218_0x3130();var _0x2e5354=_0x313040[_0x263ef3];return _0x2e5354;}export async function reportCliHelpTrace(_0xcbabdd,_0x53c061){var _0x2566ec=a218_0x2e53;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0xcbabdd,..._0x53c061?.['service']&&{'rabetbase.help.service':_0x53c061[_0x2566ec(0x1a7)]}}});}catch(_0x510272){console[_0x2566ec(0x1ad)](_0x2566ec(0x1af),_0x510272);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a219_0x1505(){const _0x165626=['2696vRstVO','815896ejrHUl','unknown','1460634aGmygZ','5500jkkTND','13wPFTJG','178195MTPpRO','2198708OgyMno','840GJEAlq','nickname','3126didcNX','1098zhVWav','daily','production'];a219_0x1505=function(){return _0x165626;};return a219_0x1505();}function a219_0x30f6(_0x58287c,_0x5b28ff){_0x58287c=_0x58287c-0x155;const _0x15051e=a219_0x1505();let _0x30f6e9=_0x15051e[_0x58287c];return _0x30f6e9;}(function(_0x80d0c5,_0x247a66){const _0x596188=a219_0x30f6,_0x299a93=_0x80d0c5();while(!![]){try{const _0x1ec8db=-parseInt(_0x596188(0x15f))/0x1*(parseInt(_0x596188(0x15a))/0x2)+-parseInt(_0x596188(0x15d))/0x3+parseInt(_0x596188(0x161))/0x4+parseInt(_0x596188(0x160))/0x5+parseInt(_0x596188(0x156))/0x6*(parseInt(_0x596188(0x162))/0x7)+parseInt(_0x596188(0x15b))/0x8+parseInt(_0x596188(0x157))/0x9*(parseInt(_0x596188(0x15e))/0xa);if(_0x1ec8db===_0x247a66)break;else _0x299a93['push'](_0x299a93['shift']());}catch(_0xb91aa){_0x299a93['push'](_0x299a93['shift']());}}}(a219_0x1505,0x4c4c9));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';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0xe8322d=a219_0x30f6,_0x39ff59=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x4e6e14=_0x39ff59?.['user'];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0xe8322d(0x15c)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0xe8322d(0x158):_0xe8322d(0x159))}),setUserContext({'id':_0x4e6e14?.['id'],'username':_0x4e6e14?.['username'],'nickname':_0x4e6e14?.[_0xe8322d(0x155)],'email':_0x4e6e14?.['email'],'tenantCode':_0x4e6e14?.['tenant']['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x39ff59;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d3040,_0x1ab46e){const _0x51801a=a220_0x5309,_0x3ad0f5=_0x4d3040();while(!![]){try{const _0x494a98=-parseInt(_0x51801a(0x121))/0x1+-parseInt(_0x51801a(0x11a))/0x2*(-parseInt(_0x51801a(0x11d))/0x3)+parseInt(_0x51801a(0x117))/0x4+-parseInt(_0x51801a(0x11b))/0x5*(-parseInt(_0x51801a(0x118))/0x6)+-parseInt(_0x51801a(0x119))/0x7*(-parseInt(_0x51801a(0x114))/0x8)+parseInt(_0x51801a(0x123))/0x9+parseInt(_0x51801a(0x11c))/0xa*(-parseInt(_0x51801a(0x11f))/0xb);if(_0x494a98===_0x1ab46e)break;else _0x3ad0f5['push'](_0x3ad0f5['shift']());}catch(_0x84c834){_0x3ad0f5['push'](_0x3ad0f5['shift']());}}}(a220_0x175b,0x2af67));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 a220_0x175b(){const _0x5d83e3=['then','1401432DYDaXU','10698tybaLG','1549289XrGhNH','2QeHMxI','65BAYvRt','320nOYMUF','456912yrdjRC','SIGTERM','247489IgxYbh','exit','121721pEHFqh','SIGINT','2434464crxOrv','8sasXGI','once'];a220_0x175b=function(){return _0x5d83e3;};return a220_0x175b();}function a220_0x5309(_0x452f16,_0x5f1ce1){_0x452f16=_0x452f16-0x114;const _0x175b46=a220_0x175b();let _0x5309b7=_0x175b46[_0x452f16];return _0x5309b7;}export function registerOtelShutdownOnExit(){const _0x5a627e=a220_0x5309;process[_0x5a627e(0x115)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0xcb5178=()=>{const _0x592f83=_0x5a627e;void flushOtelNodeIfUsed()[_0x592f83(0x116)](()=>process[_0x592f83(0x120)](0x0));};process[_0x5a627e(0x115)](_0x5a627e(0x122),_0xcb5178),process[_0x5a627e(0x115)](_0x5a627e(0x11e),_0xcb5178);}export async function exitWithOtelShutdown(_0x3c61f8){const _0x58a406=a220_0x5309;await flushOtelNodeIfUsed(),process[_0x58a406(0x120)](_0x3c61f8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a221_0x5b3a91=a221_0x5750;function a221_0xb07c(){const _0x52e9f4=['1133vkLUcK','traceparent','manual','5WKxkCl','spanName','145180FROKsQ','7pQpwIE','134CkEXoY','1127051KtNsYQ','rabetbase-cli','1137304aAykrI','801648wLmBNR','logData','13188xWnNvB','174980KNFTar','version','4834626WkOQmP'];a221_0xb07c=function(){return _0x52e9f4;};return a221_0xb07c();}(function(_0x41ccd4,_0x3bce57){const _0x2f0e46=a221_0x5750,_0x4fd168=_0x41ccd4();while(!![]){try{const _0x569591=parseInt(_0x2f0e46(0x113))/0x1+parseInt(_0x2f0e46(0x112))/0x2*(parseInt(_0x2f0e46(0x107))/0x3)+-parseInt(_0x2f0e46(0x110))/0x4+-parseInt(_0x2f0e46(0x10e))/0x5*(-parseInt(_0x2f0e46(0x10a))/0x6)+parseInt(_0x2f0e46(0x111))/0x7*(parseInt(_0x2f0e46(0x104))/0x8)+parseInt(_0x2f0e46(0x105))/0x9+parseInt(_0x2f0e46(0x108))/0xa*(-parseInt(_0x2f0e46(0x10b))/0xb);if(_0x569591===_0x3bce57)break;else _0x4fd168['push'](_0x4fd168['shift']());}catch(_0x2b555f){_0x4fd168['push'](_0x4fd168['shift']());}}}(a221_0xb07c,0x975e0));import{sendTraceLog}from'@lovrabet/otel-logger';function a221_0x5750(_0x3d1636,_0x16d55e){_0x3d1636=_0x3d1636-0x103;const _0xb07cb4=a221_0xb07c();let _0x57506e=_0xb07cb4[_0x3d1636];return _0x57506e;}import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a221_0x5b3a91(0x103);export async function sendCliTraceLog(_0x3fcb69){const _0x516598=a221_0x5b3a91;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x3fcb69['traceName']??DEFAULT_TRACE_NAME,'version':_0x3fcb69[_0x516598(0x109)]??getCliVersion(),'spanName':_0x3fcb69[_0x516598(0x10f)],'eventType':_0x516598(0x10d),'logData':_0x3fcb69[_0x516598(0x106)],..._0x3fcb69['traceparent']&&{'traceparent':_0x3fcb69[_0x516598(0x10c)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a222_0x68ad94=a222_0x8b6e;(function(_0x31a807,_0xae8649){const _0x30ab3b=a222_0x8b6e,_0x546df9=_0x31a807();while(!![]){try{const _0x354dcd=parseInt(_0x30ab3b(0x1e4))/0x1*(parseInt(_0x30ab3b(0x1e2))/0x2)+parseInt(_0x30ab3b(0x1df))/0x3+parseInt(_0x30ab3b(0x1e5))/0x4+parseInt(_0x30ab3b(0x1e1))/0x5*(-parseInt(_0x30ab3b(0x1eb))/0x6)+-parseInt(_0x30ab3b(0x1e6))/0x7*(-parseInt(_0x30ab3b(0x1ea))/0x8)+-parseInt(_0x30ab3b(0x1db))/0x9+-parseInt(_0x30ab3b(0x1e9))/0xa;if(_0x354dcd===_0xae8649)break;else _0x546df9['push'](_0x546df9['shift']());}catch(_0x588033){_0x546df9['push'](_0x546df9['shift']());}}}(a222_0x349f,0x1e5c9));function a222_0x349f(){const _0x1b5dc8=['192942eBqQhw','sanitize','5ztWjjS','453150wTUKhJ','join','1BCexzf','154804qVwbwl','277914KCCSsl','truncated','description','1797950nSzjZL','24AtPmHF','258546bDHBmu','redactionKinds','913041IkjIMB','issue.log.collect','redactionCount','originalBytes'];a222_0x349f=function(){return _0x1b5dc8;};return a222_0x349f();}function a222_0x8b6e(_0x252acc,_0x37d703){_0x252acc=_0x252acc-0x1db;const _0x349f8f=a222_0x349f();let _0x8b6e54=_0x349f8f[_0x252acc];return _0x8b6e54;}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=a222_0x68ad94(0x1dc);export async function sendPlatformIssueCollectLog(_0x14dffc){const _0xe144c5=a222_0x68ad94;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x14dffc['title'],'issue.description':_0x14dffc[_0xe144c5(0x1e8)],..._0x14dffc['sanitize']?{'issue.description_original_bytes':_0x14dffc[_0xe144c5(0x1e0)][_0xe144c5(0x1de)],'issue.description_truncated':_0x14dffc[_0xe144c5(0x1e0)][_0xe144c5(0x1e7)],'issue.description_redactions':_0x14dffc['sanitize'][_0xe144c5(0x1dd)],'issue.description_redaction_kinds':_0x14dffc['sanitize'][_0xe144c5(0x1ec)][_0xe144c5(0x1e3)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a224_0x340b67=a224_0x24f2;(function(_0x3d6ce6,_0x5445e9){const _0x34fc2e=a224_0x24f2,_0x23701b=_0x3d6ce6();while(!![]){try{const _0xe2d051=parseInt(_0x34fc2e(0x16a))/0x1+parseInt(_0x34fc2e(0x190))/0x2+-parseInt(_0x34fc2e(0x15d))/0x3+parseInt(_0x34fc2e(0x164))/0x4+-parseInt(_0x34fc2e(0x18a))/0x5*(parseInt(_0x34fc2e(0x166))/0x6)+-parseInt(_0x34fc2e(0x16e))/0x7+parseInt(_0x34fc2e(0x182))/0x8;if(_0xe2d051===_0x5445e9)break;else _0x23701b['push'](_0x23701b['shift']());}catch(_0x5b24e5){_0x23701b['push'](_0x23701b['shift']());}}}(a224_0x5565,0x62250));export const CORE_IDE_CONFIGS={'cursor':{'name':a224_0x340b67(0x180),'description':a224_0x340b67(0x171),'folders':['.cursorrules',a224_0x340b67(0x17e)],'files':[{'type':a224_0x340b67(0x168),'path':a224_0x340b67(0x18d),'template':a224_0x340b67(0x192)}]},'windsurf':{'name':a224_0x340b67(0x16b),'description':'Windsurf\x20IDE','folders':[a224_0x340b67(0x17b)],'files':[{'type':'file','path':a224_0x340b67(0x17f),'template':a224_0x340b67(0x192)}]},'claude':{'name':a224_0x340b67(0x183),'description':'Claude\x20Code','folders':[a224_0x340b67(0x161)],'files':[{'type':a224_0x340b67(0x168),'path':a224_0x340b67(0x189),'template':'SKILL.md.tpl'}]},'cline':{'name':a224_0x340b67(0x188),'description':a224_0x340b67(0x179),'folders':[a224_0x340b67(0x163)],'files':[{'type':a224_0x340b67(0x168),'path':a224_0x340b67(0x167),'template':a224_0x340b67(0x192)}]},'codex':{'name':a224_0x340b67(0x184),'description':a224_0x340b67(0x16c),'folders':[a224_0x340b67(0x162)],'files':[{'type':'file','path':'.codex/skills/lovrabet/SKILL.md','template':a224_0x340b67(0x192)}]},'opencode':{'name':a224_0x340b67(0x186),'description':a224_0x340b67(0x160),'folders':['.opencode'],'files':[{'type':a224_0x340b67(0x168),'path':a224_0x340b67(0x172),'template':'SKILL.md.tpl'}]},'qoder':{'name':'Qoder','description':a224_0x340b67(0x177),'folders':[a224_0x340b67(0x178)],'files':[{'type':'file','path':a224_0x340b67(0x15e),'template':a224_0x340b67(0x192)},{'type':a224_0x340b67(0x168),'path':a224_0x340b67(0x17d),'template':a224_0x340b67(0x192)}]},'codebuddy':{'name':a224_0x340b67(0x18f),'description':'CodeBuddy\x20IDE','folders':['.codebuddy'],'files':[{'type':a224_0x340b67(0x168),'path':a224_0x340b67(0x17a),'template':a224_0x340b67(0x192)}]},'trae':{'name':a224_0x340b67(0x174),'description':'Trae\x20IDE','folders':[a224_0x340b67(0x185)],'files':[{'type':'file','path':a224_0x340b67(0x170),'template':a224_0x340b67(0x192)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a224_0x340b67(0x193),'description':a224_0x340b67(0x15f),'folders':[a224_0x340b67(0x18c)],'files':[{'type':a224_0x340b67(0x168),'path':a224_0x340b67(0x169),'template':a224_0x340b67(0x192)}]},'antigravity':{'name':'Antigravity','description':a224_0x340b67(0x175),'folders':[a224_0x340b67(0x18c)],'files':[{'type':'file','path':'.agent/skills/lovrabet/SKILL.md','template':a224_0x340b67(0x192)}]}};function a224_0x24f2(_0xbee079,_0x2793f4){_0xbee079=_0xbee079-0x15d;const _0x556526=a224_0x5565();let _0x24f2e3=_0x556526[_0xbee079];return _0x24f2e3;}export const CORE_IDE_LIST=[a224_0x340b67(0x173),'cline','codebuddy',a224_0x340b67(0x191),a224_0x340b67(0x181),a224_0x340b67(0x18e),a224_0x340b67(0x165),a224_0x340b67(0x18b),a224_0x340b67(0x17c)];export const IDE_LIST=[a224_0x340b67(0x16d),'claude',a224_0x340b67(0x176),a224_0x340b67(0x16f),'codex',a224_0x340b67(0x181),a224_0x340b67(0x18e),a224_0x340b67(0x165),a224_0x340b67(0x18b),a224_0x340b67(0x17c),a224_0x340b67(0x187)];export const ALL_CORE_IDES=[a224_0x340b67(0x181),'windsurf',a224_0x340b67(0x173),a224_0x340b67(0x176),'codex','opencode','qoder',a224_0x340b67(0x16f),a224_0x340b67(0x18b)];function a224_0x5565(){const _0x439aee=['.cline/skills/lovrabet/SKILL.md','file','.agent/skills/lovrabet/SKILL.md','108292kVsNGD','Windsurf','Codex\x20IDE','antigravity','4918340UWsNqd','codebuddy','.trae/skills/lovrabet/SKILL.md','Cursor\x20IDE','.opencode/skills/lovrabet/SKILL.md','claude','Trae','Antigravity\x20IDE','cline','Qoder\x20IDE','.qoder','Cline\x20IDE','.codebuddy/skills/lovrabet/SKILL.md','.windsurf','windsurf','.qoder/skills/lovrabet/SKILL.md','.cursor','.windsurf/workflows/rabetbase.md','Cursor','cursor','4263904MngRpu','Claude\x20Code','Codex','.trae','OpenCode','agent','Cline','.claude/skills/lovrabet/SKILL.md','10EjOmSj','trae','.agent','.cursor/skills/rabetbase.md','opencode','CodeBuddy','1250364wZgRzY','codex','SKILL.md.tpl','其他\x20(通用模板)','1575093LrnuUl','.qoder/rules/rabetbase.md','通用模板\x20-\x20兜底方案','OpenCode\x20IDE','.claude','.codex','.cline','2200652JqnaUl','qoder','560922DsrZRY'];a224_0x5565=function(){return _0x439aee;};return a224_0x5565();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b626e,_0x316d1e){const _0x17a0d7=a225_0x3244,_0x3d45d0=_0x5b626e();while(!![]){try{const _0x356c3d=-parseInt(_0x17a0d7(0x72))/0x1+-parseInt(_0x17a0d7(0x79))/0x2*(-parseInt(_0x17a0d7(0x76))/0x3)+-parseInt(_0x17a0d7(0x74))/0x4*(parseInt(_0x17a0d7(0x71))/0x5)+-parseInt(_0x17a0d7(0x78))/0x6*(parseInt(_0x17a0d7(0x73))/0x7)+parseInt(_0x17a0d7(0x77))/0x8+parseInt(_0x17a0d7(0x7a))/0x9*(-parseInt(_0x17a0d7(0x75))/0xa)+parseInt(_0x17a0d7(0x70))/0xb;if(_0x356c3d===_0x316d1e)break;else _0x3d45d0['push'](_0x3d45d0['shift']());}catch(_0x4bc4c1){_0x3d45d0['push'](_0x3d45d0['shift']());}}}(a225_0x4484,0x66fa4));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a225_0x3244(_0x415b19,_0x142762){_0x415b19=_0x415b19-0x70;const _0x448455=a225_0x4484();let _0x32449d=_0x448455[_0x415b19];return _0x32449d;}function a225_0x4484(){const _0xa51e91=['5kPeMrW','663714yITLux','672175esGFAW','1392392kcRPzj','308470CxYAGO','4071phBAJD','4600856gHyPQQ','30keFKcR','154xDITqh','207alCIMt','21379798nWWUDw'];a225_0x4484=function(){return _0xa51e91;};return a225_0x4484();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x468bfd,_0x4f2211){const _0x1eb0e5=a226_0x52f1,_0xd15e35=_0x468bfd();while(!![]){try{const _0x2a1271=parseInt(_0x1eb0e5(0x1ad))/0x1+parseInt(_0x1eb0e5(0x1a6))/0x2*(parseInt(_0x1eb0e5(0x1a7))/0x3)+-parseInt(_0x1eb0e5(0x1ab))/0x4*(-parseInt(_0x1eb0e5(0x1a9))/0x5)+-parseInt(_0x1eb0e5(0x1a4))/0x6+parseInt(_0x1eb0e5(0x1b2))/0x7+parseInt(_0x1eb0e5(0x1a3))/0x8*(parseInt(_0x1eb0e5(0x1a8))/0x9)+-parseInt(_0x1eb0e5(0x1ae))/0xa*(parseInt(_0x1eb0e5(0x1aa))/0xb);if(_0x2a1271===_0x4f2211)break;else _0xd15e35['push'](_0xd15e35['shift']());}catch(_0x417ed2){_0xd15e35['push'](_0xd15e35['shift']());}}}(a226_0x57e9,0xa32b0));import{getTemplateBaseUrl}from'../utils/config.js';function a226_0x52f1(_0x5ea087,_0x562389){_0x5ea087=_0x5ea087-0x1a1;const _0x57e95d=a226_0x57e9();let _0x52f1f6=_0x57e95d[_0x5ea087];return _0x52f1f6;}export async function fetchCdnConfig(){const _0x8bac2=a226_0x52f1,_0xe5d97a=getTemplateBaseUrl(),_0x31e558=[_0xe5d97a+'/config.json',_0xe5d97a+_0x8bac2(0x1a1)];for(const _0x578acd of _0x31e558){try{const _0xbb484d=await fetch(_0x578acd,{'headers':{'Accept':_0x8bac2(0x1b1)}});if(!_0xbb484d['ok'])continue;const _0x2789ca=await _0xbb484d[_0x8bac2(0x1af)]();if(!_0x2789ca[_0x8bac2(0x1b0)]?.['stableVersion']||!_0x2789ca[_0x8bac2(0x1ac)]?.[_0x8bac2(0x1a5)]?.[_0x8bac2(0x1a2)])continue;return _0x2789ca;}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 _0x456624=Date['now']();if(hasCachedConfig){const _0x186c18=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x456624-cacheTime<_0x186c18)return cachedConfig;}const _0x41e57d=await fetchCdnConfig();return cachedConfig=_0x41e57d,cacheTime=_0x456624,hasCachedConfig=!![],_0x41e57d;}function a226_0x57e9(){const _0x5cec01=['node','6070dFSJxe','1047NjkEnN','221139rrYujs','3855uCvuGb','36628427AYVWcj','5228iDgVBD','sdk','369259LTkYag','10mcQVih','json','cli','application/json','4878174MrUjIO','/config/index.json','stableVersion','408HcUQcP','2327886FvbvUU'];a226_0x57e9=function(){return _0x5cec01;};return a226_0x57e9();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a227_0x5cd6(){const _0x5b762c=['stableVersion','all','dependencies','existsSync','\x20\x20\x20Upgrade\x20command:\x20','\x20\x20\x20Current\x20version:\x20','needsUpgrade','utf-8','2102756LMRiLP','↪\x20SDK\x20update\x20available','node','170493hcWWvs','utf8','log','package.json','devDependencies','version','1738110DcWDPk','coerce','@lovrabet/sdk','3GnuheY','latest','readFileSync','parse','1030952dRsaRO','\x1b[1m','1.2.0','\x1b[33m','packageName','\x20\x20\x20Stable\x20version:\x20','623203xdXLQt','npm\x20install\x20','join','12wlzESj','240512WWfcyu','sdk','node_modules','5273883UEzTdk'];a227_0x5cd6=function(){return _0x5b762c;};return a227_0x5cd6();}const a227_0x510b66=a227_0x5de9;(function(_0x493d79,_0x34cce8){const _0x3c9a14=a227_0x5de9,_0x3ec426=_0x493d79();while(!![]){try{const _0x486245=parseInt(_0x3c9a14(0x125))/0x1+parseInt(_0x3c9a14(0x116))/0x2+parseInt(_0x3c9a14(0x12e))/0x3*(parseInt(_0x3c9a14(0x122))/0x4)+parseInt(_0x3c9a14(0x12b))/0x5+parseInt(_0x3c9a14(0x115))/0x6*(-parseInt(_0x3c9a14(0x112))/0x7)+-parseInt(_0x3c9a14(0x10c))/0x8+-parseInt(_0x3c9a14(0x119))/0x9;if(_0x486245===_0x34cce8)break;else _0x3ec426['push'](_0x3ec426['shift']());}catch(_0x2a8e63){_0x3ec426['push'](_0x3ec426['shift']());}}}(a227_0x5cd6,0x4232a));import a227_0x5b9304 from'node:fs';import a227_0x27c11b from'node:path';import a227_0x464860 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a227_0x510b66(0x10e);function isNonNumericVersion(_0x237607){const _0x2447ea=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2447ea['some'](_0x12231e=>_0x12231e['test'](_0x237607));}function getInstalledVersion(_0x1a58bb,_0xcd47c1){const _0x486f1f=a227_0x510b66;try{const _0x52b4ab=a227_0x27c11b[_0x486f1f(0x114)](_0x1a58bb,_0x486f1f(0x118),_0xcd47c1,_0x486f1f(0x128));if(a227_0x5b9304[_0x486f1f(0x11d)](_0x52b4ab)){const _0x1c2e77=JSON[_0x486f1f(0x10b)](a227_0x5b9304[_0x486f1f(0x130)](_0x52b4ab,_0x486f1f(0x121)));return _0x1c2e77['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x7d1a11=a227_0x510b66;try{const _0x19c2fb=await getCdnConfig();return _0x19c2fb?.[_0x7d1a11(0x117)]?.[_0x7d1a11(0x124)]?.[_0x7d1a11(0x11a)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x1551ad=a227_0x510b66;try{const _0x3b88c5=await getCdnConfig();return _0x3b88c5?.[_0x1551ad(0x117)]?.['node']?.[_0x1551ad(0x110)]||_0x1551ad(0x12d);}catch{return _0x1551ad(0x12d);}}export async function checkSdkVersion(_0x298dab){const _0x42952a=a227_0x510b66,_0x6e6d6a=a227_0x27c11b[_0x42952a(0x114)](_0x298dab,_0x42952a(0x128)),[_0x4a64a2,_0x459622]=await Promise[_0x42952a(0x11b)]([getSdkStableVersion(),getSdkPackageName()]),_0x5a0024=_0x4a64a2||FALLBACK_MIN_SDK_VERSION;if(!a227_0x5b9304[_0x42952a(0x11d)](_0x6e6d6a))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5a0024,'packageName':_0x459622,'stableVersion':_0x4a64a2};try{const _0xf39bcb=JSON[_0x42952a(0x10b)](a227_0x5b9304[_0x42952a(0x130)](_0x6e6d6a,'utf8')),_0x5876f4=_0xf39bcb[_0x42952a(0x11c)]||{},_0xac9add=_0xf39bcb[_0x42952a(0x129)]||{},_0x4fd757=_0x5876f4[_0x459622]||_0xac9add[_0x459622];if(!_0x4fd757)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5a0024,'packageName':_0x459622,'stableVersion':_0x4a64a2};let _0x5b81d7=getInstalledVersion(_0x298dab,_0x459622);!_0x5b81d7&&(_0x5b81d7=_0x4fd757);if(isNonNumericVersion(_0x4fd757))return{'installed':!![],'version':_0x5b81d7,'needsUpgrade':![],'minVersion':_0x5a0024,'packageName':_0x459622,'stableVersion':_0x4a64a2};const _0x46acdd=a227_0x464860[_0x42952a(0x12c)](_0x5b81d7),_0x17cf55=a227_0x464860[_0x42952a(0x12c)](_0x5a0024),_0x4df4db=_0x46acdd&&_0x17cf55?a227_0x464860['lt'](_0x46acdd,_0x17cf55):![];return{'installed':!![],'version':_0x5b81d7,'needsUpgrade':_0x4df4db,'minVersion':_0x5a0024,'packageName':_0x459622,'stableVersion':_0x4a64a2};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5a0024,'packageName':_0x459622,'stableVersion':_0x4a64a2};}}function a227_0x5de9(_0x821113,_0x570475){_0x821113=_0x821113-0x10b;const _0x5cd619=a227_0x5cd6();let _0x5de9ed=_0x5cd619[_0x821113];return _0x5de9ed;}export function checkSdkVersionSync(_0x122e19){const _0x3b61e7=a227_0x510b66,_0x45913e=a227_0x27c11b[_0x3b61e7(0x114)](_0x122e19,_0x3b61e7(0x128)),_0x1c1408=_0x3b61e7(0x12d);if(!a227_0x5b9304['existsSync'](_0x45913e))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c1408,'stableVersion':null};try{const _0x47c9dc=JSON[_0x3b61e7(0x10b)](a227_0x5b9304[_0x3b61e7(0x130)](_0x45913e,_0x3b61e7(0x126))),_0x377d48=_0x47c9dc[_0x3b61e7(0x11c)]||{},_0xf927a1=_0x47c9dc[_0x3b61e7(0x129)]||{},_0x4c1129=_0x377d48[_0x1c1408]||_0xf927a1[_0x1c1408];if(!_0x4c1129)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c1408,'stableVersion':null};let _0x6b22f9=getInstalledVersion(_0x122e19,_0x1c1408);!_0x6b22f9&&(_0x6b22f9=_0x4c1129);if(isNonNumericVersion(_0x4c1129))return{'installed':!![],'version':_0x6b22f9,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c1408,'stableVersion':null};const _0x3f878f=a227_0x464860[_0x3b61e7(0x12c)](_0x6b22f9),_0x30ab00=_0x3f878f?a227_0x464860['lt'](_0x3f878f,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x6b22f9,'needsUpgrade':_0x30ab00,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c1408,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1c1408,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x3e6a63){const _0x236dae=a227_0x510b66;if(!_0x3e6a63[_0x236dae(0x120)])return;const _0x4f5573=_0x236dae(0x10f),_0x2e4ef1='\x1b[0m',_0x421196=_0x236dae(0x10d),_0x457236=_0x3e6a63[_0x236dae(0x110)]||_0x236dae(0x12d),_0x209ff1=_0x3e6a63[_0x236dae(0x11a)]||_0x3e6a63['minVersion'],_0x4838c0=_0x236dae(0x113)+_0x457236+'@'+(_0x209ff1||_0x236dae(0x12f));console['log'](),console[_0x236dae(0x127)](''+_0x4f5573+_0x421196+_0x236dae(0x123)+_0x2e4ef1),console[_0x236dae(0x127)](_0x4f5573+_0x236dae(0x11f)+_0x457236+'@'+_0x3e6a63[_0x236dae(0x12a)]+_0x2e4ef1),console[_0x236dae(0x127)](_0x4f5573+_0x236dae(0x111)+_0x209ff1+_0x2e4ef1),console[_0x236dae(0x127)](_0x4f5573+_0x236dae(0x11e)+_0x4838c0+_0x2e4ef1),console[_0x236dae(0x127)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x377559,_0x4a61bc){const _0x3d6033=a228_0x3a55,_0x407de1=_0x377559();while(!![]){try{const _0xd7e2fa=-parseInt(_0x3d6033(0xa0))/0x1+-parseInt(_0x3d6033(0xa2))/0x2+-parseInt(_0x3d6033(0xaa))/0x3*(-parseInt(_0x3d6033(0xb9))/0x4)+parseInt(_0x3d6033(0xa9))/0x5+parseInt(_0x3d6033(0xaf))/0x6+parseInt(_0x3d6033(0xab))/0x7+-parseInt(_0x3d6033(0xa4))/0x8;if(_0xd7e2fa===_0x4a61bc)break;else _0x407de1['push'](_0x407de1['shift']());}catch(_0x1c784e){_0x407de1['push'](_0x407de1['shift']());}}}(a228_0x2833,0x2d5f1));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a228_0x2d9c6e from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x5666b3){const _0x1e6ff9=a228_0x3a55,_0x4bf539=_0x5666b3[_0x1e6ff9(0xa1)]||_0x1e6ff9(0xb2);return _0x1e6ff9(0xb0)+NPM_PACKAGE_NAME+'@'+_0x4bf539;}function a228_0x2833(){const _0x286cae=['\x1b[1m','↪\x20Critical\x20CLI\x20upgrade\x20required','186710CpFJNQ','660eMakIL','2200282qVAEZJ','upgradeMessage','Current\x20version:\x20','coerce','1545270KbmXSd','npm\x20install\x20-g\x20','\x1b[33m','latest','\x20\x20\x20Upgrade\x20command:\x20','\x20\x20\x20Current\x20CLI\x20version:\x20','\x20\x20\x20Minimum\x20supported:\x20','log','../..','package.json','1768zJxDiu','\x20\x20\x20','minimumVersion','validation','belowMinimum','join','minimumVersionMessage','\x1b[31m','1.0.0','version','345675cyrnfu','stableVersion','329416NXkQZB','\x1b[0m','81832xfgMuo','\x20\x20\x20Recommended\x20stable:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.'];a228_0x2833=function(){return _0x286cae;};return a228_0x2833();}function getCurrentCliVersion(){const _0x5aa054=a228_0x3a55;try{const _0x1e33e2=fileURLToPath(import.meta.url),_0x11accf=resolve(dirname(_0x1e33e2),_0x5aa054(0xb7)),_0x49b1e5=resolve(_0x11accf,_0x5aa054(0xb8)),_0x1a1f34=JSON['parse'](readFileSync(_0x49b1e5,'utf-8'));return _0x1a1f34[_0x5aa054(0x9f)]||_0x5aa054(0x9e);}catch{return'1.0.0';}}function a228_0x3a55(_0x51d0e5,_0x3ee8cf){_0x51d0e5=_0x51d0e5-0x9d;const _0x28339f=a228_0x2833();let _0x3a5525=_0x28339f[_0x51d0e5];return _0x3a5525;}export async function checkCliVersion(){const _0x26228c=a228_0x3a55,_0x567db8=getCurrentCliVersion(),_0x32efee=await getCliVersionPolicy(),_0x55d35e=_0x32efee?.['stableVersion']||null,_0x49e055=_0x32efee?.[_0x26228c(0xbb)]||null;let _0x556174=![],_0x2b5313=![];const _0x1d3b21=a228_0x2d9c6e[_0x26228c(0xae)](_0x567db8);if(_0x1d3b21&&_0x55d35e)try{const _0x1fbe4a=a228_0x2d9c6e[_0x26228c(0xae)](_0x55d35e);if(_0x1fbe4a)_0x556174=a228_0x2d9c6e['lt'](_0x1d3b21,_0x1fbe4a);}catch{}if(_0x1d3b21&&_0x49e055)try{const _0x52b41e=a228_0x2d9c6e['coerce'](_0x49e055);if(_0x52b41e)_0x2b5313=a228_0x2d9c6e['lt'](_0x1d3b21,_0x52b41e);}catch{}return _0x2b5313&&(_0x556174=!![]),{'currentVersion':_0x567db8,'stableVersion':_0x55d35e,'minimumVersion':_0x49e055,'needsUpgrade':_0x556174,'belowMinimum':_0x2b5313,'isPreRelease':![],'upgradeMessage':_0x32efee?.[_0x26228c(0xac)],'minimumVersionMessage':_0x32efee?.[_0x26228c(0xbf)]};}export function printCliUpgradeWarning(_0xbda8c2){const _0x18e7bf=a228_0x3a55;if(!_0xbda8c2['needsUpgrade']&&!_0xbda8c2[_0x18e7bf(0xbd)])return;const _0x181919=_0x18e7bf(0x9d),_0x5640ee=_0x18e7bf(0xb1),_0x2b873a=_0x18e7bf(0xa3),_0x1824e0=_0x18e7bf(0xa7),_0x52dc05=getCliUpgradeCommand(_0xbda8c2);console[_0x18e7bf(0xb6)](),_0xbda8c2['belowMinimum']?(console[_0x18e7bf(0xb6)](''+_0x181919+_0x1824e0+_0x18e7bf(0xa8)+_0x2b873a),console[_0x18e7bf(0xb6)](_0x181919+_0x18e7bf(0xb4)+_0xbda8c2['currentVersion']+_0x2b873a),_0xbda8c2[_0x18e7bf(0xbb)]&&console[_0x18e7bf(0xb6)](_0x181919+_0x18e7bf(0xb5)+_0xbda8c2['minimumVersion']+_0x2b873a),_0xbda8c2['stableVersion']&&_0xbda8c2[_0x18e7bf(0xa1)]!==_0xbda8c2[_0x18e7bf(0xbb)]&&console[_0x18e7bf(0xb6)](_0x181919+_0x18e7bf(0xa5)+_0xbda8c2[_0x18e7bf(0xa1)]+_0x2b873a),_0xbda8c2[_0x18e7bf(0xbf)]&&console[_0x18e7bf(0xb6)](_0x181919+_0x18e7bf(0xba)+_0xbda8c2[_0x18e7bf(0xbf)]+_0x2b873a),console['log'](_0x181919+'\x20\x20\x20Upgrade\x20command:\x20'+_0x52dc05+_0x2b873a)):(console['log'](''+_0x5640ee+_0x1824e0+'↪\x20New\x20version\x20available'+_0x2b873a),console[_0x18e7bf(0xb6)](_0x5640ee+_0x18e7bf(0xb4)+_0xbda8c2['currentVersion']+_0x2b873a),console[_0x18e7bf(0xb6)](_0x5640ee+'\x20\x20\x20Stable\x20version:\x20'+_0xbda8c2[_0x18e7bf(0xa1)]+_0x2b873a),_0xbda8c2['upgradeMessage']&&console['log'](_0x5640ee+'\x20\x20\x20'+_0xbda8c2[_0x18e7bf(0xac)]+_0x2b873a),console[_0x18e7bf(0xb6)](_0x5640ee+_0x18e7bf(0xb3)+_0x52dc05+_0x2b873a)),console[_0x18e7bf(0xb6)]();}export function assertCliVersionSupported(_0x4d15f4){const _0x237699=a228_0x3a55;if(!_0x4d15f4[_0x237699(0xbd)])return;const _0x46d3a1=[_0x4d15f4[_0x237699(0xbf)],_0x237699(0xad)+_0x4d15f4['currentVersion'],_0x4d15f4['minimumVersion']?'Minimum\x20supported:\x20'+_0x4d15f4[_0x237699(0xbb)]:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x4d15f4)]['filter'](Boolean)[_0x237699(0xbe)]('\x0a');throw CliErrors[_0x237699(0xbc)](_0x237699(0xa6),_0x46d3a1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a229_0x2b04(_0x5e88ce,_0x5e2bcf){_0x5e88ce=_0x5e88ce-0xf9;const _0x57532d=a229_0x5753();let _0x2b046a=_0x57532d[_0x5e88ce];return _0x2b046a;}(function(_0x10a9da,_0x36f854){const _0x24b606=a229_0x2b04,_0x41882e=_0x10a9da();while(!![]){try{const _0x41c3e9=-parseInt(_0x24b606(0xff))/0x1+parseInt(_0x24b606(0x10d))/0x2*(parseInt(_0x24b606(0xfc))/0x3)+parseInt(_0x24b606(0x105))/0x4*(-parseInt(_0x24b606(0x101))/0x5)+-parseInt(_0x24b606(0xfe))/0x6*(parseInt(_0x24b606(0x109))/0x7)+parseInt(_0x24b606(0x10e))/0x8+-parseInt(_0x24b606(0xfa))/0x9*(parseInt(_0x24b606(0x104))/0xa)+-parseInt(_0x24b606(0x108))/0xb*(-parseInt(_0x24b606(0xfb))/0xc);if(_0x41c3e9===_0x36f854)break;else _0x41882e['push'](_0x41882e['shift']());}catch(_0x3ba277){_0x41882e['push'](_0x41882e['shift']());}}}(a229_0x5753,0xb5e32));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(_0x57a9ac){const _0x864a13=a229_0x2b04;return typeof _0x57a9ac==='string'&&_0x57a9ac[_0x864a13(0x102)]()[_0x864a13(0x10b)]>0x0?_0x57a9ac[_0x864a13(0x102)]():null;}function normalizeCliVersionPolicy(_0x5a803c){const _0x4761c3=a229_0x2b04;if(!_0x5a803c||typeof _0x5a803c!==_0x4761c3(0x100))return null;const _0x489e7c=_0x5a803c,_0x37a528=_0x489e7c[_0x4761c3(0x10c)]&&typeof _0x489e7c[_0x4761c3(0x10c)]===_0x4761c3(0x100)?_0x489e7c[_0x4761c3(0x10c)]:_0x489e7c,_0x5a1593=pickString(_0x37a528['stableVersion'])||pickString(_0x37a528[_0x4761c3(0x106)])||pickString(_0x37a528[_0x4761c3(0x103)]),_0x4b7c47=pickString(_0x37a528['minimumVersion'])||pickString(_0x37a528[_0x4761c3(0xf9)]);if(!_0x5a1593&&!_0x4b7c47)return null;return{'stableVersion':_0x5a1593,'minimumVersion':_0x4b7c47,'upgradeMessage':pickString(_0x37a528['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x37a528[_0x4761c3(0xfd)])||undefined};}export async function fetchCliVersionPolicy(){const _0x31e60f=a229_0x2b04,_0x41276c=new AbortController(),_0x646efb=setTimeout(()=>_0x41276c[_0x31e60f(0x10a)](),FETCH_TIMEOUT_MS);try{const _0x2b59d5=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':_0x41276c[_0x31e60f(0x107)]});if(!_0x2b59d5['ok'])return null;const _0x51fc8f=await _0x2b59d5['json']();return normalizeCliVersionPolicy(_0x51fc8f);}catch{return null;}finally{clearTimeout(_0x646efb);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];function a229_0x5753(){const _0x1094b9=['304740VnBTWU','11612688eaLreT','minVersion','9fOwhcr','24epswpF','18VjTRKQ','minimumVersionMessage','114GzItsy','1225963vgKGQc','object','25HwQFDG','trim','recommendedVersion','14578610xAfogD','631084VBeAtN','latestVersion','signal','13253790urgZUn','205541YNhrcD','abort','length','cli'];a229_0x5753=function(){return _0x1094b9;};return a229_0x5753();}export async function getCliVersionPolicy(){const _0x340313=Date['now']();if(hasCachedPolicy){const _0x459e82=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x340313-cacheTime<_0x459e82)return cachedPolicy;}const _0x238f0a=await fetchCliVersionPolicy();return cachedPolicy=_0x238f0a,cacheTime=_0x340313,hasCachedPolicy=!![],_0x238f0a;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a230_0x2d10f0=a230_0x216a;(function(_0x41d2ab,_0x4f3283){const _0x4d6f40=a230_0x216a,_0x1392ce=_0x41d2ab();while(!![]){try{const _0x3f05be=-parseInt(_0x4d6f40(0x95))/0x1*(parseInt(_0x4d6f40(0x97))/0x2)+parseInt(_0x4d6f40(0x9c))/0x3+-parseInt(_0x4d6f40(0x9d))/0x4*(-parseInt(_0x4d6f40(0x98))/0x5)+-parseInt(_0x4d6f40(0x99))/0x6+-parseInt(_0x4d6f40(0x9a))/0x7+parseInt(_0x4d6f40(0x93))/0x8+-parseInt(_0x4d6f40(0x92))/0x9*(parseInt(_0x4d6f40(0x96))/0xa);if(_0x3f05be===_0x4f3283)break;else _0x1392ce['push'](_0x1392ce['shift']());}catch(_0x11a746){_0x1392ce['push'](_0x1392ce['shift']());}}}(a230_0x2ab4,0xc2a65));function a230_0x2ab4(){const _0x55b591=['251808wHqDdx','10658669XLIHYH','string','4347585slqsfx','575548kNQcAA','project','171VFaaxo','4003008wGBjYO','env','61zIXnYN','586660uEVEXq','1828rvlHDo','55HPUNjR'];a230_0x2ab4=function(){return _0x55b591;};return a230_0x2ab4();}import{initEnv}from'../constant/env.js';function a230_0x216a(_0x3d5ae5,_0x1b6920){_0x3d5ae5=_0x3d5ae5-0x91;const _0x2ab456=a230_0x2ab4();let _0x216a6a=_0x2ab456[_0x3d5ae5];return _0x216a6a;}import{readRawConfig,getConfigAppCode as a230_0x3d8d89,getMultiAppConfigs as a230_0x62cccd,getTemplateBaseUrl as a230_0x5d9c15}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x4cf615){const _0x783885=a230_0x216a,_0x3e1381=readRawConfig(_0x4cf615);return _0x3e1381[_0x783885(0x94)]&&typeof _0x3e1381[_0x783885(0x94)]===_0x783885(0x9b)&&initEnv(_0x3e1381[_0x783885(0x94)]),_0x3e1381;}export function getConfigAppCode(){return a230_0x3d8d89();}export function getMultiAppConfigs(_0x3bbde8=a230_0x2d10f0(0x91)){return a230_0x62cccd(_0x3bbde8);}export function getTemplateBaseUrl(){return a230_0x5d9c15();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f0984,_0x5ec690){const _0xf3a9bc=a231_0x129c,_0x4a7a26=_0x1f0984();while(!![]){try{const _0x1772a5=parseInt(_0xf3a9bc(0x9f))/0x1+-parseInt(_0xf3a9bc(0x98))/0x2+-parseInt(_0xf3a9bc(0x94))/0x3+-parseInt(_0xf3a9bc(0x9c))/0x4*(-parseInt(_0xf3a9bc(0x97))/0x5)+parseInt(_0xf3a9bc(0x9b))/0x6+-parseInt(_0xf3a9bc(0x9a))/0x7+parseInt(_0xf3a9bc(0x9e))/0x8*(parseInt(_0xf3a9bc(0x93))/0x9);if(_0x1772a5===_0x5ec690)break;else _0x4a7a26['push'](_0x4a7a26['shift']());}catch(_0x630ff9){_0x4a7a26['push'](_0x4a7a26['shift']());}}}(a231_0x3409,0x965ee));function a231_0x3409(){const _0x88956d=['error','join','9asDcEz','1449822EKoiQz','readdirSync','name','6565HvIrLt','1158272hYRUIW','isDirectory','6723269mGycGh','5416638zzeXle','820mpvLxZ','复制目录时出错:','7241424WRAOcD','561679PhwStg'];a231_0x3409=function(){return _0x88956d;};return a231_0x3409();}import a231_0x49b641 from'node:path';function a231_0x129c(_0x20c3df,_0x3579eb){_0x20c3df=_0x20c3df-0x92;const _0x340960=a231_0x3409();let _0x129cf2=_0x340960[_0x20c3df];return _0x129cf2;}import a231_0x381aff from'node:fs';export async function copyDirectory(_0x5d0071,_0x3c7769){const _0x29ab9d=a231_0x129c;try{const _0x60a39a=a231_0x381aff[_0x29ab9d(0x95)](_0x5d0071,{'withFileTypes':!![]});a231_0x381aff['mkdirSync'](_0x3c7769,{'recursive':!![]});for(const _0x2dadd5 of _0x60a39a){const _0x48fe95=a231_0x49b641[_0x29ab9d(0x92)](_0x5d0071,_0x2dadd5['name']),_0x380710=a231_0x49b641[_0x29ab9d(0x92)](_0x3c7769,_0x2dadd5[_0x29ab9d(0x96)]);_0x2dadd5[_0x29ab9d(0x99)]()?await copyDirectory(_0x48fe95,_0x380710):a231_0x381aff['copyFileSync'](_0x48fe95,_0x380710);}}catch(_0x37a3f7){console[_0x29ab9d(0xa0)](_0x29ab9d(0x9d),_0x37a3f7);}}
|