@lovrabet/rabetbase-cli 2.5.4-beta.2 → 2.5.4-beta.3
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/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/logs.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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/dataset/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.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-restore.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/dataset/user-deleted-field-list.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/table-diff-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/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/search.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/menu/visibility-update.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/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.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/domain-routing-sync.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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/feishu-bind.d.ts +2 -0
- package/lib/commands/user-account/feishu-bind.js +1 -0
- 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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.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 +2 -0
- 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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.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/page/lr-smart-jsx.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/supported-flags.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/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 +3 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52237b,_0x1f6b9c){const _0x49bd51=a317_0x2416,_0x93e2bc=_0x52237b();while(!![]){try{const _0x4fcbf6=parseInt(_0x49bd51(0xf6))/0x1*(parseInt(_0x49bd51(0x109))/0x2)+parseInt(_0x49bd51(0xff))/0x3+parseInt(_0x49bd51(0xfb))/0x4*(-parseInt(_0x49bd51(0xfa))/0x5)+-parseInt(_0x49bd51(0x103))/0x6*(-parseInt(_0x49bd51(0x10d))/0x7)+-parseInt(_0x49bd51(0xf8))/0x8*(-parseInt(_0x49bd51(0xfc))/0x9)+-parseInt(_0x49bd51(0xfd))/0xa*(parseInt(_0x49bd51(0x100))/0xb)+parseInt(_0x49bd51(0x10a))/0xc*(-parseInt(_0x49bd51(0x101))/0xd);if(_0x4fcbf6===_0x1f6b9c)break;else _0x93e2bc['push'](_0x93e2bc['shift']());}catch(_0x185696){_0x93e2bc['push'](_0x93e2bc['shift']());}}}(a317_0x1d77,0x2c33a));const DESCRIPTION_MAX_LENGTH=0x1f4;function a317_0x2416(_0x441c28,_0x347360){_0x441c28=_0x441c28-0xf6;const _0x1d7762=a317_0x1d77();let _0x2416bf=_0x1d7762[_0x441c28];return _0x2416bf;}export function buildRabetbaseConfirmationRequest(_0x3cef54,_0x3463b6,_0x39234a){const _0xcbb33d=a317_0x2416,_0x22d799=normalizeText(_0x3cef54[_0xcbb33d(0x10c)],DESCRIPTION_MAX_LENGTH),_0x57de1f=_0x22d799||normalizeText(defaultDescription(requireWriteRisk(_0x3cef54),_0x3463b6),DESCRIPTION_MAX_LENGTH);return{'operation':_0x3463b6,'risk':requireWriteRisk(_0x3cef54),'description':_0x57de1f,..._0x39234a?{'signal':_0x39234a}:{}};}function requireWriteRisk(_0x2b5912){const _0x558608=a317_0x2416;if(_0x2b5912[_0x558608(0xf9)]===_0x558608(0x105)||_0x2b5912[_0x558608(0xf9)]==='high-risk-write')return _0x2b5912['risk'];throw new Error(_0x558608(0xf7));}function defaultDescription(_0x3fdfc1,_0x1cc1e0){const _0x4ef9f4=a317_0x2416;if(_0x3fdfc1===_0x4ef9f4(0x10b))return _0x4ef9f4(0x108)+_0x1cc1e0+_0x4ef9f4(0x102);return _0x4ef9f4(0x104)+_0x1cc1e0+_0x4ef9f4(0xfe);}function normalizeText(_0x7e942c,_0x58db45){const _0xd4da69=a317_0x2416;if(typeof _0x7e942c!==_0xd4da69(0x106))return'';return _0x7e942c[_0xd4da69(0x107)](/[\u0000-\u001f\u007f]+/g,'\x20')['replace'](/\s+/g,'\x20')['trim']()['slice'](0x0,_0x58db45);}function a317_0x1d77(){const _0x4d34df=['replace','This\x20will\x20run\x20the\x20high-risk\x20write\x20','694606hdbRbh','5451588UHhRig','high-risk-write','confirmationDescription','38276ypUcms','1KcdHRG','Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.','968qhOcCm','risk','10MOOLSg','235180czdAxP','25443jHZnrl','27930aansnS','.\x20It\x20may\x20create\x20or\x20change\x20business\x20data\x20or\x20local\x20configuration.','100662yLorFk','11QECzNQ','13aKCQoC','.\x20It\x20may\x20overwrite,\x20delete,\x20or\x20materially\x20change\x20live\x20behavior.','36uigHeF','This\x20will\x20run\x20the\x20write\x20','write','string'];a317_0x1d77=function(){return _0x4d34df;};return a317_0x1d77();}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4f7dbb,_0x310764){const _0x21a91b=a318_0x1d7b,_0x19a6df=_0x4f7dbb();while(!![]){try{const _0x4bc2eb=-parseInt(_0x21a91b(0xda))/0x1+-parseInt(_0x21a91b(0xea))/0x2*(parseInt(_0x21a91b(0xec))/0x3)+parseInt(_0x21a91b(0xe2))/0x4*(-parseInt(_0x21a91b(0xe3))/0x5)+parseInt(_0x21a91b(0xdd))/0x6*(parseInt(_0x21a91b(0xdf))/0x7)+parseInt(_0x21a91b(0xe8))/0x8+-parseInt(_0x21a91b(0xe4))/0x9*(-parseInt(_0x21a91b(0xeb))/0xa)+-parseInt(_0x21a91b(0xe9))/0xb*(parseInt(_0x21a91b(0xed))/0xc);if(_0x4bc2eb===_0x310764)break;else _0x19a6df['push'](_0x19a6df['shift']());}catch(_0x45cf5c){_0x19a6df['push'](_0x19a6df['shift']());}}}(a318_0x36fa,0x58908));export function canonicalRabetbaseOperation(_0x47a58c){const _0x338462=a318_0x1d7b;return[_0x47a58c['service'],..._0x47a58c[_0x338462(0xef)][_0x338462(0xe5)]()['split'](/\s+/)][_0x338462(0xe1)](Boolean)['join']('.');}export function createRabetbaseWriteMetadata(_0x29f45a,_0x4e925d,_0x47cd42,_0x48f68a){const _0x573fc6=a318_0x1d7b;if(_0x48f68a||_0x47cd42['ok']!==!![]||hasUnresolvedConflicts(_0x47cd42)||_0x29f45a[_0x573fc6(0xe7)]!==_0x573fc6(0xdc)&&_0x29f45a[_0x573fc6(0xe7)]!==_0x573fc6(0xde))return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':'rabetbase.write.completed','operation':_0x4e925d,'risk':_0x29f45a[_0x573fc6(0xe7)]}}};}function hasUnresolvedConflicts(_0x128476){const _0x390a5d=a318_0x1d7b,_0x5f4454=_0x128476[_0x390a5d(0xee)];return Boolean(_0x5f4454&&typeof _0x5f4454===_0x390a5d(0xe0)&&!Array[_0x390a5d(0xdb)](_0x5f4454)&&Array['isArray'](_0x5f4454[_0x390a5d(0xd9)])&&_0x5f4454['conflicts'][_0x390a5d(0xe6)]>0x0);}function a318_0x1d7b(_0x3be6d6,_0x5d4e13){_0x3be6d6=_0x3be6d6-0xd9;const _0x36fa45=a318_0x36fa();let _0x1d7bc5=_0x36fa45[_0x3be6d6];return _0x1d7bc5;}function a318_0x36fa(){const _0x57988b=['2056gdUPfm','4605aJHbQe','477GcHEbK','trim','length','risk','3108504omhQAl','68959VJjbdJ','8heFyVf','79220sdowzq','230481vPRuQa','108MkjoPD','data','command','conflicts','196239tftYfg','isArray','write','3526158kTNgjK','high-risk-write','7QCCXvp','object','filter'];a318_0x36fa=function(){return _0x57988b;};return a318_0x36fa();}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x28816f,_0xdb4578){const _0x2fe2ac=a319_0x5e4a,_0x4f9952=_0x28816f();while(!![]){try{const _0x387f06=parseInt(_0x2fe2ac(0x154))/0x1+parseInt(_0x2fe2ac(0x16d))/0x2*(parseInt(_0x2fe2ac(0x15c))/0x3)+parseInt(_0x2fe2ac(0x164))/0x4+-parseInt(_0x2fe2ac(0x168))/0x5+-parseInt(_0x2fe2ac(0x157))/0x6+-parseInt(_0x2fe2ac(0x15e))/0x7*(parseInt(_0x2fe2ac(0x15a))/0x8)+parseInt(_0x2fe2ac(0x159))/0x9*(parseInt(_0x2fe2ac(0x172))/0xa);if(_0x387f06===_0xdb4578)break;else _0x4f9952['push'](_0x4f9952['shift']());}catch(_0x236f3b){_0x4f9952['push'](_0x4f9952['shift']());}}}(a319_0x34bd,0x962bd));import{buildConfigFromFlags,initGlobalEnvironment,isRoutingRecoveryService}from'../context.js';import{createPipelineEnv,createRabetbaseRunnerAdapter,finalizeRabetbaseRuntimeState,runCommand}from'../framework/runner.js';import{buildRabetbaseConfirmationRequest}from'../runtime/confirmation.js';function a319_0x5e4a(_0x5bd13a,_0x27d449){_0x5bd13a=_0x5bd13a-0x154;const _0x34bda0=a319_0x34bd();let _0x5e4ae9=_0x34bda0[_0x5bd13a];return _0x5e4ae9;}import{canonicalRabetbaseOperation,createRabetbaseWriteMetadata}from'../runtime/event.js';import{runSerialized}from'../runtime/queue.js';import{resolveRabetbaseInvocation}from'../runtime/resolve.js';function a319_0x34bd(){const _0x47f5e7=['6001465HqHjGn','AbortError','isNonInteractive','stringify','definition','26xdfgFV','signal','command','result','yes','8150DONuCM','reason','dryRun','data','presentation','high-risk-write','411845bLvcrD','args','Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.','5241552RddyiG','write','17937qCpLou','40CtcIcq','dry-run','212703TEzDcD','rawFlags','819707CeSetY','message','risk','present','confirm','Rabetbase\x20invocation\x20aborted.','1266552ermWZG','format','service','execute'];a319_0x34bd=function(){return _0x47f5e7;};return a319_0x34bd();}const defaultPresentation={'present'({result:_0xf6b286,command:_0xce768,risk:_0x1913e0,dryRun:_0x1a666e}){const _0x4e5550=a319_0x5e4a;return JSON[_0x4e5550(0x16b)]({'ok':_0xf6b286['ok'],'command':_0xce768,'risk':_0x1913e0,..._0x1a666e?{'dryRun':!![]}:{},..._0xf6b286[_0x4e5550(0x175)]!==undefined?{'data':_0xf6b286['data']}:{},..._0xf6b286[_0x4e5550(0x15f)]?{'message':_0xf6b286[_0x4e5550(0x15f)]}:{}});}};export async function invokeRabetbase(_0x8c4a9e,_0x150a58){const _0x1a5113=a319_0x5e4a;throwIfAborted(_0x150a58[_0x1a5113(0x16e)]);const _0x19f40a=await resolveRabetbaseInvocation(_0x8c4a9e),_0x1337b8=canonicalRabetbaseOperation(_0x19f40a[_0x1a5113(0x16c)]);return await confirmWriteBeforeQueue(_0x19f40a[_0x1a5113(0x16c)],_0x19f40a[_0x1a5113(0x15d)],_0x1337b8,_0x150a58),runSerialized(async()=>{const _0x571919=_0x1a5113,_0x14e7fa={};try{throwIfAborted(_0x150a58[_0x571919(0x16e)]);const _0x5dc550=buildConfigFromFlags(_0x19f40a[_0x571919(0x15d)]);!isRoutingRecoveryService(_0x19f40a[_0x571919(0x16c)][_0x571919(0x166)])&&await initGlobalEnvironment(_0x5dc550);const _0x3023ab=createPipelineEnv(_0x5dc550,{..._0x19f40a[_0x571919(0x15d)],'yes':_0x19f40a[_0x571919(0x16c)][_0x571919(0x160)]===_0x571919(0x177)?!![]:_0x19f40a[_0x571919(0x15d)][_0x571919(0x171)],'nonInteractive':!![]},_0x19f40a[_0x571919(0x155)]);_0x3023ab[_0x571919(0x16a)]=!![],_0x3023ab['riskLevel']=_0x571919(0x177);const _0x13e08d=withAbortSignal(_0x19f40a[_0x571919(0x16c)],_0x150a58[_0x571919(0x16e)]),_0x1b559f=createRabetbaseRunnerAdapter({'formatOutput'(_0x470969,_0x4d10ce){const _0x145b6e=_0x571919;_0x14e7fa[_0x145b6e(0x170)]=_0x470969,_0x14e7fa[_0x145b6e(0x16f)]=_0x4d10ce[_0x145b6e(0x16f)],_0x14e7fa[_0x145b6e(0x160)]=_0x4d10ce['risk'],_0x14e7fa['format']=_0x4d10ce[_0x145b6e(0x165)],_0x14e7fa[_0x145b6e(0x174)]=_0x4d10ce[_0x145b6e(0x174)]===!![];},async 'confirmHighRisk'(){const _0x14528a=_0x571919;throw new Error(_0x14528a(0x156));}});await runCommand(_0x13e08d,_0x3023ab,_0x1b559f);if(!_0x14e7fa['result']||!_0x14e7fa[_0x571919(0x16f)]||!_0x14e7fa[_0x571919(0x160)]||!_0x14e7fa[_0x571919(0x165)])throw new Error('Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.');const _0x3767df=_0x14e7fa[_0x571919(0x174)]===!![],_0x42de7a=_0x150a58[_0x571919(0x176)]??defaultPresentation,_0x552d84={'result':_0x14e7fa[_0x571919(0x170)],'command':_0x14e7fa[_0x571919(0x16f)],'operation':_0x1337b8,'risk':_0x14e7fa[_0x571919(0x160)],'format':_0x14e7fa['format'],'dryRun':_0x3767df},_0x4fdd1d=createRabetbaseWriteMetadata(_0x19f40a['definition'],_0x1337b8,_0x14e7fa[_0x571919(0x170)],_0x3767df);let _0x319c11;try{_0x319c11=await _0x42de7a[_0x571919(0x161)](_0x552d84);}catch(_0xa6f11){if(!_0x4fdd1d||_0x42de7a===defaultPresentation)throw _0xa6f11;_0x319c11=await defaultPresentation[_0x571919(0x161)](_0x552d84);}return{'operation':_0x1337b8,'risk':_0x14e7fa[_0x571919(0x160)],'mode':_0x3767df?_0x571919(0x15b):_0x571919(0x167),'result':_0x14e7fa['result'],'output':_0x319c11,..._0x4fdd1d?{'metadata':_0x4fdd1d}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}async function confirmWriteBeforeQueue(_0x980a01,_0x4a973e,_0x38e477,_0x3415ae){const _0x2c72ac=a319_0x5e4a;if(_0x4a973e[_0x2c72ac(0x174)]===!![]||_0x980a01['risk']!==_0x2c72ac(0x158)&&_0x980a01[_0x2c72ac(0x160)]!==_0x2c72ac(0x177))return;await _0x3415ae['confirmation'][_0x2c72ac(0x162)](buildRabetbaseConfirmationRequest(_0x980a01,_0x38e477,_0x3415ae['signal']));}function withAbortSignal(_0x21353a,_0x41f293){return{..._0x21353a,async 'execute'(_0x17ea24){return throwIfAborted(_0x41f293),_0x21353a['execute']({..._0x17ea24,'signal':_0x41f293});}};}function throwIfAborted(_0x745722){const _0x35224f=a319_0x5e4a;if(_0x745722?.['aborted'])throw _0x745722[_0x35224f(0x173)]instanceof Error?_0x745722['reason']:new DOMException(_0x35224f(0x163),_0x35224f(0x169));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x287b9e,_0x281712){const _0x1fe2ac=a320_0x5264,_0x59f73c=_0x287b9e();while(!![]){try{const _0x3bccb6=-parseInt(_0x1fe2ac(0x120))/0x1+-parseInt(_0x1fe2ac(0x122))/0x2*(parseInt(_0x1fe2ac(0x11e))/0x3)+parseInt(_0x1fe2ac(0x124))/0x4+-parseInt(_0x1fe2ac(0x11f))/0x5+-parseInt(_0x1fe2ac(0x121))/0x6*(-parseInt(_0x1fe2ac(0x11d))/0x7)+parseInt(_0x1fe2ac(0x125))/0x8+parseInt(_0x1fe2ac(0x123))/0x9;if(_0x3bccb6===_0x281712)break;else _0x59f73c['push'](_0x59f73c['shift']());}catch(_0x10065a){_0x59f73c['push'](_0x59f73c['shift']());}}}(a320_0x3e30,0x4a056));function a320_0x5264(_0x259c38,_0x5cf8c4){_0x259c38=_0x259c38-0x11d;const _0x3e30cd=a320_0x3e30();let _0x526418=_0x3e30cd[_0x259c38];return _0x526418;}function a320_0x3e30(){const _0x3f7dc6=['14RwxKXz','3ampfmO','1834215YSWebV','403094aqkQvl','200910nrpIui','160746zOnNaH','8641692ApKAgV','104948IlIrtF','800840YQjSqE'];a320_0x3e30=function(){return _0x3f7dc6;};return a320_0x3e30();}let tail=Promise['resolve']();export async function runSerialized(_0x2282f2){const _0x1d4d36=tail;let _0x4641d6;tail=new Promise(_0x19d86b=>{_0x4641d6=_0x19d86b;}),await _0x1d4d36['catch'](()=>undefined);try{return await _0x2282f2();}finally{_0x4641d6();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x356bb8,_0x54c7dd){const _0x5c1d81=a321_0x4852,_0x4d4440=_0x356bb8();while(!![]){try{const _0x534597=-parseInt(_0x5c1d81(0x1a2))/0x1*(parseInt(_0x5c1d81(0x19b))/0x2)+-parseInt(_0x5c1d81(0x1ad))/0x3+parseInt(_0x5c1d81(0x1a7))/0x4*(parseInt(_0x5c1d81(0x1a6))/0x5)+-parseInt(_0x5c1d81(0x1af))/0x6+parseInt(_0x5c1d81(0x1b1))/0x7*(parseInt(_0x5c1d81(0x1ac))/0x8)+parseInt(_0x5c1d81(0x1a5))/0x9+parseInt(_0x5c1d81(0x1ab))/0xa*(parseInt(_0x5c1d81(0x19a))/0xb);if(_0x534597===_0x54c7dd)break;else _0x4d4440['push'](_0x4d4440['shift']());}catch(_0x2e8f08){_0x4d4440['push'](_0x4d4440['shift']());}}}(a321_0x2ff7,0xa759e));import a321_0x40c6db from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';function a321_0x2ff7(){const _0x9be34=['4tlsDGq','message','flags','hint','3550bVJcmp','24yNXuRq','210639ujfXXN','validation','8182560THHfIG','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','891723ULdGyk','defaultCommand','slice','26631SwCgeB','15046iqOIEJ','Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','join','Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.','input','Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','unknownCommand','97uwQywL','wildcardDef','run','10277037HyCvLc','2328295UqXZlL'];a321_0x2ff7=function(){return _0x9be34;};return a321_0x2ff7();}import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{assertSupportedCommandFlags}from'../framework/supported-flags.js';function a321_0x4852(_0x30543b,_0x48c58b){_0x30543b=_0x30543b-0x19a;const _0x2ff7f6=a321_0x2ff7();let _0x4852f6=_0x2ff7f6[_0x30543b];return _0x4852f6;}export async function resolveRabetbaseInvocation(_0x1749df){const _0x239985=a321_0x4852,_0x1bf605=a321_0x40c6db('',{'importMeta':import.meta,'argv':[..._0x1749df],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x2232cb=[..._0x1bf605[_0x239985(0x19f)]],_0x3847d8=_0x1bf605[_0x239985(0x1a9)],_0x38c2c7=_0x2232cb[0x0];if(!_0x38c2c7)throw CliErrors['validation'](_0x239985(0x19c));const _0x5e6e14=resolveRemovedCommand(_0x38c2c7,_0x2232cb[0x1]);if(_0x5e6e14)throw CliErrors[_0x239985(0x1ae)](_0x5e6e14[_0x239985(0x1a8)],_0x5e6e14[_0x239985(0x1aa)]);if(_0x38c2c7===_0x239985(0x1a4))throw CliErrors[_0x239985(0x1ae)](_0x239985(0x1b0),_0x239985(0x19e));if(!isKnownService(_0x38c2c7))throw CliErrors[_0x239985(0x1a1)](_0x2232cb[_0x239985(0x19d)]('\x20'));const _0x2ea1b5=getServiceEntry(_0x38c2c7),_0x40408e=_0x2232cb[0x1],_0x5119bc=_0x40408e||_0x2ea1b5[_0x239985(0x1b2)];if(!_0x5119bc){if(_0x2ea1b5[_0x239985(0x1a3)])return{'definition':_0x2ea1b5['wildcardDef'],'rawFlags':_0x3847d8,'args':[]};throw CliErrors[_0x239985(0x1ae)](_0x239985(0x1a0)+_0x38c2c7+'\x22.');}const _0x2c5f75=findDefinition(_0x38c2c7,_0x5119bc);if(_0x2c5f75)return assertSupportedCommandFlags(_0x2c5f75,_0x3847d8),{'definition':_0x2c5f75,'rawFlags':_0x3847d8,'args':_0x2232cb[_0x239985(0x1b3)](0x2)};if(_0x2ea1b5[_0x239985(0x1a3)])return{'definition':_0x2ea1b5[_0x239985(0x1a3)],'rawFlags':_0x3847d8,'args':[_0x5119bc,..._0x2232cb[_0x239985(0x1b3)](0x2)]};throw CliErrors['unknownCommand'](_0x38c2c7+'\x20'+_0x5119bc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a322_0x136cdc=a322_0x4c44;(function(_0xf423bd,_0x50fa56){const _0x5cc27a=a322_0x4c44,_0x15fc49=_0xf423bd();while(!![]){try{const _0x45d02c=-parseInt(_0x5cc27a(0x1dc))/0x1+parseInt(_0x5cc27a(0x1b3))/0x2+-parseInt(_0x5cc27a(0x1b0))/0x3+parseInt(_0x5cc27a(0x1ac))/0x4+-parseInt(_0x5cc27a(0x1a3))/0x5*(parseInt(_0x5cc27a(0x1c8))/0x6)+parseInt(_0x5cc27a(0x1b6))/0x7*(parseInt(_0x5cc27a(0x1ce))/0x8)+parseInt(_0x5cc27a(0x1a7))/0x9*(parseInt(_0x5cc27a(0x1a4))/0xa);if(_0x45d02c===_0x50fa56)break;else _0x15fc49['push'](_0x15fc49['shift']());}catch(_0x588bed){_0x15fc49['push'](_0x15fc49['shift']());}}}(a322_0x4990,0x39e6d));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a322_0x136cdc(0x1e2),SKILL_NAME=a322_0x136cdc(0x1c9),debug=debuglog(a322_0x136cdc(0x1e7));function frontmatterValue(_0x293df9,_0x4348a5){const _0x229b18=a322_0x136cdc;return _0x293df9['match'](new RegExp('^'+_0x4348a5+_0x229b18(0x1be),'m'))?.[0x1]?.[_0x229b18(0x1c2)]()??'';}function listFiles(_0x433487,_0x15135c=_0x433487){const _0x24dbc9=a322_0x136cdc;return readdirSync(_0x15135c,{'withFileTypes':!![]})[_0x24dbc9(0x1c4)](_0xa3c2bb=>{const _0xc75865=_0x24dbc9,_0x5cb35a=join(_0x15135c,_0xa3c2bb[_0xc75865(0x1e5)]),_0x352540=lstatSync(_0x5cb35a);if(_0x352540['isSymbolicLink']())throw new Error(_0xc75865(0x1d2)+_0x5cb35a);if(_0x352540['isDirectory']())return listFiles(_0x433487,_0x5cb35a);if(!_0x352540[_0xc75865(0x1cf)]())throw new Error(_0xc75865(0x1cc)+_0x5cb35a);return[relative(_0x433487,_0x5cb35a)['split'](sep)[_0xc75865(0x1bd)]('/')];})[_0x24dbc9(0x1d1)]((_0x3e6def,_0x530a0d)=>_0x3e6def<_0x530a0d?-0x1:_0x3e6def>_0x530a0d?0x1:0x0);}function digestFiles(_0xb52023,_0x4afb91){const _0x50cc73=a322_0x136cdc,_0x361f62=createHash(_0x50cc73(0x1db));for(const _0x37dbed of _0x4afb91){if(_0x37dbed[_0x50cc73(0x1da)]('/')||_0x37dbed[_0x50cc73(0x1bb)]('/')['includes']('..')||_0x37dbed[_0x50cc73(0x1a0)]('\x5c'))throw new Error(_0x50cc73(0x1b1)+_0x37dbed);_0x361f62[_0x50cc73(0x1a8)](_0x37dbed),_0x361f62[_0x50cc73(0x1a8)]('\x00'),_0x361f62[_0x50cc73(0x1a8)](readFileSync(join(_0xb52023,..._0x37dbed['split']('/')))),_0x361f62[_0x50cc73(0x1a8)]('\x00');}return _0x361f62['digest']('hex');}function sameFiles(_0x75b41f,_0x32ba90){const _0x476473=a322_0x136cdc;return _0x75b41f[_0x476473(0x1b7)]===_0x32ba90[_0x476473(0x1b7)]&&_0x75b41f['every']((_0x508bb9,_0x1d64b6)=>_0x508bb9===_0x32ba90[_0x1d64b6]);}function readSource(_0x16befb){const _0x4e5bea=a322_0x136cdc,_0x501380=JSON[_0x4e5bea(0x1b4)](readFileSync(join(_0x16befb,_0x4e5bea(0x1d9)),_0x4e5bea(0x1e9))),_0x329f65=JSON['parse'](readFileSync(join(_0x16befb,_0x4e5bea(0x1ca),'rabetbase.manifest.json'),'utf8')),_0x47612b=join(_0x16befb,_0x4e5bea(0x1ca),SKILL_NAME),_0x5df50d=frontmatterValue(readFileSync(join(_0x47612b,_0x4e5bea(0x1a1)),_0x4e5bea(0x1e9)),'version'),_0x58d3af=listFiles(_0x47612b);if(_0x329f65[_0x4e5bea(0x1b5)]!==0x1||_0x329f65['name']!==SKILL_NAME||!_0x501380[_0x4e5bea(0x1aa)]||_0x329f65[_0x4e5bea(0x1de)]!==_0x501380[_0x4e5bea(0x1aa)]||_0x329f65[_0x4e5bea(0x1ae)]!==_0x501380[_0x4e5bea(0x1aa)]||_0x5df50d!==_0x501380[_0x4e5bea(0x1aa)]||!sameFiles(_0x58d3af,_0x329f65['files'])||digestFiles(_0x47612b,_0x58d3af)!==_0x329f65['digest'])throw new Error(_0x4e5bea(0x1df));return{'packageVersion':_0x501380['version'],'skillVersion':_0x5df50d,'root':_0x47612b,'manifest':_0x329f65};}function installedSkillPath(_0x511d1e){const _0x50b366=a322_0x136cdc,_0x2fd63f=resolveInstalledSkill(SKILL_NAME,{'home':_0x511d1e});if(_0x2fd63f[_0x50b366(0x1d7)]===_0x50b366(0x1e1))return{'state':_0x50b366(0x1e1),'path':dirname(_0x2fd63f['path'])};if(_0x2fd63f[_0x50b366(0x1d7)]===_0x50b366(0x1bf))return{'state':'missing'};return{'state':_0x50b366(0x1d3),'reason':_0x2fd63f[_0x50b366(0x1ad)]};}export function inspectInstalledBuiltinSkillVersion(_0x3b2e1a,_0x4e9599={}){const _0x49a614=a322_0x136cdc,_0x333d20=installedSkillPath(_0x4e9599[_0x49a614(0x1e3)]??homedir());if(_0x333d20[_0x49a614(0x1d7)]==='missing')return{'state':_0x49a614(0x1b2),'expectedVersion':_0x3b2e1a,'repairCommand':REPAIR_COMMAND};if(_0x333d20[_0x49a614(0x1d7)]===_0x49a614(0x1d3))return{'state':_0x49a614(0x1d3),'expectedVersion':_0x3b2e1a,'reason':_0x333d20['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x1932a3=frontmatterValue(readFileSync(join(_0x333d20['path'],_0x49a614(0x1a1)),_0x49a614(0x1e9)),_0x49a614(0x1aa));return{'state':_0x1932a3===_0x3b2e1a?_0x49a614(0x1c7):_0x49a614(0x1c0),'expectedVersion':_0x3b2e1a,'skillVersion':_0x1932a3,'installedPath':_0x333d20[_0x49a614(0x1c5)],'repairCommand':REPAIR_COMMAND};}catch(_0x53b1d1){return{'state':_0x49a614(0x1d3),'expectedVersion':_0x3b2e1a,'installedPath':_0x333d20[_0x49a614(0x1c5)],'reason':_0x53b1d1 instanceof Error?_0x53b1d1['message']:String(_0x53b1d1),'repairCommand':REPAIR_COMMAND};}}function a322_0x4990(){const _0xbe1730=['pipe','15WCbDXv','51620PTSSzr','error','count','279aAhbIE','update','unknown','version','status','953044znbxEv','reason','skillVersion','message','1203579cJHKNu','Unsafe\x20manifest\x20path:\x20','missing','370504SkohzF','parse','schemaVersion','2953517fkcHFb','length','CLI\x20Built-in\x20Skill\x20','\x20verified;\x20','SOURCE_INVALID','split','partialFailure','join',':\x5cs*(.+)$','absent','version_mismatch','files','trim','VERIFY_FAILED','flatMap','path','skipped','current','53796VyhOGd','rabetbase','skills','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','Unsupported\x20Skill\x20entry:\x20','manifest','8YRLoZI','isFile','digest','sort','Symbolic\x20link\x20is\x20not\x20allowed:\x20','unverifiable','packageRoot','content_mismatch','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','state','Installed\x20Skill\x20state\x20is\x20','package.json','startsWith','sha256','340210ZRmVQa','root','packageVersion','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','output','present','rabetbase\x20cli-skill\x20install','home','INSTALL_FAILED','name','installedPath','rabetbase-skills','log','utf8','includes','SKILL.md'];a322_0x4990=function(){return _0xbe1730;};return a322_0x4990();}export function inspectBuiltinSkill(_0x5bfe34={}){const _0x201755=a322_0x136cdc,_0x2e4249=_0x5bfe34[_0x201755(0x1d4)]??DEFAULT_PACKAGE_ROOT;let _0x6293c7;try{_0x6293c7=readSource(_0x2e4249);}catch(_0x156739){return{'state':_0x201755(0x1d3),'packageVersion':'unknown','reason':_0x156739 instanceof Error?_0x156739['message']:String(_0x156739),'repairCommand':REPAIR_COMMAND};}const _0x3f387e=installedSkillPath(_0x5bfe34[_0x201755(0x1e3)]??homedir());if(_0x3f387e[_0x201755(0x1d7)]===_0x201755(0x1b2))return{'state':_0x201755(0x1b2),'packageVersion':_0x6293c7[_0x201755(0x1de)],'repairCommand':REPAIR_COMMAND};if(_0x3f387e['state']===_0x201755(0x1d3))return{'state':_0x201755(0x1d3),'packageVersion':_0x6293c7[_0x201755(0x1de)],'reason':_0x3f387e[_0x201755(0x1ad)],'repairCommand':REPAIR_COMMAND};try{const _0x36434d=frontmatterValue(readFileSync(join(_0x3f387e['path'],'SKILL.md'),_0x201755(0x1e9)),_0x201755(0x1aa));if(_0x36434d!==_0x6293c7['skillVersion'])return{'state':_0x201755(0x1c0),'packageVersion':_0x6293c7[_0x201755(0x1de)],'skillVersion':_0x36434d,'installedPath':_0x3f387e['path'],'repairCommand':REPAIR_COMMAND};const _0x5e08cc=listFiles(_0x3f387e[_0x201755(0x1c5)]),_0x4d8f74=digestFiles(_0x3f387e['path'],_0x5e08cc);return{'state':sameFiles(_0x5e08cc,_0x6293c7[_0x201755(0x1cd)][_0x201755(0x1c1)])&&_0x4d8f74===_0x6293c7[_0x201755(0x1cd)][_0x201755(0x1d0)]?_0x201755(0x1c7):_0x201755(0x1d5),'packageVersion':_0x6293c7[_0x201755(0x1de)],'skillVersion':_0x36434d,'installedPath':_0x3f387e['path'],'digest':_0x4d8f74,'repairCommand':REPAIR_COMMAND};}catch(_0x558203){return{'state':'unverifiable','packageVersion':_0x6293c7[_0x201755(0x1de)],'installedPath':_0x3f387e[_0x201755(0x1c5)],'reason':_0x558203 instanceof Error?_0x558203['message']:String(_0x558203),'repairCommand':REPAIR_COMMAND};}}function a322_0x4c44(_0x27667f,_0x3644c9){_0x27667f=_0x27667f-0x1a0;const _0x49907d=a322_0x4990();let _0x4c4447=_0x49907d[_0x27667f];return _0x4c4447;}function failure(_0x41a57a,_0x321ef4,_0x1966f0,_0x164f5b){const _0x370049=a322_0x136cdc;return{'ok':![],'code':_0x41a57a,'packageVersion':_0x321ef4[_0x370049(0x1de)],'skillVersion':_0x321ef4[_0x370049(0x1ae)],'installedPath':_0x164f5b,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x1966f0 instanceof Error?_0x1966f0[_0x370049(0x1af)]:String(_0x1966f0)};}export function installBuiltinSkill(_0x4c0bec={}){const _0x4e32cf=a322_0x136cdc,_0x3746ed=_0x4c0bec[_0x4e32cf(0x1d4)]??DEFAULT_PACKAGE_ROOT,_0x1ed05d=_0x4c0bec[_0x4e32cf(0x1e3)]??homedir();let _0x1dcecf;try{_0x1dcecf=readSource(_0x3746ed);}catch(_0x24926){return failure(_0x4e32cf(0x1ba),{'packageVersion':_0x4e32cf(0x1a9),'skillVersion':_0x4e32cf(0x1a9)},_0x24926);}const _0x470750=inspectBuiltinSkill({'packageRoot':_0x3746ed,'home':_0x1ed05d}),_0x38f78f=runNpxSkillsAddGlobal(_0x3746ed,_0x1dcecf[_0x4e32cf(0x1dd)],{'stdio':_0x4c0bec['stdio']??_0x4e32cf(0x1a2),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x1ed05d}});if(_0x38f78f[_0x4e32cf(0x1c6)])return{'ok':!![],'packageVersion':_0x1dcecf[_0x4e32cf(0x1de)],'skillVersion':_0x1dcecf['skillVersion'],'installedPath':_0x470750[_0x4e32cf(0x1e6)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x38f78f['ok'])return failure(_0x4e32cf(0x1e4),_0x1dcecf,_0x38f78f[_0x4e32cf(0x1a5)]??'skills@latest\x20exited\x20'+_0x38f78f[_0x4e32cf(0x1ab)]);const _0x11c78f=inspectBuiltinSkill({'packageRoot':_0x3746ed,'home':_0x1ed05d});if(_0x11c78f[_0x4e32cf(0x1d7)]!==_0x4e32cf(0x1c7)){const _0x3ab1c1=_0x11c78f[_0x4e32cf(0x1ad)]??_0x4e32cf(0x1d8)+_0x11c78f['state'];return failure(_0x4e32cf(0x1c3),_0x1dcecf,_0x38f78f[_0x4e32cf(0x1bc)]?_0x3ab1c1+'\x0a'+_0x38f78f[_0x4e32cf(0x1bc)][_0x4e32cf(0x1e0)]:_0x3ab1c1,_0x11c78f['installedPath']);}return _0x38f78f[_0x4e32cf(0x1bc)]&&(debug(_0x4e32cf(0x1d6),_0x38f78f[_0x4e32cf(0x1bc)][_0x4e32cf(0x1e0)]),console[_0x4e32cf(0x1e8)](_0x4e32cf(0x1b8)+_0x1dcecf[_0x4e32cf(0x1ae)]+_0x4e32cf(0x1b9)+_0x38f78f[_0x4e32cf(0x1bc)][_0x4e32cf(0x1a6)]+_0x4e32cf(0x1cb))),{'ok':!![],'packageVersion':_0x1dcecf[_0x4e32cf(0x1de)],'skillVersion':_0x1dcecf[_0x4e32cf(0x1ae)],'installedPath':_0x11c78f[_0x4e32cf(0x1e6)],'changed':_0x470750[_0x4e32cf(0x1d7)]!==_0x4e32cf(0x1c7),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a323_0x2d6c22=a323_0x1ea0;(function(_0x162454,_0x295a83){const _0x17b941=a323_0x1ea0,_0x24c657=_0x162454();while(!![]){try{const _0x210d1d=-parseInt(_0x17b941(0x187))/0x1+-parseInt(_0x17b941(0x17d))/0x2+parseInt(_0x17b941(0x164))/0x3+-parseInt(_0x17b941(0x154))/0x4*(-parseInt(_0x17b941(0x14e))/0x5)+parseInt(_0x17b941(0x161))/0x6*(-parseInt(_0x17b941(0x178))/0x7)+-parseInt(_0x17b941(0x162))/0x8+-parseInt(_0x17b941(0x168))/0x9*(-parseInt(_0x17b941(0x14f))/0xa);if(_0x210d1d===_0x295a83)break;else _0x24c657['push'](_0x24c657['shift']());}catch(_0x2f4e2b){_0x24c657['push'](_0x24c657['shift']());}}}(a323_0x2ede,0x3ece9));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND='rabetbase\x20cli-skill\x20install',SKILL_NAME=a323_0x2d6c22(0x16c),debug=debuglog('rabetbase-skills');function frontmatterValue(_0x517ce3,_0x5823d7){const _0x129916=a323_0x2d6c22;return _0x517ce3[_0x129916(0x17c)](new RegExp('^'+_0x5823d7+_0x129916(0x181),'m'))?.[0x1]?.['trim']()??'';}function a323_0x1ea0(_0x31a6d4,_0x495820){_0x31a6d4=_0x31a6d4-0x14d;const _0x2ede65=a323_0x2ede();let _0x1ea0de=_0x2ede65[_0x31a6d4];return _0x1ea0de;}function listFiles(_0xf5279c,_0x4d0087=_0xf5279c){const _0x4d1a83=a323_0x2d6c22;return readdirSync(_0x4d0087,{'withFileTypes':!![]})[_0x4d1a83(0x157)](_0x183dc2=>{const _0x1d1fe5=_0x4d1a83,_0x3d5d5a=join(_0x4d0087,_0x183dc2[_0x1d1fe5(0x18a)]),_0x45e757=lstatSync(_0x3d5d5a);if(_0x45e757[_0x1d1fe5(0x150)]())throw new Error(_0x1d1fe5(0x16f)+_0x3d5d5a);if(_0x45e757[_0x1d1fe5(0x169)]())return listFiles(_0xf5279c,_0x3d5d5a);if(!_0x45e757['isFile']())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x3d5d5a);return[relative(_0xf5279c,_0x3d5d5a)[_0x1d1fe5(0x156)](sep)[_0x1d1fe5(0x184)]('/')];})[_0x4d1a83(0x188)]((_0x39d56c,_0x2d264c)=>_0x39d56c<_0x2d264c?-0x1:_0x39d56c>_0x2d264c?0x1:0x0);}function digestFiles(_0x1a0a42,_0x32c15f){const _0x2fa63e=a323_0x2d6c22,_0x50e1ae=createHash('sha256');for(const _0x360136 of _0x32c15f){if(_0x360136[_0x2fa63e(0x15c)]('/')||_0x360136[_0x2fa63e(0x156)]('/')[_0x2fa63e(0x18d)]('..')||_0x360136[_0x2fa63e(0x18d)]('\x5c'))throw new Error(_0x2fa63e(0x15d)+_0x360136);_0x50e1ae[_0x2fa63e(0x17e)](_0x360136),_0x50e1ae[_0x2fa63e(0x17e)]('\x00'),_0x50e1ae[_0x2fa63e(0x17e)](readFileSync(join(_0x1a0a42,..._0x360136[_0x2fa63e(0x156)]('/')))),_0x50e1ae['update']('\x00');}return _0x50e1ae[_0x2fa63e(0x17b)](_0x2fa63e(0x175));}function sameFiles(_0x5cee62,_0x1ce7f5){const _0x4ec80c=a323_0x2d6c22;return _0x5cee62[_0x4ec80c(0x153)]===_0x1ce7f5[_0x4ec80c(0x153)]&&_0x5cee62[_0x4ec80c(0x158)]((_0x304edd,_0x18b7df)=>_0x304edd===_0x1ce7f5[_0x18b7df]);}function readSource(_0x5bb140){const _0x354929=a323_0x2d6c22,_0x53275f=JSON['parse'](readFileSync(join(_0x5bb140,'package.json'),_0x354929(0x16b))),_0xa2bad0=JSON[_0x354929(0x186)](readFileSync(join(_0x5bb140,'skills',_0x354929(0x15e)),_0x354929(0x16b))),_0x338960=join(_0x5bb140,_0x354929(0x17f),SKILL_NAME),_0x2d9f5e=frontmatterValue(readFileSync(join(_0x338960,_0x354929(0x16e)),_0x354929(0x16b)),'version'),_0x1435f5=listFiles(_0x338960);if(_0xa2bad0[_0x354929(0x155)]!==0x1||_0xa2bad0[_0x354929(0x18a)]!==SKILL_NAME||!_0x53275f['version']||_0xa2bad0[_0x354929(0x15a)]!==_0x53275f[_0x354929(0x173)]||_0xa2bad0[_0x354929(0x191)]!==_0x53275f['version']||_0x2d9f5e!==_0x53275f[_0x354929(0x173)]||!sameFiles(_0x1435f5,_0xa2bad0[_0x354929(0x152)])||digestFiles(_0x338960,_0x1435f5)!==_0xa2bad0[_0x354929(0x17b)])throw new Error(_0x354929(0x16a));return{'packageVersion':_0x53275f[_0x354929(0x173)],'skillVersion':_0x2d9f5e,'root':_0x338960,'manifest':_0xa2bad0};}function installedSkillPath(_0x1bcdd2){const _0xc2c074=a323_0x2d6c22,_0xf8e390=resolveInstalledSkill(SKILL_NAME,{'home':_0x1bcdd2});if(_0xf8e390['state']===_0xc2c074(0x172))return{'state':_0xc2c074(0x172),'path':dirname(_0xf8e390[_0xc2c074(0x167)])};if(_0xf8e390[_0xc2c074(0x18b)]==='absent')return{'state':_0xc2c074(0x163)};return{'state':_0xc2c074(0x170),'reason':_0xf8e390[_0xc2c074(0x18f)]};}export function inspectInstalledBuiltinSkillVersion(_0x578e8e,_0x3f1cd4={}){const _0x155aa4=a323_0x2d6c22,_0x1f5299=installedSkillPath(_0x3f1cd4[_0x155aa4(0x15b)]??homedir());if(_0x1f5299[_0x155aa4(0x18b)]===_0x155aa4(0x163))return{'state':_0x155aa4(0x163),'expectedVersion':_0x578e8e,'repairCommand':REPAIR_COMMAND};if(_0x1f5299[_0x155aa4(0x18b)]===_0x155aa4(0x170))return{'state':_0x155aa4(0x170),'expectedVersion':_0x578e8e,'reason':_0x1f5299[_0x155aa4(0x18f)],'repairCommand':REPAIR_COMMAND};try{const _0x2faa1e=frontmatterValue(readFileSync(join(_0x1f5299[_0x155aa4(0x167)],_0x155aa4(0x16e)),_0x155aa4(0x16b)),'version');return{'state':_0x2faa1e===_0x578e8e?_0x155aa4(0x17a):_0x155aa4(0x18c),'expectedVersion':_0x578e8e,'skillVersion':_0x2faa1e,'installedPath':_0x1f5299[_0x155aa4(0x167)],'repairCommand':REPAIR_COMMAND};}catch(_0xce0897){return{'state':_0x155aa4(0x170),'expectedVersion':_0x578e8e,'installedPath':_0x1f5299[_0x155aa4(0x167)],'reason':_0xce0897 instanceof Error?_0xce0897['message']:String(_0xce0897),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x3592c4={}){const _0x5b0eeb=a323_0x2d6c22,_0x4a6953=_0x3592c4[_0x5b0eeb(0x189)]??DEFAULT_PACKAGE_ROOT;let _0x12031a;try{_0x12031a=readSource(_0x4a6953);}catch(_0xe8c3ea){return{'state':_0x5b0eeb(0x170),'packageVersion':_0x5b0eeb(0x174),'reason':_0xe8c3ea instanceof Error?_0xe8c3ea[_0x5b0eeb(0x16d)]:String(_0xe8c3ea),'repairCommand':REPAIR_COMMAND};}const _0x52101d=installedSkillPath(_0x3592c4[_0x5b0eeb(0x15b)]??homedir());if(_0x52101d[_0x5b0eeb(0x18b)]===_0x5b0eeb(0x163))return{'state':_0x5b0eeb(0x163),'packageVersion':_0x12031a[_0x5b0eeb(0x15a)],'repairCommand':REPAIR_COMMAND};if(_0x52101d['state']===_0x5b0eeb(0x170))return{'state':_0x5b0eeb(0x170),'packageVersion':_0x12031a[_0x5b0eeb(0x15a)],'reason':_0x52101d['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x23d6ce=frontmatterValue(readFileSync(join(_0x52101d['path'],_0x5b0eeb(0x16e)),_0x5b0eeb(0x16b)),_0x5b0eeb(0x173));if(_0x23d6ce!==_0x12031a[_0x5b0eeb(0x191)])return{'state':_0x5b0eeb(0x18c),'packageVersion':_0x12031a[_0x5b0eeb(0x15a)],'skillVersion':_0x23d6ce,'installedPath':_0x52101d[_0x5b0eeb(0x167)],'repairCommand':REPAIR_COMMAND};const _0x5471ed=listFiles(_0x52101d[_0x5b0eeb(0x167)]),_0x47e1bf=digestFiles(_0x52101d[_0x5b0eeb(0x167)],_0x5471ed);return{'state':sameFiles(_0x5471ed,_0x12031a[_0x5b0eeb(0x15f)]['files'])&&_0x47e1bf===_0x12031a[_0x5b0eeb(0x15f)][_0x5b0eeb(0x17b)]?_0x5b0eeb(0x17a):_0x5b0eeb(0x151),'packageVersion':_0x12031a[_0x5b0eeb(0x15a)],'skillVersion':_0x23d6ce,'installedPath':_0x52101d[_0x5b0eeb(0x167)],'digest':_0x47e1bf,'repairCommand':REPAIR_COMMAND};}catch(_0x478c8e){return{'state':_0x5b0eeb(0x170),'packageVersion':_0x12031a[_0x5b0eeb(0x15a)],'installedPath':_0x52101d[_0x5b0eeb(0x167)],'reason':_0x478c8e instanceof Error?_0x478c8e[_0x5b0eeb(0x16d)]:String(_0x478c8e),'repairCommand':REPAIR_COMMAND};}}function a323_0x2ede(){const _0x4b5e71=['version','unknown','hex','output','Installed\x20Skill\x20state\x20is\x20','91jjhoVZ','skipped','current','digest','match','85836LtmbDr','update','skills','VERIFY_FAILED',':\x5cs*(.+)$','error','SOURCE_INVALID','join','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','parse','198860soEZLW','sort','packageRoot','name','state','version_mismatch','includes','installedPath','reason','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','skillVersion','\x20verified;\x20','135875WNKZWc','210770zLJFBI','isSymbolicLink','content_mismatch','files','length','20geGAgL','schemaVersion','split','flatMap','every','log','packageVersion','home','startsWith','Unsafe\x20manifest\x20path:\x20','rabetbase.manifest.json','manifest','skills@latest\x20exited\x20','138930IwkVix','229608TSNMcE','missing','750777YnGrsG','partialFailure','status','path','189MGGnVs','isDirectory','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','utf8','rabetbase','message','SKILL.md','Symbolic\x20link\x20is\x20not\x20allowed:\x20','unverifiable','stdio','present'];a323_0x2ede=function(){return _0x4b5e71;};return a323_0x2ede();}function failure(_0x3100a3,_0x3a04d9,_0x4b7a90,_0x458b89){const _0x195367=a323_0x2d6c22;return{'ok':![],'code':_0x3100a3,'packageVersion':_0x3a04d9[_0x195367(0x15a)],'skillVersion':_0x3a04d9[_0x195367(0x191)],'installedPath':_0x458b89,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x4b7a90 instanceof Error?_0x4b7a90['message']:String(_0x4b7a90)};}export function installBuiltinSkill(_0x32ddb6={}){const _0x3fae30=a323_0x2d6c22,_0x300b22=_0x32ddb6[_0x3fae30(0x189)]??DEFAULT_PACKAGE_ROOT,_0x335562=_0x32ddb6[_0x3fae30(0x15b)]??homedir();let _0x326493;try{_0x326493=readSource(_0x300b22);}catch(_0x19c100){return failure(_0x3fae30(0x183),{'packageVersion':_0x3fae30(0x174),'skillVersion':_0x3fae30(0x174)},_0x19c100);}const _0x2e2516=inspectBuiltinSkill({'packageRoot':_0x300b22,'home':_0x335562}),_0x1cf809=runNpxSkillsAddGlobal(_0x300b22,_0x326493['root'],{'stdio':_0x32ddb6[_0x3fae30(0x171)]??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0x335562}});if(_0x1cf809[_0x3fae30(0x179)])return{'ok':!![],'packageVersion':_0x326493[_0x3fae30(0x15a)],'skillVersion':_0x326493[_0x3fae30(0x191)],'installedPath':_0x2e2516[_0x3fae30(0x18e)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x1cf809['ok'])return failure('INSTALL_FAILED',_0x326493,_0x1cf809[_0x3fae30(0x182)]??_0x3fae30(0x160)+_0x1cf809[_0x3fae30(0x166)]);const _0x4c09c7=inspectBuiltinSkill({'packageRoot':_0x300b22,'home':_0x335562});if(_0x4c09c7[_0x3fae30(0x18b)]!=='current'){const _0x35ca06=_0x4c09c7[_0x3fae30(0x18f)]??_0x3fae30(0x177)+_0x4c09c7[_0x3fae30(0x18b)];return failure(_0x3fae30(0x180),_0x326493,_0x1cf809[_0x3fae30(0x165)]?_0x35ca06+'\x0a'+_0x1cf809[_0x3fae30(0x165)]['output']:_0x35ca06,_0x4c09c7['installedPath']);}return _0x1cf809[_0x3fae30(0x165)]&&(debug(_0x3fae30(0x185),_0x1cf809[_0x3fae30(0x165)][_0x3fae30(0x176)]),console[_0x3fae30(0x159)]('CLI\x20Built-in\x20Skill\x20'+_0x326493[_0x3fae30(0x191)]+_0x3fae30(0x14d)+_0x1cf809[_0x3fae30(0x165)]['count']+_0x3fae30(0x190))),{'ok':!![],'packageVersion':_0x326493['packageVersion'],'skillVersion':_0x326493[_0x3fae30(0x191)],'installedPath':_0x4c09c7[_0x3fae30(0x18e)],'changed':_0x2e2516[_0x3fae30(0x18b)]!==_0x3fae30(0x17a),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27f35e,_0x1f6864){const _0x440e34=a324_0x2122,_0x136bf8=_0x27f35e();while(!![]){try{const _0x3b98fc=-parseInt(_0x440e34(0xc7))/0x1*(-parseInt(_0x440e34(0xe0))/0x2)+-parseInt(_0x440e34(0xd8))/0x3+-parseInt(_0x440e34(0xd5))/0x4*(-parseInt(_0x440e34(0xdc))/0x5)+-parseInt(_0x440e34(0xc2))/0x6*(parseInt(_0x440e34(0xd1))/0x7)+-parseInt(_0x440e34(0xca))/0x8+parseInt(_0x440e34(0xd6))/0x9+parseInt(_0x440e34(0xc9))/0xa;if(_0x3b98fc===_0x1f6864)break;else _0x136bf8['push'](_0x136bf8['shift']());}catch(_0x3f0de0){_0x136bf8['push'](_0x136bf8['shift']());}}}(a324_0x4fbb,0x75195));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a324_0x2122(_0x4a1941,_0x4e57d7){_0x4a1941=_0x4a1941-0xc2;const _0x4fbb0b=a324_0x4fbb();let _0x2122ca=_0x4fbb0b[_0x4a1941];return _0x2122ca;}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x28f146){const _0x555181=a324_0x2122,_0x433a34=[];for(const [_0x474f6e,_0x5f1bc7]of Object[_0x555181(0xd7)](_0x28f146)){if(_0x5f1bc7===!![]){const _0x5417b6=_0x474f6e[_0x555181(0xc3)](/([A-Z])/g,'-$1')[_0x555181(0xc6)]();_0x433a34[_0x555181(0xe3)](_0x5417b6);}}return _0x433a34;}export function parseDynamicFlags(){const _0x2ae5cd=a324_0x2122,_0x26a3ca=[];for(let _0x416518=0x3;_0x416518<process[_0x2ae5cd(0xd3)][_0x2ae5cd(0xc5)];_0x416518++){const _0x3108a9=process['argv'][_0x416518];if(_0x3108a9&&_0x3108a9[_0x2ae5cd(0xc4)]('--')){const _0x5bea8d=_0x3108a9[_0x2ae5cd(0xc8)](0x2);_0x5bea8d&&!_0x5bea8d['includes']('=')&&_0x26a3ca[_0x2ae5cd(0xe3)](_0x5bea8d);}}return _0x26a3ca;}export function getAllProvidedFlags(_0x1e1b98){const _0x292b1e=camelCaseFlagsToKebab(_0x1e1b98),_0x56316e=parseDynamicFlags(),_0x18b90d=new Set([..._0x292b1e,..._0x56316e]);return Array['from'](_0x18b90d);}export function normalizeLegacyBffSaveFlags(_0x593a76){const _0x1f709d=a324_0x2122,_0x170e62=new Set(_0x593a76);return _0x170e62[_0x1f709d(0xdf)](_0x1f709d(0xde))&&_0x170e62['add']('enable-bff-save'),Array[_0x1f709d(0xe2)](_0x170e62);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x1e3dc5,_0x5f3520,_0x381c72){const _0x4a064e=a324_0x2122;logger[_0x4a064e(0xdb)](process[_0x4a064e(0xda)]());if(_0x381c72?.[_0x4a064e(0xe4)]||_0x1e3dc5==='--help'){showHelp();return;}console[_0x4a064e(0xdd)]('Error:\x20Unsupported\x20command:\x20'+(_0x1e3dc5||_0x4a064e(0xcd))),console[_0x4a064e(0xcc)](_0x4a064e(0xcb)),console[_0x4a064e(0xcc)]('\x20\x20'+CLI_BIN_NAME+_0x4a064e(0xd4)),console[_0x4a064e(0xcc)](''),console[_0x4a064e(0xcc)](_0x4a064e(0xcf)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x4a064e(0xdd)]('skill',_0x4a064e(0xd2)+_0x1e3dc5),process[_0x4a064e(0xd9)](0x1);}function showHelp(){const _0x31dd37=a324_0x2122;console[_0x31dd37(0xcc)](_0x31dd37(0xd0)+CLI_BIN_NAME+_0x31dd37(0xe1)+SKILLS_INSTALL_COMMAND_LINE+_0x31dd37(0xce));}function a324_0x4fbb(){const _0xd7d22c=['\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','Public\x20Open\x20Skill\x20source:\x20','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','459991zUdKYN','Unsupported\x20command:\x20','argv','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','248ChQywD','8552403xKUrQk','entries','1875XrpYHT','exit','cwd','setLogPath','2830MWxFem','error','dangerously-bff-save','has','6TzhGHa','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','from','push','help','66noBGsz','replace','startsWith','length','toLowerCase','135377vruLpZ','slice','2187380FjhTzN','3256984sLGkHA','\x0aAvailable\x20commands:','log','(empty)'];a324_0x4fbb=function(){return _0xd7d22c;};return a324_0x4fbb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a325_0x512530=a325_0x1f7d;(function(_0xe567ab,_0x2d8699){const _0x4aeeca=a325_0x1f7d,_0x436c87=_0xe567ab();while(!![]){try{const _0x74f432=parseInt(_0x4aeeca(0xec))/0x1*(parseInt(_0x4aeeca(0x111))/0x2)+parseInt(_0x4aeeca(0xfc))/0x3+-parseInt(_0x4aeeca(0xf5))/0x4*(-parseInt(_0x4aeeca(0x107))/0x5)+-parseInt(_0x4aeeca(0xef))/0x6+-parseInt(_0x4aeeca(0xe5))/0x7*(-parseInt(_0x4aeeca(0x105))/0x8)+parseInt(_0x4aeeca(0x10c))/0x9*(-parseInt(_0x4aeeca(0xfd))/0xa)+parseInt(_0x4aeeca(0x121))/0xb*(parseInt(_0x4aeeca(0x10f))/0xc);if(_0x74f432===_0x2d8699)break;else _0x436c87['push'](_0x436c87['shift']());}catch(_0x48275c){_0x436c87['push'](_0x436c87['shift']());}}}(a325_0xba7b,0xeb2d0));import{execaSync}from'execa';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=a325_0x512530(0xf6);export const NPX_SKILLS_SUBCOMMAND_ADD=a325_0x512530(0x114);export const NPX_SKILLS_FLAG_SKILL=a325_0x512530(0x10d);export const RABETBASE_SKILL_SOURCE=a325_0x512530(0x110);export const RABETBASE_GLOBAL_SKILL_NAME=a325_0x512530(0x115);export const RABETBASE_SKILL_GIT_SOURCE=a325_0x512530(0xed);function a325_0xba7b(){const _0x476502=['Skill\x20\x22','npx\x20terminated\x20by\x20signal\x20','inherit','CHILD_TERMINATED','stdout','join','trim','EPERM','18678319xLAbbF','413bDhWFe','failed','stderr','ENOENT','presence','SPAWN_FAILED','SKILL_NOT_INSTALLED','369293fEFJHq','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','code','10816926ALoHgL','Installer\x20reported\x20','absent','present','push','npx','1710008HjLcAl','skills@latest','npm_config_global','pipe','exit\x20','\x22\x20install\x20state:\x20','unknown','938451VxIAPz','10310530kqrAmp','state','message','CHILD_EXIT_NONZERO','partialFailure','signal','match','unverifiable','34024tnaZri','\x20failed\x20target(s)','5jLOMHK','stdio','checked','skill','exitCode','9mjeDmG','--skill','EACCES','12VwyHfp','lovrabet/rabetbase','6kXsVIH','INSTALL_PARTIAL','expectedSkillName','add','rabetbase','filter','warn','shortMessage'];a325_0xba7b=function(){return _0x476502;};return a325_0xba7b();}export function resolveGlobalSkillName(_0x3ea637){const _0x22d687=a325_0x512530;switch(_0x3ea637[_0x22d687(0x11f)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x4aec8c){const _0x6b31dc=a325_0x512530,_0x108632=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x4aec8c&&_0x108632[_0x6b31dc(0xf3)](NPX_SKILLS_FLAG_SKILL,_0x4aec8c),_0x108632;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a325_0x512530(0xf4),...buildNpxSkillsAddArgv()][a325_0x512530(0x11e)]('\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]['join']('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x5c5818,_0x9699a8,_0x5d25fc){return{'ok':![],'status':_0x9699a8,'code':_0x5c5818,'error':'['+_0x5c5818+']\x20'+_0x5d25fc};}function a325_0x1f7d(_0x1d6ffa,_0x7f15f){_0x1d6ffa=_0x1d6ffa-0xe5;const _0xba7b72=a325_0xba7b();let _0x1f7d62=_0xba7b72[_0x1d6ffa];return _0x1f7d62;}function execaOptions(_0x38dc97,_0x40a1f0){const _0x39e891=a325_0x512530,_0x303b87={...process.env};return delete _0x303b87[_0x39e891(0xf7)],delete _0x303b87['NPM_CONFIG_GLOBAL'],{'cwd':_0x38dc97,'stdio':_0x40a1f0,'env':_0x303b87,'extendEnv':![],'shell':![],'reject':![],..._0x40a1f0==='pipe'?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0xae1648,_0x2673ef,_0x24cb38){const _0x22a8c6=a325_0x512530,_0x2d385e=[_0xae1648[_0x22a8c6(0x11d)]?String(_0xae1648['stdout']):'',_0xae1648[_0x22a8c6(0xe7)]?String(_0xae1648[_0x22a8c6(0xe7)]):''][_0x22a8c6(0x116)](Boolean)[_0x22a8c6(0x11e)]('\x0a')[_0x22a8c6(0x11f)](),_0x378359=_0xae1648[_0x22a8c6(0x10b)]??null;if(_0xae1648[_0x22a8c6(0xee)]){const _0x489894=_0xae1648['code']===_0x22a8c6(0xe8)?'NPX_NOT_FOUND':_0xae1648[_0x22a8c6(0xee)]===_0x22a8c6(0x120)||_0xae1648['code']===_0x22a8c6(0x10e)?'PERMISSION_DENIED':'SPAWN_FAILED';return failure(_0x489894,_0x378359,_0xae1648[_0x22a8c6(0x118)]??_0xae1648['message']??_0xae1648[_0x22a8c6(0xee)]);}if(_0xae1648[_0x22a8c6(0x102)])return failure(_0x22a8c6(0x11c),_0x378359,_0x22a8c6(0x11a)+_0xae1648[_0x22a8c6(0x102)]);if(_0xae1648[_0x22a8c6(0xe6)]&&_0x378359===null)return failure(_0x22a8c6(0xea),_0x378359,_0xae1648[_0x22a8c6(0x118)]??_0xae1648[_0x22a8c6(0xff)]??'npx\x20failed\x20to\x20start');if(_0x378359!==0x0)return failure(_0x22a8c6(0x100),_0x378359,_0x2d385e||_0xae1648[_0x22a8c6(0x118)]||_0x22a8c6(0xf9)+(_0x378359??_0x22a8c6(0xfb)));const _0x5c0731=_0x2673ef?resolveInstalledSkill(_0x2673ef,_0x24cb38):undefined,_0x456c02=_0x2d385e[_0x22a8c6(0x103)](/Failed to install\s+(\d+)/i);if(_0x456c02&&Number(_0x456c02[0x1])>0x0){const _0x3b54a7=_0x22a8c6(0xf0)+_0x456c02[0x1]+_0x22a8c6(0x106)+(_0x2d385e?':\x0a'+_0x2d385e:'');if(_0x5c0731?.['state']===_0x22a8c6(0xf2))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x456c02[0x1]),'output':_0x2d385e}};return failure(_0x22a8c6(0x112),0x0,_0x3b54a7);}if(_0x5c0731){if(_0x5c0731[_0x22a8c6(0xfe)]===_0x22a8c6(0xf1))return failure(_0x22a8c6(0xeb),0x0,_0x22a8c6(0x119)+_0x2673ef+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0x5c0731[_0x22a8c6(0x109)][_0x22a8c6(0x11e)](',\x20')+')');_0x5c0731[_0x22a8c6(0xfe)]===_0x22a8c6(0x104)&&console[_0x22a8c6(0x117)]('!\x20Could\x20not\x20verify\x20\x22'+_0x2673ef+_0x22a8c6(0xfa)+_0x5c0731['reason']);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x3a69e6,_0x21e34b){const _0x1b6c61=a325_0x512530;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4ec913=_0x21e34b?.[_0x1b6c61(0x108)]??_0x1b6c61(0x11b),_0x1dc3d5=buildNpxSkillsAddArgv(_0x21e34b?.[_0x1b6c61(0x10a)]),_0x11e509=[_0x1b6c61(0xf4),..._0x1dc3d5]['join']('\x20');console['log']('*\x20'+_0x11e509);const _0x4b3305=execaSync('npx',_0x1dc3d5,execaOptions(_0x3a69e6,_0x4ec913));return normalizeExecaResult(_0x4b3305);}export function runNpxSkillsAddGlobal(_0x14d129,_0x2cd574,_0x251e9a){const _0x4b56d8=a325_0x512530;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3eb881=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x2cd574,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x39573b=[_0x4b56d8(0xf4),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x2cd574,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x4b56d8(0x11e)]('\x20');console['log']('*\x20'+_0x39573b);const _0x182138=execaSync(_0x4b56d8(0xf4),_0x3eb881,execaOptions(_0x14d129,_0x4b56d8(0xf8))),_0x32f3dc=normalizeExecaResult(_0x182138,_0x251e9a?.[_0x4b56d8(0x113)]??resolveGlobalSkillName(_0x2cd574),_0x251e9a?.[_0x4b56d8(0xe9)]);if(_0x251e9a?.['stdio']!==_0x4b56d8(0xf8)&&!_0x32f3dc[_0x4b56d8(0x101)]){const _0x113a01=[_0x182138[_0x4b56d8(0x11d)],_0x182138['stderr']]['filter'](Boolean)[_0x4b56d8(0x11e)]('\x0a')[_0x4b56d8(0x11f)]();if(_0x113a01)console['log'](_0x113a01);}return _0x32f3dc;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a326_0x1e5b02=a326_0x1105;(function(_0x51d1bb,_0x42e820){const _0x3a4c4f=a326_0x1105,_0x3937e8=_0x51d1bb();while(!![]){try{const _0x595f2e=parseInt(_0x3a4c4f(0xbb))/0x1+parseInt(_0x3a4c4f(0x9f))/0x2*(-parseInt(_0x3a4c4f(0x9e))/0x3)+parseInt(_0x3a4c4f(0xa4))/0x4+-parseInt(_0x3a4c4f(0xb2))/0x5*(parseInt(_0x3a4c4f(0xba))/0x6)+-parseInt(_0x3a4c4f(0xbf))/0x7*(parseInt(_0x3a4c4f(0xac))/0x8)+parseInt(_0x3a4c4f(0xa6))/0x9*(-parseInt(_0x3a4c4f(0xb1))/0xa)+parseInt(_0x3a4c4f(0xb0))/0xb;if(_0x595f2e===_0x42e820)break;else _0x3937e8['push'](_0x3937e8['shift']());}catch(_0x253e85){_0x3937e8['push'](_0x3937e8['shift']());}}}(a326_0x7882,0x33eba));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a326_0x1105(_0x22e3e5,_0xa03b4){_0x22e3e5=_0x22e3e5-0x99;const _0x788224=a326_0x7882();let _0x110554=_0x788224[_0x22e3e5];return _0x110554;}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a326_0x1e5b02(0xab),a326_0x1e5b02(0xa9));function a326_0x7882(){const _0x199868=['map','number','2046cPFBjZ','788hRVyIA','absent','not-recorded','utf8','message','559292KKtktV','\x20uses\x20unsupported\x20version\x20','9ylzdMs','unverifiable','reason','.skill-lock.json','join','.agents','721168LrlDmq','SKILL.md','object','present','8147436gocndv','1469060VMTwqG','1600045XUZsXD','recorded','parse','globalSkillsDirs','home','find','.claude','\x20records\x20\x22','6qpCrSA','157936YUUhbj','unusable','skills','\x20has\x20no\x20skills\x20map','7uJvnNH','version','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','kind','\x20is\x20unreadable:\x20'];a326_0x7882=function(){return _0x199868;};return a326_0x7882();}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a326_0x1e5b02(0xab),a326_0x1e5b02(0xbd)),join(a326_0x1e5b02(0xb8),a326_0x1e5b02(0xbd))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x49ee4b,_0x2e9b1a){const _0x5b374f=a326_0x1e5b02;if(!existsSync(_0x49ee4b))return{'kind':_0x5b374f(0xa1)};let _0x5772cf;try{_0x5772cf=JSON[_0x5b374f(0xb4)](readFileSync(_0x49ee4b,_0x5b374f(0xa2)));}catch(_0x4060f0){return{'kind':_0x5b374f(0xbc),'reason':_0x49ee4b+_0x5b374f(0x9b)+_0x4060f0[_0x5b374f(0xa3)]};}const _0x54f4e3=_0x5772cf;if(typeof _0x54f4e3?.[_0x5b374f(0xc0)]!==_0x5b374f(0x9d)||!SUPPORTED_LOCK_VERSIONS['includes'](_0x54f4e3[_0x5b374f(0xc0)]))return{'kind':'unusable','reason':_0x49ee4b+_0x5b374f(0xa5)+String(_0x54f4e3?.[_0x5b374f(0xc0)])};if(!_0x54f4e3[_0x5b374f(0xbd)]||typeof _0x54f4e3[_0x5b374f(0xbd)]!==_0x5b374f(0xae))return{'kind':_0x5b374f(0xbc),'reason':_0x49ee4b+_0x5b374f(0xbe)};return _0x54f4e3['skills'][_0x2e9b1a]?{'kind':_0x5b374f(0xb3)}:{'kind':_0x5b374f(0xa1)};}export function resolveInstalledSkill(_0x35d70c,_0x5138dc){const _0x194ff4=a326_0x1e5b02,_0x56a0e6=_0x5138dc?.[_0x194ff4(0xb6)]??homedir(),_0x1adf75=_0x5138dc?.[_0x194ff4(0xb5)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x194ff4(0x9c)](_0x165f8b=>join(_0x56a0e6,_0x165f8b)),_0x345740=_0x5138dc?.['lockFile']??join(_0x56a0e6,SKILL_LOCK_RELATIVE_PATH),_0x5a9cc0=_0x1adf75[_0x194ff4(0x9c)](_0x282a78=>join(_0x282a78,_0x35d70c,_0x194ff4(0xad))),_0xd19f12=_0x5a9cc0[_0x194ff4(0xb7)](_0x3b630c=>existsSync(_0x3b630c));if(_0xd19f12)return{'state':_0x194ff4(0xaf),'path':_0xd19f12};const _0x3e57e8=readLockLookup(_0x345740,_0x35d70c);if(_0x3e57e8[_0x194ff4(0x9a)]===_0x194ff4(0xbc))return{'state':_0x194ff4(0xa7),'reason':_0x3e57e8[_0x194ff4(0xa8)]};if(_0x3e57e8['kind']===_0x194ff4(0xb3))return{'state':_0x194ff4(0xa7),'reason':_0x345740+_0x194ff4(0xb9)+_0x35d70c+_0x194ff4(0x99)+('('+_0x5a9cc0[_0x194ff4(0xaa)](',\x20')+')')};return{'state':_0x194ff4(0xa0),'checked':_0x5a9cc0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd1bbd2,_0x458eec){const _0x2849ca=a327_0x4203,_0x4048b7=_0xd1bbd2();while(!![]){try{const _0x1df112=parseInt(_0x2849ca(0x103))/0x1*(parseInt(_0x2849ca(0x105))/0x2)+-parseInt(_0x2849ca(0x106))/0x3+-parseInt(_0x2849ca(0xf9))/0x4+parseInt(_0x2849ca(0xfa))/0x5+parseInt(_0x2849ca(0xfe))/0x6+-parseInt(_0x2849ca(0xff))/0x7*(parseInt(_0x2849ca(0xfc))/0x8)+parseInt(_0x2849ca(0xfd))/0x9*(parseInt(_0x2849ca(0x108))/0xa);if(_0x1df112===_0x458eec)break;else _0x4048b7['push'](_0x4048b7['shift']());}catch(_0x11f81c){_0x4048b7['push'](_0x4048b7['shift']());}}}(a327_0x56d5,0x93512));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a327_0x56d5(){const _0xa82476=['553725HvqRJf','message','457296jzcoNN','7713rgUjMJ','3041844wAkoRh','35svWnsK','test','flags','stringify','1PmwELD','some','518002YPYipS','2521512dhjYcv','command','22520WZqMhG','rabetbase.command','entries','durationMs','error','4307840kVOyGx'];a327_0x56d5=function(){return _0xa82476;};return a327_0x56d5();}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(_0x5594cd){const _0x51f4cd=a327_0x4203;return SENSITIVE_PATTERNS[_0x51f4cd(0x104)](_0x4a3be7=>_0x4a3be7[_0x51f4cd(0x100)](_0x5594cd));}function sanitizeFlags(_0x5bb98f){const _0x3cc004=a327_0x4203,_0x1fb484={};for(const [_0x4a3870,_0x51fb12]of Object[_0x3cc004(0xf6)](_0x5bb98f)){isSensitiveKey(_0x4a3870)?_0x1fb484[_0x4a3870]=_0x51fb12!=null&&_0x51fb12!==''?'[REDACTED]':_0x51fb12:_0x1fb484[_0x4a3870]=_0x51fb12;}return _0x1fb484;}function a327_0x4203(_0x4652e5,_0x2e3211){_0x4652e5=_0x4652e5-0xf6;const _0x56d56a=a327_0x56d5();let _0x42038a=_0x56d56a[_0x4652e5];return _0x42038a;}export async function reportCommandTrace(_0x3516b9){const _0x322280=a327_0x4203;try{const _0x1f32a8=sanitizeFlags(_0x3516b9[_0x322280(0x101)]);await sendCliTraceLog({'spanName':_0x322280(0x109),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x3516b9['service'],'command.name':_0x3516b9[_0x322280(0x107)],'command.flags':JSON[_0x322280(0x102)](_0x1f32a8),..._0x3516b9[_0x322280(0xf7)]!=null?{'command.duration_ms':_0x3516b9['durationMs']}:{},..._0x3516b9['error']?{'command.error':_0x3516b9[_0x322280(0xf8)]instanceof Error?_0x3516b9[_0x322280(0xf8)][_0x322280(0xfb)]:String(_0x3516b9[_0x322280(0xf8)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ad561,_0x1eb643){var _0x408167=a328_0x1fa5,_0x4acc67=_0x2ad561();while(!![]){try{var _0xa45fef=parseInt(_0x408167(0xd8))/0x1+parseInt(_0x408167(0xe6))/0x2*(-parseInt(_0x408167(0xd7))/0x3)+parseInt(_0x408167(0xd9))/0x4*(parseInt(_0x408167(0xe2))/0x5)+-parseInt(_0x408167(0xe1))/0x6+parseInt(_0x408167(0xda))/0x7*(parseInt(_0x408167(0xde))/0x8)+parseInt(_0x408167(0xe4))/0x9*(parseInt(_0x408167(0xe5))/0xa)+-parseInt(_0x408167(0xdb))/0xb*(parseInt(_0x408167(0xdc))/0xc);if(_0xa45fef===_0x1eb643)break;else _0x4acc67['push'](_0x4acc67['shift']());}catch(_0x5da775){_0x4acc67['push'](_0x4acc67['shift']());}}}(a328_0x379b,0x62552));function a328_0x379b(){var _0x231581=['41862WtreFm','45avHffc','616988nNJfcl','260zvRjMP','7mveVrD','11XPSuMC','14871228agsNjj','error','5683856Zlougc','Failed\x20to\x20report\x20CLI\x20help\x20trace:','service','902340yNzwHN','695FeXsVT','cli.help','9aDidIu','7698890cyHRQc'];a328_0x379b=function(){return _0x231581;};return a328_0x379b();}function a328_0x1fa5(_0xd10856,_0x5ed7ac){_0xd10856=_0xd10856-0xd7;var _0x379b77=a328_0x379b();var _0x1fa5e3=_0x379b77[_0xd10856];return _0x1fa5e3;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x19df7d,_0x24a16a){var _0x27f327=a328_0x1fa5;try{await sendCliTraceLog({'spanName':_0x27f327(0xe3),'logData':{'rabetbase.help.kind':_0x19df7d,..._0x24a16a?.[_0x27f327(0xe0)]&&{'rabetbase.help.service':_0x24a16a[_0x27f327(0xe0)]}}});}catch(_0x1a93c7){console[_0x27f327(0xdd)](_0x27f327(0xdf),_0x1a93c7);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29d99e,_0x2a5fd8){const _0x598a12=a329_0x36ea,_0x37283d=_0x29d99e();while(!![]){try{const _0xb4106=parseInt(_0x598a12(0x9d))/0x1*(-parseInt(_0x598a12(0x9c))/0x2)+parseInt(_0x598a12(0xa2))/0x3+-parseInt(_0x598a12(0xa9))/0x4*(parseInt(_0x598a12(0xa4))/0x5)+-parseInt(_0x598a12(0x9f))/0x6*(-parseInt(_0x598a12(0xa6))/0x7)+-parseInt(_0x598a12(0xa1))/0x8+-parseInt(_0x598a12(0x9e))/0x9*(-parseInt(_0x598a12(0xa3))/0xa)+-parseInt(_0x598a12(0xab))/0xb*(-parseInt(_0x598a12(0xa0))/0xc);if(_0xb4106===_0x2a5fd8)break;else _0x37283d['push'](_0x37283d['shift']());}catch(_0x5d877e){_0x37283d['push'](_0x37283d['shift']());}}}(a329_0x510c,0x98c78));function a329_0x510c(){const _0x150cab=['production','1519AHBAel','unknown','daily','68XQWCUp','username','9809668CVDldf','194ZsSLCx','9325KonIyw','72Hgevyo','32322xYulCa','12HIpefg','1234224WgbmvY','1747527EEeoXp','30590OvArss','289165GfeBJa'];a329_0x510c=function(){return _0x150cab;};return a329_0x510c();}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';function a329_0x36ea(_0x423f3e,_0x568cc7){_0x423f3e=_0x423f3e-0x9c;const _0x510cd6=a329_0x510c();let _0x36ea73=_0x510cd6[_0x423f3e];return _0x36ea73;}import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x5868b5=a329_0x36ea,_0x1a47a1=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x1689a4=_0x1a47a1?.['user'];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x5868b5(0xa7)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x5868b5(0xa8):_0x5868b5(0xa5))}),setUserContext({'id':_0x1689a4?.['id'],'username':_0x1689a4?.[_0x5868b5(0xaa)],'nickname':_0x1689a4?.['nickname'],'email':_0x1689a4?.['email'],'tenantCode':_0x1689a4?.['tenant']?.['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x1a47a1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a330_0x3b47(){const _0x1d17b3=['then','once','9DDzKin','1738oHubHm','12oaaOvA','24YBnFsh','17954okHSRO','SIGTERM','exit','1548184SKruLj','25780FlFqsz','364615bPuYld','652848NBjBhC','24722784OmVmzw','3051006IcSvlY','28YvvOVl'];a330_0x3b47=function(){return _0x1d17b3;};return a330_0x3b47();}(function(_0xe62972,_0x525d31){const _0x59e1e9=a330_0x56e4,_0x5c54e4=_0xe62972();while(!![]){try{const _0x247f58=-parseInt(_0x59e1e9(0x145))/0x1*(-parseInt(_0x59e1e9(0x144))/0x2)+-parseInt(_0x59e1e9(0x14b))/0x3+-parseInt(_0x59e1e9(0x14e))/0x4*(parseInt(_0x59e1e9(0x14a))/0x5)+-parseInt(_0x59e1e9(0x143))/0x6*(parseInt(_0x59e1e9(0x14d))/0x7)+parseInt(_0x59e1e9(0x148))/0x8*(parseInt(_0x59e1e9(0x141))/0x9)+-parseInt(_0x59e1e9(0x149))/0xa*(parseInt(_0x59e1e9(0x142))/0xb)+parseInt(_0x59e1e9(0x14c))/0xc;if(_0x247f58===_0x525d31)break;else _0x5c54e4['push'](_0x5c54e4['shift']());}catch(_0xd1fe96){_0x5c54e4['push'](_0x5c54e4['shift']());}}}(a330_0x3b47,0x70d06));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}function a330_0x56e4(_0x42349f,_0x40ebd3){_0x42349f=_0x42349f-0x141;const _0x3b4746=a330_0x3b47();let _0x56e44e=_0x3b4746[_0x42349f];return _0x56e44e;}export function registerOtelShutdownOnExit(){const _0x86a080=a330_0x56e4;process[_0x86a080(0x150)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x53d94c=()=>{const _0x1547fe=_0x86a080;void flushOtelNodeIfUsed()[_0x1547fe(0x14f)](()=>process[_0x1547fe(0x147)](0x0));};process['once']('SIGINT',_0x53d94c),process[_0x86a080(0x150)](_0x86a080(0x146),_0x53d94c);}export async function exitWithOtelShutdown(_0x7a2c04){const _0x5ba016=a330_0x56e4;await flushOtelNodeIfUsed(),process[_0x5ba016(0x147)](_0x7a2c04);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a331_0x180a88=a331_0xc6d8;function a331_0x3faa(){const _0x4a6bda=['48jDWikY','spanName','traceName','160405DcfMlb','406076BDvlBm','5864HTBDxY','369XvAepV','logData','traceparent','889859iGifvh','3gjfsuV','9289pkNXwB','27330xefslF','108bEEcVj','version','13390585fKPkRl','rabetbase-cli','2218828LbwJrH','manual','2ZhLGfk'];a331_0x3faa=function(){return _0x4a6bda;};return a331_0x3faa();}function a331_0xc6d8(_0x5a182d,_0x3c8716){_0x5a182d=_0x5a182d-0xf0;const _0x3faa4f=a331_0x3faa();let _0xc6d85a=_0x3faa4f[_0x5a182d];return _0xc6d85a;}(function(_0x202457,_0x16b6d8){const _0x4bf8a9=a331_0xc6d8,_0x88ff3e=_0x202457();while(!![]){try{const _0x385305=-parseInt(_0x4bf8a9(0xf3))/0x1*(-parseInt(_0x4bf8a9(0xfd))/0x2)+-parseInt(_0x4bf8a9(0xf4))/0x3*(-parseInt(_0x4bf8a9(0xfb))/0x4)+-parseInt(_0x4bf8a9(0x101))/0x5*(parseInt(_0x4bf8a9(0xf7))/0x6)+parseInt(_0x4bf8a9(0xf5))/0x7*(parseInt(_0x4bf8a9(0x103))/0x8)+parseInt(_0x4bf8a9(0xf0))/0x9*(-parseInt(_0x4bf8a9(0xf6))/0xa)+parseInt(_0x4bf8a9(0x102))/0xb*(-parseInt(_0x4bf8a9(0xfe))/0xc)+-parseInt(_0x4bf8a9(0xf9))/0xd;if(_0x385305===_0x16b6d8)break;else _0x88ff3e['push'](_0x88ff3e['shift']());}catch(_0x46b2ad){_0x88ff3e['push'](_0x88ff3e['shift']());}}}(a331_0x3faa,0x86495));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=a331_0x180a88(0xfa);export async function sendCliTraceLog(_0x2fd7cc){const _0xd2bf46=a331_0x180a88;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x2fd7cc[_0xd2bf46(0x100)]??DEFAULT_TRACE_NAME,'version':_0x2fd7cc[_0xd2bf46(0xf8)]??getCliVersion(),'spanName':_0x2fd7cc[_0xd2bf46(0xff)],'eventType':_0xd2bf46(0xfc),'logData':_0x2fd7cc[_0xd2bf46(0xf1)],..._0x2fd7cc[_0xd2bf46(0xf2)]&&{'traceparent':_0x2fd7cc['traceparent']}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a332_0x23a8bb=a332_0x19d1;(function(_0x1b9a25,_0x209191){const _0x5ddf3f=a332_0x19d1,_0x560f66=_0x1b9a25();while(!![]){try{const _0x1daade=parseInt(_0x5ddf3f(0x190))/0x1+-parseInt(_0x5ddf3f(0x18a))/0x2*(parseInt(_0x5ddf3f(0x192))/0x3)+parseInt(_0x5ddf3f(0x18d))/0x4*(parseInt(_0x5ddf3f(0x183))/0x5)+parseInt(_0x5ddf3f(0x189))/0x6*(parseInt(_0x5ddf3f(0x187))/0x7)+parseInt(_0x5ddf3f(0x18c))/0x8*(parseInt(_0x5ddf3f(0x186))/0x9)+-parseInt(_0x5ddf3f(0x193))/0xa*(parseInt(_0x5ddf3f(0x185))/0xb)+-parseInt(_0x5ddf3f(0x18e))/0xc;if(_0x1daade===_0x209191)break;else _0x560f66['push'](_0x560f66['shift']());}catch(_0x500a4b){_0x560f66['push'](_0x560f66['shift']());}}}(a332_0x1316,0x94fd8));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a332_0x19d1(_0x20915d,_0x32d5a1){_0x20915d=_0x20915d-0x183;const _0x1316eb=a332_0x1316();let _0x19d1fc=_0x1316eb[_0x20915d];return _0x19d1fc;}export const PLATFORM_ISSUE_TRACE_NAME=a332_0x23a8bb(0x191);export const PLATFORM_ISSUE_SPAN_NAME=a332_0x23a8bb(0x194);export async function sendPlatformIssueCollectLog(_0x534639){const _0x964f40=a332_0x23a8bb;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x534639[_0x964f40(0x188)],'issue.description':_0x534639[_0x964f40(0x18f)],..._0x534639[_0x964f40(0x184)]?{'issue.description_original_bytes':_0x534639[_0x964f40(0x184)][_0x964f40(0x196)],'issue.description_truncated':_0x534639[_0x964f40(0x184)][_0x964f40(0x195)],'issue.description_redactions':_0x534639[_0x964f40(0x184)][_0x964f40(0x197)],'issue.description_redaction_kinds':_0x534639[_0x964f40(0x184)][_0x964f40(0x18b)]['join'](',')}:{}}});}function a332_0x1316(){const _0x50aa5a=['truncated','originalBytes','redactionCount','142035ZYEdKH','sanitize','5710639RfIyHX','5206716ryfaFQ','7077CDXuie','title','4794PVgNOV','25370reVZeN','redactionKinds','16mDngrJ','4yvAfme','6656436hlARbi','description','464657XdfjhD','platform-issue-log-collect','183FTiEtk','10bqpDUg','issue.log.collect'];a332_0x1316=function(){return _0x50aa5a;};return a332_0x1316();}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a334_0x3b163a=a334_0xc5b5;(function(_0x2f97ed,_0x49bc2e){const _0x3df129=a334_0xc5b5,_0x59711f=_0x2f97ed();while(!![]){try{const _0x37f751=-parseInt(_0x3df129(0xba))/0x1*(-parseInt(_0x3df129(0xca))/0x2)+-parseInt(_0x3df129(0xdd))/0x3+-parseInt(_0x3df129(0xbf))/0x4+-parseInt(_0x3df129(0xc4))/0x5*(-parseInt(_0x3df129(0xdb))/0x6)+-parseInt(_0x3df129(0xc6))/0x7*(parseInt(_0x3df129(0xde))/0x8)+parseInt(_0x3df129(0xd9))/0x9+-parseInt(_0x3df129(0xaa))/0xa*(-parseInt(_0x3df129(0xc8))/0xb);if(_0x37f751===_0x49bc2e)break;else _0x59711f['push'](_0x59711f['shift']());}catch(_0x1710a6){_0x59711f['push'](_0x59711f['shift']());}}}(a334_0x280d,0xae6b2));function a334_0xc5b5(_0x395c04,_0x1019ea){_0x395c04=_0x395c04-0xa7;const _0x280df6=a334_0x280d();let _0xc5b51b=_0x280df6[_0x395c04];return _0xc5b51b;}export const CORE_IDE_CONFIGS={'cursor':{'name':a334_0x3b163a(0xcc),'description':a334_0x3b163a(0xcf),'folders':[a334_0x3b163a(0xae),a334_0x3b163a(0xce)],'files':[{'type':a334_0x3b163a(0xe0),'path':'.cursor/skills/rabetbase.md'}]},'windsurf':{'name':'Windsurf','description':a334_0x3b163a(0xbc),'folders':[a334_0x3b163a(0xd1)],'files':[{'type':a334_0x3b163a(0xe0),'path':a334_0x3b163a(0xb7)}]},'claude':{'name':a334_0x3b163a(0xb0),'description':'Claude\x20Code','folders':[a334_0x3b163a(0xaf)],'files':[{'type':a334_0x3b163a(0xe0),'path':a334_0x3b163a(0xa8)}]},'cline':{'name':a334_0x3b163a(0xbe),'description':a334_0x3b163a(0xd2),'folders':[a334_0x3b163a(0xc2)],'files':[{'type':a334_0x3b163a(0xe0),'path':a334_0x3b163a(0xcd)}]},'codex':{'name':a334_0x3b163a(0xcb),'description':a334_0x3b163a(0xdc),'folders':[a334_0x3b163a(0xb6)],'files':[{'type':'file','path':a334_0x3b163a(0xc0)}]},'opencode':{'name':'OpenCode','description':a334_0x3b163a(0xc9),'folders':[a334_0x3b163a(0xd0)],'files':[{'type':a334_0x3b163a(0xe0),'path':a334_0x3b163a(0xb2)}]},'qoder':{'name':a334_0x3b163a(0xbb),'description':a334_0x3b163a(0xb5),'folders':['.qoder'],'files':[{'type':'file','path':a334_0x3b163a(0xd8)},{'type':a334_0x3b163a(0xe0),'path':a334_0x3b163a(0xb3)}]},'codebuddy':{'name':a334_0x3b163a(0xe1),'description':a334_0x3b163a(0xdf),'folders':['.codebuddy'],'files':[{'type':'file','path':a334_0x3b163a(0xa9)}]},'trae':{'name':a334_0x3b163a(0xb8),'description':a334_0x3b163a(0xc7),'folders':['.trae'],'files':[{'type':'file','path':'.trae/skills/lovrabet/SKILL.md'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a334_0x3b163a(0xd7),'description':a334_0x3b163a(0xc3),'folders':[a334_0x3b163a(0xb9)],'files':[{'type':a334_0x3b163a(0xe0),'path':'.agent/skills/lovrabet/SKILL.md'}]},'antigravity':{'name':a334_0x3b163a(0xda),'description':a334_0x3b163a(0xd5),'folders':[a334_0x3b163a(0xb9)],'files':[{'type':a334_0x3b163a(0xe0),'path':a334_0x3b163a(0xd4)}]}};export const CORE_IDE_LIST=[a334_0x3b163a(0xd3),a334_0x3b163a(0xac),a334_0x3b163a(0xd6),a334_0x3b163a(0xbd),'cursor',a334_0x3b163a(0xa7),a334_0x3b163a(0xb1),a334_0x3b163a(0xc5),'windsurf'];export const IDE_LIST=[a334_0x3b163a(0xb4),a334_0x3b163a(0xd3),a334_0x3b163a(0xac),a334_0x3b163a(0xd6),'codex','cursor',a334_0x3b163a(0xa7),a334_0x3b163a(0xb1),a334_0x3b163a(0xc5),a334_0x3b163a(0xc1),a334_0x3b163a(0xad)];export const ALL_CORE_IDES=[a334_0x3b163a(0xab),a334_0x3b163a(0xc1),a334_0x3b163a(0xd3),a334_0x3b163a(0xac),a334_0x3b163a(0xbd),a334_0x3b163a(0xa7),a334_0x3b163a(0xb1),'codebuddy',a334_0x3b163a(0xc5)];function a334_0x280d(){const _0x598be3=['.cursor','Cursor\x20IDE','.opencode','.windsurf','Cline\x20IDE','claude','.agent/skills/lovrabet/SKILL.md','Antigravity\x20IDE','codebuddy','Other\x20(generic\x20template)','.qoder/rules/rabetbase.md','12738762fJoxvG','Antigravity','177156PLboBC','Codex\x20IDE','2603640vpLAmQ','582632VIOhaZ','CodeBuddy\x20IDE','file','CodeBuddy','opencode','.claude/skills/lovrabet/SKILL.md','.codebuddy/skills/lovrabet/SKILL.md','170TiOVBe','cursor','cline','agent','.cursorrules','.claude','Claude\x20Code','qoder','.opencode/skills/lovrabet/SKILL.md','.qoder/skills/lovrabet/SKILL.md','antigravity','Qoder\x20IDE','.codex','.windsurf/workflows/rabetbase.md','Trae','.agent','34552dupgDE','Qoder','Windsurf\x20IDE','codex','Cline','5018336VkxfwS','.codex/skills/lovrabet/SKILL.md','windsurf','.cline','Generic\x20template\x20fallback','185CgkDva','trae','77llCZsT','Trae\x20IDE','507683GtrNhw','OpenCode\x20IDE','20tsJBid','Codex','Cursor','.cline/skills/lovrabet/SKILL.md'];a334_0x280d=function(){return _0x598be3;};return a334_0x280d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57f756,_0x458d05){const _0x469949=a335_0x245d,_0x3f5fd5=_0x57f756();while(!![]){try{const _0x46546b=-parseInt(_0x469949(0x144))/0x1+parseInt(_0x469949(0x141))/0x2+-parseInt(_0x469949(0x142))/0x3+parseInt(_0x469949(0x145))/0x4+-parseInt(_0x469949(0x149))/0x5*(parseInt(_0x469949(0x146))/0x6)+parseInt(_0x469949(0x147))/0x7*(-parseInt(_0x469949(0x148))/0x8)+parseInt(_0x469949(0x143))/0x9;if(_0x46546b===_0x458d05)break;else _0x3f5fd5['push'](_0x3f5fd5['shift']());}catch(_0x315cab){_0x3f5fd5['push'](_0x3f5fd5['shift']());}}}(a335_0x3adb,0xb5368));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a335_0x245d(_0x5b65cc,_0x284b00){_0x5b65cc=_0x5b65cc-0x141;const _0x3adb9b=a335_0x3adb();let _0x245d7d=_0x3adb9b[_0x5b65cc];return _0x245d7d;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a335_0x3adb(){const _0x185d44=['2708380HdCVnK','1784499msMhBJ','9331218eUdbdH','819002yqAARz','3749008VNSSAY','6ivzBxG','7YRLOcc','515392TiKuNe','5538685xBvICn'];a335_0x3adb=function(){return _0x185d44;};return a335_0x3adb();}
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa1b1ad,_0x3bb341){const _0x3a9d84=a336_0x13bf,_0x3eae88=_0xa1b1ad();while(!![]){try{const _0x5220fb=-parseInt(_0x3a9d84(0x8a))/0x1+parseInt(_0x3a9d84(0x86))/0x2+-parseInt(_0x3a9d84(0x89))/0x3*(-parseInt(_0x3a9d84(0x85))/0x4)+parseInt(_0x3a9d84(0x8f))/0x5+parseInt(_0x3a9d84(0x84))/0x6+parseInt(_0x3a9d84(0x8c))/0x7*(parseInt(_0x3a9d84(0x8b))/0x8)+-parseInt(_0x3a9d84(0x82))/0x9;if(_0x5220fb===_0x3bb341)break;else _0x3eae88['push'](_0x3eae88['shift']());}catch(_0x201f81){_0x3eae88['push'](_0x3eae88['shift']());}}}(a336_0x2a36,0xde4b9));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x37ee22=a336_0x13bf,_0xce0185=getTemplateBaseUrl(),_0x52723f=[_0xce0185+_0x37ee22(0x83),_0xce0185+_0x37ee22(0x8e)];for(const _0x52320f of _0x52723f){try{const _0x289bbf=await fetch(_0x52320f,{'headers':{'Accept':'application/json'}});if(!_0x289bbf['ok'])continue;const _0x5f53e9=await _0x289bbf['json']();if(!_0x5f53e9['cli']?.[_0x37ee22(0x88)]||!_0x5f53e9[_0x37ee22(0x8d)]?.[_0x37ee22(0x87)]?.['stableVersion'])continue;return _0x5f53e9;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;function a336_0x2a36(){const _0x192171=['212398fgqqLD','node','stableVersion','31425vXhdaS','1578109BgbKwl','56HwRaiH','1245706gzbZyj','sdk','/config/index.json','4655805aaRFJp','10818171hjoHAn','/config.json','8005548Palxho','28upfNJl'];a336_0x2a36=function(){return _0x192171;};return a336_0x2a36();}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x2ce2fe=Date['now']();if(hasCachedConfig){const _0x57a6ba=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2ce2fe-cacheTime<_0x57a6ba)return cachedConfig;}const _0x5e5584=await fetchCdnConfig();return cachedConfig=_0x5e5584,cacheTime=_0x2ce2fe,hasCachedConfig=!![],_0x5e5584;}function a336_0x13bf(_0x204c01,_0x3b71ce){_0x204c01=_0x204c01-0x82;const _0x2a368e=a336_0x2a36();let _0x13bfdd=_0x2a368e[_0x204c01];return _0x13bfdd;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a337_0x5043e2=a337_0x1613;(function(_0x1c3fc4,_0x406836){const _0x25e32f=a337_0x1613,_0xae319a=_0x1c3fc4();while(!![]){try{const _0x3c9a65=parseInt(_0x25e32f(0x1b3))/0x1*(-parseInt(_0x25e32f(0x1b4))/0x2)+-parseInt(_0x25e32f(0x1ae))/0x3*(parseInt(_0x25e32f(0x1aa))/0x4)+-parseInt(_0x25e32f(0x1ba))/0x5*(parseInt(_0x25e32f(0x1b5))/0x6)+parseInt(_0x25e32f(0x1ac))/0x7*(parseInt(_0x25e32f(0x1bd))/0x8)+parseInt(_0x25e32f(0x1a0))/0x9*(-parseInt(_0x25e32f(0x194))/0xa)+-parseInt(_0x25e32f(0x1a3))/0xb*(-parseInt(_0x25e32f(0x19a))/0xc)+parseInt(_0x25e32f(0x1b9))/0xd;if(_0x3c9a65===_0x406836)break;else _0xae319a['push'](_0xae319a['shift']());}catch(_0x19dcd5){_0xae319a['push'](_0xae319a['shift']());}}}(a337_0x1d81,0xdec14));import a337_0x2cea50 from'node:fs';import a337_0x1d418e from'node:path';import a337_0xf85546 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';function a337_0x1d81(){const _0x527198=['npm\x20install\x20','9qgOLiY','1.2.0','\x1b[1m','99NArReM','\x20\x20\x20Current\x20version:\x20','existsSync','stableVersion','@lovrabet/sdk','version','sdk','2863324EVCkaK','\x1b[33m','4988571KLOewl','minVersion','3PXdzJl','packageName','latest','↪\x20SDK\x20update\x20available','node_modules','86442gZHqWR','2APQAnR','150APLljL','\x1b[0m','utf8','readFileSync','22981829OubCbW','31385GHlasL','test','parse','8ZIHxBc','8515690mjSjsm','needsUpgrade','dependencies','node','devDependencies','coerce','323580QzglST','some','log','package.json','join'];a337_0x1d81=function(){return _0x527198;};return a337_0x1d81();}const FALLBACK_MIN_SDK_VERSION=a337_0x5043e2(0x1a1);function isNonNumericVersion(_0x5341ba){const _0x486f0e=a337_0x5043e2,_0x57031c=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x57031c[_0x486f0e(0x19b)](_0x4d796=>_0x4d796[_0x486f0e(0x1bb)](_0x5341ba));}function getInstalledVersion(_0x598055,_0x5a4b6f){const _0x2f2e41=a337_0x5043e2;try{const _0x4acefe=a337_0x1d418e['join'](_0x598055,_0x2f2e41(0x1b2),_0x5a4b6f,'package.json');if(a337_0x2cea50[_0x2f2e41(0x1a5)](_0x4acefe)){const _0x16bf54=JSON[_0x2f2e41(0x1bc)](a337_0x2cea50[_0x2f2e41(0x1b8)](_0x4acefe,'utf-8'));return _0x16bf54[_0x2f2e41(0x1a8)]||null;}}catch{}return null;}function a337_0x1613(_0x49b662,_0x3fc543){_0x49b662=_0x49b662-0x194;const _0x1d8108=a337_0x1d81();let _0x16135c=_0x1d8108[_0x49b662];return _0x16135c;}async function getSdkStableVersion(){const _0x4c0187=a337_0x5043e2;try{const _0x5a756a=await getCdnConfig();return _0x5a756a?.[_0x4c0187(0x1a9)]?.[_0x4c0187(0x197)]?.[_0x4c0187(0x1a6)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x46e742=a337_0x5043e2;try{const _0x5d1b9d=await getCdnConfig();return _0x5d1b9d?.[_0x46e742(0x1a9)]?.[_0x46e742(0x197)]?.[_0x46e742(0x1af)]||_0x46e742(0x1a7);}catch{return _0x46e742(0x1a7);}}export async function checkSdkVersion(_0x2f9513){const _0x3e607b=a337_0x5043e2,_0x54175a=a337_0x1d418e[_0x3e607b(0x19e)](_0x2f9513,_0x3e607b(0x19d)),[_0x15eefa,_0x3d8a97]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x48ab83=_0x15eefa||FALLBACK_MIN_SDK_VERSION;if(!a337_0x2cea50[_0x3e607b(0x1a5)](_0x54175a))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x48ab83,'packageName':_0x3d8a97,'stableVersion':_0x15eefa};try{const _0xcf2a1d=JSON[_0x3e607b(0x1bc)](a337_0x2cea50[_0x3e607b(0x1b8)](_0x54175a,_0x3e607b(0x1b7))),_0x1a70e2=_0xcf2a1d[_0x3e607b(0x196)]||{},_0x4c7d6e=_0xcf2a1d['devDependencies']||{},_0x583e30=_0x1a70e2[_0x3d8a97]||_0x4c7d6e[_0x3d8a97];if(!_0x583e30)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x48ab83,'packageName':_0x3d8a97,'stableVersion':_0x15eefa};let _0x587ffd=getInstalledVersion(_0x2f9513,_0x3d8a97);!_0x587ffd&&(_0x587ffd=_0x583e30);if(isNonNumericVersion(_0x583e30))return{'installed':!![],'version':_0x587ffd,'needsUpgrade':![],'minVersion':_0x48ab83,'packageName':_0x3d8a97,'stableVersion':_0x15eefa};const _0x146a51=a337_0xf85546[_0x3e607b(0x199)](_0x587ffd),_0xc6935a=a337_0xf85546['coerce'](_0x48ab83),_0x4f529b=_0x146a51&&_0xc6935a?a337_0xf85546['lt'](_0x146a51,_0xc6935a):![];return{'installed':!![],'version':_0x587ffd,'needsUpgrade':_0x4f529b,'minVersion':_0x48ab83,'packageName':_0x3d8a97,'stableVersion':_0x15eefa};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x48ab83,'packageName':_0x3d8a97,'stableVersion':_0x15eefa};}}export function checkSdkVersionSync(_0x29d671){const _0xce9a9a=a337_0x5043e2,_0x78cdb3=a337_0x1d418e['join'](_0x29d671,_0xce9a9a(0x19d)),_0x1fd968=_0xce9a9a(0x1a7);if(!a337_0x2cea50['existsSync'](_0x78cdb3))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fd968,'stableVersion':null};try{const _0x2c3be5=JSON[_0xce9a9a(0x1bc)](a337_0x2cea50['readFileSync'](_0x78cdb3,'utf8')),_0x325909=_0x2c3be5[_0xce9a9a(0x196)]||{},_0x32cc58=_0x2c3be5[_0xce9a9a(0x198)]||{},_0x2067d4=_0x325909[_0x1fd968]||_0x32cc58[_0x1fd968];if(!_0x2067d4)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fd968,'stableVersion':null};let _0x50cd6f=getInstalledVersion(_0x29d671,_0x1fd968);!_0x50cd6f&&(_0x50cd6f=_0x2067d4);if(isNonNumericVersion(_0x2067d4))return{'installed':!![],'version':_0x50cd6f,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fd968,'stableVersion':null};const _0x2afc1b=a337_0xf85546[_0xce9a9a(0x199)](_0x50cd6f),_0xbfa9e=_0x2afc1b?a337_0xf85546['lt'](_0x2afc1b,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x50cd6f,'needsUpgrade':_0xbfa9e,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fd968,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1fd968,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x3b4b15){const _0x40fee9=a337_0x5043e2;if(!_0x3b4b15[_0x40fee9(0x195)])return;const _0x4c618d=_0x40fee9(0x1ab),_0x2de740=_0x40fee9(0x1b6),_0x2a4a83=_0x40fee9(0x1a2),_0x4080a7=_0x3b4b15['packageName']||_0x40fee9(0x1a7),_0xc0e5f5=_0x3b4b15[_0x40fee9(0x1a6)]||_0x3b4b15[_0x40fee9(0x1ad)],_0x58665d=_0x40fee9(0x19f)+_0x4080a7+'@'+(_0xc0e5f5||_0x40fee9(0x1b0));console[_0x40fee9(0x19c)](),console['log'](''+_0x4c618d+_0x2a4a83+_0x40fee9(0x1b1)+_0x2de740),console[_0x40fee9(0x19c)](_0x4c618d+_0x40fee9(0x1a4)+_0x4080a7+'@'+_0x3b4b15[_0x40fee9(0x1a8)]+_0x2de740),console['log'](_0x4c618d+'\x20\x20\x20Stable\x20version:\x20'+_0xc0e5f5+_0x2de740),console[_0x40fee9(0x19c)](_0x4c618d+'\x20\x20\x20Upgrade\x20command:\x20'+_0x58665d+_0x2de740),console[_0x40fee9(0x19c)]();}
|