@lovrabet/rabetbase-cli 2.4.5 → 2.4.6-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/README.md +3 -2
- 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.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/dataset/business-groups.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 -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.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.d.ts +8 -7
- 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/types.d.ts +17 -2
- 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/{page/standard-page-status.d.ts → menu/visibility-update.d.ts} +1 -1
- package/lib/commands/menu/visibility-update.js +1 -0
- 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/create.d.ts +2 -0
- package/lib/commands/page/create.js +1 -0
- package/lib/commands/page/{react → custom}/detail.d.ts +1 -1
- package/lib/commands/page/custom/detail.js +1 -0
- package/lib/commands/page/{react → custom}/list.d.ts +1 -1
- package/lib/commands/page/custom/list.js +1 -0
- package/lib/commands/page/{react → custom}/publish.d.ts +1 -1
- package/lib/commands/page/custom/publish.js +1 -0
- package/lib/commands/page/{react → custom}/shared.d.ts +15 -15
- package/lib/commands/page/custom/shared.js +1 -0
- package/lib/commands/page/{react → custom}/syntax.d.ts +2 -2
- package/lib/commands/page/custom/syntax.js +1 -0
- package/lib/commands/page/custom/template.js +1 -0
- package/lib/commands/page/{react → custom}/update.d.ts +1 -1
- package/lib/commands/page/custom/update.js +1 -0
- package/lib/commands/page/data-list-status.d.ts +2 -0
- package/lib/commands/page/data-list-status.js +1 -0
- 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/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +18 -18
- package/lib/commands/page/shared.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.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 +43 -43
- 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.d.ts +3 -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 +35 -34
- package/skills/rabetbase/guides/backend-function.md +63 -18
- package/skills/rabetbase/guides/bff-creation-workflow.md +2 -0
- package/skills/rabetbase/guides/{react-custom-page-workflow.md → custom-page-workflow.md} +45 -45
- package/skills/rabetbase/guides/page-development-workflow.md +22 -22
- package/skills/rabetbase/knowledge/{react-page → custom-page}/components.md +2 -2
- package/skills/rabetbase/knowledge/{react-page → custom-page}/generation-standards.md +6 -6
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +6 -6
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-create.md +2 -0
- package/skills/rabetbase/references/{rabetbase-standard-page-status.md → rabetbase-data-list-status.md} +6 -6
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +1 -1
- package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +1 -1
- package/skills/rabetbase/references/rabetbase-dataset-relations.md +1 -1
- package/skills/rabetbase/references/rabetbase-dataset-restore.md +1 -1
- package/skills/rabetbase/references/rabetbase-menu-list.md +4 -2
- package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +59 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +31 -0
- package/skills/rabetbase/references/{rabetbase-page-react-detail.md → rabetbase-page-custom-detail.md} +5 -5
- package/skills/rabetbase/references/{rabetbase-page-react-list.md → rabetbase-page-custom-list.md} +4 -4
- package/skills/rabetbase/references/{rabetbase-page-react-publish.md → rabetbase-page-custom-publish.md} +6 -6
- package/skills/rabetbase/references/{rabetbase-page-react-update.md → rabetbase-page-custom-update.md} +6 -6
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -4
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +4 -4
- package/skills/rabetbase/references/rabetbase-page-pull.md +2 -2
- package/skills/rabetbase/references/rabetbase-page-relation-binding.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-restore.md +7 -7
- package/skills/rabetbase/references/rabetbase-page-sync.md +3 -3
- package/skills/rabetbase.manifest.json +13 -12
- package/lib/commands/page/react/create.d.ts +0 -2
- package/lib/commands/page/react/create.js +0 -1
- package/lib/commands/page/react/detail.js +0 -1
- package/lib/commands/page/react/list.js +0 -1
- package/lib/commands/page/react/publish.js +0 -1
- package/lib/commands/page/react/shared.js +0 -1
- package/lib/commands/page/react/syntax.js +0 -1
- package/lib/commands/page/react/template.js +0 -1
- package/lib/commands/page/react/update.js +0 -1
- package/lib/commands/page/standard-page-status.js +0 -1
- package/skills/rabetbase/references/rabetbase-page-react-create.md +0 -29
- /package/lib/commands/page/{react → custom}/template.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a264_0x3bbd39=a264_0x2973;(function(_0x514e7a,_0x2255a2){const _0x2751df=a264_0x2973,_0x2700fa=_0x514e7a();while(!![]){try{const _0x2e4934=-parseInt(_0x2751df(0x19f))/0x1+parseInt(_0x2751df(0x1a1))/0x2*(parseInt(_0x2751df(0x1b1))/0x3)+parseInt(_0x2751df(0x18b))/0x4*(parseInt(_0x2751df(0x1a7))/0x5)+parseInt(_0x2751df(0x1b0))/0x6+parseInt(_0x2751df(0x1a5))/0x7+-parseInt(_0x2751df(0x1a6))/0x8*(-parseInt(_0x2751df(0x1ab))/0x9)+-parseInt(_0x2751df(0x1a0))/0xa*(parseInt(_0x2751df(0x1af))/0xb);if(_0x2e4934===_0x2255a2)break;else _0x2700fa['push'](_0x2700fa['shift']());}catch(_0x3196f7){_0x2700fa['push'](_0x2700fa['shift']());}}}(a264_0x28de,0x5ba1a));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';export const NPX_SKILLS_CLI='skills@latest';export const NPX_SKILLS_SUBCOMMAND_ADD=a264_0x3bbd39(0x1bd);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a264_0x3bbd39(0x1ac);export const LEGACY_RABETBASE_SKILL_SOURCE=a264_0x3bbd39(0x1b3);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export const RABETBASE_GLOBAL_SKILL_NAME=a264_0x3bbd39(0x1b4);export const RABETBASE_SKILL_GIT_SOURCE='git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git';function a264_0x28de(){const _0x1067c2=['status','yes','unknown','CHILD_EXIT_NONZERO','stdout','npm_config_global','state','skill','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','273154IdnQcs','20bcNZCx','3296qNAtWQ','trim','EPERM','ENOENT','2259376WISLDw','255952hCvPnr','5LWXoEn','warn','\x22\x20install\x20state:\x20','code','18zUhlVd','lovrabet/rabetbase','stderr','reason','6388349XLOWeg','4018158aIpKHn','474RPwHQo','npx','lovrabet/lovrabet-skill','rabetbase','present','Skill\x20\x22','log','message','match','pipe','error','SPAWN_FAILED','add','toString','stdio','!\x20Could\x20not\x20verify\x20\x22','1972644tBsgfb','exit\x20','signal','INSTALL_PARTIAL','join','absent','SKILL_NOT_INSTALLED','expectedSkillName','npx\x20terminated\x20by\x20signal\x20','Installer\x20reported\x20','push'];a264_0x28de=function(){return _0x1067c2;};return a264_0x28de();}export function resolveGlobalSkillName(_0x3f79fb){const _0x476e95=a264_0x3bbd39;switch(_0x3f79fb[_0x476e95(0x1a2)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x53d41d){const _0x4bd91b=a264_0x3bbd39,_0x20aeac=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x53d41d&&_0x20aeac[_0x4bd91b(0x195)](NPX_SKILLS_FLAG_SKILL,_0x53d41d),_0x20aeac;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a264_0x3bbd39(0x1b2),...buildNpxSkillsAddArgv()][a264_0x3bbd39(0x18f)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=['npx',NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a264_0x3bbd39(0x18f)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x49e047,_0x37cca7,_0x4c5bf7){return{'ok':![],'status':_0x37cca7,'code':_0x49e047,'error':'['+_0x49e047+']\x20'+_0x4c5bf7};}function spawnOptions(_0x5b2d71,_0x4b2e54){const _0x8fd08d=a264_0x3bbd39,_0x5f592e={...process.env};return delete _0x5f592e[_0x8fd08d(0x19b)],delete _0x5f592e['NPM_CONFIG_GLOBAL'],{'cwd':_0x5b2d71,'stdio':_0x4b2e54,'env':_0x5f592e,'shell':![],..._0x4b2e54===_0x8fd08d(0x1ba)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x2eacce,_0x436bb6,_0x487bf5,_0x2e0e02){const _0x5131ff=a264_0x3bbd39,_0x2bf1a4=[_0x2eacce[_0x5131ff(0x19a)]?_0x2eacce[_0x5131ff(0x19a)][_0x5131ff(0x188)]():'',_0x2eacce[_0x5131ff(0x1ad)]?_0x2eacce[_0x5131ff(0x1ad)][_0x5131ff(0x188)]():'']['filter'](Boolean)[_0x5131ff(0x18f)]('\x0a')['trim']();_0x2e0e02!==_0x5131ff(0x1ba)&&_0x2bf1a4&&console[_0x5131ff(0x1b7)](_0x2bf1a4);if(_0x2eacce['error']){const _0x2c0ffa=_0x2eacce[_0x5131ff(0x1bb)],_0xe98aae=_0x2c0ffa['code']===_0x5131ff(0x1a4)?'NPX_NOT_FOUND':_0x2c0ffa[_0x5131ff(0x1aa)]===_0x5131ff(0x1a3)||_0x2c0ffa[_0x5131ff(0x1aa)]==='EACCES'?'PERMISSION_DENIED':_0x5131ff(0x1bc);return failure(_0xe98aae,_0x2eacce[_0x5131ff(0x196)],_0x2c0ffa[_0x5131ff(0x1b8)]);}if(_0x2eacce[_0x5131ff(0x18d)])return failure('CHILD_TERMINATED',_0x2eacce['status'],_0x5131ff(0x193)+_0x2eacce['signal']);if(_0x2eacce[_0x5131ff(0x196)]!==0x0)return failure(_0x5131ff(0x199),_0x2eacce[_0x5131ff(0x196)],_0x2bf1a4||_0x5131ff(0x18c)+(_0x2eacce[_0x5131ff(0x196)]??_0x5131ff(0x198)));const _0xcabbb0=_0x436bb6?resolveInstalledSkill(_0x436bb6,_0x487bf5):undefined,_0x27b23d=_0x2bf1a4[_0x5131ff(0x1b9)](/Failed to install\s+(\d+)/i);if(_0x27b23d&&Number(_0x27b23d[0x1])>0x0){const _0xe6bbc3=_0x5131ff(0x194)+_0x27b23d[0x1]+'\x20failed\x20target(s)'+(_0x2bf1a4?':\x0a'+_0x2bf1a4:'');if(_0xcabbb0?.['state']===_0x5131ff(0x1b5))return console[_0x5131ff(0x1a8)]('!\x20'+_0xe6bbc3),{'ok':!![],'status':0x0};return failure(_0x5131ff(0x18e),0x0,_0xe6bbc3);}if(_0xcabbb0){if(_0xcabbb0[_0x5131ff(0x19c)]===_0x5131ff(0x190))return failure(_0x5131ff(0x191),0x0,_0x5131ff(0x1b6)+_0x436bb6+_0x5131ff(0x19e)+_0xcabbb0['checked']['join'](',\x20')+')');_0xcabbb0[_0x5131ff(0x19c)]==='unverifiable'&&console[_0x5131ff(0x1a8)](_0x5131ff(0x18a)+_0x436bb6+_0x5131ff(0x1a9)+_0xcabbb0[_0x5131ff(0x1ae)]);}return{'ok':!![],'status':0x0};}function a264_0x2973(_0x368cf4,_0x39f691){_0x368cf4=_0x368cf4-0x188;const _0x28de84=a264_0x28de();let _0x297352=_0x28de84[_0x368cf4];return _0x297352;}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x4d43b5,_0x3af4ec){const _0x3d3c8c=a264_0x3bbd39;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5e5c82=_0x3af4ec?.[_0x3d3c8c(0x189)]??'inherit',_0x3a531f=resolveNpmBin('npx'),_0x413fe5=buildNpxSkillsAddArgv(_0x3af4ec?.[_0x3d3c8c(0x19d)]),_0x11e6bd=['npx',..._0x413fe5][_0x3d3c8c(0x18f)]('\x20');console['log']('*\x20'+_0x11e6bd);const _0x12b3f6=spawnSync(_0x3a531f,_0x413fe5,spawnOptions(_0x4d43b5,_0x5e5c82));return normalizeSpawnResult(_0x12b3f6,undefined,undefined,_0x5e5c82);}export function runNpxSkillsRemove(_0x5df657,_0x151c66,_0x3b0156=LEGACY_RABETBASE_SKILL_SOURCE){const _0x1eca78=a264_0x3bbd39;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x554e81=_0x151c66?.[_0x1eca78(0x189)]??'inherit',_0x4779b5=resolveNpmBin(_0x1eca78(0x1b2)),_0x577554=[NPX_FLAG_YES,NPX_SKILLS_CLI,'remove',_0x3b0156,NPX_SKILLS_FLAG_SKILL,_0x151c66?.[_0x1eca78(0x19d)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x151c66?.[_0x1eca78(0x197)]?['-y']:[]],_0x20aba4=[_0x4779b5,..._0x577554]['join']('\x20');console['log']('*\x20'+_0x20aba4);const _0x23a8e3=spawnSync(_0x4779b5,_0x577554,spawnOptions(_0x5df657,_0x554e81));return normalizeSpawnResult(_0x23a8e3,undefined,undefined,_0x554e81);}export function runNpxSkillsAddGlobal(_0x316902,_0xbc5db4,_0x360f14){const _0x2795e3=a264_0x3bbd39;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3d4e8c=resolveNpmBin('npx'),_0x23e9fe=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0xbc5db4,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x30a214=[_0x2795e3(0x1b2),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0xbc5db4,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x2795e3(0x18f)]('\x20');console['log']('*\x20'+_0x30a214);const _0x2eba35=spawnSync(_0x3d4e8c,_0x23e9fe,spawnOptions(_0x316902,'pipe'));return normalizeSpawnResult(_0x2eba35,_0x360f14?.[_0x2795e3(0x192)]??resolveGlobalSkillName(_0xbc5db4),_0x360f14?.['presence'],_0x360f14?.[_0x2795e3(0x189)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a265_0x3f4c(_0x340f6f,_0x38dbeb){_0x340f6f=_0x340f6f-0x112;const _0x1d368d=a265_0x1d36();let _0x3f4c6d=_0x1d368d[_0x340f6f];return _0x3f4c6d;}const a265_0xcc088f=a265_0x3f4c;(function(_0x3df682,_0x56ff20){const _0x1eb44a=a265_0x3f4c,_0x22a1b8=_0x3df682();while(!![]){try{const _0x220e1f=parseInt(_0x1eb44a(0x116))/0x1+parseInt(_0x1eb44a(0x118))/0x2*(-parseInt(_0x1eb44a(0x133))/0x3)+parseInt(_0x1eb44a(0x125))/0x4+parseInt(_0x1eb44a(0x129))/0x5+parseInt(_0x1eb44a(0x115))/0x6+-parseInt(_0x1eb44a(0x122))/0x7*(-parseInt(_0x1eb44a(0x126))/0x8)+-parseInt(_0x1eb44a(0x12b))/0x9;if(_0x220e1f===_0x56ff20)break;else _0x22a1b8['push'](_0x22a1b8['shift']());}catch(_0x378d79){_0x22a1b8['push'](_0x22a1b8['shift']());}}}(a265_0x1d36,0x4a3a0));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a265_0xcc088f(0x11c),a265_0xcc088f(0x113)),join(a265_0xcc088f(0x121),'skills')];function a265_0x1d36(){const _0x4c346b=['message','\x20records\x20\x22','1030932cjwFew','10192vKesTU','SKILL.md','version','668630rJZdES','object','3569742tIOnTv','join','number','includes','utf8','reason','\x20uses\x20unsupported\x20version\x20','not-recorded','1197918OPVijg','unusable','skills','globalSkillsDirs','798516POLikE','151189KMwHWz','parse','2PLvKXw','find','home','unverifiable','.agents','map','recorded','present','kind','.claude','2331CtSOdV'];a265_0x1d36=function(){return _0x4c346b;};return a265_0x1d36();}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x1c8142,_0x54ab26){const _0x139028=a265_0xcc088f;if(!existsSync(_0x1c8142))return{'kind':_0x139028(0x132)};let _0x33c95e;try{_0x33c95e=JSON[_0x139028(0x117)](readFileSync(_0x1c8142,_0x139028(0x12f)));}catch(_0x57410a){return{'kind':'unusable','reason':_0x1c8142+'\x20is\x20unreadable:\x20'+_0x57410a[_0x139028(0x123)]};}const _0x17c99f=_0x33c95e;if(typeof _0x17c99f?.[_0x139028(0x128)]!==_0x139028(0x12d)||!SUPPORTED_LOCK_VERSIONS[_0x139028(0x12e)](_0x17c99f[_0x139028(0x128)]))return{'kind':_0x139028(0x112),'reason':_0x1c8142+_0x139028(0x131)+String(_0x17c99f?.['version'])};if(!_0x17c99f[_0x139028(0x113)]||typeof _0x17c99f[_0x139028(0x113)]!==_0x139028(0x12a))return{'kind':_0x139028(0x112),'reason':_0x1c8142+'\x20has\x20no\x20skills\x20map'};return _0x17c99f[_0x139028(0x113)][_0x54ab26]?{'kind':'recorded'}:{'kind':_0x139028(0x132)};}export function resolveInstalledSkill(_0x278f3b,_0xfc398b){const _0x4c3da5=a265_0xcc088f,_0x6a1e48=_0xfc398b?.[_0x4c3da5(0x11a)]??homedir(),_0x3d2aa2=_0xfc398b?.[_0x4c3da5(0x114)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x549483=>join(_0x6a1e48,_0x549483)),_0x43ed1f=_0xfc398b?.['lockFile']??join(_0x6a1e48,SKILL_LOCK_RELATIVE_PATH),_0x47431a=_0x3d2aa2[_0x4c3da5(0x11d)](_0x2b8420=>join(_0x2b8420,_0x278f3b,_0x4c3da5(0x127))),_0x5add15=_0x47431a[_0x4c3da5(0x119)](_0x219509=>existsSync(_0x219509));if(_0x5add15)return{'state':_0x4c3da5(0x11f),'path':_0x5add15};const _0x49ca87=readLockLookup(_0x43ed1f,_0x278f3b);if(_0x49ca87[_0x4c3da5(0x120)]===_0x4c3da5(0x112))return{'state':_0x4c3da5(0x11b),'reason':_0x49ca87[_0x4c3da5(0x130)]};if(_0x49ca87[_0x4c3da5(0x120)]===_0x4c3da5(0x11e))return{'state':_0x4c3da5(0x11b),'reason':_0x43ed1f+_0x4c3da5(0x124)+_0x278f3b+'\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'+('('+_0x47431a[_0x4c3da5(0x12c)](',\x20')+')')};return{'state':'absent','checked':_0x47431a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47c743,_0x9d20ab){const _0x252ed4=a266_0x296d,_0x592d2d=_0x47c743();while(!![]){try{const _0x2560bf=-parseInt(_0x252ed4(0x15c))/0x1+parseInt(_0x252ed4(0x165))/0x2+parseInt(_0x252ed4(0x167))/0x3*(-parseInt(_0x252ed4(0x162))/0x4)+-parseInt(_0x252ed4(0x163))/0x5*(-parseInt(_0x252ed4(0x15d))/0x6)+parseInt(_0x252ed4(0x169))/0x7*(parseInt(_0x252ed4(0x16b))/0x8)+-parseInt(_0x252ed4(0x16c))/0x9+-parseInt(_0x252ed4(0x164))/0xa;if(_0x2560bf===_0x9d20ab)break;else _0x592d2d['push'](_0x592d2d['shift']());}catch(_0x5b08c7){_0x592d2d['push'](_0x592d2d['shift']());}}}(a266_0x59c9,0x7291f));function a266_0x296d(_0x359901,_0x4eb5aa){_0x359901=_0x359901-0x15b;const _0x59c9c4=a266_0x59c9();let _0x296da9=_0x59c9c4[_0x359901];return _0x296da9;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a266_0x59c9(){const _0x3b2b38=['7LBLBGv','stringify','2713376UvxsLr','3430593usvVbR','flags','91451tdcyyi','5375406fvQRCD','error','test','[REDACTED]','command','12eNtEDl','5cBNQyx','9388140qZeLga','1802274JcYKTp','durationMs','255489TshEXC','some'];a266_0x59c9=function(){return _0x3b2b38;};return a266_0x59c9();}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(_0x2c777f){const _0x42bbf8=a266_0x296d;return SENSITIVE_PATTERNS[_0x42bbf8(0x168)](_0x45539b=>_0x45539b[_0x42bbf8(0x15f)](_0x2c777f));}function sanitizeFlags(_0x332f3e){const _0x55557e=a266_0x296d,_0x5d10a8={};for(const [_0x151641,_0x5ee087]of Object['entries'](_0x332f3e)){isSensitiveKey(_0x151641)?_0x5d10a8[_0x151641]=_0x5ee087!=null&&_0x5ee087!==''?_0x55557e(0x160):_0x5ee087:_0x5d10a8[_0x151641]=_0x5ee087;}return _0x5d10a8;}export async function reportCommandTrace(_0x1204b4){const _0x4cc0a4=a266_0x296d;try{const _0x15e38c=sanitizeFlags(_0x1204b4[_0x4cc0a4(0x15b)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x1204b4['service'],'command.name':_0x1204b4[_0x4cc0a4(0x161)],'command.flags':JSON[_0x4cc0a4(0x16a)](_0x15e38c),..._0x1204b4[_0x4cc0a4(0x166)]!=null?{'command.duration_ms':_0x1204b4[_0x4cc0a4(0x166)]}:{},..._0x1204b4[_0x4cc0a4(0x15e)]?{'command.error':_0x1204b4['error']instanceof Error?_0x1204b4[_0x4cc0a4(0x15e)]['message']:String(_0x1204b4[_0x4cc0a4(0x15e)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x181bb0,_0x44b216){var _0x59e624=a267_0x86d3,_0xf9af33=_0x181bb0();while(!![]){try{var _0x30e826=parseInt(_0x59e624(0x133))/0x1*(-parseInt(_0x59e624(0x12f))/0x2)+parseInt(_0x59e624(0x139))/0x3+parseInt(_0x59e624(0x130))/0x4+-parseInt(_0x59e624(0x12c))/0x5+parseInt(_0x59e624(0x12d))/0x6*(-parseInt(_0x59e624(0x135))/0x7)+parseInt(_0x59e624(0x138))/0x8*(parseInt(_0x59e624(0x137))/0x9)+parseInt(_0x59e624(0x131))/0xa;if(_0x30e826===_0x44b216)break;else _0xf9af33['push'](_0xf9af33['shift']());}catch(_0x335bd7){_0xf9af33['push'](_0xf9af33['shift']());}}}(a267_0x5a32,0x4d3d0));function a267_0x5a32(){var _0x196ef9=['1327500pobQSh','665320TBYnlG','Failed\x20to\x20report\x20CLI\x20help\x20trace:','5908BixBQP','error','154Ynchhg','service','6273PRySgU','6824iaiNwy','1514190QWlLvl','2634770YNfskM','91452eeZPpU','cli.help','108mDMJMU'];a267_0x5a32=function(){return _0x196ef9;};return a267_0x5a32();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a267_0x86d3(_0x1cadb0,_0x1cec1b){_0x1cadb0=_0x1cadb0-0x12c;var _0x5a325a=a267_0x5a32();var _0x86d382=_0x5a325a[_0x1cadb0];return _0x86d382;}export async function reportCliHelpTrace(_0x59028d,_0x13a25d){var _0x3644f0=a267_0x86d3;try{await sendCliTraceLog({'spanName':_0x3644f0(0x12e),'logData':{'rabetbase.help.kind':_0x59028d,..._0x13a25d?.['service']&&{'rabetbase.help.service':_0x13a25d[_0x3644f0(0x136)]}}});}catch(_0x2c11a8){console[_0x3644f0(0x134)](_0x3644f0(0x132),_0x2c11a8);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22363,_0x12f29e){const _0x1b3175=a268_0x4583,_0x259a5d=_0x22363();while(!![]){try{const _0x44c2e7=parseInt(_0x1b3175(0x18d))/0x1*(parseInt(_0x1b3175(0x186))/0x2)+-parseInt(_0x1b3175(0x183))/0x3*(parseInt(_0x1b3175(0x190))/0x4)+parseInt(_0x1b3175(0x185))/0x5+parseInt(_0x1b3175(0x189))/0x6+-parseInt(_0x1b3175(0x18b))/0x7*(-parseInt(_0x1b3175(0x192))/0x8)+-parseInt(_0x1b3175(0x18c))/0x9*(-parseInt(_0x1b3175(0x191))/0xa)+-parseInt(_0x1b3175(0x18a))/0xb*(parseInt(_0x1b3175(0x184))/0xc);if(_0x44c2e7===_0x12f29e)break;else _0x259a5d['push'](_0x259a5d['shift']());}catch(_0x2ccbbc){_0x259a5d['push'](_0x259a5d['shift']());}}}(a268_0x49e6,0x39413));function a268_0x49e6(){const _0x265f01=['1793412ePEijc','10855669EvottD','500493NKFQpr','97515nfgXMw','1UYAPzh','username','tenant','12znkCDj','140nbgcum','8svXaRa','119331TSRuyh','12UyXSDO','1917215XpzorZ','870382iwYJef','production','email'];a268_0x49e6=function(){return _0x265f01;};return a268_0x49e6();}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';function a268_0x4583(_0x5d87cb,_0x506c7a){_0x5d87cb=_0x5d87cb-0x183;const _0x49e60c=a268_0x49e6();let _0x4583ae=_0x49e60c[_0x5d87cb];return _0x4583ae;}let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x5370d5=a268_0x4583,_0x5ce1ca=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x2dff39=_0x5ce1ca?.['user'];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':_0x5370d5(0x187))}),setUserContext({'id':_0x2dff39?.['id'],'username':_0x2dff39?.[_0x5370d5(0x18e)],'nickname':_0x2dff39?.['nickname'],'email':_0x2dff39?.[_0x5370d5(0x188)],'tenantCode':_0x2dff39?.[_0x5370d5(0x18f)]?.['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x5ce1ca;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2464ae,_0x484a3a){const _0x246e5d=a269_0xb501,_0x403846=_0x2464ae();while(!![]){try{const _0x3192ca=-parseInt(_0x246e5d(0x12c))/0x1+-parseInt(_0x246e5d(0x127))/0x2*(parseInt(_0x246e5d(0x133))/0x3)+parseInt(_0x246e5d(0x126))/0x4+-parseInt(_0x246e5d(0x128))/0x5+-parseInt(_0x246e5d(0x12e))/0x6+-parseInt(_0x246e5d(0x130))/0x7+-parseInt(_0x246e5d(0x12d))/0x8*(-parseInt(_0x246e5d(0x134))/0x9);if(_0x3192ca===_0x484a3a)break;else _0x403846['push'](_0x403846['shift']());}catch(_0xf3ec29){_0x403846['push'](_0x403846['shift']());}}}(a269_0x291e,0x3409a));import{shutdownTraces}from'@lovrabet/otel-logger';function a269_0x291e(){const _0x290102=['24144DKxivF','once','2808694tEhkPL','beforeExit','then','93kMAnAD','5365917lnxiMz','910756AgrvtG','23974oWeZCG','1992340YGHykV','SIGINT','exit','SIGTERM','31638YUIMtd','16aOCkFN'];a269_0x291e=function(){return _0x290102;};return a269_0x291e();}function a269_0xb501(_0x180fe2,_0x1fa467){_0x180fe2=_0x180fe2-0x126;const _0x291e26=a269_0x291e();let _0xb5016=_0x291e26[_0x180fe2];return _0xb5016;}let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x5b7320=a269_0xb501;process['once'](_0x5b7320(0x131),()=>{void flushOtelNodeIfUsed();});const _0x5c2b0a=()=>{const _0x890c53=_0x5b7320;void flushOtelNodeIfUsed()[_0x890c53(0x132)](()=>process[_0x890c53(0x12a)](0x0));};process[_0x5b7320(0x12f)](_0x5b7320(0x129),_0x5c2b0a),process[_0x5b7320(0x12f)](_0x5b7320(0x12b),_0x5c2b0a);}export async function exitWithOtelShutdown(_0x18447e){const _0x59cb29=a269_0xb501;await flushOtelNodeIfUsed(),process[_0x59cb29(0x12a)](_0x18447e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a270_0x3abd74=a270_0x3a06;function a270_0x3a06(_0x2f4a7c,_0x4adc5e){_0x2f4a7c=_0x2f4a7c-0x192;const _0x3984f1=a270_0x3984();let _0x3a06ea=_0x3984f1[_0x2f4a7c];return _0x3a06ea;}function a270_0x3984(){const _0x35d97c=['traceName','4496iarpYU','28nNsYJk','6988869mpCSOh','manual','53180UvsGuY','192417pZkkaM','286198DINnjC','rabetbase-cli','logData','traceparent','6496LkhgXY','320NeIsnG','322921kTUMJp','version','48IMxbIp','759260Mtqypf'];a270_0x3984=function(){return _0x35d97c;};return a270_0x3984();}(function(_0x1e919c,_0x39920d){const _0x269047=a270_0x3a06,_0x6cdd5e=_0x1e919c();while(!![]){try{const _0x85ed81=-parseInt(_0x269047(0x19a))/0x1+-parseInt(_0x269047(0x1a0))/0x2*(parseInt(_0x269047(0x193))/0x3)+-parseInt(_0x269047(0x19d))/0x4+parseInt(_0x269047(0x192))/0x5*(-parseInt(_0x269047(0x19c))/0x6)+parseInt(_0x269047(0x198))/0x7*(parseInt(_0x269047(0x19f))/0x8)+parseInt(_0x269047(0x1a1))/0x9+-parseInt(_0x269047(0x199))/0xa*(-parseInt(_0x269047(0x194))/0xb);if(_0x85ed81===_0x39920d)break;else _0x6cdd5e['push'](_0x6cdd5e['shift']());}catch(_0x48a8d8){_0x6cdd5e['push'](_0x6cdd5e['shift']());}}}(a270_0x3984,0x9b003));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a270_0x3abd74(0x195);export async function sendCliTraceLog(_0x10a7bf){const _0x4d5cf5=a270_0x3abd74;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x10a7bf[_0x4d5cf5(0x19e)]??DEFAULT_TRACE_NAME,'version':_0x10a7bf[_0x4d5cf5(0x19b)]??getCliVersion(),'spanName':_0x10a7bf['spanName'],'eventType':_0x4d5cf5(0x1a2),'logData':_0x10a7bf[_0x4d5cf5(0x196)],..._0x10a7bf[_0x4d5cf5(0x197)]&&{'traceparent':_0x10a7bf['traceparent']}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a271_0x50202b=a271_0x4d2a;(function(_0x36ce3f,_0x149bfd){const _0x2eebed=a271_0x4d2a,_0x5c3652=_0x36ce3f();while(!![]){try{const _0x46fcbe=-parseInt(_0x2eebed(0xb0))/0x1*(-parseInt(_0x2eebed(0xaa))/0x2)+-parseInt(_0x2eebed(0xb8))/0x3+-parseInt(_0x2eebed(0xad))/0x4+parseInt(_0x2eebed(0xaf))/0x5+parseInt(_0x2eebed(0xb9))/0x6+parseInt(_0x2eebed(0xab))/0x7+parseInt(_0x2eebed(0xb1))/0x8;if(_0x46fcbe===_0x149bfd)break;else _0x5c3652['push'](_0x5c3652['shift']());}catch(_0x3e779e){_0x5c3652['push'](_0x5c3652['shift']());}}}(a271_0x1b79,0xda7be));function a271_0x1b79(){const _0x1705f0=['issue.log.collect','1324815geCJgm','3758580XYXpFI','originalBytes','2VHcBll','1482229OJiwaJ','title','4831196MDpNps','platform-issue-log-collect','2555845PCeSev','122365tJyHGn','8580824fbWxJY','join','redactionKinds','sanitize','description','redactionCount'];a271_0x1b79=function(){return _0x1705f0;};return a271_0x1b79();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a271_0x50202b(0xae);export const PLATFORM_ISSUE_SPAN_NAME=a271_0x50202b(0xb7);function a271_0x4d2a(_0x925901,_0x321c28){_0x925901=_0x925901-0xaa;const _0x1b79b7=a271_0x1b79();let _0x4d2a3b=_0x1b79b7[_0x925901];return _0x4d2a3b;}export async function sendPlatformIssueCollectLog(_0x6a0758){const _0x5d031a=a271_0x50202b;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x6a0758[_0x5d031a(0xac)],'issue.description':_0x6a0758[_0x5d031a(0xb5)],..._0x6a0758['sanitize']?{'issue.description_original_bytes':_0x6a0758[_0x5d031a(0xb4)][_0x5d031a(0xba)],'issue.description_truncated':_0x6a0758[_0x5d031a(0xb4)]['truncated'],'issue.description_redactions':_0x6a0758[_0x5d031a(0xb4)][_0x5d031a(0xb6)],'issue.description_redaction_kinds':_0x6a0758['sanitize'][_0x5d031a(0xb3)][_0x5d031a(0xb2)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a273_0x9658db=a273_0x1d6e;(function(_0x3bded7,_0x374e15){const _0x52447f=a273_0x1d6e,_0x1af2e9=_0x3bded7();while(!![]){try{const _0x43b151=-parseInt(_0x52447f(0x1c9))/0x1*(-parseInt(_0x52447f(0x1e4))/0x2)+parseInt(_0x52447f(0x1c4))/0x3+-parseInt(_0x52447f(0x1d6))/0x4+-parseInt(_0x52447f(0x1d2))/0x5+-parseInt(_0x52447f(0x1bf))/0x6*(parseInt(_0x52447f(0x1c5))/0x7)+parseInt(_0x52447f(0x1b5))/0x8+parseInt(_0x52447f(0x1c1))/0x9;if(_0x43b151===_0x374e15)break;else _0x1af2e9['push'](_0x1af2e9['shift']());}catch(_0x4d3efa){_0x1af2e9['push'](_0x1af2e9['shift']());}}}(a273_0x2502,0x82ae7));function a273_0x2502(){const _0x3c6910=['.cursor','codex','Antigravity','通用模板\x20-\x20兜底方案','CodeBuddy','antigravity','.agent','5226615OHIDGV','Claude\x20Code','.cline','.qoder/rules/rabetbase.md','2571328GzohpV','.claude/skills/lovrabet/SKILL.md','其他\x20(通用模板)','.windsurf','SKILL.md.tpl','Cursor','.cline/skills/lovrabet/SKILL.md','Antigravity\x20IDE','.opencode','claude','cline','.qoder','.agent/skills/lovrabet/SKILL.md','windsurf','545368deaqMe','.claude','Qoder\x20IDE','.codebuddy','trae','Windsurf','cursor','7840352jqjusP','.trae/skills/lovrabet/SKILL.md','Cline','.cursor/skills/rabetbase.md','Windsurf\x20IDE','Codex\x20IDE','file','opencode','Qoder','.qoder/skills/lovrabet/SKILL.md','126iimDQT','.codex','5050917MrNhCP','Cursor\x20IDE','.trae','988368BIYySd','155113cjfvWg','Trae\x20IDE','OpenCode','codebuddy','3sIcCoD','qoder'];a273_0x2502=function(){return _0x3c6910;};return a273_0x2502();}export const CORE_IDE_CONFIGS={'cursor':{'name':a273_0x9658db(0x1db),'description':a273_0x9658db(0x1c2),'folders':['.cursorrules',a273_0x9658db(0x1cb)],'files':[{'type':'file','path':a273_0x9658db(0x1b8),'template':a273_0x9658db(0x1da)}]},'windsurf':{'name':a273_0x9658db(0x1b3),'description':a273_0x9658db(0x1b9),'folders':[a273_0x9658db(0x1d9)],'files':[{'type':'file','path':'.windsurf/workflows/rabetbase.md','template':a273_0x9658db(0x1da)}]},'claude':{'name':a273_0x9658db(0x1d3),'description':'Claude\x20Code','folders':[a273_0x9658db(0x1e5)],'files':[{'type':a273_0x9658db(0x1bb),'path':a273_0x9658db(0x1d7),'template':a273_0x9658db(0x1da)}]},'cline':{'name':a273_0x9658db(0x1b7),'description':'Cline\x20IDE','folders':[a273_0x9658db(0x1d4)],'files':[{'type':a273_0x9658db(0x1bb),'path':a273_0x9658db(0x1dc),'template':a273_0x9658db(0x1da)}]},'codex':{'name':'Codex','description':a273_0x9658db(0x1ba),'folders':[a273_0x9658db(0x1c0)],'files':[{'type':a273_0x9658db(0x1bb),'path':'.codex/skills/lovrabet/SKILL.md','template':a273_0x9658db(0x1da)}]},'opencode':{'name':a273_0x9658db(0x1c7),'description':'OpenCode\x20IDE','folders':[a273_0x9658db(0x1de)],'files':[{'type':a273_0x9658db(0x1bb),'path':'.opencode/skills/lovrabet/SKILL.md','template':a273_0x9658db(0x1da)}]},'qoder':{'name':a273_0x9658db(0x1bd),'description':a273_0x9658db(0x1e6),'folders':[a273_0x9658db(0x1e1)],'files':[{'type':a273_0x9658db(0x1bb),'path':a273_0x9658db(0x1d5),'template':'SKILL.md.tpl'},{'type':a273_0x9658db(0x1bb),'path':a273_0x9658db(0x1be),'template':a273_0x9658db(0x1da)}]},'codebuddy':{'name':a273_0x9658db(0x1cf),'description':'CodeBuddy\x20IDE','folders':[a273_0x9658db(0x1e7)],'files':[{'type':a273_0x9658db(0x1bb),'path':'.codebuddy/skills/lovrabet/SKILL.md','template':a273_0x9658db(0x1da)}]},'trae':{'name':'Trae','description':a273_0x9658db(0x1c6),'folders':[a273_0x9658db(0x1c3)],'files':[{'type':'file','path':a273_0x9658db(0x1b6),'template':a273_0x9658db(0x1da)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a273_0x9658db(0x1d8),'description':a273_0x9658db(0x1ce),'folders':[a273_0x9658db(0x1d1)],'files':[{'type':'file','path':a273_0x9658db(0x1e2),'template':a273_0x9658db(0x1da)}]},'antigravity':{'name':a273_0x9658db(0x1cd),'description':a273_0x9658db(0x1dd),'folders':[a273_0x9658db(0x1d1)],'files':[{'type':a273_0x9658db(0x1bb),'path':a273_0x9658db(0x1e2),'template':a273_0x9658db(0x1da)}]}};function a273_0x1d6e(_0x121e74,_0x142e8d){_0x121e74=_0x121e74-0x1b2;const _0x250207=a273_0x2502();let _0x1d6ebb=_0x250207[_0x121e74];return _0x1d6ebb;}export const CORE_IDE_LIST=['claude',a273_0x9658db(0x1e0),a273_0x9658db(0x1c8),a273_0x9658db(0x1cc),a273_0x9658db(0x1b4),'opencode','qoder',a273_0x9658db(0x1b2),'windsurf'];export const IDE_LIST=[a273_0x9658db(0x1d0),a273_0x9658db(0x1df),a273_0x9658db(0x1e0),'codebuddy','codex',a273_0x9658db(0x1b4),a273_0x9658db(0x1bc),a273_0x9658db(0x1ca),a273_0x9658db(0x1b2),a273_0x9658db(0x1e3),'agent'];export const ALL_CORE_IDES=[a273_0x9658db(0x1b4),a273_0x9658db(0x1e3),a273_0x9658db(0x1df),'cline',a273_0x9658db(0x1cc),a273_0x9658db(0x1bc),'qoder','codebuddy',a273_0x9658db(0x1b2)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a2beb,_0x59617e){const _0x3b5883=a274_0x44fa,_0xb43be1=_0x4a2beb();while(!![]){try{const _0x94f582=-parseInt(_0x3b5883(0x9a))/0x1+parseInt(_0x3b5883(0x98))/0x2+-parseInt(_0x3b5883(0x96))/0x3+-parseInt(_0x3b5883(0x9c))/0x4+-parseInt(_0x3b5883(0x9b))/0x5*(-parseInt(_0x3b5883(0x99))/0x6)+parseInt(_0x3b5883(0x9d))/0x7+-parseInt(_0x3b5883(0x9e))/0x8*(-parseInt(_0x3b5883(0x97))/0x9);if(_0x94f582===_0x59617e)break;else _0xb43be1['push'](_0xb43be1['shift']());}catch(_0x4752bc){_0xb43be1['push'](_0xb43be1['shift']());}}}(a274_0x85b9,0x7c2c7));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a274_0x85b9(){const _0x5d3d82=['90lxYIDi','4008876cUKDmw','2197937tXvkTm','3065016tDgRrT','1928154eegqRf','18ypmmdL','852458CRjybn','287322JFBXbo','214888rBhKQO'];a274_0x85b9=function(){return _0x5d3d82;};return a274_0x85b9();}import{CliErrors}from'../errors.js';function a274_0x44fa(_0x465eec,_0xf9ebec){_0x465eec=_0x465eec-0x96;const _0x85b995=a274_0x85b9();let _0x44fa1a=_0x85b995[_0x465eec];return _0x44fa1a;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f2e47,_0x2da49a){const _0x38a7b8=a275_0x586d,_0x4cdaa1=_0x5f2e47();while(!![]){try{const _0x77d50a=-parseInt(_0x38a7b8(0xed))/0x1+-parseInt(_0x38a7b8(0xe3))/0x2*(parseInt(_0x38a7b8(0xeb))/0x3)+-parseInt(_0x38a7b8(0xe1))/0x4*(parseInt(_0x38a7b8(0xe5))/0x5)+-parseInt(_0x38a7b8(0xdf))/0x6*(parseInt(_0x38a7b8(0xf1))/0x7)+-parseInt(_0x38a7b8(0xe7))/0x8+parseInt(_0x38a7b8(0xe8))/0x9*(-parseInt(_0x38a7b8(0xef))/0xa)+parseInt(_0x38a7b8(0xea))/0xb;if(_0x77d50a===_0x2da49a)break;else _0x4cdaa1['push'](_0x4cdaa1['shift']());}catch(_0x3583d0){_0x4cdaa1['push'](_0x4cdaa1['shift']());}}}(a275_0x1b31,0x7d60a));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x249f04=a275_0x586d,_0xea0998=getTemplateBaseUrl(),_0x2f5cef=[_0xea0998+_0x249f04(0xec),_0xea0998+_0x249f04(0xe0)];for(const _0x3370a3 of _0x2f5cef){try{const _0x214f0d=await fetch(_0x3370a3,{'headers':{'Accept':_0x249f04(0xf0)}});if(!_0x214f0d['ok'])continue;const _0x325e13=await _0x214f0d[_0x249f04(0xe9)]();if(!_0x325e13[_0x249f04(0xe2)]?.[_0x249f04(0xe6)]||!_0x325e13[_0x249f04(0xee)]?.[_0x249f04(0xe4)]?.[_0x249f04(0xe6)])continue;return _0x325e13;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;function a275_0x1b31(){const _0x24df77=['957087jCBaBG','json','44068805ZCtjyF','3dmMARW','/config.json','961253RgfGdL','sdk','70sKJbQP','application/json','18725WKGqNH','186NTfGLb','/config/index.json','32nmGVTZ','cli','1270274bFsSTc','node','64815PODHuM','stableVersion','7722312jNMdfN'];a275_0x1b31=function(){return _0x24df77;};return a275_0x1b31();}let hasCachedConfig=![];export async function getCdnConfig(){const _0x511d73=Date['now']();if(hasCachedConfig){const _0xb4d43b=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x511d73-cacheTime<_0xb4d43b)return cachedConfig;}const _0x37a2d2=await fetchCdnConfig();return cachedConfig=_0x37a2d2,cacheTime=_0x511d73,hasCachedConfig=!![],_0x37a2d2;}function a275_0x586d(_0x354f97,_0x44a4ca){_0x354f97=_0x354f97-0xdf;const _0x1b3198=a275_0x1b31();let _0x586d7c=_0x1b3198[_0x354f97];return _0x586d7c;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a276_0x2c6127=a276_0x31ee;(function(_0x38f0b6,_0x217492){const _0x762229=a276_0x31ee,_0x2f4dda=_0x38f0b6();while(!![]){try{const _0x9c94ae=-parseInt(_0x762229(0x11d))/0x1+-parseInt(_0x762229(0x120))/0x2+parseInt(_0x762229(0x114))/0x3+parseInt(_0x762229(0x118))/0x4+parseInt(_0x762229(0x12e))/0x5*(parseInt(_0x762229(0x128))/0x6)+-parseInt(_0x762229(0x112))/0x7+parseInt(_0x762229(0x124))/0x8*(-parseInt(_0x762229(0x132))/0x9);if(_0x9c94ae===_0x217492)break;else _0x2f4dda['push'](_0x2f4dda['shift']());}catch(_0x1da351){_0x2f4dda['push'](_0x2f4dda['shift']());}}}(a276_0x34ad,0x8d31b));import a276_0x346b50 from'node:fs';import a276_0x564ceb from'node:path';import a276_0x52354b from'semver';function a276_0x31ee(_0x5213a7,_0x5070e0){_0x5213a7=_0x5213a7-0x110;const _0x34adce=a276_0x34ad();let _0x31eead=_0x34adce[_0x5213a7];return _0x31eead;}import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a276_0x2c6127(0x123);function isNonNumericVersion(_0x7e5802){const _0x12ed28=a276_0x2c6127,_0x1dac13=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x1dac13['some'](_0x37288e=>_0x37288e[_0x12ed28(0x12b)](_0x7e5802));}function getInstalledVersion(_0xedbb7c,_0x50895b){const _0x564351=a276_0x2c6127;try{const _0x313249=a276_0x564ceb[_0x564351(0x11c)](_0xedbb7c,'node_modules',_0x50895b,_0x564351(0x11b));if(a276_0x346b50['existsSync'](_0x313249)){const _0x31d001=JSON['parse'](a276_0x346b50[_0x564351(0x126)](_0x313249,_0x564351(0x12c)));return _0x31d001[_0x564351(0x121)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1b5036=a276_0x2c6127;try{const _0x51e8f4=await getCdnConfig();return _0x51e8f4?.[_0x1b5036(0x111)]?.[_0x1b5036(0x115)]?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x32deff=a276_0x2c6127;try{const _0x35b592=await getCdnConfig();return _0x35b592?.['sdk']?.['node']?.[_0x32deff(0x125)]||_0x32deff(0x119);}catch{return _0x32deff(0x119);}}export async function checkSdkVersion(_0x42970c){const _0xe8a02e=a276_0x2c6127,_0x5c3491=a276_0x564ceb[_0xe8a02e(0x11c)](_0x42970c,_0xe8a02e(0x11b)),[_0x1db2d3,_0x2f8729]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x39eeba=_0x1db2d3||FALLBACK_MIN_SDK_VERSION;if(!a276_0x346b50[_0xe8a02e(0x12f)](_0x5c3491))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x39eeba,'packageName':_0x2f8729,'stableVersion':_0x1db2d3};try{const _0x1b8f44=JSON['parse'](a276_0x346b50[_0xe8a02e(0x126)](_0x5c3491,'utf8')),_0x42777f=_0x1b8f44['dependencies']||{},_0x317683=_0x1b8f44[_0xe8a02e(0x11e)]||{},_0x349b97=_0x42777f[_0x2f8729]||_0x317683[_0x2f8729];if(!_0x349b97)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x39eeba,'packageName':_0x2f8729,'stableVersion':_0x1db2d3};let _0x42dbf9=getInstalledVersion(_0x42970c,_0x2f8729);!_0x42dbf9&&(_0x42dbf9=_0x349b97);if(isNonNumericVersion(_0x349b97))return{'installed':!![],'version':_0x42dbf9,'needsUpgrade':![],'minVersion':_0x39eeba,'packageName':_0x2f8729,'stableVersion':_0x1db2d3};const _0x22a06b=a276_0x52354b[_0xe8a02e(0x127)](_0x42dbf9),_0x434998=a276_0x52354b[_0xe8a02e(0x127)](_0x39eeba),_0x1a08e1=_0x22a06b&&_0x434998?a276_0x52354b['lt'](_0x22a06b,_0x434998):![];return{'installed':!![],'version':_0x42dbf9,'needsUpgrade':_0x1a08e1,'minVersion':_0x39eeba,'packageName':_0x2f8729,'stableVersion':_0x1db2d3};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x39eeba,'packageName':_0x2f8729,'stableVersion':_0x1db2d3};}}function a276_0x34ad(){const _0x43c274=['utf-8','minVersion','29240FWznvp','existsSync','log','parse','9hgousq','↪\x20SDK\x20update\x20available','sdk','4426324vCqyni','needsUpgrade','2490663jdVsVX','node','stableVersion','\x20\x20\x20Current\x20version:\x20','4222732OxAbpi','@lovrabet/sdk','\x1b[33m','package.json','join','306135KYELmB','devDependencies','\x20\x20\x20Upgrade\x20command:\x20','973846mhmBHB','version','\x1b[1m','1.2.0','7431800OtpMLk','packageName','readFileSync','coerce','1074oAeVZj','\x1b[0m','npm\x20install\x20','test'];a276_0x34ad=function(){return _0x43c274;};return a276_0x34ad();}export function checkSdkVersionSync(_0x3e3aea){const _0x23ccf4=a276_0x2c6127,_0x3416db=a276_0x564ceb[_0x23ccf4(0x11c)](_0x3e3aea,'package.json'),_0x298a17=_0x23ccf4(0x119);if(!a276_0x346b50[_0x23ccf4(0x12f)](_0x3416db))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x298a17,'stableVersion':null};try{const _0x8311d=JSON[_0x23ccf4(0x131)](a276_0x346b50[_0x23ccf4(0x126)](_0x3416db,'utf8')),_0x5ed0c8=_0x8311d['dependencies']||{},_0x31a91b=_0x8311d[_0x23ccf4(0x11e)]||{},_0x5de63c=_0x5ed0c8[_0x298a17]||_0x31a91b[_0x298a17];if(!_0x5de63c)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x298a17,'stableVersion':null};let _0x4760c9=getInstalledVersion(_0x3e3aea,_0x298a17);!_0x4760c9&&(_0x4760c9=_0x5de63c);if(isNonNumericVersion(_0x5de63c))return{'installed':!![],'version':_0x4760c9,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x298a17,'stableVersion':null};const _0x100371=a276_0x52354b[_0x23ccf4(0x127)](_0x4760c9),_0x4d4c75=_0x100371?a276_0x52354b['lt'](_0x100371,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4760c9,'needsUpgrade':_0x4d4c75,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x298a17,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x298a17,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x3246c6){const _0x1c5db5=a276_0x2c6127;if(!_0x3246c6[_0x1c5db5(0x113)])return;const _0x2ef2e0=_0x1c5db5(0x11a),_0x4a9890=_0x1c5db5(0x129),_0x22e619=_0x1c5db5(0x122),_0x50e443=_0x3246c6['packageName']||_0x1c5db5(0x119),_0x494592=_0x3246c6[_0x1c5db5(0x116)]||_0x3246c6[_0x1c5db5(0x12d)],_0x5634f4=_0x1c5db5(0x12a)+_0x50e443+'@'+(_0x494592||'latest');console['log'](),console['log'](''+_0x2ef2e0+_0x22e619+_0x1c5db5(0x110)+_0x4a9890),console[_0x1c5db5(0x130)](_0x2ef2e0+_0x1c5db5(0x117)+_0x50e443+'@'+_0x3246c6[_0x1c5db5(0x121)]+_0x4a9890),console['log'](_0x2ef2e0+'\x20\x20\x20Stable\x20version:\x20'+_0x494592+_0x4a9890),console['log'](_0x2ef2e0+_0x1c5db5(0x11f)+_0x5634f4+_0x4a9890),console[_0x1c5db5(0x130)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26b7fa,_0x34b8ae){const _0x3a185a=a277_0x1aaf,_0x1a64e3=_0x26b7fa();while(!![]){try{const _0x59384b=-parseInt(_0x3a185a(0x77))/0x1*(parseInt(_0x3a185a(0x89))/0x2)+parseInt(_0x3a185a(0x98))/0x3+-parseInt(_0x3a185a(0x73))/0x4*(-parseInt(_0x3a185a(0x82))/0x5)+parseInt(_0x3a185a(0x95))/0x6+parseInt(_0x3a185a(0x86))/0x7*(-parseInt(_0x3a185a(0x90))/0x8)+-parseInt(_0x3a185a(0x91))/0x9*(-parseInt(_0x3a185a(0x99))/0xa)+parseInt(_0x3a185a(0x8c))/0xb*(-parseInt(_0x3a185a(0x74))/0xc);if(_0x59384b===_0x34b8ae)break;else _0x1a64e3['push'](_0x1a64e3['shift']());}catch(_0x5ab7d9){_0x1a64e3['push'](_0x1a64e3['shift']());}}}(a277_0x499f,0x23180));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a277_0x5ae15b from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a277_0x499f(){const _0x304e73=['join','22cZjzAi','↪\x20New\x20version\x20available','1.0.0','Current\x20version:\x20','68704MomWVk','9EVMQyd','\x20\x20\x20Minimum\x20supported:\x20','validation','log','1112052tKBHIB','\x20\x20\x20Stable\x20version:\x20','utf-8','321150jDZANe','309130gWGBpg','\x20\x20\x20Recommended\x20stable:\x20','\x20\x20\x20Upgrade\x20command:\x20','version','minimumVersionMessage','633008AmXuqI','1432668FvvFEO','Upgrade\x20command:\x20','needsUpgrade','3fVcFnh','npm\x20install\x20-g\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','Minimum\x20supported:\x20','filter','parse','upgradeMessage','stableVersion','\x1b[0m','coerce','package.json','5FSyzMH','\x1b[31m','latest','currentVersion','49zxQYcb','belowMinimum','minimumVersion','25946KNsVUl','\x20\x20\x20'];a277_0x499f=function(){return _0x304e73;};return a277_0x499f();}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x5c75ef){const _0x2b1485=a277_0x1aaf,_0x376c4e=_0x5c75ef[_0x2b1485(0x7e)]||_0x2b1485(0x84);return _0x2b1485(0x78)+NPM_PACKAGE_NAME+'@'+_0x376c4e;}function a277_0x1aaf(_0x35bbc2,_0x5d3a50){_0x35bbc2=_0x35bbc2-0x6f;const _0x499fab=a277_0x499f();let _0x1aaf3d=_0x499fab[_0x35bbc2];return _0x1aaf3d;}function getCurrentCliVersion(){const _0x307d64=a277_0x1aaf;try{const _0x272d93=fileURLToPath(import.meta.url),_0x284e3a=resolve(dirname(_0x272d93),'../..'),_0x3b0e4a=resolve(_0x284e3a,_0x307d64(0x81)),_0x358f44=JSON[_0x307d64(0x7c)](readFileSync(_0x3b0e4a,_0x307d64(0x97)));return _0x358f44[_0x307d64(0x71)]||_0x307d64(0x8e);}catch{return _0x307d64(0x8e);}}export async function checkCliVersion(){const _0x5d250e=a277_0x1aaf,_0x6163b7=getCurrentCliVersion(),_0x54053c=await getCliVersionPolicy(),_0x45db31=_0x54053c?.['stableVersion']||null,_0xc5042b=_0x54053c?.[_0x5d250e(0x88)]||null;let _0x3c9676=![],_0x405f28=![];const _0x3d4f75=a277_0x5ae15b[_0x5d250e(0x80)](_0x6163b7);if(_0x3d4f75&&_0x45db31)try{const _0x5c8f22=a277_0x5ae15b[_0x5d250e(0x80)](_0x45db31);if(_0x5c8f22)_0x3c9676=a277_0x5ae15b['lt'](_0x3d4f75,_0x5c8f22);}catch{}if(_0x3d4f75&&_0xc5042b)try{const _0x347fe9=a277_0x5ae15b['coerce'](_0xc5042b);if(_0x347fe9)_0x405f28=a277_0x5ae15b['lt'](_0x3d4f75,_0x347fe9);}catch{}return _0x405f28&&(_0x3c9676=!![]),{'currentVersion':_0x6163b7,'stableVersion':_0x45db31,'minimumVersion':_0xc5042b,'needsUpgrade':_0x3c9676,'belowMinimum':_0x405f28,'isPreRelease':![],'upgradeMessage':_0x54053c?.[_0x5d250e(0x7d)],'minimumVersionMessage':_0x54053c?.[_0x5d250e(0x72)]};}export function printCliUpgradeWarning(_0x41b7c2){const _0x15b174=a277_0x1aaf;if(!_0x41b7c2[_0x15b174(0x76)]&&!_0x41b7c2['belowMinimum'])return;const _0x19c6e2=_0x15b174(0x83),_0x5bc9ed='\x1b[33m',_0x107522=_0x15b174(0x7f),_0xdfe52e='\x1b[1m',_0x18a3de=getCliUpgradeCommand(_0x41b7c2);console[_0x15b174(0x94)](),_0x41b7c2[_0x15b174(0x87)]?(console[_0x15b174(0x94)](''+_0x19c6e2+_0xdfe52e+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x107522),console[_0x15b174(0x94)](_0x19c6e2+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x41b7c2[_0x15b174(0x85)]+_0x107522),_0x41b7c2[_0x15b174(0x88)]&&console[_0x15b174(0x94)](_0x19c6e2+_0x15b174(0x92)+_0x41b7c2[_0x15b174(0x88)]+_0x107522),_0x41b7c2[_0x15b174(0x7e)]&&_0x41b7c2[_0x15b174(0x7e)]!==_0x41b7c2[_0x15b174(0x88)]&&console['log'](_0x19c6e2+_0x15b174(0x6f)+_0x41b7c2['stableVersion']+_0x107522),_0x41b7c2[_0x15b174(0x72)]&&console[_0x15b174(0x94)](_0x19c6e2+_0x15b174(0x8a)+_0x41b7c2['minimumVersionMessage']+_0x107522),console[_0x15b174(0x94)](_0x19c6e2+_0x15b174(0x70)+_0x18a3de+_0x107522)):(console['log'](''+_0x5bc9ed+_0xdfe52e+_0x15b174(0x8d)+_0x107522),console['log'](_0x5bc9ed+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x41b7c2['currentVersion']+_0x107522),console[_0x15b174(0x94)](_0x5bc9ed+_0x15b174(0x96)+_0x41b7c2[_0x15b174(0x7e)]+_0x107522),_0x41b7c2[_0x15b174(0x7d)]&&console['log'](_0x5bc9ed+_0x15b174(0x8a)+_0x41b7c2['upgradeMessage']+_0x107522),console[_0x15b174(0x94)](_0x5bc9ed+_0x15b174(0x70)+_0x18a3de+_0x107522)),console['log']();}export function assertCliVersionSupported(_0x3f0c03){const _0x159909=a277_0x1aaf;if(!_0x3f0c03[_0x159909(0x87)])return;const _0x55b561=[_0x3f0c03[_0x159909(0x72)],_0x159909(0x8f)+_0x3f0c03[_0x159909(0x85)],_0x3f0c03[_0x159909(0x88)]?_0x159909(0x7a)+_0x3f0c03[_0x159909(0x88)]:null,_0x159909(0x75)+getCliUpgradeCommand(_0x3f0c03)][_0x159909(0x7b)](Boolean)[_0x159909(0x8b)]('\x0a');throw CliErrors[_0x159909(0x93)](_0x159909(0x79),_0x55b561);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5af278,_0x212c99){const _0x29ac2a=a278_0x1401,_0x2f6efe=_0x5af278();while(!![]){try{const _0x2d536f=-parseInt(_0x29ac2a(0x159))/0x1+parseInt(_0x29ac2a(0x169))/0x2*(parseInt(_0x29ac2a(0x16c))/0x3)+-parseInt(_0x29ac2a(0x15c))/0x4*(parseInt(_0x29ac2a(0x168))/0x5)+parseInt(_0x29ac2a(0x15b))/0x6+-parseInt(_0x29ac2a(0x160))/0x7+-parseInt(_0x29ac2a(0x16b))/0x8*(parseInt(_0x29ac2a(0x164))/0x9)+parseInt(_0x29ac2a(0x15e))/0xa*(parseInt(_0x29ac2a(0x16f))/0xb);if(_0x2d536f===_0x212c99)break;else _0x2f6efe['push'](_0x2f6efe['shift']());}catch(_0x32ffde){_0x2f6efe['push'](_0x2f6efe['shift']());}}}(a278_0x1546,0x338d9));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(_0x5ce446){const _0x4f3225=a278_0x1401;return typeof _0x5ce446==='string'&&_0x5ce446['trim']()['length']>0x0?_0x5ce446[_0x4f3225(0x16d)]():null;}function normalizeCliVersionPolicy(_0x38352d){const _0x4768db=a278_0x1401;if(!_0x38352d||typeof _0x38352d!=='object')return null;const _0x3864b3=_0x38352d,_0x9aebbd=_0x3864b3[_0x4768db(0x157)]&&typeof _0x3864b3[_0x4768db(0x157)]===_0x4768db(0x158)?_0x3864b3[_0x4768db(0x157)]:_0x3864b3,_0x24ccb9=pickString(_0x9aebbd['stableVersion'])||pickString(_0x9aebbd[_0x4768db(0x15a)])||pickString(_0x9aebbd[_0x4768db(0x161)]),_0x4c882c=pickString(_0x9aebbd[_0x4768db(0x167)])||pickString(_0x9aebbd[_0x4768db(0x162)]);if(!_0x24ccb9&&!_0x4c882c)return null;return{'stableVersion':_0x24ccb9,'minimumVersion':_0x4c882c,'upgradeMessage':pickString(_0x9aebbd[_0x4768db(0x166)])||undefined,'minimumVersionMessage':pickString(_0x9aebbd[_0x4768db(0x165)])||undefined};}function a278_0x1546(){const _0xaf080c=['653860EDefgE','application/json','820hGUIei','signal','909062erwKPS','recommendedVersion','minVersion','now','505863eFWFuS','minimumVersionMessage','upgradeMessage','minimumVersion','10nJsHOp','952yvDVDB','json','32ziJAAI','804uOTpbW','trim','abort','90937OEadOe','cli','object','199687isReLr','latestVersion','1722060RsDLbX'];a278_0x1546=function(){return _0xaf080c;};return a278_0x1546();}function a278_0x1401(_0x603699,_0x2d260b){_0x603699=_0x603699-0x157;const _0x15463b=a278_0x1546();let _0x1401e8=_0x15463b[_0x603699];return _0x1401e8;}export async function fetchRabetbaseCdnConfig(){const _0x254ad7=a278_0x1401,_0x3eedeb=new AbortController(),_0x2df920=setTimeout(()=>_0x3eedeb[_0x254ad7(0x16e)](),FETCH_TIMEOUT_MS);try{const _0x5e1e92=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x254ad7(0x15d)},'signal':_0x3eedeb[_0x254ad7(0x15f)]});if(!_0x5e1e92['ok'])return null;const _0x5820a9=await _0x5e1e92[_0x254ad7(0x16a)]();return _0x5820a9&&typeof _0x5820a9===_0x254ad7(0x158)?_0x5820a9:null;}catch{return null;}finally{clearTimeout(_0x2df920);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x3ca2f7=a278_0x1401,_0x33b501=Date[_0x3ca2f7(0x163)]();if(hasCachedConfig){const _0x418c47=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x33b501-cacheTime<_0x418c47)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x33b501,hasCachedConfig=!![],cachedConfig;}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
|
-
(function(
|
|
1
|
+
const a279_0x2f14c9=a279_0x3d5b;function a279_0x3d5b(_0x6eb8d5,_0xa583ad){_0x6eb8d5=_0x6eb8d5-0x155;const _0x235335=a279_0x2353();let _0x3d5bd7=_0x235335[_0x6eb8d5];return _0x3d5bd7;}(function(_0x30d9f4,_0x50053f){const _0x41b78d=a279_0x3d5b,_0x9c0bf8=_0x30d9f4();while(!![]){try{const _0x3ebf86=-parseInt(_0x41b78d(0x160))/0x1*(parseInt(_0x41b78d(0x15e))/0x2)+-parseInt(_0x41b78d(0x15c))/0x3*(parseInt(_0x41b78d(0x163))/0x4)+parseInt(_0x41b78d(0x159))/0x5+parseInt(_0x41b78d(0x156))/0x6*(-parseInt(_0x41b78d(0x15f))/0x7)+parseInt(_0x41b78d(0x158))/0x8*(-parseInt(_0x41b78d(0x157))/0x9)+parseInt(_0x41b78d(0x155))/0xa+-parseInt(_0x41b78d(0x161))/0xb*(-parseInt(_0x41b78d(0x162))/0xc);if(_0x3ebf86===_0x50053f)break;else _0x9c0bf8['push'](_0x9c0bf8['shift']());}catch(_0x52c7fe){_0x9c0bf8['push'](_0x9c0bf8['shift']());}}}(a279_0x2353,0x74682));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a279_0x335370,getMultiAppConfigs as a279_0x4cb01e,getTemplateBaseUrl as a279_0x15f0cb}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';function a279_0x2353(){const _0x359c5b=['7419744gQsgyh','96RgoGNf','2824410bdhrEz','30mIkLQs','3118239tiCnNQ','16DaVAAx','1992380dLLzJC','project','env','77247akrZif','string','4fMSYPI','975065HJHrOD','25829ojZDuA','33kPvYtt'];a279_0x2353=function(){return _0x359c5b;};return a279_0x2353();}export function readConfig(_0x13434f){const _0x3ebb49=a279_0x3d5b,_0x339e97=readRawConfig(_0x13434f);return _0x339e97[_0x3ebb49(0x15b)]&&typeof _0x339e97[_0x3ebb49(0x15b)]===_0x3ebb49(0x15d)&&initEnv(_0x339e97['env']),_0x339e97;}export function getConfigAppCode(){return a279_0x335370();}export function getMultiAppConfigs(_0x2fea73=a279_0x2f14c9(0x15a)){return a279_0x4cb01e(_0x2fea73);}export function getTemplateBaseUrl(){return a279_0x15f0cb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48d80f,_0x55c19a){const _0x637498=a280_0x1870,_0x293c1c=_0x48d80f();while(!![]){try{const _0x2f47b8=parseInt(_0x637498(0x173))/0x1*(parseInt(_0x637498(0x17b))/0x2)+-parseInt(_0x637498(0x176))/0x3*(parseInt(_0x637498(0x180))/0x4)+parseInt(_0x637498(0x17f))/0x5+-parseInt(_0x637498(0x177))/0x6*(-parseInt(_0x637498(0x17d))/0x7)+parseInt(_0x637498(0x174))/0x8+parseInt(_0x637498(0x17c))/0x9+-parseInt(_0x637498(0x175))/0xa*(parseInt(_0x637498(0x178))/0xb);if(_0x2f47b8===_0x55c19a)break;else _0x293c1c['push'](_0x293c1c['shift']());}catch(_0x796718){_0x293c1c['push'](_0x293c1c['shift']());}}}(a280_0x28d1,0xb5457));function toFiniteNumber(_0x97daae){const _0x447fd5=a280_0x1870;if(typeof _0x97daae===_0x447fd5(0x17a)&&Number[_0x447fd5(0x179)](_0x97daae))return _0x97daae;if(typeof _0x97daae===_0x447fd5(0x181)){const _0x4b79de=_0x97daae[_0x447fd5(0x182)]();if(!_0x4b79de)return undefined;const _0x405b56=Number(_0x4b79de);if(Number['isFinite'](_0x405b56))return _0x405b56;}return undefined;}function a280_0x28d1(){const _0x4b67fd=['trim','1xcItDU','1677312SeFnVQ','9853290BllCFm','1135257dSdGuj','26340XgVetH','22ECLEWF','isFinite','number','1223340BPpUgH','5784210wqvFrt','511OIjFsw','object','6535350xixwNy','4UdAsAC','string'];a280_0x28d1=function(){return _0x4b67fd;};return a280_0x28d1();}function a280_0x1870(_0x597fcb,_0x2ffce3){_0x597fcb=_0x597fcb-0x173;const _0x28d159=a280_0x28d1();let _0x18709f=_0x28d159[_0x597fcb];return _0x18709f;}export function normalizeEntityWithIdResponse(_0x396bd2){const _0x1e5048=a280_0x1870,_0x27b6e2=toFiniteNumber(_0x396bd2);if(_0x27b6e2!==undefined)return{'id':_0x27b6e2,'entity':{'id':_0x27b6e2}};if(!_0x396bd2||typeof _0x396bd2!==_0x1e5048(0x17e))return{'id':undefined,'entity':{}};const _0x5b333f={..._0x396bd2},_0x1d47ed=toFiniteNumber(_0x5b333f['id']);return _0x1d47ed!==undefined&&(_0x5b333f['id']=_0x1d47ed),{'id':_0x1d47ed,'entity':_0x5b333f};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fec82,_0x18fe9e){const _0x230db6=a281_0x1b52,_0x14b830=_0x3fec82();while(!![]){try{const _0x325f5f=parseInt(_0x230db6(0x85))/0x1+-parseInt(_0x230db6(0x7b))/0x2+parseInt(_0x230db6(0x7c))/0x3*(parseInt(_0x230db6(0x81))/0x4)+-parseInt(_0x230db6(0x82))/0x5*(parseInt(_0x230db6(0x84))/0x6)+parseInt(_0x230db6(0x80))/0x7*(-parseInt(_0x230db6(0x7f))/0x8)+-parseInt(_0x230db6(0x7d))/0x9*(-parseInt(_0x230db6(0x86))/0xa)+parseInt(_0x230db6(0x7e))/0xb;if(_0x325f5f===_0x18fe9e)break;else _0x14b830['push'](_0x14b830['shift']());}catch(_0x42fe40){_0x14b830['push'](_0x14b830['shift']());}}}(a281_0x1d5b,0xc3c08));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a281_0x1b52(_0x2c1ba6,_0x575778){_0x2c1ba6=_0x2c1ba6-0x7b;const _0x1d5bd0=a281_0x1d5b();let _0x1b5232=_0x1d5bd0[_0x2c1ba6];return _0x1b5232;}import{join}from'node:path';export async function copyDir(_0x560224,_0x45c0bf){const _0x370ed4=a281_0x1b52,_0x5934a2=statSync(_0x560224);if(_0x5934a2[_0x370ed4(0x83)]()){!existsSync(_0x45c0bf)&&mkdirSync(_0x45c0bf,{'recursive':!![]});const _0x54ad25=readdirSync(_0x560224);for(const _0x277b0c of _0x54ad25){await copyDir(join(_0x560224,_0x277b0c),join(_0x45c0bf,_0x277b0c));}}else copyFileSync(_0x560224,_0x45c0bf);}function a281_0x1d5b(){const _0x42261a=['2646396GRXtGD','17165511UrOBez','16JNLJgw','1685495rzhSLf','81528qRriGS','6129670FTAvXW','isDirectory','6EvkiQR','927079dIMHsc','30gejnWl','2128456otRLWb','30piCBTM'];a281_0x1d5b=function(){return _0x42261a;};return a281_0x1d5b();}export function ensureDir(_0x45cb48){!existsSync(_0x45cb48)&&mkdirSync(_0x45cb48,{'recursive':!![]});}export function pathExists(_0x4cdb9c){return existsSync(_0x4cdb9c);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a282_0x2339ef=a282_0x4941;(function(_0x386809,_0x59d231){const _0x5b76e2=a282_0x4941,_0x2ef218=_0x386809();while(!![]){try{const _0x3cc569=-parseInt(_0x5b76e2(0x8c))/0x1+parseInt(_0x5b76e2(0x76))/0x2*(parseInt(_0x5b76e2(0x96))/0x3)+parseInt(_0x5b76e2(0x85))/0x4*(parseInt(_0x5b76e2(0x78))/0x5)+parseInt(_0x5b76e2(0x8f))/0x6+parseInt(_0x5b76e2(0x83))/0x7*(parseInt(_0x5b76e2(0x7d))/0x8)+parseInt(_0x5b76e2(0x99))/0x9+-parseInt(_0x5b76e2(0x90))/0xa;if(_0x3cc569===_0x59d231)break;else _0x2ef218['push'](_0x2ef218['shift']());}catch(_0x412420){_0x2ef218['push'](_0x2ef218['shift']());}}}(a282_0x9b1d,0x6e93a));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 _0x48477a=a282_0x4941,_0x536821=getTemplateBaseUrl();return _0x536821+_0x48477a(0x8a);}function a282_0x9b1d(){const _0x43f2fb=['trimEnd','title','/skills/guides.json','application/json','805835cJcTKf','CDN\x20返回数据格式错误','utf-8','5131758izMYgi','5464950vcpGXz','keys','length','replace','CDN\x20数据中缺少\x20skillTemplate','lastUpdated','716880gLtltv','extendContent','skillTemplate','756891dBfIgs','object','2guWQMU','content','4480hOdBlX','path','.lovrabet/skill/guides','entries','map','2096ihiMiS','guides','push','json','join','cache','2338TxEVGN','.md','2408tauDYp','\x0a\x0a>更新时间:','CDN\x20请求失败:\x20'];a282_0x9b1d=function(){return _0x43f2fb;};return a282_0x9b1d();}const CACHE_DIR=join(homedir(),'.lovrabet',a282_0x2339ef(0x82));export async function fetchGuidesFromCDN(){const _0xee4714=a282_0x2339ef,_0x176753=getGuidesCdnUrl(),_0x16ce69=await fetch(_0x176753,{'headers':{'Accept':_0xee4714(0x8b)}});if(!_0x16ce69['ok'])throw new Error(_0xee4714(0x87)+_0x16ce69['status']+'\x20'+_0x16ce69['statusText']);const _0x482ef7=await _0x16ce69[_0xee4714(0x80)]();if(!_0x482ef7[_0xee4714(0x7e)]||typeof _0x482ef7[_0xee4714(0x7e)]!==_0xee4714(0x75))throw new Error(_0xee4714(0x8d));return _0x482ef7;}export function writeGuidesToProject(_0x2f98d3,_0x12a053,_0xc9552c=a282_0x2339ef(0x7a),_0x2ce60d){const _0x360f78=a282_0x2339ef,_0x11283f=join(_0x12a053,_0xc9552c);mkdirSync(_0x11283f,{'recursive':!![]});for(const [_0x3c53a2,_0x200c96]of Object[_0x360f78(0x7b)](_0x2f98d3[_0x360f78(0x7e)])){let _0x4e3f44=_0x200c96['content'];_0x200c96['lastUpdated']&&(_0x4e3f44=appendUpdateTime(_0x4e3f44,_0x200c96[_0x360f78(0x95)])),writeFileSync(join(_0x11283f,_0x3c53a2+_0x360f78(0x84)),_0x4e3f44,_0x360f78(0x8e));}}export function appendUpdateTime(_0x1eb155,_0x30c479){const _0x48f78d=a282_0x2339ef;return _0x1eb155=_0x1eb155['replace'](/\n*>更新时间:.*$/m,''),_0x1eb155[_0x48f78d(0x88)]()+(_0x48f78d(0x86)+_0x30c479);}export function getSkillTemplate(_0x292038){const _0x45e392=a282_0x2339ef;return _0x292038[_0x45e392(0x98)]?.[_0x45e392(0x77)]||'';}export function appendExtendContents(_0x293385,_0x3aa858,_0x652b5c){const _0x460878=a282_0x2339ef,_0x31c2e3=[];for(const [,_0x49b916]of Object[_0x460878(0x7b)](_0x3aa858[_0x460878(0x7e)])){_0x49b916[_0x460878(0x97)]&&_0x31c2e3[_0x460878(0x7f)](_0x49b916[_0x460878(0x97)][_0x460878(0x88)]());}if(_0x31c2e3[_0x460878(0x92)]===0x0)return _0x293385;return _0x293385[_0x460878(0x88)]()+'\x0a\x0a'+_0x31c2e3[_0x460878(0x81)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x471b39,_0xee232c,_0x5cba33){const _0x176c9f=a282_0x2339ef,_0x17c887=getSkillTemplate(_0x471b39);if(!_0x17c887)throw new Error(_0x176c9f(0x94));const _0x19268a=dirname(_0xee232c);mkdirSync(_0x19268a,{'recursive':!![]});let _0x4f847a=_0x17c887[_0x176c9f(0x93)](/\{\{IDE_NAME\}\}/g,_0x5cba33);_0x4f847a=appendExtendContents(_0x4f847a,_0x471b39),_0x471b39[_0x176c9f(0x98)][_0x176c9f(0x95)]&&(_0x4f847a=appendUpdateTime(_0x4f847a,_0x471b39[_0x176c9f(0x98)][_0x176c9f(0x95)])),writeFileSync(_0xee232c,_0x4f847a,_0x176c9f(0x8e));}function a282_0x4941(_0x2fdbf1,_0x56ad67){_0x2fdbf1=_0x2fdbf1-0x75;const _0x9b1dfd=a282_0x9b1d();let _0x49414a=_0x9b1dfd[_0x2fdbf1];return _0x49414a;}export async function installGuides(_0xe9ead0){const _0x19706d=a282_0x2339ef,_0x552aa3=await fetchGuidesFromCDN();return writeGuidesToProject(_0x552aa3,_0xe9ead0),Object[_0x19706d(0x91)](_0x552aa3[_0x19706d(0x7e)])['length'];}export function getGuidesSummary(_0x2109f7){const _0x4bccc4=a282_0x2339ef;return Object[_0x4bccc4(0x7b)](_0x2109f7[_0x4bccc4(0x7e)])[_0x4bccc4(0x7c)](([_0x573b38,_0xac24ad])=>({'key':_0x573b38,'title':_0xac24ad[_0x4bccc4(0x89)],'path':_0xac24ad[_0x4bccc4(0x79)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a283_0x3b84(){const _0x59b752=['fetch','statusText','*\x20请求失败,','abort','2367176KEwkiw','headers','199229oxnjno','1463168dAmlEe','log','message','1820440xMbPsS','get','json','status','includes','text','application/json','476706jqdoXZ','1673NesuST','1227610hYuNhJ','TypeError','url','AbortError','36NVExlc','name','signal','ECONNRESET','5574YuQyiA','Request\x20failed','2DzULov','content-type'];a283_0x3b84=function(){return _0x59b752;};return a283_0x3b84();}(function(_0x1db312,_0x6c821b){const _0x5b2bd6=a283_0x7a25,_0x20e3e7=_0x1db312();while(!![]){try{const _0x5299f3=parseInt(_0x5b2bd6(0x183))/0x1+parseInt(_0x5b2bd6(0x17b))/0x2*(-parseInt(_0x5b2bd6(0x18e))/0x3)+parseInt(_0x5b2bd6(0x184))/0x4+parseInt(_0x5b2bd6(0x187))/0x5+-parseInt(_0x5b2bd6(0x198))/0x6*(-parseInt(_0x5b2bd6(0x18f))/0x7)+-parseInt(_0x5b2bd6(0x181))/0x8+-parseInt(_0x5b2bd6(0x194))/0x9*(parseInt(_0x5b2bd6(0x190))/0xa);if(_0x5299f3===_0x6c821b)break;else _0x20e3e7['push'](_0x20e3e7['shift']());}catch(_0x1b6390){_0x20e3e7['push'](_0x20e3e7['shift']());}}}(a283_0x3b84,0x321f1));function a283_0x7a25(_0x424066,_0x3d0edb){_0x424066=_0x424066-0x17a;const _0x3b84aa=a283_0x3b84();let _0x7a25fd=_0x3b84aa[_0x424066];return _0x7a25fd;}export async function httpRequest(_0x385f00,_0x480778={}){const _0x867548=a283_0x7a25,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x480778;let _0x19d441=null;for(let _0x16fae1=0x0;_0x16fae1<=retries;_0x16fae1++){try{const _0x164256=new AbortController(),_0x2b4640=setTimeout(()=>_0x164256[_0x867548(0x180)](),timeout),_0x5d84d8=await fetch(_0x385f00,{'headers':headers,'signal':_0x164256[_0x867548(0x196)]});clearTimeout(_0x2b4640);let _0x4aaf10;const _0x59c93a=_0x5d84d8[_0x867548(0x182)][_0x867548(0x188)](_0x867548(0x17c));return _0x59c93a?.['includes'](_0x867548(0x18d))?_0x4aaf10=await _0x5d84d8[_0x867548(0x189)]():_0x4aaf10=await _0x5d84d8[_0x867548(0x18c)](),{'ok':_0x5d84d8['ok'],'status':_0x5d84d8[_0x867548(0x18a)],'statusText':_0x5d84d8[_0x867548(0x17e)],'data':_0x4aaf10,'headers':_0x5d84d8[_0x867548(0x182)],'url':_0x5d84d8[_0x867548(0x192)],'text':()=>_0x5d84d8[_0x867548(0x18c)]()};}catch(_0x4aab3a){_0x19d441=_0x4aab3a instanceof Error?_0x4aab3a:new Error(String(_0x4aab3a));if(_0x16fae1===retries)break;if(shouldRetry(_0x4aab3a)){console[_0x867548(0x185)](_0x867548(0x17f)+retryDelay+'ms\x20后进行第\x20'+(_0x16fae1+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0x19d441||new Error(_0x867548(0x17a));}function shouldRetry(_0x463314){const _0x439b39=a283_0x7a25;if(_0x463314 instanceof Error){if(_0x463314['name']===_0x439b39(0x193))return![];if(_0x463314[_0x439b39(0x195)]===_0x439b39(0x191)&&_0x463314[_0x439b39(0x186)][_0x439b39(0x18b)](_0x439b39(0x17d)))return!![];if(_0x463314[_0x439b39(0x186)][_0x439b39(0x18b)](_0x439b39(0x197)))return!![];if(_0x463314[_0x439b39(0x186)][_0x439b39(0x18b)]('ENOTFOUND'))return![];}return![];}function sleep(_0x16e057){return new Promise(_0x428b55=>setTimeout(_0x428b55,_0x16e057));}export function validateUrl(_0x5f183f){try{return new URL(_0x5f183f),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f11b3,_0x3c6116){const _0x239b19=a284_0x2ffd,_0x2cc845=_0x4f11b3();while(!![]){try{const _0x8ae7b9=parseInt(_0x239b19(0x147))/0x1+parseInt(_0x239b19(0x13f))/0x2*(-parseInt(_0x239b19(0x149))/0x3)+-parseInt(_0x239b19(0x142))/0x4*(parseInt(_0x239b19(0x145))/0x5)+-parseInt(_0x239b19(0x141))/0x6+parseInt(_0x239b19(0x14a))/0x7*(-parseInt(_0x239b19(0x146))/0x8)+-parseInt(_0x239b19(0x13b))/0x9*(parseInt(_0x239b19(0x13e))/0xa)+parseInt(_0x239b19(0x13a))/0xb;if(_0x8ae7b9===_0x3c6116)break;else _0x2cc845['push'](_0x2cc845['shift']());}catch(_0x4e908e){_0x2cc845['push'](_0x2cc845['shift']());}}}(a284_0xc501,0xeaf8e));function env(_0x154fb5){return process.env[`RABETBASE_${_0x154fb5}`]||process.env[`LOVRABET_${_0x154fb5}`]||undefined;}function a284_0xc501(){const _0x434912=['9740304yjBtHZ','32viRIid','stdin','nonInteractive','308145aMQgKo','40eMfACB','39456ZcsQCS','setRawMode','2367SgyKDg','1703604LXHSyb','79011163EqKMyE','293049gyWbRi','true','isTTY','380QoRonH','4282MeWluD','stdout'];a284_0xc501=function(){return _0x434912;};return a284_0xc501();}function a284_0x2ffd(_0x4d9ccc,_0x3d2ad1){_0x4d9ccc=_0x4d9ccc-0x13a;const _0xc50169=a284_0xc501();let _0x2ffd8d=_0xc50169[_0x4d9ccc];return _0x2ffd8d;}export function isNonInteractive(_0x41d9bf){const _0x5d5bf4=a284_0x2ffd;return!!(_0x41d9bf[_0x5d5bf4(0x144)]||_0x41d9bf['ci']||env('CI')==='true'||process.env.CI===_0x5d5bf4(0x13c)||!process[_0x5d5bf4(0x140)][_0x5d5bf4(0x13d)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x4d0d45=a284_0x2ffd;if(!process[_0x4d0d45(0x143)]['isTTY'])return![];try{const _0x2e4d7c=process[_0x4d0d45(0x143)]['isRaw'];return process[_0x4d0d45(0x143)][_0x4d0d45(0x148)](!![]),process['stdin'][_0x4d0d45(0x148)](_0x2e4d7c??![]),!![];}catch{return![];}}
|