@lovrabet/rabetbase-cli 2.4.4 → 2.4.5-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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +1 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/business-group-update.js +1 -1
- package/lib/commands/{permit/index.d.ts → dataset/business-groups.d.ts} +1 -1
- package/lib/commands/dataset/business-groups.js +1 -0
- 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 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- 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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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.d.ts +15 -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 -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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.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/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/upgrade.js +1 -1
- package/lib/commands/registry.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.d.ts +15 -17
- 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/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.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.d.ts +70 -79
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +1 -0
- 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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/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/skills/rabetbase/SKILL.md +18 -24
- package/skills/rabetbase/guides/database-connection-workflow.md +6 -2
- package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +28 -0
- package/skills/rabetbase/references/rabetbase-dataset-delete.md +7 -5
- package/skills/rabetbase/references/rabetbase-dataset-list.md +6 -6
- package/skills/rabetbase/references/rabetbase-dataset-restore.md +5 -5
- package/skills/rabetbase/references/rabetbase-db-create.md +3 -0
- package/skills/rabetbase/references/rabetbase-db-delete.md +10 -2
- package/skills/rabetbase/references/rabetbase-db-detail.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-list.md +3 -2
- package/skills/rabetbase/references/rabetbase-db-update.md +4 -2
- package/skills/rabetbase/references/rabetbase-role-list.md +9 -17
- package/skills/rabetbase/references/rabetbase-role-user-add.md +44 -16
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
- package/skills/rabetbase.manifest.json +4 -7
- package/lib/commands/permit/index.js +0 -1
- package/lib/commands/permit/page-get.d.ts +0 -2
- package/lib/commands/permit/page-get.js +0 -1
- package/lib/commands/permit/page-set.d.ts +0 -2
- package/lib/commands/permit/page-set.js +0 -1
- package/lib/commands/permit/role-apis-set.d.ts +0 -2
- package/lib/commands/permit/role-apis-set.js +0 -1
- package/lib/commands/permit/role-menus-set.d.ts +0 -2
- package/lib/commands/permit/role-menus-set.js +0 -1
- package/lib/commands/permit/role-menus.d.ts +0 -2
- package/lib/commands/permit/role-menus.js +0 -1
- package/lib/commands/permit/shared.d.ts +0 -74
- package/lib/commands/permit/shared.js +0 -1
- package/lib/commands/role/create.d.ts +0 -2
- package/lib/commands/role/create.js +0 -1
- package/skills/rabetbase/guides/role-permit-workflow.md +0 -127
- package/skills/rabetbase/references/rabetbase-permit-page-set.md +0 -69
- package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +0 -53
- package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a263_0x4b6db1=a263_0x124c;(function(_0x4dc1e1,_0x5c9d44){const _0x5519df=a263_0x124c,_0x62e791=_0x4dc1e1();while(!![]){try{const _0x48a743=parseInt(_0x5519df(0x107))/0x1+-parseInt(_0x5519df(0x115))/0x2+-parseInt(_0x5519df(0xf8))/0x3*(parseInt(_0x5519df(0xfc))/0x4)+parseInt(_0x5519df(0xeb))/0x5*(parseInt(_0x5519df(0xf9))/0x6)+parseInt(_0x5519df(0xfd))/0x7+parseInt(_0x5519df(0x10b))/0x8*(parseInt(_0x5519df(0xe9))/0x9)+-parseInt(_0x5519df(0x118))/0xa;if(_0x48a743===_0x5c9d44)break;else _0x62e791['push'](_0x62e791['shift']());}catch(_0x5616bc){_0x62e791['push'](_0x62e791['shift']());}}}(a263_0x1f1c,0x4deca));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';function a263_0x1f1c(){const _0x1ab870=['inherit','signal','state','422911DBszEr','remove','trim','absent','16arveby','EACCES','ENOENT','NPM_CONFIG_GLOBAL','stdout','pipe','yes','INSTALL_PARTIAL','stderr','Skill\x20\x22','588722OMswpy','EPERM','npx','11022530JKjYHW','lovrabet/rabetbase','Installer\x20reported\x20','npm_config_global','unknown','code','\x20failed\x20target(s)','2475855MwhUNa','CHILD_TERMINATED','5qttRuj','NPX_NOT_FOUND','skills@latest','lovrabet/lovrabet-skill','unverifiable','stdio','npx\x20terminated\x20by\x20signal\x20','\x22\x20install\x20state:\x20','SPAWN_FAILED','SKILL_NOT_INSTALLED','join','rabetbase','warn','3ngwqRo','3685386MpgOtM','!\x20Could\x20not\x20verify\x20\x22','expectedSkillName','309592ByWwvi','1441006xffEXQ','error','toString','status','message','presence','push'];a263_0x1f1c=function(){return _0x1ab870;};return a263_0x1f1c();}export const NPX_SKILLS_CLI=a263_0x4b6db1(0xed);export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL='--skill';function a263_0x124c(_0x3e2815,_0x46ac30){_0x3e2815=_0x3e2815-0xe5;const _0x1f1c3d=a263_0x1f1c();let _0x124ccd=_0x1f1c3d[_0x3e2815];return _0x124ccd;}export const RABETBASE_SKILL_SOURCE=a263_0x4b6db1(0x119);export const LEGACY_RABETBASE_SKILL_SOURCE=a263_0x4b6db1(0xee);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export const RABETBASE_GLOBAL_SKILL_NAME=a263_0x4b6db1(0xf6);export const RABETBASE_SKILL_GIT_SOURCE='git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git';export function resolveGlobalSkillName(_0x3db049){const _0x1b34eb=a263_0x4b6db1;switch(_0x3db049[_0x1b34eb(0x109)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x1f8082){const _0x21a55=a263_0x4b6db1,_0xff3b7d=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x1f8082&&_0xff3b7d[_0x21a55(0x103)](NPX_SKILLS_FLAG_SKILL,_0x1f8082),_0xff3b7d;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a263_0x4b6db1(0x117),...buildNpxSkillsAddArgv()][a263_0x4b6db1(0xf5)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a263_0x4b6db1(0x117),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x451569,_0x494c33,_0x1ac9e4){return{'ok':![],'status':_0x494c33,'code':_0x451569,'error':'['+_0x451569+']\x20'+_0x1ac9e4};}function spawnOptions(_0x44c362,_0x17fd05){const _0xebf965=a263_0x4b6db1,_0x4f6f16={...process.env};return delete _0x4f6f16[_0xebf965(0xe5)],delete _0x4f6f16[_0xebf965(0x10e)],{'cwd':_0x44c362,'stdio':_0x17fd05,'env':_0x4f6f16,'shell':![],..._0x17fd05===_0xebf965(0x110)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x1ef5d1,_0x1fe048,_0x109f69,_0x3ea05e){const _0x5e21ae=a263_0x4b6db1,_0x5a6d25=[_0x1ef5d1['stdout']?_0x1ef5d1[_0x5e21ae(0x10f)][_0x5e21ae(0xff)]():'',_0x1ef5d1['stderr']?_0x1ef5d1[_0x5e21ae(0x113)][_0x5e21ae(0xff)]():'']['filter'](Boolean)[_0x5e21ae(0xf5)]('\x0a')[_0x5e21ae(0x109)]();_0x3ea05e!==_0x5e21ae(0x110)&&_0x5a6d25&&console['log'](_0x5a6d25);if(_0x1ef5d1[_0x5e21ae(0xfe)]){const _0x39fab8=_0x1ef5d1[_0x5e21ae(0xfe)],_0x19e788=_0x39fab8[_0x5e21ae(0xe7)]===_0x5e21ae(0x10d)?_0x5e21ae(0xec):_0x39fab8[_0x5e21ae(0xe7)]===_0x5e21ae(0x116)||_0x39fab8['code']===_0x5e21ae(0x10c)?'PERMISSION_DENIED':_0x5e21ae(0xf3);return failure(_0x19e788,_0x1ef5d1[_0x5e21ae(0x100)],_0x39fab8[_0x5e21ae(0x101)]);}if(_0x1ef5d1[_0x5e21ae(0x105)])return failure(_0x5e21ae(0xea),_0x1ef5d1[_0x5e21ae(0x100)],_0x5e21ae(0xf1)+_0x1ef5d1[_0x5e21ae(0x105)]);if(_0x1ef5d1[_0x5e21ae(0x100)]!==0x0)return failure('CHILD_EXIT_NONZERO',_0x1ef5d1[_0x5e21ae(0x100)],_0x5a6d25||'exit\x20'+(_0x1ef5d1[_0x5e21ae(0x100)]??_0x5e21ae(0xe6)));const _0x351cec=_0x1fe048?resolveInstalledSkill(_0x1fe048,_0x109f69):undefined,_0xb958a1=_0x5a6d25['match'](/Failed to install\s+(\d+)/i);if(_0xb958a1&&Number(_0xb958a1[0x1])>0x0){const _0x17a957=_0x5e21ae(0x11a)+_0xb958a1[0x1]+_0x5e21ae(0xe8)+(_0x5a6d25?':\x0a'+_0x5a6d25:'');if(_0x351cec?.[_0x5e21ae(0x106)]==='present')return console[_0x5e21ae(0xf7)]('!\x20'+_0x17a957),{'ok':!![],'status':0x0};return failure(_0x5e21ae(0x112),0x0,_0x17a957);}if(_0x351cec){if(_0x351cec[_0x5e21ae(0x106)]===_0x5e21ae(0x10a))return failure(_0x5e21ae(0xf4),0x0,_0x5e21ae(0x114)+_0x1fe048+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0x351cec['checked'][_0x5e21ae(0xf5)](',\x20')+')');_0x351cec[_0x5e21ae(0x106)]===_0x5e21ae(0xef)&&console[_0x5e21ae(0xf7)](_0x5e21ae(0xfa)+_0x1fe048+_0x5e21ae(0xf2)+_0x351cec['reason']);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x26e688,_0x22b98f){const _0x31b2dc=a263_0x4b6db1;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x54be44=_0x22b98f?.[_0x31b2dc(0xf0)]??_0x31b2dc(0x104),_0xefffe1=resolveNpmBin(_0x31b2dc(0x117)),_0x28a30b=buildNpxSkillsAddArgv(_0x22b98f?.['skill']),_0x44787d=[_0x31b2dc(0x117),..._0x28a30b][_0x31b2dc(0xf5)]('\x20');console['log']('*\x20'+_0x44787d);const _0x3c6a15=spawnSync(_0xefffe1,_0x28a30b,spawnOptions(_0x26e688,_0x54be44));return normalizeSpawnResult(_0x3c6a15,undefined,undefined,_0x54be44);}export function runNpxSkillsRemove(_0x32ffdd,_0xc721cb,_0x1d241e=LEGACY_RABETBASE_SKILL_SOURCE){const _0x363318=a263_0x4b6db1;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x26a052=_0xc721cb?.['stdio']??'inherit',_0x1c3d86=resolveNpmBin(_0x363318(0x117)),_0x4c7987=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x363318(0x108),_0x1d241e,NPX_SKILLS_FLAG_SKILL,_0xc721cb?.['skill']??DEFAULT_RABETBASE_SKILL_NAME,..._0xc721cb?.[_0x363318(0x111)]?['-y']:[]],_0xb32ffa=[_0x1c3d86,..._0x4c7987][_0x363318(0xf5)]('\x20');console['log']('*\x20'+_0xb32ffa);const _0x12ec6c=spawnSync(_0x1c3d86,_0x4c7987,spawnOptions(_0x32ffdd,_0x26a052));return normalizeSpawnResult(_0x12ec6c,undefined,undefined,_0x26a052);}export function runNpxSkillsAddGlobal(_0x114679,_0x5e298c,_0x5df697){const _0x36ebc4=a263_0x4b6db1;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5f40de=resolveNpmBin('npx'),_0x4191de=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x5e298c,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x57cab9=[_0x36ebc4(0x117),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x5e298c,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x36ebc4(0xf5)]('\x20');console['log']('*\x20'+_0x57cab9);const _0xb43150=spawnSync(_0x5f40de,_0x4191de,spawnOptions(_0x114679,_0x36ebc4(0x110)));return normalizeSpawnResult(_0xb43150,_0x5df697?.[_0x36ebc4(0xfb)]??resolveGlobalSkillName(_0x5e298c),_0x5df697?.[_0x36ebc4(0x102)],_0x5df697?.['stdio']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a264_0x36659a=a264_0x7490;(function(_0x310c5a,_0xacc811){const _0x1c086d=a264_0x7490,_0x20dfb1=_0x310c5a();while(!![]){try{const _0x1f6a7b=-parseInt(_0x1c086d(0x112))/0x1*(-parseInt(_0x1c086d(0x125))/0x2)+-parseInt(_0x1c086d(0x127))/0x3*(-parseInt(_0x1c086d(0x117))/0x4)+-parseInt(_0x1c086d(0x120))/0x5*(parseInt(_0x1c086d(0x11f))/0x6)+parseInt(_0x1c086d(0x113))/0x7*(parseInt(_0x1c086d(0x118))/0x8)+-parseInt(_0x1c086d(0x11e))/0x9+parseInt(_0x1c086d(0x12a))/0xa*(parseInt(_0x1c086d(0x12d))/0xb)+-parseInt(_0x1c086d(0x11a))/0xc;if(_0x1f6a7b===_0xacc811)break;else _0x20dfb1['push'](_0x20dfb1['shift']());}catch(_0x185bac){_0x20dfb1['push'](_0x20dfb1['shift']());}}}(a264_0x3254,0x2764a));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a264_0x7490(_0x290168,_0x4a56e5){_0x290168=_0x290168-0x10d;const _0x325446=a264_0x3254();let _0x74908b=_0x325446[_0x290168];return _0x74908b;}function a264_0x3254(){const _0x3d5f99=['.agents','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','lockFile','19MmSjfY','691432LaQJmE','recorded','map','version','48PvDwKH','16ZBBIui','\x20records\x20\x22','5050776LscaBd','\x20uses\x20unsupported\x20version\x20','unverifiable','present','239895ExBZVV','210IiCsJl','28735cATkAP','skills','home','globalSkillsDirs','\x20has\x20no\x20skills\x20map','19246khEhIK','message','55281TaXbpd','reason','join','71910JAArRi','absent','find','319suOjFf','utf8','not-recorded','\x20is\x20unreadable:\x20','unusable','parse'];a264_0x3254=function(){return _0x3d5f99;};return a264_0x3254();}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a264_0x36659a(0x10f),'.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a264_0x36659a(0x121)),join('.claude',a264_0x36659a(0x121))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x39c439,_0x133208){const _0x413921=a264_0x36659a;if(!existsSync(_0x39c439))return{'kind':_0x413921(0x12f)};let _0x3e8087;try{_0x3e8087=JSON[_0x413921(0x10e)](readFileSync(_0x39c439,_0x413921(0x12e)));}catch(_0xc489fd){return{'kind':_0x413921(0x10d),'reason':_0x39c439+_0x413921(0x130)+_0xc489fd[_0x413921(0x126)]};}const _0x546da2=_0x3e8087;if(typeof _0x546da2?.[_0x413921(0x116)]!=='number'||!SUPPORTED_LOCK_VERSIONS['includes'](_0x546da2[_0x413921(0x116)]))return{'kind':_0x413921(0x10d),'reason':_0x39c439+_0x413921(0x11b)+String(_0x546da2?.[_0x413921(0x116)])};if(!_0x546da2[_0x413921(0x121)]||typeof _0x546da2[_0x413921(0x121)]!=='object')return{'kind':_0x413921(0x10d),'reason':_0x39c439+_0x413921(0x124)};return _0x546da2['skills'][_0x133208]?{'kind':_0x413921(0x114)}:{'kind':_0x413921(0x12f)};}export function resolveInstalledSkill(_0x164cc7,_0x166d88){const _0xa6373d=a264_0x36659a,_0x30192f=_0x166d88?.[_0xa6373d(0x122)]??homedir(),_0x4f6ba4=_0x166d88?.[_0xa6373d(0x123)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0xa6373d(0x115)](_0x540ce2=>join(_0x30192f,_0x540ce2)),_0x2024ae=_0x166d88?.[_0xa6373d(0x111)]??join(_0x30192f,SKILL_LOCK_RELATIVE_PATH),_0xca36a2=_0x4f6ba4['map'](_0x4d56fe=>join(_0x4d56fe,_0x164cc7,'SKILL.md')),_0x3a0f82=_0xca36a2[_0xa6373d(0x12c)](_0x1ab317=>existsSync(_0x1ab317));if(_0x3a0f82)return{'state':_0xa6373d(0x11d),'path':_0x3a0f82};const _0x5db1c4=readLockLookup(_0x2024ae,_0x164cc7);if(_0x5db1c4['kind']===_0xa6373d(0x10d))return{'state':_0xa6373d(0x11c),'reason':_0x5db1c4[_0xa6373d(0x128)]};if(_0x5db1c4['kind']===_0xa6373d(0x114))return{'state':_0xa6373d(0x11c),'reason':_0x2024ae+_0xa6373d(0x119)+_0x164cc7+_0xa6373d(0x110)+('('+_0xca36a2[_0xa6373d(0x129)](',\x20')+')')};return{'state':_0xa6373d(0x12b),'checked':_0xca36a2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a265_0x494d(){const _0x264c60=['88LIOibh','4OqBbOT','[REDACTED]','rabetbase.command','400tHSyqr','16SyqtDH','error','3805vgUNJp','command','message','test','604719jsDzwY','2252187wliEYB','entries','service','3075490KuXxWd','durationMs','1289708DLhaFP','some','stringify','1006265zPyBBR','2770326ReDRUV'];a265_0x494d=function(){return _0x264c60;};return a265_0x494d();}(function(_0x13c434,_0x1e8437){const _0xc594c0=a265_0x3a58,_0x321f15=_0x13c434();while(!![]){try{const _0x255e5e=parseInt(_0xc594c0(0x11d))/0x1*(-parseInt(_0xc594c0(0x11a))/0x2)+-parseInt(_0xc594c0(0x10c))/0x3*(parseInt(_0xc594c0(0x117))/0x4)+parseInt(_0xc594c0(0x114))/0x5+-parseInt(_0xc594c0(0x115))/0x6+parseInt(_0xc594c0(0x111))/0x7*(-parseInt(_0xc594c0(0x11b))/0x8)+parseInt(_0xc594c0(0x10b))/0x9+parseInt(_0xc594c0(0x10f))/0xa*(parseInt(_0xc594c0(0x116))/0xb);if(_0x255e5e===_0x1e8437)break;else _0x321f15['push'](_0x321f15['shift']());}catch(_0x301cb6){_0x321f15['push'](_0x321f15['shift']());}}}(a265_0x494d,0x5e752));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 a265_0x3a58(_0x79033,_0x4838a9){_0x79033=_0x79033-0x10b;const _0x494d54=a265_0x494d();let _0x3a58be=_0x494d54[_0x79033];return _0x3a58be;}function isSensitiveKey(_0x90498c){const _0x251d8c=a265_0x3a58;return SENSITIVE_PATTERNS[_0x251d8c(0x112)](_0x5c8081=>_0x5c8081[_0x251d8c(0x120)](_0x90498c));}function sanitizeFlags(_0x25bf1a){const _0x52ff82=a265_0x3a58,_0x2a28ef={};for(const [_0x3611ea,_0x2225ca]of Object[_0x52ff82(0x10d)](_0x25bf1a)){isSensitiveKey(_0x3611ea)?_0x2a28ef[_0x3611ea]=_0x2225ca!=null&&_0x2225ca!==''?_0x52ff82(0x118):_0x2225ca:_0x2a28ef[_0x3611ea]=_0x2225ca;}return _0x2a28ef;}export async function reportCommandTrace(_0x3934d5){const _0x1c6b9b=a265_0x3a58;try{const _0x4eebd4=sanitizeFlags(_0x3934d5['flags']);await sendCliTraceLog({'spanName':_0x1c6b9b(0x119),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x3934d5[_0x1c6b9b(0x10e)],'command.name':_0x3934d5[_0x1c6b9b(0x11e)],'command.flags':JSON[_0x1c6b9b(0x113)](_0x4eebd4),..._0x3934d5[_0x1c6b9b(0x110)]!=null?{'command.duration_ms':_0x3934d5[_0x1c6b9b(0x110)]}:{},..._0x3934d5[_0x1c6b9b(0x11c)]?{'command.error':_0x3934d5[_0x1c6b9b(0x11c)]instanceof Error?_0x3934d5[_0x1c6b9b(0x11c)][_0x1c6b9b(0x11f)]:String(_0x3934d5[_0x1c6b9b(0x11c)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a266_0x4ef1(_0x363be0,_0x10d655){_0x363be0=_0x363be0-0x7a;var _0x744a84=a266_0x744a();var _0x4ef1cc=_0x744a84[_0x363be0];return _0x4ef1cc;}function a266_0x744a(){var _0x2e4906=['14jaXaDG','626055IJJuBD','99228fEOQzX','5775824bzqsST','63vjQVEE','Failed\x20to\x20report\x20CLI\x20help\x20trace:','error','318mdxPZa','service','1557192Qlhqyr','131090qtwGkJ','9803610FArGQG','cli.help','1203381dLJMcR'];a266_0x744a=function(){return _0x2e4906;};return a266_0x744a();}(function(_0x293cb8,_0x3bc059){var _0x20022d=a266_0x4ef1,_0x1878a5=_0x293cb8();while(!![]){try{var _0x1580a7=parseInt(_0x20022d(0x7b))/0x1+parseInt(_0x20022d(0x83))/0x2+-parseInt(_0x20022d(0x7e))/0x3*(-parseInt(_0x20022d(0x7c))/0x4)+-parseInt(_0x20022d(0x84))/0x5*(-parseInt(_0x20022d(0x81))/0x6)+parseInt(_0x20022d(0x7a))/0x7*(-parseInt(_0x20022d(0x7d))/0x8)+-parseInt(_0x20022d(0x87))/0x9+-parseInt(_0x20022d(0x85))/0xa;if(_0x1580a7===_0x3bc059)break;else _0x1878a5['push'](_0x1878a5['shift']());}catch(_0x58b3e1){_0x1878a5['push'](_0x1878a5['shift']());}}}(a266_0x744a,0xb8d86));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x5c0ae1,_0xb3b29d){var _0xd5f35=a266_0x4ef1;try{await sendCliTraceLog({'spanName':_0xd5f35(0x86),'logData':{'rabetbase.help.kind':_0x5c0ae1,..._0xb3b29d?.[_0xd5f35(0x82)]&&{'rabetbase.help.service':_0xb3b29d[_0xd5f35(0x82)]}}});}catch(_0x17ed16){console[_0xd5f35(0x80)](_0xd5f35(0x7f),_0x17ed16);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d595,_0xad4bb7){const _0x35ff66=a267_0x2c2c,_0xc5b594=_0x3d595();while(!![]){try{const _0x5b9ae8=-parseInt(_0x35ff66(0x12e))/0x1+-parseInt(_0x35ff66(0x12a))/0x2*(-parseInt(_0x35ff66(0x131))/0x3)+parseInt(_0x35ff66(0x12c))/0x4+parseInt(_0x35ff66(0x128))/0x5*(-parseInt(_0x35ff66(0x125))/0x6)+-parseInt(_0x35ff66(0x132))/0x7+-parseInt(_0x35ff66(0x124))/0x8+parseInt(_0x35ff66(0x129))/0x9;if(_0x5b9ae8===_0xad4bb7)break;else _0xc5b594['push'](_0xc5b594['shift']());}catch(_0x13b8ed){_0xc5b594['push'](_0xc5b594['shift']());}}}(a267_0x51d8,0x98f85));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';function a267_0x2c2c(_0x35e38c,_0x146472){_0x35e38c=_0x35e38c-0x123;const _0x51d879=a267_0x51d8();let _0x2c2c4c=_0x51d879[_0x35e38c];return _0x2c2c4c;}import{getConfigAppCode}from'../utils/config.js';function a267_0x51d8(){const _0x11faf8=['6201726TcmiQH','nickname','unknown','5qOZrMs','20956761GmbAQS','2fyrvMK','daily','5011400JYOheC','tenant_code','615902oqBSAr','email','tenant','2001189AlZwoh','6208909iVjOhb','user','8682936mAKRCO'];a267_0x51d8=function(){return _0x11faf8;};return a267_0x51d8();}let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x1ffed8=a267_0x2c2c,_0x5d5964=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x1ec2ad=_0x5d5964?.[_0x1ffed8(0x123)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x1ffed8(0x127)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x1ffed8(0x12b):'production')}),setUserContext({'id':_0x1ec2ad?.['id'],'username':_0x1ec2ad?.['username'],'nickname':_0x1ec2ad?.[_0x1ffed8(0x126)],'email':_0x1ec2ad?.[_0x1ffed8(0x12f)],'tenantCode':_0x1ec2ad?.[_0x1ffed8(0x130)]?.[_0x1ffed8(0x12d)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x5d5964;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x7b8096,_0x147c5b){const _0x2a9105=a268_0x50c3,_0x37ebfc=_0x7b8096();while(!![]){try{const _0x54f922=-parseInt(_0x2a9105(0x10a))/0x1*(-parseInt(_0x2a9105(0x103))/0x2)+-parseInt(_0x2a9105(0x10e))/0x3*(-parseInt(_0x2a9105(0x106))/0x4)+-parseInt(_0x2a9105(0x107))/0x5+parseInt(_0x2a9105(0x100))/0x6*(-parseInt(_0x2a9105(0x10d))/0x7)+parseInt(_0x2a9105(0x101))/0x8+-parseInt(_0x2a9105(0x108))/0x9+-parseInt(_0x2a9105(0x10b))/0xa*(-parseInt(_0x2a9105(0x104))/0xb);if(_0x54f922===_0x147c5b)break;else _0x37ebfc['push'](_0x37ebfc['shift']());}catch(_0x48e246){_0x37ebfc['push'](_0x37ebfc['shift']());}}}(a268_0x526e,0x91d64));import{shutdownTraces}from'@lovrabet/otel-logger';function a268_0x50c3(_0x2fc47e,_0x594b9f){_0x2fc47e=_0x2fc47e-0x100;const _0x526ea5=a268_0x526e();let _0x50c3de=_0x526ea5[_0x2fc47e];return _0x50c3de;}let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x5a226c=a268_0x50c3;process[_0x5a226c(0x109)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x4f3008=()=>{const _0x38c8a7=_0x5a226c;void flushOtelNodeIfUsed()[_0x38c8a7(0x102)](()=>process['exit'](0x0));};process[_0x5a226c(0x109)](_0x5a226c(0x105),_0x4f3008),process[_0x5a226c(0x109)](_0x5a226c(0x10c),_0x4f3008);}function a268_0x526e(){const _0x431b4f=['59507DXvSdu','6ADUjdL','594osYHCK','2268752SariyD','then','1272756FwcJYk','821579FnSbBs','SIGINT','506324VkWFFk','1022660JPArCb','7194312jFzVVc','once','1BZpOUC','170rXQroZ','SIGTERM'];a268_0x526e=function(){return _0x431b4f;};return a268_0x526e();}export async function exitWithOtelShutdown(_0x5af5c4){await flushOtelNodeIfUsed(),process['exit'](_0x5af5c4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a269_0x3873(_0x81dddd,_0x38babb){_0x81dddd=_0x81dddd-0x70;const _0x18c267=a269_0x18c2();let _0x387359=_0x18c267[_0x81dddd];return _0x387359;}(function(_0x4fc937,_0xb2239b){const _0x3e1177=a269_0x3873,_0x2c36d6=_0x4fc937();while(!![]){try{const _0x2bc952=parseInt(_0x3e1177(0x7d))/0x1+-parseInt(_0x3e1177(0x7c))/0x2+-parseInt(_0x3e1177(0x7e))/0x3*(-parseInt(_0x3e1177(0x78))/0x4)+parseInt(_0x3e1177(0x75))/0x5*(parseInt(_0x3e1177(0x79))/0x6)+-parseInt(_0x3e1177(0x70))/0x7*(-parseInt(_0x3e1177(0x74))/0x8)+-parseInt(_0x3e1177(0x7a))/0x9+-parseInt(_0x3e1177(0x76))/0xa*(parseInt(_0x3e1177(0x77))/0xb);if(_0x2bc952===_0xb2239b)break;else _0x2c36d6['push'](_0x2c36d6['shift']());}catch(_0x2bbd72){_0x2c36d6['push'](_0x2c36d6['shift']());}}}(a269_0x18c2,0x635f9));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';function a269_0x18c2(){const _0x1f948b=['61770BffIKu','572Zrjajk','12eIGNSZ','4783962yEKEpH','5344533pOvFRm','manual','800744olNROL','93360jQLUDl','411771yaRKgW','434TXJEbo','logData','spanName','traceparent','54192XaetNN','5WwRanF'];a269_0x18c2=function(){return _0x1f948b;};return a269_0x18c2();}import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME='rabetbase-cli';export async function sendCliTraceLog(_0x24df52){const _0x327a41=a269_0x3873;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x24df52['traceName']??DEFAULT_TRACE_NAME,'version':_0x24df52['version']??getCliVersion(),'spanName':_0x24df52[_0x327a41(0x72)],'eventType':_0x327a41(0x7b),'logData':_0x24df52[_0x327a41(0x71)],..._0x24df52[_0x327a41(0x73)]&&{'traceparent':_0x24df52[_0x327a41(0x73)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a270_0xddb5(){const _0xa80837=['truncated','4pVtZdY','platform-issue-log-collect','originalBytes','1362430wLOgmO','redactionCount','sanitize','1335850ygxpWu','join','2835992wnjJAY','1614QOKSJM','issue.log.collect','7840IHFqjX','title','1031883OxqKrF','3505374cvAMOh','626529zXdazq'];a270_0xddb5=function(){return _0xa80837;};return a270_0xddb5();}const a270_0x1e7cac=a270_0x2f89;(function(_0x458d79,_0x453c44){const _0x3dc7d1=a270_0x2f89,_0x102cb1=_0x458d79();while(!![]){try{const _0x3ead69=parseInt(_0x3dc7d1(0xbc))/0x1+-parseInt(_0x3dc7d1(0xc1))/0x2+-parseInt(_0x3dc7d1(0xba))/0x3+-parseInt(_0x3dc7d1(0xbe))/0x4*(parseInt(_0x3dc7d1(0xb3))/0x5)+parseInt(_0x3dc7d1(0xb6))/0x6*(parseInt(_0x3dc7d1(0xb8))/0x7)+parseInt(_0x3dc7d1(0xb5))/0x8+parseInt(_0x3dc7d1(0xbb))/0x9;if(_0x3ead69===_0x453c44)break;else _0x102cb1['push'](_0x102cb1['shift']());}catch(_0x2fa6ba){_0x102cb1['push'](_0x102cb1['shift']());}}}(a270_0xddb5,0x5ca38));function a270_0x2f89(_0x1c16e2,_0x1953fe){_0x1c16e2=_0x1c16e2-0xb2;const _0xddb510=a270_0xddb5();let _0x2f891c=_0xddb510[_0x1c16e2];return _0x2f891c;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a270_0x1e7cac(0xbf);export const PLATFORM_ISSUE_SPAN_NAME=a270_0x1e7cac(0xb7);export async function sendPlatformIssueCollectLog(_0x2df55d){const _0x384ddf=a270_0x1e7cac;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2df55d[_0x384ddf(0xb9)],'issue.description':_0x2df55d['description'],..._0x2df55d[_0x384ddf(0xb2)]?{'issue.description_original_bytes':_0x2df55d['sanitize'][_0x384ddf(0xc0)],'issue.description_truncated':_0x2df55d[_0x384ddf(0xb2)][_0x384ddf(0xbd)],'issue.description_redactions':_0x2df55d[_0x384ddf(0xb2)][_0x384ddf(0xc2)],'issue.description_redaction_kinds':_0x2df55d[_0x384ddf(0xb2)]['redactionKinds'][_0x384ddf(0xb4)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a272_0x295d8f=a272_0x5557;(function(_0x29edd6,_0x39c888){const _0x5cef92=a272_0x5557,_0x5ce39a=_0x29edd6();while(!![]){try{const _0x2e98c5=-parseInt(_0x5cef92(0x1e9))/0x1+parseInt(_0x5cef92(0x1c1))/0x2+-parseInt(_0x5cef92(0x1ba))/0x3+parseInt(_0x5cef92(0x1d4))/0x4*(parseInt(_0x5cef92(0x1d8))/0x5)+-parseInt(_0x5cef92(0x1c6))/0x6+parseInt(_0x5cef92(0x1d0))/0x7*(parseInt(_0x5cef92(0x1b9))/0x8)+parseInt(_0x5cef92(0x1c4))/0x9;if(_0x2e98c5===_0x39c888)break;else _0x5ce39a['push'](_0x5ce39a['shift']());}catch(_0x5073b1){_0x5ce39a['push'](_0x5ce39a['shift']());}}}(a272_0x3552,0x1daa5));export const CORE_IDE_CONFIGS={'cursor':{'name':a272_0x295d8f(0x1e6),'description':a272_0x295d8f(0x1e2),'folders':[a272_0x295d8f(0x1c3),a272_0x295d8f(0x1cc)],'files':[{'type':a272_0x295d8f(0x1be),'path':a272_0x295d8f(0x1e3),'template':a272_0x295d8f(0x1bd)}]},'windsurf':{'name':a272_0x295d8f(0x1df),'description':'Windsurf\x20IDE','folders':[a272_0x295d8f(0x1cf)],'files':[{'type':a272_0x295d8f(0x1be),'path':'.windsurf/workflows/rabetbase.md','template':a272_0x295d8f(0x1bd)}]},'claude':{'name':a272_0x295d8f(0x1b8),'description':a272_0x295d8f(0x1b8),'folders':[a272_0x295d8f(0x1d5)],'files':[{'type':a272_0x295d8f(0x1be),'path':a272_0x295d8f(0x1e0),'template':a272_0x295d8f(0x1bd)}]},'cline':{'name':'Cline','description':a272_0x295d8f(0x1bb),'folders':['.cline'],'files':[{'type':a272_0x295d8f(0x1be),'path':a272_0x295d8f(0x1e1),'template':'SKILL.md.tpl'}]},'codex':{'name':a272_0x295d8f(0x1c0),'description':'Codex\x20IDE','folders':[a272_0x295d8f(0x1d7)],'files':[{'type':a272_0x295d8f(0x1be),'path':'.codex/skills/lovrabet/SKILL.md','template':a272_0x295d8f(0x1bd)}]},'opencode':{'name':a272_0x295d8f(0x1bf),'description':a272_0x295d8f(0x1c5),'folders':[a272_0x295d8f(0x1d6)],'files':[{'type':a272_0x295d8f(0x1be),'path':'.opencode/skills/lovrabet/SKILL.md','template':a272_0x295d8f(0x1bd)}]},'qoder':{'name':a272_0x295d8f(0x1cd),'description':a272_0x295d8f(0x1db),'folders':[a272_0x295d8f(0x1ce)],'files':[{'type':'file','path':'.qoder/rules/rabetbase.md','template':'SKILL.md.tpl'},{'type':'file','path':'.qoder/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'codebuddy':{'name':a272_0x295d8f(0x1d1),'description':a272_0x295d8f(0x1e8),'folders':[a272_0x295d8f(0x1c8)],'files':[{'type':a272_0x295d8f(0x1be),'path':'.codebuddy/skills/lovrabet/SKILL.md','template':a272_0x295d8f(0x1bd)}]},'trae':{'name':a272_0x295d8f(0x1bc),'description':'Trae\x20IDE','folders':[a272_0x295d8f(0x1ca)],'files':[{'type':a272_0x295d8f(0x1be),'path':'.trae/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a272_0x295d8f(0x1dc),'description':a272_0x295d8f(0x1dd),'folders':[a272_0x295d8f(0x1cb)],'files':[{'type':a272_0x295d8f(0x1be),'path':a272_0x295d8f(0x1ea),'template':a272_0x295d8f(0x1bd)}]},'antigravity':{'name':a272_0x295d8f(0x1b6),'description':a272_0x295d8f(0x1e4),'folders':[a272_0x295d8f(0x1cb)],'files':[{'type':a272_0x295d8f(0x1be),'path':a272_0x295d8f(0x1ea),'template':a272_0x295d8f(0x1bd)}]}};function a272_0x5557(_0x4ce2b6,_0x7c3933){_0x4ce2b6=_0x4ce2b6-0x1b6;const _0x35528f=a272_0x3552();let _0x5557c6=_0x35528f[_0x4ce2b6];return _0x5557c6;}export const CORE_IDE_LIST=['claude',a272_0x295d8f(0x1d9),a272_0x295d8f(0x1c2),a272_0x295d8f(0x1c7),a272_0x295d8f(0x1d2),a272_0x295d8f(0x1c9),a272_0x295d8f(0x1da),'trae',a272_0x295d8f(0x1b7)];function a272_0x3552(){const _0x4d2586=['.codebuddy','opencode','.trae','.agent','.cursor','Qoder','.qoder','.windsurf','7DrFAxj','CodeBuddy','cursor','antigravity','4wfvIna','.claude','.opencode','.codex','501565txekUM','cline','qoder','Qoder\x20IDE','其他\x20(通用模板)','通用模板\x20-\x20兜底方案','agent','Windsurf','.claude/skills/lovrabet/SKILL.md','.cline/skills/lovrabet/SKILL.md','Cursor\x20IDE','.cursor/skills/rabetbase.md','Antigravity\x20IDE','claude','Cursor','trae','CodeBuddy\x20IDE','122054IxkJkt','.agent/skills/lovrabet/SKILL.md','Antigravity','windsurf','Claude\x20Code','1087008NGGfGM','233412WrFilw','Cline\x20IDE','Trae','SKILL.md.tpl','file','OpenCode','Codex','154796LtxOsW','codebuddy','.cursorrules','2141712lpkztm','OpenCode\x20IDE','1381128ivOplx','codex'];a272_0x3552=function(){return _0x4d2586;};return a272_0x3552();}export const IDE_LIST=[a272_0x295d8f(0x1d3),a272_0x295d8f(0x1e5),a272_0x295d8f(0x1d9),a272_0x295d8f(0x1c2),'codex',a272_0x295d8f(0x1d2),'opencode','qoder',a272_0x295d8f(0x1e7),a272_0x295d8f(0x1b7),a272_0x295d8f(0x1de)];export const ALL_CORE_IDES=[a272_0x295d8f(0x1d2),a272_0x295d8f(0x1b7),a272_0x295d8f(0x1e5),a272_0x295d8f(0x1d9),a272_0x295d8f(0x1c7),a272_0x295d8f(0x1c9),a272_0x295d8f(0x1da),a272_0x295d8f(0x1c2),a272_0x295d8f(0x1e7)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cd633,_0x1c0f89){const _0x31faf4=a273_0xf5d1,_0x3249d4=_0x3cd633();while(!![]){try{const _0x829937=-parseInt(_0x31faf4(0x16c))/0x1*(parseInt(_0x31faf4(0x16b))/0x2)+parseInt(_0x31faf4(0x169))/0x3+-parseInt(_0x31faf4(0x16e))/0x4*(parseInt(_0x31faf4(0x168))/0x5)+parseInt(_0x31faf4(0x16d))/0x6*(parseInt(_0x31faf4(0x170))/0x7)+-parseInt(_0x31faf4(0x16a))/0x8+-parseInt(_0x31faf4(0x167))/0x9+parseInt(_0x31faf4(0x16f))/0xa;if(_0x829937===_0x1c0f89)break;else _0x3249d4['push'](_0x3249d4['shift']());}catch(_0x55b253){_0x3249d4['push'](_0x3249d4['shift']());}}}(a273_0x8279,0x4787b));function a273_0xf5d1(_0x43b587,_0x37b455){_0x43b587=_0x43b587-0x167;const _0x8279e2=a273_0x8279();let _0xf5d11c=_0x8279e2[_0x43b587];return _0xf5d11c;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a273_0x8279(){const _0x3872cd=['4473730FdKpyf','973VwrTgn','2344338DDLvvY','5Vwthsn','1539798vTNyRP','1494632ktFSqU','1622UEqdHJ','571EVNZBR','13914ktBiwN','318404QYaVyN'];a273_0x8279=function(){return _0x3872cd;};return a273_0x8279();}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 a274_0x25b3(_0x2e922d,_0x50a03d){_0x2e922d=_0x2e922d-0xda;const _0x1ecbbf=a274_0x1ecb();let _0x25b3e9=_0x1ecbbf[_0x2e922d];return _0x25b3e9;}(function(_0x1dca4d,_0x804760){const _0x21c691=a274_0x25b3,_0xc219d4=_0x1dca4d();while(!![]){try{const _0xfccf07=-parseInt(_0x21c691(0xe3))/0x1*(-parseInt(_0x21c691(0xe5))/0x2)+parseInt(_0x21c691(0xe2))/0x3*(parseInt(_0x21c691(0xeb))/0x4)+-parseInt(_0x21c691(0xe0))/0x5+-parseInt(_0x21c691(0xe4))/0x6*(parseInt(_0x21c691(0xe1))/0x7)+parseInt(_0x21c691(0xde))/0x8*(parseInt(_0x21c691(0xe6))/0x9)+-parseInt(_0x21c691(0xdd))/0xa+-parseInt(_0x21c691(0xe7))/0xb*(-parseInt(_0x21c691(0xea))/0xc);if(_0xfccf07===_0x804760)break;else _0xc219d4['push'](_0xc219d4['shift']());}catch(_0x1237e6){_0xc219d4['push'](_0xc219d4['shift']());}}}(a274_0x1ecb,0xdb33a));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x558c29=a274_0x25b3,_0x367356=getTemplateBaseUrl(),_0x3437e3=[_0x367356+'/config.json',_0x367356+_0x558c29(0xda)];for(const _0x82d27f of _0x3437e3){try{const _0xe3bb77=await fetch(_0x82d27f,{'headers':{'Accept':_0x558c29(0xe9)}});if(!_0xe3bb77['ok'])continue;const _0x5a53e7=await _0xe3bb77['json']();if(!_0x5a53e7['cli']?.['stableVersion']||!_0x5a53e7[_0x558c29(0xdf)]?.[_0x558c29(0xdc)]?.[_0x558c29(0xdb)])continue;return _0x5a53e7;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a274_0x1ecb(){const _0x2fb9e9=['2699554Bqcdzr','now','application/json','36WcyzHv','6276344StcBpb','/config/index.json','stableVersion','node','13513060fqxCBB','8rpkNbj','sdk','3989895JDlInQ','14tqFktq','3ntEEiv','1hrvHwP','3754338ZgvsDL','2238388gvVdWo','7866531QCqmmS'];a274_0x1ecb=function(){return _0x2fb9e9;};return a274_0x1ecb();}export async function getCdnConfig(){const _0x1bcdf2=a274_0x25b3,_0x377b6f=Date[_0x1bcdf2(0xe8)]();if(hasCachedConfig){const _0x229751=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x377b6f-cacheTime<_0x229751)return cachedConfig;}const _0x4a1824=await fetchCdnConfig();return cachedConfig=_0x4a1824,cacheTime=_0x377b6f,hasCachedConfig=!![],_0x4a1824;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a275_0x1fc60d=a275_0x5d3d;(function(_0x5c0376,_0xcc90a8){const _0x1e2f23=a275_0x5d3d,_0x37ddaa=_0x5c0376();while(!![]){try{const _0x2ff7c6=-parseInt(_0x1e2f23(0xfa))/0x1+-parseInt(_0x1e2f23(0xe8))/0x2+parseInt(_0x1e2f23(0xf8))/0x3*(parseInt(_0x1e2f23(0xf0))/0x4)+parseInt(_0x1e2f23(0x102))/0x5*(parseInt(_0x1e2f23(0x10a))/0x6)+-parseInt(_0x1e2f23(0xeb))/0x7+parseInt(_0x1e2f23(0xff))/0x8*(parseInt(_0x1e2f23(0xe6))/0x9)+-parseInt(_0x1e2f23(0xef))/0xa*(parseInt(_0x1e2f23(0xea))/0xb);if(_0x2ff7c6===_0xcc90a8)break;else _0x37ddaa['push'](_0x37ddaa['shift']());}catch(_0x4d2aa0){_0x37ddaa['push'](_0x37ddaa['shift']());}}}(a275_0x25ee,0x9b806));import a275_0x195f54 from'node:fs';import a275_0x6659dc from'node:path';import a275_0x5ae34e from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a275_0x1fc60d(0x107);function isNonNumericVersion(_0x17d7f6){const _0x18efb0=a275_0x1fc60d,_0x37684a=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x37684a[_0x18efb0(0xfb)](_0x1a778a=>_0x1a778a['test'](_0x17d7f6));}function getInstalledVersion(_0x4314d4,_0x51ee92){const _0x363cf2=a275_0x1fc60d;try{const _0x49a7f8=a275_0x6659dc['join'](_0x4314d4,_0x363cf2(0xec),_0x51ee92,_0x363cf2(0xf4));if(a275_0x195f54['existsSync'](_0x49a7f8)){const _0x3fbbe6=JSON['parse'](a275_0x195f54[_0x363cf2(0x108)](_0x49a7f8,'utf-8'));return _0x3fbbe6['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0xd27279=a275_0x1fc60d;try{const _0x4c2b13=await getCdnConfig();return _0x4c2b13?.['sdk']?.[_0xd27279(0x105)]?.[_0xd27279(0x100)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x4d765f=a275_0x1fc60d;try{const _0x146cd9=await getCdnConfig();return _0x146cd9?.[_0x4d765f(0xf6)]?.[_0x4d765f(0x105)]?.['packageName']||_0x4d765f(0x106);}catch{return'@lovrabet/sdk';}}function a275_0x5d3d(_0x1e92a9,_0x1722d7){_0x1e92a9=_0x1e92a9-0xe6;const _0x25ee2f=a275_0x25ee();let _0x5d3db7=_0x25ee2f[_0x1e92a9];return _0x5d3db7;}export async function checkSdkVersion(_0x50adc0){const _0x4073a0=a275_0x1fc60d,_0x3847e1=a275_0x6659dc[_0x4073a0(0x103)](_0x50adc0,_0x4073a0(0xf4)),[_0x3cd30f,_0x495d97]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x5cc9cd=_0x3cd30f||FALLBACK_MIN_SDK_VERSION;if(!a275_0x195f54['existsSync'](_0x3847e1))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5cc9cd,'packageName':_0x495d97,'stableVersion':_0x3cd30f};try{const _0x26211a=JSON[_0x4073a0(0xf5)](a275_0x195f54['readFileSync'](_0x3847e1,_0x4073a0(0xfc))),_0x366922=_0x26211a[_0x4073a0(0x101)]||{},_0x5e92d1=_0x26211a[_0x4073a0(0xed)]||{},_0x277302=_0x366922[_0x495d97]||_0x5e92d1[_0x495d97];if(!_0x277302)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5cc9cd,'packageName':_0x495d97,'stableVersion':_0x3cd30f};let _0xfffa8a=getInstalledVersion(_0x50adc0,_0x495d97);!_0xfffa8a&&(_0xfffa8a=_0x277302);if(isNonNumericVersion(_0x277302))return{'installed':!![],'version':_0xfffa8a,'needsUpgrade':![],'minVersion':_0x5cc9cd,'packageName':_0x495d97,'stableVersion':_0x3cd30f};const _0x4198e1=a275_0x5ae34e[_0x4073a0(0xf7)](_0xfffa8a),_0x28c353=a275_0x5ae34e[_0x4073a0(0xf7)](_0x5cc9cd),_0x159e96=_0x4198e1&&_0x28c353?a275_0x5ae34e['lt'](_0x4198e1,_0x28c353):![];return{'installed':!![],'version':_0xfffa8a,'needsUpgrade':_0x159e96,'minVersion':_0x5cc9cd,'packageName':_0x495d97,'stableVersion':_0x3cd30f};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5cc9cd,'packageName':_0x495d97,'stableVersion':_0x3cd30f};}}export function checkSdkVersionSync(_0x36abef){const _0xd364ad=a275_0x1fc60d,_0x3d1006=a275_0x6659dc[_0xd364ad(0x103)](_0x36abef,_0xd364ad(0xf4)),_0x193646=_0xd364ad(0x106);if(!a275_0x195f54[_0xd364ad(0x109)](_0x3d1006))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x193646,'stableVersion':null};try{const _0x12e64c=JSON['parse'](a275_0x195f54[_0xd364ad(0x108)](_0x3d1006,'utf8')),_0x37b67a=_0x12e64c[_0xd364ad(0x101)]||{},_0x1b990f=_0x12e64c[_0xd364ad(0xed)]||{},_0x594946=_0x37b67a[_0x193646]||_0x1b990f[_0x193646];if(!_0x594946)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x193646,'stableVersion':null};let _0x748994=getInstalledVersion(_0x36abef,_0x193646);!_0x748994&&(_0x748994=_0x594946);if(isNonNumericVersion(_0x594946))return{'installed':!![],'version':_0x748994,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x193646,'stableVersion':null};const _0x295e59=a275_0x5ae34e['coerce'](_0x748994),_0x2d0079=_0x295e59?a275_0x5ae34e['lt'](_0x295e59,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x748994,'needsUpgrade':_0x2d0079,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x193646,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x193646,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x27972b){const _0x2d3208=a275_0x1fc60d;if(!_0x27972b['needsUpgrade'])return;const _0x3eb0e0='\x1b[33m',_0x2ffd97=_0x2d3208(0xf2),_0x38496e=_0x2d3208(0xf1),_0x87d88d=_0x27972b[_0x2d3208(0xe9)]||'@lovrabet/sdk',_0x30cf00=_0x27972b[_0x2d3208(0x100)]||_0x27972b[_0x2d3208(0xfe)],_0x43df65='npm\x20install\x20'+_0x87d88d+'@'+(_0x30cf00||_0x2d3208(0xf3));console[_0x2d3208(0xe7)](),console[_0x2d3208(0xe7)](''+_0x3eb0e0+_0x38496e+_0x2d3208(0xf9)+_0x2ffd97),console[_0x2d3208(0xe7)](_0x3eb0e0+_0x2d3208(0xfd)+_0x87d88d+'@'+_0x27972b['version']+_0x2ffd97),console[_0x2d3208(0xe7)](_0x3eb0e0+_0x2d3208(0x104)+_0x30cf00+_0x2ffd97),console[_0x2d3208(0xe7)](_0x3eb0e0+_0x2d3208(0xee)+_0x43df65+_0x2ffd97),console[_0x2d3208(0xe7)]();}function a275_0x25ee(){const _0x39844a=['devDependencies','\x20\x20\x20Upgrade\x20command:\x20','1477180acvZyK','144dqsZrD','\x1b[1m','\x1b[0m','latest','package.json','parse','sdk','coerce','95631ofyLUr','↪\x20SDK\x20update\x20available','286505tNTrvF','some','utf8','\x20\x20\x20Current\x20version:\x20','minVersion','2061512bXTMxg','stableVersion','dependencies','15RSqnCJ','join','\x20\x20\x20Stable\x20version:\x20','node','@lovrabet/sdk','1.2.0','readFileSync','existsSync','2475798WMDMYo','36JknFsX','log','2358116uKAitL','packageName','33lyIrgI','6094032DVowyw','node_modules'];a275_0x25ee=function(){return _0x39844a;};return a275_0x25ee();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54cb9b,_0x3c2146){const _0xcd0de8=a276_0x41f3,_0xa5ba48=_0x54cb9b();while(!![]){try{const _0x384780=parseInt(_0xcd0de8(0x165))/0x1+-parseInt(_0xcd0de8(0x15d))/0x2+-parseInt(_0xcd0de8(0x17b))/0x3+parseInt(_0xcd0de8(0x15b))/0x4+parseInt(_0xcd0de8(0x17d))/0x5+parseInt(_0xcd0de8(0x16a))/0x6+-parseInt(_0xcd0de8(0x162))/0x7;if(_0x384780===_0x3c2146)break;else _0xa5ba48['push'](_0xa5ba48['shift']());}catch(_0x229dc5){_0xa5ba48['push'](_0xa5ba48['shift']());}}}(a276_0xc847,0x63d98));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a276_0x16cccc from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a276_0xc847(){const _0x430fbd=['package.json','Minimum\x20supported:\x20','Current\x20version:\x20','minimumVersion','../..','↪\x20Critical\x20CLI\x20upgrade\x20required','\x20\x20\x20Current\x20CLI\x20version:\x20','\x20\x20\x20Upgrade\x20command:\x20','npm\x20install\x20-g\x20','coerce','stableVersion','\x20\x20\x20Stable\x20version:\x20','utf-8','199284HpVuQP','\x1b[31m','1901155Cqutbf','\x1b[0m','3170796McFZvZ','\x20\x20\x20Minimum\x20supported:\x20','388530GxeNLg','\x20\x20\x20','log','needsUpgrade','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','8298570NpicYt','version','parse','310374pGKqwz','currentVersion','minimumVersionMessage','Upgrade\x20command:\x20','belowMinimum','2231298ksWWVy','join','upgradeMessage','1.0.0'];a276_0xc847=function(){return _0x430fbd;};return a276_0xc847();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x1b9dc9){const _0x3ca12a=a276_0x41f3,_0x160bb1=_0x1b9dc9['stableVersion']||'latest';return _0x3ca12a(0x176)+NPM_PACKAGE_NAME+'@'+_0x160bb1;}function getCurrentCliVersion(){const _0x74ab9d=a276_0x41f3;try{const _0x2af286=fileURLToPath(import.meta.url),_0x46c45e=resolve(dirname(_0x2af286),_0x74ab9d(0x172)),_0x4d7d68=resolve(_0x46c45e,_0x74ab9d(0x16e)),_0x515873=JSON[_0x74ab9d(0x164)](readFileSync(_0x4d7d68,_0x74ab9d(0x17a)));return _0x515873[_0x74ab9d(0x163)]||'1.0.0';}catch{return _0x74ab9d(0x16d);}}function a276_0x41f3(_0x2ccd60,_0x4dcc4f){_0x2ccd60=_0x2ccd60-0x15a;const _0xc84721=a276_0xc847();let _0x41f3d4=_0xc84721[_0x2ccd60];return _0x41f3d4;}export async function checkCliVersion(){const _0x32a2ff=a276_0x41f3,_0x19dbbf=getCurrentCliVersion(),_0x113eff=await getCliVersionPolicy(),_0x40ceb0=_0x113eff?.[_0x32a2ff(0x178)]||null,_0x325b95=_0x113eff?.[_0x32a2ff(0x171)]||null;let _0x1effdf=![],_0x310d9f=![];const _0x13a31d=a276_0x16cccc['coerce'](_0x19dbbf);if(_0x13a31d&&_0x40ceb0)try{const _0xc220c2=a276_0x16cccc[_0x32a2ff(0x177)](_0x40ceb0);if(_0xc220c2)_0x1effdf=a276_0x16cccc['lt'](_0x13a31d,_0xc220c2);}catch{}if(_0x13a31d&&_0x325b95)try{const _0x17cf43=a276_0x16cccc[_0x32a2ff(0x177)](_0x325b95);if(_0x17cf43)_0x310d9f=a276_0x16cccc['lt'](_0x13a31d,_0x17cf43);}catch{}return _0x310d9f&&(_0x1effdf=!![]),{'currentVersion':_0x19dbbf,'stableVersion':_0x40ceb0,'minimumVersion':_0x325b95,'needsUpgrade':_0x1effdf,'belowMinimum':_0x310d9f,'isPreRelease':![],'upgradeMessage':_0x113eff?.[_0x32a2ff(0x16c)],'minimumVersionMessage':_0x113eff?.[_0x32a2ff(0x167)]};}export function printCliUpgradeWarning(_0x230d3b){const _0x2deb28=a276_0x41f3;if(!_0x230d3b[_0x2deb28(0x160)]&&!_0x230d3b[_0x2deb28(0x169)])return;const _0x40c207=_0x2deb28(0x17c),_0x3bc223='\x1b[33m',_0x4019ba=_0x2deb28(0x15a),_0x2f672d='\x1b[1m',_0x367195=getCliUpgradeCommand(_0x230d3b);console['log'](),_0x230d3b['belowMinimum']?(console['log'](''+_0x40c207+_0x2f672d+_0x2deb28(0x173)+_0x4019ba),console[_0x2deb28(0x15f)](_0x40c207+_0x2deb28(0x174)+_0x230d3b['currentVersion']+_0x4019ba),_0x230d3b[_0x2deb28(0x171)]&&console[_0x2deb28(0x15f)](_0x40c207+_0x2deb28(0x15c)+_0x230d3b[_0x2deb28(0x171)]+_0x4019ba),_0x230d3b['stableVersion']&&_0x230d3b[_0x2deb28(0x178)]!==_0x230d3b['minimumVersion']&&console[_0x2deb28(0x15f)](_0x40c207+'\x20\x20\x20Recommended\x20stable:\x20'+_0x230d3b[_0x2deb28(0x178)]+_0x4019ba),_0x230d3b['minimumVersionMessage']&&console[_0x2deb28(0x15f)](_0x40c207+_0x2deb28(0x15e)+_0x230d3b[_0x2deb28(0x167)]+_0x4019ba),console[_0x2deb28(0x15f)](_0x40c207+'\x20\x20\x20Upgrade\x20command:\x20'+_0x367195+_0x4019ba)):(console[_0x2deb28(0x15f)](''+_0x3bc223+_0x2f672d+'↪\x20New\x20version\x20available'+_0x4019ba),console[_0x2deb28(0x15f)](_0x3bc223+_0x2deb28(0x174)+_0x230d3b[_0x2deb28(0x166)]+_0x4019ba),console[_0x2deb28(0x15f)](_0x3bc223+_0x2deb28(0x179)+_0x230d3b[_0x2deb28(0x178)]+_0x4019ba),_0x230d3b['upgradeMessage']&&console[_0x2deb28(0x15f)](_0x3bc223+'\x20\x20\x20'+_0x230d3b[_0x2deb28(0x16c)]+_0x4019ba),console[_0x2deb28(0x15f)](_0x3bc223+_0x2deb28(0x175)+_0x367195+_0x4019ba)),console[_0x2deb28(0x15f)]();}export function assertCliVersionSupported(_0x4f7782){const _0x3a46b5=a276_0x41f3;if(!_0x4f7782[_0x3a46b5(0x169)])return;const _0x42941e=[_0x4f7782['minimumVersionMessage'],_0x3a46b5(0x170)+_0x4f7782[_0x3a46b5(0x166)],_0x4f7782[_0x3a46b5(0x171)]?_0x3a46b5(0x16f)+_0x4f7782[_0x3a46b5(0x171)]:null,_0x3a46b5(0x168)+getCliUpgradeCommand(_0x4f7782)]['filter'](Boolean)[_0x3a46b5(0x16b)]('\x0a');throw CliErrors['validation'](_0x3a46b5(0x161),_0x42941e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8248ea,_0x50b886){const _0xf1a14d=a277_0x4bd0,_0x6020a7=_0x8248ea();while(!![]){try{const _0x120be4=-parseInt(_0xf1a14d(0x92))/0x1+-parseInt(_0xf1a14d(0x98))/0x2+parseInt(_0xf1a14d(0x8a))/0x3*(-parseInt(_0xf1a14d(0x9b))/0x4)+-parseInt(_0xf1a14d(0x94))/0x5*(parseInt(_0xf1a14d(0x9e))/0x6)+-parseInt(_0xf1a14d(0x95))/0x7*(parseInt(_0xf1a14d(0x8c))/0x8)+-parseInt(_0xf1a14d(0xa0))/0x9*(parseInt(_0xf1a14d(0x8d))/0xa)+-parseInt(_0xf1a14d(0x9d))/0xb*(-parseInt(_0xf1a14d(0x97))/0xc);if(_0x120be4===_0x50b886)break;else _0x6020a7['push'](_0x6020a7['shift']());}catch(_0x401d52){_0x6020a7['push'](_0x6020a7['shift']());}}}(a277_0x1dee,0x54146));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(_0x462eef){const _0x31d18f=a277_0x4bd0;return typeof _0x462eef===_0x31d18f(0x9c)&&_0x462eef[_0x31d18f(0x9a)]()['length']>0x0?_0x462eef[_0x31d18f(0x9a)]():null;}function normalizeCliVersionPolicy(_0x571386){const _0x429b14=a277_0x4bd0;if(!_0x571386||typeof _0x571386!==_0x429b14(0x99))return null;const _0x4e9876=_0x571386,_0x13da25=_0x4e9876[_0x429b14(0x93)]&&typeof _0x4e9876[_0x429b14(0x93)]===_0x429b14(0x99)?_0x4e9876[_0x429b14(0x93)]:_0x4e9876,_0x338943=pickString(_0x13da25[_0x429b14(0x9f)])||pickString(_0x13da25[_0x429b14(0xa2)])||pickString(_0x13da25['recommendedVersion']),_0x1c7c7b=pickString(_0x13da25[_0x429b14(0x90)])||pickString(_0x13da25[_0x429b14(0x8b)]);if(!_0x338943&&!_0x1c7c7b)return null;return{'stableVersion':_0x338943,'minimumVersion':_0x1c7c7b,'upgradeMessage':pickString(_0x13da25[_0x429b14(0x8f)])||undefined,'minimumVersionMessage':pickString(_0x13da25[_0x429b14(0x91)])||undefined};}function a277_0x4bd0(_0x4e1f3c,_0x70c5cd){_0x4e1f3c=_0x4e1f3c-0x8a;const _0x1dee8b=a277_0x1dee();let _0x4bd070=_0x1dee8b[_0x4e1f3c];return _0x4bd070;}export async function fetchRabetbaseCdnConfig(){const _0x1751d2=a277_0x4bd0,_0x15cc65=new AbortController(),_0x5cdeb9=setTimeout(()=>_0x15cc65[_0x1751d2(0x8e)](),FETCH_TIMEOUT_MS);try{const _0x109703=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':_0x15cc65[_0x1751d2(0x96)]});if(!_0x109703['ok'])return null;const _0x3c155e=await _0x109703['json']();return _0x3c155e&&typeof _0x3c155e==='object'?_0x3c155e:null;}catch{return null;}finally{clearTimeout(_0x5cdeb9);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x23ac5c=a277_0x4bd0,_0x445f8c=Date[_0x23ac5c(0xa1)]();if(hasCachedConfig){const _0x3af383=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x445f8c-cacheTime<_0x3af383)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x445f8c,hasCachedConfig=!![],cachedConfig;}function a277_0x1dee(){const _0x490272=['30OhOvdh','stableVersion','39834HKoYDv','now','latestVersion','3AJjqLQ','minVersion','801224UXYzlM','770WQGmeU','abort','upgradeMessage','minimumVersion','minimumVersionMessage','319779xliISx','cli','621070bJYfvl','7EwdAiU','signal','12sIiaLe','758738TkpxpW','object','trim','2255420NGVUZf','string','29363598JpeePX'];a277_0x1dee=function(){return _0x490272;};return a277_0x1dee();}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c4c67,_0x2e09bb){const _0x2983b8=a278_0x5e16,_0x36e88a=_0x1c4c67();while(!![]){try{const _0x3df1f4=parseInt(_0x2983b8(0x149))/0x1+parseInt(_0x2983b8(0x150))/0x2+parseInt(_0x2983b8(0x14f))/0x3*(-parseInt(_0x2983b8(0x14b))/0x4)+parseInt(_0x2983b8(0x14d))/0x5+-parseInt(_0x2983b8(0x14a))/0x6*(-parseInt(_0x2983b8(0x14c))/0x7)+-parseInt(_0x2983b8(0x152))/0x8*(parseInt(_0x2983b8(0x151))/0x9)+-parseInt(_0x2983b8(0x148))/0xa;if(_0x3df1f4===_0x2e09bb)break;else _0x36e88a['push'](_0x36e88a['shift']());}catch(_0x58d11b){_0x36e88a['push'](_0x36e88a['shift']());}}}(a278_0xb217,0x6463b));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a278_0x580844,getMultiAppConfigs as a278_0x442fb5,getTemplateBaseUrl as a278_0x5ed577}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a278_0xb217(){const _0x3b38fa=['9944360pMDOeN','182966pVugEu','6zpiigy','25412sSVeqq','5345543aXkqAc','330250svTzWe','env','93kEcHqZ','1611140uGFxZm','646983JlWWBI','24LNzKje'];a278_0xb217=function(){return _0x3b38fa;};return a278_0xb217();}export{isInProject}from'../context.js';export function readConfig(_0x1f1380){const _0x38c69f=a278_0x5e16,_0x8a682e=readRawConfig(_0x1f1380);return _0x8a682e[_0x38c69f(0x14e)]&&typeof _0x8a682e[_0x38c69f(0x14e)]==='string'&&initEnv(_0x8a682e[_0x38c69f(0x14e)]),_0x8a682e;}export function getConfigAppCode(){return a278_0x580844();}function a278_0x5e16(_0x24c27c,_0x4869c8){_0x24c27c=_0x24c27c-0x148;const _0xb2172e=a278_0xb217();let _0x5e1611=_0xb2172e[_0x24c27c];return _0x5e1611;}export function getMultiAppConfigs(_0x4323ba='project'){return a278_0x442fb5(_0x4323ba);}export function getTemplateBaseUrl(){return a278_0x5ed577();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a2c22,_0x3180b1){const _0x32e1f0=a279_0x1acf,_0x21c521=_0x1a2c22();while(!![]){try{const _0x4b9962=-parseInt(_0x32e1f0(0xc5))/0x1+parseInt(_0x32e1f0(0xc8))/0x2*(parseInt(_0x32e1f0(0xce))/0x3)+parseInt(_0x32e1f0(0xcb))/0x4*(parseInt(_0x32e1f0(0xcc))/0x5)+-parseInt(_0x32e1f0(0xd0))/0x6+parseInt(_0x32e1f0(0xd1))/0x7*(-parseInt(_0x32e1f0(0xc9))/0x8)+-parseInt(_0x32e1f0(0xc6))/0x9+parseInt(_0x32e1f0(0xd2))/0xa;if(_0x4b9962===_0x3180b1)break;else _0x21c521['push'](_0x21c521['shift']());}catch(_0x46571c){_0x21c521['push'](_0x21c521['shift']());}}}(a279_0x212e,0xc9a9e));function a279_0x212e(){const _0x2da1b5=['24921620zWbTyW','1292961fzjmLp','6709653dQmOrV','trim','3438odUMGg','8CuJXBx','string','4lYNuRt','4326765YtkrMN','object','1170dLWLOf','isFinite','3812562HsQciv','3696042OlWpai'];a279_0x212e=function(){return _0x2da1b5;};return a279_0x212e();}function toFiniteNumber(_0x4c7396){const _0x40565a=a279_0x1acf;if(typeof _0x4c7396==='number'&&Number[_0x40565a(0xcf)](_0x4c7396))return _0x4c7396;if(typeof _0x4c7396===_0x40565a(0xca)){const _0x2c3c18=_0x4c7396[_0x40565a(0xc7)]();if(!_0x2c3c18)return undefined;const _0x4818f5=Number(_0x2c3c18);if(Number[_0x40565a(0xcf)](_0x4818f5))return _0x4818f5;}return undefined;}function a279_0x1acf(_0x84d483,_0xdfb0e5){_0x84d483=_0x84d483-0xc5;const _0x212e60=a279_0x212e();let _0x1acf4e=_0x212e60[_0x84d483];return _0x1acf4e;}export function normalizeEntityWithIdResponse(_0x3a1ec6){const _0x4812ad=a279_0x1acf,_0x8422a0=toFiniteNumber(_0x3a1ec6);if(_0x8422a0!==undefined)return{'id':_0x8422a0,'entity':{'id':_0x8422a0}};if(!_0x3a1ec6||typeof _0x3a1ec6!==_0x4812ad(0xcd))return{'id':undefined,'entity':{}};const _0x359c06={..._0x3a1ec6},_0x1feccb=toFiniteNumber(_0x359c06['id']);return _0x1feccb!==undefined&&(_0x359c06['id']=_0x1feccb),{'id':_0x1feccb,'entity':_0x359c06};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a5f4e,_0x6e730e){const _0x383ddf=a280_0x44a0,_0x2eae67=_0x3a5f4e();while(!![]){try{const _0x99c215=-parseInt(_0x383ddf(0xf8))/0x1*(-parseInt(_0x383ddf(0xf9))/0x2)+-parseInt(_0x383ddf(0xf6))/0x3*(parseInt(_0x383ddf(0xfe))/0x4)+-parseInt(_0x383ddf(0xfd))/0x5+parseInt(_0x383ddf(0xf7))/0x6+parseInt(_0x383ddf(0xf5))/0x7*(parseInt(_0x383ddf(0xff))/0x8)+-parseInt(_0x383ddf(0xfb))/0x9*(-parseInt(_0x383ddf(0xf4))/0xa)+-parseInt(_0x383ddf(0xfa))/0xb;if(_0x99c215===_0x6e730e)break;else _0x2eae67['push'](_0x2eae67['shift']());}catch(_0x1a45fa){_0x2eae67['push'](_0x2eae67['shift']());}}}(a280_0x448b,0xb8de2));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x16bd71,_0x484aab){const _0x332cfe=a280_0x44a0,_0x19ba1e=statSync(_0x16bd71);if(_0x19ba1e[_0x332cfe(0xfc)]()){!existsSync(_0x484aab)&&mkdirSync(_0x484aab,{'recursive':!![]});const _0x272527=readdirSync(_0x16bd71);for(const _0x2d63e8 of _0x272527){await copyDir(join(_0x16bd71,_0x2d63e8),join(_0x484aab,_0x2d63e8));}}else copyFileSync(_0x16bd71,_0x484aab);}export function ensureDir(_0x7447b9){!existsSync(_0x7447b9)&&mkdirSync(_0x7447b9,{'recursive':!![]});}function a280_0x44a0(_0xaec437,_0x598de9){_0xaec437=_0xaec437-0xf4;const _0x448bfb=a280_0x448b();let _0x44a07d=_0x448bfb[_0xaec437];return _0x44a07d;}function a280_0x448b(){const _0x6e04da=['516350ErMLDY','6923uVQecm','39XbPVOZ','1580130zBxkZt','18892uoDSuQ','108ZSICFB','5007893mYvJHg','18zqGoPL','isDirectory','435220LkAevi','185396swspzf','4168VNubNS'];a280_0x448b=function(){return _0x6e04da;};return a280_0x448b();}export function pathExists(_0x5b6974){return existsSync(_0x5b6974);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a281_0x3720bf=a281_0x136a;(function(_0x37f1b6,_0x1f2bb2){const _0x31c69a=a281_0x136a,_0x4d2d99=_0x37f1b6();while(!![]){try{const _0x12d012=-parseInt(_0x31c69a(0x12c))/0x1*(parseInt(_0x31c69a(0x138))/0x2)+-parseInt(_0x31c69a(0x12e))/0x3*(-parseInt(_0x31c69a(0x143))/0x4)+parseInt(_0x31c69a(0x126))/0x5+parseInt(_0x31c69a(0x13c))/0x6+-parseInt(_0x31c69a(0x13f))/0x7*(-parseInt(_0x31c69a(0x137))/0x8)+-parseInt(_0x31c69a(0x12f))/0x9*(parseInt(_0x31c69a(0x12d))/0xa)+parseInt(_0x31c69a(0x131))/0xb;if(_0x12d012===_0x1f2bb2)break;else _0x4d2d99['push'](_0x4d2d99['shift']());}catch(_0x504ea6){_0x4d2d99['push'](_0x4d2d99['shift']());}}}(a281_0x1b56,0xc7b96));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x232795=a281_0x136a,_0x224b41=getTemplateBaseUrl();return _0x224b41+_0x232795(0x12b);}const CACHE_DIR=join(homedir(),a281_0x3720bf(0x130),a281_0x3720bf(0x13e));export async function fetchGuidesFromCDN(){const _0x129701=a281_0x3720bf,_0x3bd810=getGuidesCdnUrl(),_0x5ddbdb=await fetch(_0x3bd810,{'headers':{'Accept':_0x129701(0x141)}});if(!_0x5ddbdb['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x5ddbdb[_0x129701(0x142)]+'\x20'+_0x5ddbdb[_0x129701(0x133)]);const _0x46f7fb=await _0x5ddbdb[_0x129701(0x13b)]();if(!_0x46f7fb[_0x129701(0x147)]||typeof _0x46f7fb[_0x129701(0x147)]!==_0x129701(0x127))throw new Error(_0x129701(0x129));return _0x46f7fb;}function a281_0x136a(_0x1288a6,_0x52ab81){_0x1288a6=_0x1288a6-0x123;const _0x1b560a=a281_0x1b56();let _0x136abd=_0x1b560a[_0x1288a6];return _0x136abd;}function a281_0x1b56(){const _0xc6300e=['length','extendContent','skillTemplate','424oqDrWA','45910LJnJqt','title','CDN\x20数据中缺少\x20skillTemplate','json','971814pESfuv','join','cache','59178HZnKHF','trimEnd','application/json','status','131728zhajky','content','utf-8','entries','guides','replace','\x0a\x0a>更新时间:','.lovrabet/skill/guides','582265Bylrwk','object','keys','CDN\x20返回数据格式错误','.md','/skills/guides.json','41aHsVZd','1220CxCLWR','69GgCEvG','486UqCrwA','.lovrabet','3100823gmqteq','lastUpdated','statusText'];a281_0x1b56=function(){return _0xc6300e;};return a281_0x1b56();}export function writeGuidesToProject(_0x4ee061,_0x58c778,_0x1d4c3e=a281_0x3720bf(0x125),_0x2e45ff){const _0x349108=a281_0x3720bf,_0x29ba33=join(_0x58c778,_0x1d4c3e);mkdirSync(_0x29ba33,{'recursive':!![]});for(const [_0x21f5c0,_0x4311d0]of Object[_0x349108(0x146)](_0x4ee061[_0x349108(0x147)])){let _0x1651ee=_0x4311d0[_0x349108(0x144)];_0x4311d0[_0x349108(0x132)]&&(_0x1651ee=appendUpdateTime(_0x1651ee,_0x4311d0['lastUpdated'])),writeFileSync(join(_0x29ba33,_0x21f5c0+_0x349108(0x12a)),_0x1651ee,_0x349108(0x145));}}export function appendUpdateTime(_0x3c8c1a,_0xdac7d4){const _0x10933b=a281_0x3720bf;return _0x3c8c1a=_0x3c8c1a[_0x10933b(0x123)](/\n*>更新时间:.*$/m,''),_0x3c8c1a['trimEnd']()+(_0x10933b(0x124)+_0xdac7d4);}export function getSkillTemplate(_0x3788ff){const _0x1b2202=a281_0x3720bf;return _0x3788ff['skillTemplate']?.[_0x1b2202(0x144)]||'';}export function appendExtendContents(_0xb0fd25,_0x2ac20e,_0x2ec31d){const _0x2405a5=a281_0x3720bf,_0x50dd40=[];for(const [,_0x2c195d]of Object[_0x2405a5(0x146)](_0x2ac20e[_0x2405a5(0x147)])){_0x2c195d[_0x2405a5(0x135)]&&_0x50dd40['push'](_0x2c195d[_0x2405a5(0x135)][_0x2405a5(0x140)]());}if(_0x50dd40['length']===0x0)return _0xb0fd25;return _0xb0fd25['trimEnd']()+'\x0a\x0a'+_0x50dd40[_0x2405a5(0x13d)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x3d718e,_0x1dcd1a,_0x218dbb){const _0x454c70=a281_0x3720bf,_0x86dad9=getSkillTemplate(_0x3d718e);if(!_0x86dad9)throw new Error(_0x454c70(0x13a));const _0x59c891=dirname(_0x1dcd1a);mkdirSync(_0x59c891,{'recursive':!![]});let _0x413b1f=_0x86dad9['replace'](/\{\{IDE_NAME\}\}/g,_0x218dbb);_0x413b1f=appendExtendContents(_0x413b1f,_0x3d718e),_0x3d718e[_0x454c70(0x136)][_0x454c70(0x132)]&&(_0x413b1f=appendUpdateTime(_0x413b1f,_0x3d718e['skillTemplate'][_0x454c70(0x132)])),writeFileSync(_0x1dcd1a,_0x413b1f,'utf-8');}export async function installGuides(_0x499832){const _0x5d772b=a281_0x3720bf,_0x156c74=await fetchGuidesFromCDN();return writeGuidesToProject(_0x156c74,_0x499832),Object[_0x5d772b(0x128)](_0x156c74[_0x5d772b(0x147)])[_0x5d772b(0x134)];}export function getGuidesSummary(_0x215a2e){const _0x1c13f7=a281_0x3720bf;return Object[_0x1c13f7(0x146)](_0x215a2e[_0x1c13f7(0x147)])['map'](([_0x5a9d2e,_0x3884f4])=>({'key':_0x5a9d2e,'title':_0x3884f4[_0x1c13f7(0x139)],'path':_0x3884f4['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a5f26,_0x28514a){const _0x431b55=a282_0x30fb,_0x2a2877=_0x4a5f26();while(!![]){try{const _0x4c2d9c=parseInt(_0x431b55(0x184))/0x1*(parseInt(_0x431b55(0x16f))/0x2)+parseInt(_0x431b55(0x174))/0x3*(-parseInt(_0x431b55(0x16c))/0x4)+-parseInt(_0x431b55(0x175))/0x5+-parseInt(_0x431b55(0x16e))/0x6+-parseInt(_0x431b55(0x177))/0x7+parseInt(_0x431b55(0x170))/0x8*(-parseInt(_0x431b55(0x17c))/0x9)+parseInt(_0x431b55(0x179))/0xa;if(_0x4c2d9c===_0x28514a)break;else _0x2a2877['push'](_0x2a2877['shift']());}catch(_0x42df01){_0x2a2877['push'](_0x2a2877['shift']());}}}(a282_0x12ea,0x5fda3));export async function httpRequest(_0x437d37,_0x78c5dd={}){const _0xc8dc7b=a282_0x30fb,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x78c5dd;let _0xe02148=null;for(let _0x18ed7e=0x0;_0x18ed7e<=retries;_0x18ed7e++){try{const _0x32a0fa=new AbortController(),_0x57c706=setTimeout(()=>_0x32a0fa[_0xc8dc7b(0x187)](),timeout),_0x55ccb3=await fetch(_0x437d37,{'headers':headers,'signal':_0x32a0fa['signal']});clearTimeout(_0x57c706);let _0x1b43db;const _0x5cc34d=_0x55ccb3['headers']['get'](_0xc8dc7b(0x17b));return _0x5cc34d?.['includes'](_0xc8dc7b(0x182))?_0x1b43db=await _0x55ccb3[_0xc8dc7b(0x173)]():_0x1b43db=await _0x55ccb3['text'](),{'ok':_0x55ccb3['ok'],'status':_0x55ccb3['status'],'statusText':_0x55ccb3[_0xc8dc7b(0x17f)],'data':_0x1b43db,'headers':_0x55ccb3[_0xc8dc7b(0x176)],'url':_0x55ccb3['url'],'text':()=>_0x55ccb3['text']()};}catch(_0x290e87){_0xe02148=_0x290e87 instanceof Error?_0x290e87:new Error(String(_0x290e87));if(_0x18ed7e===retries)break;if(shouldRetry(_0x290e87)){console[_0xc8dc7b(0x186)](_0xc8dc7b(0x16d)+retryDelay+_0xc8dc7b(0x17a)+(_0x18ed7e+0x1)+_0xc8dc7b(0x185)),await sleep(retryDelay);continue;}else break;}}throw _0xe02148||new Error(_0xc8dc7b(0x171));}function a282_0x12ea(){const _0x554d71=['message','ENOTFOUND','statusText','fetch','name','application/json','includes','3ClGQsb','\x20次重试...','log','abort','1892892OpVRIG','*\x20请求失败,','3447672TWscqV','483302uwpPfy','856WFtDvl','Request\x20failed','ECONNRESET','json','3DbKMoS','3180475WCjlhp','headers','1686335uejnRi','TypeError','17274200IkdtYw','ms\x20后进行第\x20','content-type','11349hKIVIc'];a282_0x12ea=function(){return _0x554d71;};return a282_0x12ea();}function shouldRetry(_0x927d87){const _0x936d4=a282_0x30fb;if(_0x927d87 instanceof Error){if(_0x927d87['name']==='AbortError')return![];if(_0x927d87[_0x936d4(0x181)]===_0x936d4(0x178)&&_0x927d87[_0x936d4(0x17d)][_0x936d4(0x183)](_0x936d4(0x180)))return!![];if(_0x927d87[_0x936d4(0x17d)][_0x936d4(0x183)](_0x936d4(0x172)))return!![];if(_0x927d87[_0x936d4(0x17d)][_0x936d4(0x183)](_0x936d4(0x17e)))return![];}return![];}function a282_0x30fb(_0x15aac3,_0x32f3e0){_0x15aac3=_0x15aac3-0x16c;const _0x12eae3=a282_0x12ea();let _0x30fb1a=_0x12eae3[_0x15aac3];return _0x30fb1a;}function sleep(_0x29d792){return new Promise(_0x4c976f=>setTimeout(_0x4c976f,_0x29d792));}export function validateUrl(_0x479abd){try{return new URL(_0x479abd),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a283_0x25b6(){const _0x790ab=['24PxUgbh','5nfhLbm','10162240WbcVHl','6057qbaeTY','436031UgvcnZ','774403FqOKbN','isTTY','true','84ihuuRG','935982OtDkxU','1777056hBwXvR','7090HIXYIT','stdin','setRawMode','21924WeoefY'];a283_0x25b6=function(){return _0x790ab;};return a283_0x25b6();}(function(_0x37df7b,_0x255fc1){const _0x51337a=a283_0x16c2,_0x45aa26=_0x37df7b();while(!![]){try{const _0x4c1e7b=parseInt(_0x51337a(0x1d4))/0x1+-parseInt(_0x51337a(0x1c9))/0x2*(parseInt(_0x51337a(0x1cf))/0x3)+parseInt(_0x51337a(0x1cb))/0x4+parseInt(_0x51337a(0x1d1))/0x5*(-parseInt(_0x51337a(0x1ca))/0x6)+parseInt(_0x51337a(0x1c6))/0x7*(parseInt(_0x51337a(0x1d0))/0x8)+-parseInt(_0x51337a(0x1d3))/0x9*(-parseInt(_0x51337a(0x1cc))/0xa)+-parseInt(_0x51337a(0x1d2))/0xb;if(_0x4c1e7b===_0x255fc1)break;else _0x45aa26['push'](_0x45aa26['shift']());}catch(_0x8ba8da){_0x45aa26['push'](_0x45aa26['shift']());}}}(a283_0x25b6,0x49de6));function env(_0x42baf4){return process.env[`RABETBASE_${_0x42baf4}`]||process.env[`LOVRABET_${_0x42baf4}`]||undefined;}export function isNonInteractive(_0x31eedb){const _0x4685e5=a283_0x16c2;return!!(_0x31eedb['nonInteractive']||_0x31eedb['ci']||env('CI')===_0x4685e5(0x1c8)||process.env.CI===_0x4685e5(0x1c8)||!process['stdout'][_0x4685e5(0x1c7)]||!isStdinRawModeSupported());}function a283_0x16c2(_0x45d3a2,_0x5af116){_0x45d3a2=_0x45d3a2-0x1c6;const _0x25b698=a283_0x25b6();let _0x16c26b=_0x25b698[_0x45d3a2];return _0x16c26b;}function isStdinRawModeSupported(){const _0x20b552=a283_0x16c2;if(!process[_0x20b552(0x1cd)]['isTTY'])return![];try{const _0x3f3040=process[_0x20b552(0x1cd)]['isRaw'];return process[_0x20b552(0x1cd)][_0x20b552(0x1ce)](!![]),process[_0x20b552(0x1cd)][_0x20b552(0x1ce)](_0x3f3040??![]),!![];}catch{return![];}}
|