@lovrabet/rabetbase-cli 2.4.7-beta.1 → 2.4.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/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/template.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/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +2 -2
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +1 -1
- package/lib/core/bff/utils.d.ts +2 -2
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/sidecar/flags.json +1 -1
- package/skills/rabetbase/SKILL.md +28 -28
- package/skills/rabetbase/guides/backend-function.md +30 -30
- package/skills/rabetbase/guides/best-practices.md +8 -8
- package/skills/rabetbase/guides/bff-creation-workflow.md +16 -16
- package/skills/rabetbase/guides/conflict-detection.md +3 -3
- package/skills/rabetbase/guides/custom-page-workflow.md +8 -8
- package/skills/rabetbase/guides/data-api-guidelines.md +6 -6
- package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +8 -8
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/troubleshooting.md +6 -6
- package/skills/rabetbase/guides/typescript-sdk.md +10 -10
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +1 -1
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +10 -10
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-delete.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-detail.md +4 -4
- package/skills/rabetbase/references/rabetbase-bff-list.md +8 -8
- package/skills/rabetbase/references/rabetbase-bff-pull.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-status.md +1 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -3
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +3 -3
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/rules/lovrabet_rules.mdc.tpl +7 -7
- package/templates/skill/SKILL.md.tpl +12 -12
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4789e4,_0xd1fca5){const _0xf3b9c8=a248_0x19b5,_0x3533d1=_0x4789e4();while(!![]){try{const _0x558b1c=parseInt(_0xf3b9c8(0x1d4))/0x1*(parseInt(_0xf3b9c8(0x1e0))/0x2)+parseInt(_0xf3b9c8(0x1dc))/0x3+-parseInt(_0xf3b9c8(0x1d5))/0x4*(-parseInt(_0xf3b9c8(0x1e6))/0x5)+-parseInt(_0xf3b9c8(0x1db))/0x6+parseInt(_0xf3b9c8(0x1d2))/0x7+parseInt(_0xf3b9c8(0x1e4))/0x8+-parseInt(_0xf3b9c8(0x1de))/0x9*(parseInt(_0xf3b9c8(0x1da))/0xa);if(_0x558b1c===_0xd1fca5)break;else _0x3533d1['push'](_0x3533d1['shift']());}catch(_0x42cd00){_0x3533d1['push'](_0x3533d1['shift']());}}}(a248_0x459e,0xb1bc6));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a248_0x19b5(_0x5b147c,_0x1168ec){_0x5b147c=_0x5b147c-0x1cd;const _0x459e6d=a248_0x459e();let _0x19b54d=_0x459e6d[_0x5b147c];return _0x19b54d;}import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x47057c,_0xa5c21d){const _0x55356b=a248_0x19b5,_0x452b14=_0x47057c['_notice'],{_notice:_0x38d1bd,..._0x36b717}=_0x47057c;void _0x38d1bd,baseFormatOutput(_0x36b717,_0xa5c21d),_0xa5c21d[_0x55356b(0x1cd)]===_0x55356b(0x1cf)&&printPrettyNotice(_0x452b14);}function a248_0x459e(){const _0x370644=['pretty','command','message','6898045udGRzp','code','215ebGFqu','192aVyCNS','stdout','validation','json','data','760TpFjXF','2047014PEholi','4275165IQCZec','url','273933RHBTfQ','error','2692WkNmFX','stringify','update','risk','2727896yqnWmc','hint','35575qyyVnm','format','endsWith'];a248_0x459e=function(){return _0x370644;};return a248_0x459e();}export function formatCliError(_0xf13ed0,_0x454e62){const _0x309e64=a248_0x19b5;if(_0x454e62[_0x309e64(0x1cd)]===_0x309e64(0x1cf))return![];const _0x5775df=_0xf13ed0[_0x309e64(0x1d9)],_0x468b71={'ok':![],'command':_0x454e62[_0x309e64(0x1d0)],'risk':_0x454e62[_0x309e64(0x1e3)],'data':_0x5775df??null,'error':{'code':_0xf13ed0[_0x309e64(0x1d3)],'message':_0xf13ed0['message'],..._0xf13ed0[_0x309e64(0x1e5)]?{'hint':_0xf13ed0[_0x309e64(0x1e5)]}:{}}},_0x156813=_0x454e62[_0x309e64(0x1cd)]===_0x309e64(0x1d8)?JSON[_0x309e64(0x1e1)](_0x468b71,null,0x2):JSON[_0x309e64(0x1e1)](_0x468b71);let _0x1c039c=_0x156813;if(_0x454e62['jqFilter']?.['trim']())try{_0x1c039c=applyJqFilter(_0x156813,_0x454e62['jqFilter']);}catch(_0x5ac89b){const _0x5d5805=_0x5ac89b instanceof CliError?_0x5ac89b:CliErrors[_0x309e64(0x1d7)]('jq:\x20'+(_0x5ac89b instanceof Error?_0x5ac89b[_0x309e64(0x1d1)]:String(_0x5ac89b))),_0x84dec1={..._0x468b71,'error':{'code':_0x5d5805['code'],'message':_0x5d5805[_0x309e64(0x1d1)],..._0x5d5805[_0x309e64(0x1e5)]?{'hint':_0x5d5805[_0x309e64(0x1e5)]}:{},'cause':_0x468b71['error']}};_0x1c039c=_0x454e62['format']==='json'?JSON[_0x309e64(0x1e1)](_0x84dec1,null,0x2):JSON[_0x309e64(0x1e1)](_0x84dec1);}return process[_0x309e64(0x1d6)]['write'](_0x1c039c[_0x309e64(0x1ce)]('\x0a')?_0x1c039c:_0x1c039c+'\x0a'),!![];}function printPrettyNotice(_0x30b786){const _0x2364d0=a248_0x19b5;if(!_0x30b786?.['update'])return;console[_0x2364d0(0x1df)](_0x30b786[_0x2364d0(0x1e2)][_0x2364d0(0x1d1)]+'\x20('+_0x30b786[_0x2364d0(0x1e2)][_0x2364d0(0x1dd)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3293dc,_0x26d8d5){var _0x24d79b=a249_0x33ed,_0x1203fc=_0x3293dc();while(!![]){try{var _0x1b1266=parseInt(_0x24d79b(0xea))/0x1*(parseInt(_0x24d79b(0xee))/0x2)+-parseInt(_0x24d79b(0xef))/0x3*(-parseInt(_0x24d79b(0xe9))/0x4)+-parseInt(_0x24d79b(0xed))/0x5*(-parseInt(_0x24d79b(0xe6))/0x6)+-parseInt(_0x24d79b(0xec))/0x7+-parseInt(_0x24d79b(0xf0))/0x8*(-parseInt(_0x24d79b(0xe7))/0x9)+parseInt(_0x24d79b(0xeb))/0xa+-parseInt(_0x24d79b(0xe8))/0xb;if(_0x1b1266===_0x26d8d5)break;else _0x1203fc['push'](_0x1203fc['shift']());}catch(_0x590ca7){_0x1203fc['push'](_0x1203fc['shift']());}}}(a249_0x48af,0x51364));function a249_0x33ed(_0x48a8e1,_0x42f42c){_0x48a8e1=_0x48a8e1-0xe6;var _0x48af45=a249_0x48af();var _0x33eddd=_0x48af45[_0x48a8e1];return _0x33eddd;}export{extractList,extractPaging}from'@lovrabet/cli-framework';function a249_0x48af(){var _0x7997f5=['1374gSmSpS','1700088jFomts','42uOYBxt','27qSQbhj','20730468GoXfoT','4188SwNiJK','12004WVsuGk','4536390FZUkgp','2980292avypzS','422950TOsKgQ','80DtmajB'];a249_0x48af=function(){return _0x7997f5;};return a249_0x48af();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x241641,_0x12dd3e){const _0x120584=a250_0x3fb4,_0x11a7c2=_0x241641();while(!![]){try{const _0x408888=-parseInt(_0x120584(0x15f))/0x1*(parseInt(_0x120584(0x15a))/0x2)+-parseInt(_0x120584(0x164))/0x3+parseInt(_0x120584(0x15c))/0x4*(-parseInt(_0x120584(0x15e))/0x5)+-parseInt(_0x120584(0x161))/0x6+parseInt(_0x120584(0x163))/0x7*(parseInt(_0x120584(0x16f))/0x8)+-parseInt(_0x120584(0x167))/0x9*(-parseInt(_0x120584(0x158))/0xa)+parseInt(_0x120584(0x162))/0xb*(parseInt(_0x120584(0x15d))/0xc);if(_0x408888===_0x12dd3e)break;else _0x11a7c2['push'](_0x11a7c2['shift']());}catch(_0x314026){_0x11a7c2['push'](_0x11a7c2['shift']());}}}(a250_0x4dbc,0x6f2e6));import{CliErrors}from'../errors.js';function a250_0x4dbc(){const _0x5dae28=['join','81392ugspCI','name','flags','code','map','\x20api\x20pull`\x20first.','4992980yDtqPI','alias','276314UTDldC','type','8isbwwc','12QqDIgs','1945205bTNYli','4imlAKG','some','2097024dzYDVV','24719123HPKCSu','7kmVYzB','1863159AHFdfq','Unknown\x20alias\x20\x22','length','9vDtjoJ','Available\x20aliases:\x20','`\x20requires\x20either\x20--code\x20or\x20--alias.','string','.\x20Run\x20`','\x22.\x20','validation'];a250_0x4dbc=function(){return _0x5dae28;};return a250_0x4dbc();}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a250_0x3fb4(_0x26614a,_0x3d350a){_0x26614a=_0x26614a-0x158;const _0x4dbc4e=a250_0x4dbc();let _0x3fb41e=_0x4dbc4e[_0x26614a];return _0x3fb41e;}export function resolveAliasToCode(_0xb17562,_0x373d22,_0x10fc47,_0x1900db){const _0x3afa30=a250_0x3fb4,_0x399766=_0xb17562[_0x3afa30(0x171)][_0x3afa30(0x160)](_0x3a83c8=>_0x3a83c8['name']===_0x3afa30(0x172)&&_0x3a83c8[_0x3afa30(0x15b)]===_0x3afa30(0x16a)),_0x57a409=_0xb17562['flags'][_0x3afa30(0x160)](_0x3f55ed=>_0x3f55ed[_0x3afa30(0x170)]===_0x3afa30(0x159)&&_0x3f55ed[_0x3afa30(0x15b)]===_0x3afa30(0x16a));if(!_0x399766||!_0x57a409)return;const _0x37ba86=_0x373d22[_0x3afa30(0x172)]?String(_0x373d22[_0x3afa30(0x172)]):'',_0xd65ba=_0x373d22['alias']?String(_0x373d22[_0x3afa30(0x159)]):'';if(!_0x37ba86&&!_0xd65ba)throw CliErrors[_0x3afa30(0x16d)]('`'+_0x1900db+_0x3afa30(0x169));if(_0xd65ba&&!_0x37ba86){const _0xc1f408=resolveAlias(_0x10fc47,_0xd65ba);if(!_0xc1f408){const _0x59f87c=listAliases(_0x10fc47)[_0x3afa30(0x173)](_0x338cce=>_0x338cce['alias']),_0x4a60cd=_0x59f87c[_0x3afa30(0x166)]?_0x3afa30(0x168)+_0x59f87c[_0x3afa30(0x16e)](',\x20'):'No\x20api.ts\x20found\x20in\x20'+_0x10fc47+_0x3afa30(0x16b)+CLI_BIN_NAME+_0x3afa30(0x174);throw CliErrors[_0x3afa30(0x16d)](_0x3afa30(0x165)+_0xd65ba+_0x3afa30(0x16c)+_0x4a60cd);}_0x373d22[_0x3afa30(0x172)]=_0xc1f408;}}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2eaa15,_0x224b00){const _0x266b0e=a251_0x3379,_0x2fa4c0=_0x2eaa15();while(!![]){try{const _0x2739dd=parseInt(_0x266b0e(0x160))/0x1*(-parseInt(_0x266b0e(0x199))/0x2)+parseInt(_0x266b0e(0x17d))/0x3+-parseInt(_0x266b0e(0x176))/0x4*(-parseInt(_0x266b0e(0x168))/0x5)+-parseInt(_0x266b0e(0x188))/0x6*(-parseInt(_0x266b0e(0x196))/0x7)+-parseInt(_0x266b0e(0x156))/0x8+parseInt(_0x266b0e(0x174))/0x9+-parseInt(_0x266b0e(0x16a))/0xa*(parseInt(_0x266b0e(0x16c))/0xb);if(_0x2739dd===_0x224b00)break;else _0x2fa4c0['push'](_0x2fa4c0['shift']());}catch(_0x1716aa){_0x2fa4c0['push'](_0x2fa4c0['shift']());}}}(a251_0x59fb,0xa78e8));function a251_0x59fb(){const _0x32cd0a=['appcode','execute','isNonInteractive','2971038ZYWJAp','string','map','RABETBASE_APPCODE','production','defaultVerbose','update','\x0a\x20\x20','find','defaultPageSize','\x22\x20if\x20this\x20operation\x20is\x20intended.\x20','30wFHZeJ','pageSize','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','formatOutput','resolveApiDomain','none','name','mergedCli','apps','Edit\x20the\x20config\x20file\x20manually','value','requiresAppCode','nonInteractive','object','639324uuZNov','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','cookie','2281718nyPoQe','format','filter','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','apiDir','verbose','appCode','A\x20human\x20user\x20may\x20review\x20the\x20active\x20risk\x20ceilings\x20and\x20manually\x20edit\x20the\x20applicable\x20.rabetbase.json\x20file\x20to\x20set\x20riskLevel\x20to\x20\x22','has','10346480IMhhAo','_notice','service','toUpperCase','trim','AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.','configMissing','risk','authRequired','cancelled','1qUfSRu','catch','includes','resolve','some','command','currentApp','hint','645cgIWOr','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','2466680ZwWtDn','required','22gGmmmd','⚠\x20\x20High-risk\x20operation:\x20','all','validation','\x20\x20\x20Continue?\x20[y/N]\x20','selectedAppName','../core/api-client.js','schema','12088314kMpfWI','High-risk\x20operation\x20`','25540pAqRFg','doctor','rawFlags','pretty'];a251_0x59fb=function(){return _0x32cd0a;};return a251_0x59fb();}import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a251_0x2708d1}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x3e8af9){const _0x57562d=a251_0x3379;return typeof _0x3e8af9===_0x57562d(0x17e)&&_0x3e8af9[_0x57562d(0x15a)]()?_0x3e8af9[_0x57562d(0x15a)]():undefined;}function resolveEnvAppCode(){const _0x371d7b=a251_0x3379,_0x320831=stringFlag(process.env.RABETBASE_APPCODE);if(_0x320831)return{'name':_0x371d7b(0x180),'value':_0x320831};const _0x386f37=stringFlag(process.env.LOVRABET_APPCODE);if(_0x386f37)return{'name':'LOVRABET_APPCODE','value':_0x386f37};return undefined;}function hasExplicitAppCode(_0x227a66,_0x46936c){const _0x1f1d3f=a251_0x3379;return!!(stringFlag(_0x227a66[_0x1f1d3f(0x17a)])||stringFlag(_0x46936c[_0x1f1d3f(0x17a)]));}function a251_0x3379(_0x453202,_0x1fc71b){_0x453202=_0x453202-0x155;const _0x59fbbf=a251_0x59fb();let _0x337954=_0x59fbbf[_0x453202];return _0x337954;}function assertEnvAppCodeNotIgnored(_0x493cbb,_0x4354f2,_0x2e318e){const _0x413f2d=a251_0x3379;if(!_0x4354f2||_0x2e318e||_0x493cbb===_0x4354f2[_0x413f2d(0x192)])return;const _0x4dbb5c=_0x493cbb?'Current\x20resolved\x20appcode\x20is\x20\x22'+_0x493cbb+'\x22.':_0x413f2d(0x18a);throw CliErrors[_0x413f2d(0x16f)](_0x4354f2[_0x413f2d(0x18e)]+'='+_0x4354f2[_0x413f2d(0x192)]+_0x413f2d(0x197)+_0x4dbb5c+'\x20'+('To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$'+_0x4354f2[_0x413f2d(0x18e)]+'\x22.'));}export function createPipelineEnv(_0x531053,_0xa0a576,_0x49ef33=[]){const _0x3a9f4c=a251_0x3379;return{'rawFlags':_0xa0a576,'args':_0x49ef33,'resolveAppCode':()=>_0x531053[_0x3a9f4c(0x19f)],'resolveCookie':()=>_0x531053[_0x3a9f4c(0x198)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a251_0x2708d1(_0xa0a576),'defaultFormat':_0x531053['format'],'defaultPageSize':_0x531053[_0x3a9f4c(0x189)],'defaultVerbose':_0x531053[_0x3a9f4c(0x19e)],'apiDir':_0x531053[_0x3a9f4c(0x19d)],'riskLevel':_0x531053['riskLevel'],'selectedAppName':_0x531053['explicitAppName'],'mergedCli':{'defaultApp':_0x531053['defaultApp'],'currentApp':_0x531053[_0x3a9f4c(0x166)],'appCode':_0x531053[_0x3a9f4c(0x19f)],'apps':_0x531053[_0x3a9f4c(0x190)]}};}export function createRabetbaseRunnerAdapter(_0x30ccb5={}){const _0x130fe2=a251_0x3379;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x130fe2(0x19b)](_0x5af834=>PIPELINE_FLAG_NAMES[_0x130fe2(0x155)](_0x5af834['name']))[_0x130fe2(0x17f)](({name:_0x1aa5c6,type:_0x44ed2f,description:_0x118a42})=>({'name':_0x1aa5c6,'type':_0x44ed2f,'description':_0x118a42})),'formatOutput':_0x30ccb5[_0x130fe2(0x18b)]??formatOutput,'getCommandLabel'(_0x1fc1f1){const _0x43abe1=_0x130fe2;return CLI_BIN_NAME+'\x20'+_0x1fc1f1[_0x43abe1(0x158)]+'\x20'+_0x1fc1f1[_0x43abe1(0x165)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x1b8d31,{def:_0x5b5b3b}){const _0x448dab=_0x130fe2,_0xee4199=_0x1b8d31['includes'](_0x448dab(0x191))?_0x448dab(0x15b):_0x448dab(0x1a0)+_0x5b5b3b[_0x448dab(0x15d)]+_0x448dab(0x187)+_0x448dab(0x15b);return CliErrors[_0x448dab(0x16f)](_0x1b8d31+_0x448dab(0x184)+_0xee4199);}},async 'prepare'(_0x10a3e9,_0x5a5872,_0x187552,_0x765147){const _0x3b444c=_0x130fe2,_0x454e1f=_0x5a5872['apiDir']||DEFAULT_API_DIR;resolveAliasToCode(_0x10a3e9,_0x187552,_0x454e1f,_0x765147);const _0x1ac669=resolveCommandAuthMode(_0x10a3e9);let _0x17c681='';if(_0x1ac669!==_0x3b444c(0x18d)){_0x17c681=_0x5a5872['resolveCookie']()||'';if(!_0x17c681){if(_0x1ac669===_0x3b444c(0x16b))throw CliErrors[_0x3b444c(0x15e)]();}else{const {setActiveCookie:_0x49df3f}=await import('../core/api-client.js');_0x49df3f(_0x17c681);}}const _0x4513c4=_0x5a5872['resolveAppCode']()??'';if(_0x10a3e9[_0x3b444c(0x193)]!==![]){assertEnvAppCodeNotIgnored(_0x4513c4,resolveEnvAppCode(),hasExplicitAppCode(_0x187552,_0x5a5872[_0x3b444c(0x178)]));if(!_0x4513c4)throw CliErrors[_0x3b444c(0x15c)]('Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+_0x3b444c(0x19c));}return{'defaults':{'booleans':{'verbose':_0x5a5872[_0x3b444c(0x182)]},'numbers':{'pagesize':_0x5a5872[_0x3b444c(0x186)]}},'extras':{'appCode':_0x4513c4,'cookie':_0x17c681,'apiDomain':_0x5a5872[_0x3b444c(0x18c)](),'apiDir':_0x454e1f,'selectedAppName':_0x5a5872[_0x3b444c(0x171)],'mergedCli':_0x5a5872[_0x3b444c(0x18f)]}};},'confirmHighRisk':_0x30ccb5['confirmHighRisk']??(async({env:_0x26d091,commandLabel:_0x178e36})=>{const _0x53384d=_0x130fe2;if(_0x26d091[_0x53384d(0x17c)])throw CliErrors[_0x53384d(0x16f)](_0x53384d(0x175)+_0x178e36+_0x53384d(0x169));await requireConfirmationPrompt({'lines':[_0x53384d(0x16d)+_0x178e36,_0x53384d(0x170)],'createCancelledError':_0x351fee=>CliErrors[_0x53384d(0x15f)](_0x351fee)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const _0x1732d2=a251_0x3379,{clearActiveCookie:_0x58f3be}=await import(_0x1732d2(0x172));_0x58f3be();}export async function finalizeRabetbaseRuntimeState(){const _0x345aaa=a251_0x3379;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x3402c2},{initEnv:_0x164276}]=await Promise[_0x345aaa(0x16e)]([import('../constant/domain.js'),import('../constant/env.js')]);_0x3402c2(),_0x164276(_0x345aaa(0x181));}}export async function runCommand(_0x292101,_0x44c115,_0x33af69=terminalRunnerAdapter){const _0x42ebee=a251_0x3379;assertRejectedFlags(_0x292101,_0x44c115[_0x42ebee(0x178)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x292101)?withUpdateNotice(_0x292101):_0x292101,_0x44c115,_0x33af69);}function assertRejectedFlags(_0x8983ec,_0x4f1ea2){const _0x4ce81e=a251_0x3379;for(const _0x3abf93 of _0x8983ec['rejectedFlags']??[]){const _0x136f54=GLOBAL_FLAGS[_0x4ce81e(0x185)](_0x55b88c=>_0x55b88c[_0x4ce81e(0x18e)]===_0x3abf93[_0x4ce81e(0x18e)]),_0x46d8af=new Set([_0x3abf93['name'],toCamelCase(_0x3abf93[_0x4ce81e(0x18e)]),_0x136f54?.['meowKey']]),_0x8789d0=[..._0x46d8af][_0x4ce81e(0x164)](_0x4d8fbc=>{if(!_0x4d8fbc)return![];const _0x56a713=_0x4f1ea2[_0x4d8fbc];return _0x56a713!==undefined&&_0x56a713!==null&&_0x56a713!==![];});if(_0x8789d0)throw CliErrors['validation'](_0x3abf93['message'],_0x3abf93[_0x4ce81e(0x167)]);}}function toCamelCase(_0x3d755e){const _0x55d3d0=a251_0x3379;return _0x3d755e['replace'](/-([a-z])/g,(_0x2f28e0,_0x404d2a)=>_0x404d2a[_0x55d3d0(0x159)]());}function shouldAttachUpdateNotice(_0x338133){const _0x5c938a=a251_0x3379;if(_0x338133['hasFormat']===![])return![];return![_0x5c938a(0x183),_0x5c938a(0x173),_0x5c938a(0x177)][_0x5c938a(0x162)](_0x338133[_0x5c938a(0x158)]);}function withUpdateNotice(_0x13cced){return{..._0x13cced,async 'execute'(_0x15d1a2){const _0x273f13=a251_0x3379,_0x42cf1a=shouldResolveUpdateNotice(_0x15d1a2)?resolveLatestUpdateNotice()[_0x273f13(0x161)](()=>null):Promise[_0x273f13(0x163)](null),_0x4e0862=await _0x13cced[_0x273f13(0x17b)](_0x15d1a2);return attachUpdateNotice(_0x4e0862,await _0x42cf1a);}};}function shouldResolveUpdateNotice(_0x5b38cf){const _0x5db70a=a251_0x3379;return _0x5b38cf[_0x5db70a(0x19a)]===_0x5db70a(0x179)&&!_0x5b38cf[_0x5db70a(0x194)];}function attachUpdateNotice(_0x1f8da7,_0x45cbdd){const _0x5e5ab2=a251_0x3379;if(!_0x45cbdd||!_0x1f8da7||typeof _0x1f8da7!==_0x5e5ab2(0x195))return _0x1f8da7;const _0x4b087f=_0x1f8da7,_0x516747=typeof _0x4b087f[_0x5e5ab2(0x157)]===_0x5e5ab2(0x195)&&_0x4b087f[_0x5e5ab2(0x157)]!==null?_0x4b087f[_0x5e5ab2(0x157)]:{};return{..._0x4b087f,'_notice':{..._0x516747,'update':_0x45cbdd}};}
|
|
1
|
+
(function(_0x1f2430,_0x1fb749){const _0x4ffe68=a251_0x59e2,_0x15d6b6=_0x1f2430();while(!![]){try{const _0x7fd6cc=parseInt(_0x4ffe68(0x1ae))/0x1*(-parseInt(_0x4ffe68(0x19e))/0x2)+-parseInt(_0x4ffe68(0x1b6))/0x3+-parseInt(_0x4ffe68(0x1bf))/0x4*(-parseInt(_0x4ffe68(0x1a8))/0x5)+-parseInt(_0x4ffe68(0x17f))/0x6*(parseInt(_0x4ffe68(0x184))/0x7)+-parseInt(_0x4ffe68(0x17e))/0x8+-parseInt(_0x4ffe68(0x18b))/0x9+parseInt(_0x4ffe68(0x19f))/0xa;if(_0x7fd6cc===_0x1fb749)break;else _0x15d6b6['push'](_0x15d6b6['shift']());}catch(_0x5efb2c){_0x15d6b6['push'](_0x15d6b6['shift']());}}}(a251_0x2c26,0x29972));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a251_0x59e2(_0x4a1e09,_0x4f1e04){_0x4a1e09=_0x4a1e09-0x179;const _0x2c26c4=a251_0x2c26();let _0x59e210=_0x2c26c4[_0x4a1e09];return _0x59e210;}import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a251_0x1b1a68}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x46b7d1){const _0x24ffa7=a251_0x59e2;return typeof _0x46b7d1==='string'&&_0x46b7d1[_0x24ffa7(0x1af)]()?_0x46b7d1['trim']():undefined;}function resolveEnvAppCode(){const _0x319253=a251_0x59e2,_0x59af80=stringFlag(process.env.RABETBASE_APPCODE);if(_0x59af80)return{'name':_0x319253(0x1b9),'value':_0x59af80};const _0x95b792=stringFlag(process.env.LOVRABET_APPCODE);if(_0x95b792)return{'name':_0x319253(0x19d),'value':_0x95b792};return undefined;}function hasExplicitAppCode(_0x31b3b0,_0x166af1){const _0x2bd38b=a251_0x59e2;return!!(stringFlag(_0x31b3b0[_0x2bd38b(0x1be)])||stringFlag(_0x166af1[_0x2bd38b(0x1be)]));}function assertEnvAppCodeNotIgnored(_0x2e76f6,_0x54e4f4,_0x299f77){const _0x4ec67e=a251_0x59e2;if(!_0x54e4f4||_0x299f77||_0x2e76f6===_0x54e4f4['value'])return;const _0x7eb84a=_0x2e76f6?_0x4ec67e(0x1ab)+_0x2e76f6+'\x22.':_0x4ec67e(0x182);throw CliErrors[_0x4ec67e(0x1a0)](_0x54e4f4['name']+'='+_0x54e4f4[_0x4ec67e(0x192)]+_0x4ec67e(0x198)+_0x7eb84a+'\x20'+('To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$'+_0x54e4f4['name']+'\x22.'));}export function createPipelineEnv(_0x19b2f9,_0x561b22,_0x5001c6=[]){const _0x1f0ee7=a251_0x59e2;return{'rawFlags':_0x561b22,'args':_0x5001c6,'resolveAppCode':()=>_0x19b2f9[_0x1f0ee7(0x1a3)],'resolveCookie':()=>_0x19b2f9[_0x1f0ee7(0x18e)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a251_0x1b1a68(_0x561b22),'defaultFormat':_0x19b2f9[_0x1f0ee7(0x1ad)],'defaultPageSize':_0x19b2f9[_0x1f0ee7(0x187)],'defaultVerbose':_0x19b2f9[_0x1f0ee7(0x1a5)],'apiDir':_0x19b2f9[_0x1f0ee7(0x180)],'riskLevel':_0x19b2f9[_0x1f0ee7(0x1b5)],'selectedAppName':_0x19b2f9[_0x1f0ee7(0x17a)],'mergedCli':{'defaultApp':_0x19b2f9['defaultApp'],'currentApp':_0x19b2f9['currentApp'],'appCode':_0x19b2f9[_0x1f0ee7(0x1a3)],'apps':_0x19b2f9[_0x1f0ee7(0x179)]}};}export function createRabetbaseRunnerAdapter(_0x49ff1f={}){const _0x123d65=a251_0x59e2;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x123d65(0x1c2)](_0xf620ab=>PIPELINE_FLAG_NAMES[_0x123d65(0x1a6)](_0xf620ab['name']))[_0x123d65(0x197)](({name:_0x439b26,type:_0x117f2c,description:_0x150501})=>({'name':_0x439b26,'type':_0x117f2c,'description':_0x150501})),'formatOutput':_0x49ff1f[_0x123d65(0x193)]??formatOutput,'getCommandLabel'(_0x4f9b24){const _0x14a053=_0x123d65;return CLI_BIN_NAME+'\x20'+_0x4f9b24[_0x14a053(0x19b)]+'\x20'+_0x4f9b24[_0x14a053(0x188)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x246605,{def:_0x2f72a4}){const _0x39e6f4=_0x123d65,_0x266981=_0x246605[_0x39e6f4(0x194)](_0x39e6f4(0x190))?'AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.':'A\x20human\x20user\x20may\x20review\x20the\x20active\x20risk\x20ceilings\x20and\x20manually\x20edit\x20the\x20applicable\x20.rabetbase.json\x20file\x20to\x20set\x20riskLevel\x20to\x20\x22'+_0x2f72a4[_0x39e6f4(0x1a4)]+_0x39e6f4(0x191)+_0x39e6f4(0x1b4);return CliErrors[_0x39e6f4(0x1a0)](_0x246605+'\x0a\x20\x20'+_0x266981);}},async 'prepare'(_0x1e347f,_0x4a84b2,_0x47c403,_0xa970fd){const _0x45b530=_0x123d65,_0x4f46fb=_0x4a84b2[_0x45b530(0x180)]||DEFAULT_API_DIR;resolveAliasToCode(_0x1e347f,_0x47c403,_0x4f46fb,_0xa970fd);const _0x939f84=resolveCommandAuthMode(_0x1e347f);let _0x2fd11f='';if(_0x939f84!==_0x45b530(0x1b1)){_0x2fd11f=_0x4a84b2['resolveCookie']()||'';if(!_0x2fd11f){if(_0x939f84===_0x45b530(0x1aa))throw CliErrors['authRequired']();}else{const {setActiveCookie:_0x3a9381}=await import(_0x45b530(0x18c));_0x3a9381(_0x2fd11f);}}const _0xf18d93=_0x4a84b2[_0x45b530(0x19c)]()??'';if(_0x1e347f[_0x45b530(0x199)]!==![]){assertEnvAppCodeNotIgnored(_0xf18d93,resolveEnvAppCode(),hasExplicitAppCode(_0x47c403,_0x4a84b2[_0x45b530(0x1b8)]));if(!_0xf18d93)throw CliErrors[_0x45b530(0x1b7)](_0x45b530(0x17d)+CLI_BIN_NAME+_0x45b530(0x1b2));}return{'defaults':{'booleans':{'verbose':_0x4a84b2[_0x45b530(0x1a1)]},'numbers':{'pagesize':_0x4a84b2['defaultPageSize']}},'extras':{'appCode':_0xf18d93,'cookie':_0x2fd11f,'apiDomain':_0x4a84b2[_0x45b530(0x1bd)](),'apiDir':_0x4f46fb,'selectedAppName':_0x4a84b2[_0x45b530(0x1a7)],'mergedCli':_0x4a84b2['mergedCli']}};},'confirmHighRisk':_0x49ff1f[_0x123d65(0x1ac)]??(async({env:_0x4b826b,commandLabel:_0x33b0e8})=>{const _0x979049=_0x123d65;if(_0x4b826b[_0x979049(0x1c0)])throw CliErrors[_0x979049(0x1a0)](_0x979049(0x189)+_0x33b0e8+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmationPrompt({'lines':[_0x979049(0x18f)+_0x33b0e8,_0x979049(0x1c1)],'createCancelledError':_0x511020=>CliErrors['cancelled'](_0x511020)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const _0x544972=a251_0x59e2,{clearActiveCookie:_0x10de1a}=await import(_0x544972(0x18c));_0x10de1a();}export async function finalizeRabetbaseRuntimeState(){const _0x2d2612=a251_0x59e2;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x151de0},{initEnv:_0x54710c}]=await Promise[_0x2d2612(0x18a)]([import(_0x2d2612(0x1b3)),import('../constant/env.js')]);_0x151de0(),_0x54710c(_0x2d2612(0x183));}}export async function runCommand(_0xfc2026,_0x584cb1,_0x3eba74=terminalRunnerAdapter){const _0x3c37f8=a251_0x59e2;assertRejectedFlags(_0xfc2026,_0x584cb1[_0x3c37f8(0x1b8)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0xfc2026)?withUpdateNotice(_0xfc2026):_0xfc2026,_0x584cb1,_0x3eba74);}function assertRejectedFlags(_0x5239ad,_0x2b5e1c){const _0xd2540b=a251_0x59e2;for(const _0x18c9a5 of _0x5239ad[_0xd2540b(0x18d)]??[]){const _0xcaf0a5=GLOBAL_FLAGS[_0xd2540b(0x196)](_0x2d6c14=>_0x2d6c14[_0xd2540b(0x185)]===_0x18c9a5[_0xd2540b(0x185)]),_0x37d5b5=new Set([_0x18c9a5[_0xd2540b(0x185)],toCamelCase(_0x18c9a5[_0xd2540b(0x185)]),_0xcaf0a5?.[_0xd2540b(0x17b)]]),_0x57d02f=[..._0x37d5b5][_0xd2540b(0x17c)](_0x1e3039=>{if(!_0x1e3039)return![];const _0x4316f8=_0x2b5e1c[_0x1e3039];return _0x4316f8!==undefined&&_0x4316f8!==null&&_0x4316f8!==![];});if(_0x57d02f)throw CliErrors[_0xd2540b(0x1a0)](_0x18c9a5[_0xd2540b(0x1bc)],_0x18c9a5[_0xd2540b(0x1b0)]);}}function toCamelCase(_0x1419c3){const _0x40906e=a251_0x59e2;return _0x1419c3['replace'](/-([a-z])/g,(_0x19eecd,_0x4c10ba)=>_0x4c10ba[_0x40906e(0x181)]());}function a251_0x2c26(){const _0x393938=['⚠\x20\x20High-risk\x20operation:\x20','Edit\x20the\x20config\x20file\x20manually','\x22\x20if\x20this\x20operation\x20is\x20intended.\x20','value','formatOutput','includes','update','find','map','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','requiresAppCode','schema','service','resolveAppCode','LOVRABET_APPCODE','4684vrOsdl','11352320MFCiSF','validation','defaultVerbose','hasFormat','appCode','risk','verbose','has','selectedAppName','15EVWbHn','_notice','required','Current\x20resolved\x20appcode\x20is\x20\x22','confirmHighRisk','format','14esYsdn','trim','hint','none','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','../constant/domain.js','AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.','riskLevel','466731hiVQUJ','configMissing','rawFlags','RABETBASE_APPCODE','object','resolve','message','resolveApiDomain','appcode','30372riNPIV','isNonInteractive','\x20\x20\x20Continue?\x20[y/N]\x20','filter','apps','explicitAppName','meowKey','some','Set\x20appcode\x20via\x20`','2350016GAyDxG','1089246oddZqS','apiDir','toUpperCase','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','production','7YSrMpY','name','nonInteractive','pageSize','command','High-risk\x20operation\x20`','all','2915991bwPzIu','../core/api-client.js','rejectedFlags','cookie'];a251_0x2c26=function(){return _0x393938;};return a251_0x2c26();}function shouldAttachUpdateNotice(_0x308eb0){const _0x33445b=a251_0x59e2;if(_0x308eb0[_0x33445b(0x1a2)]===![])return![];return![_0x33445b(0x195),_0x33445b(0x19a),'doctor'][_0x33445b(0x194)](_0x308eb0['service']);}function withUpdateNotice(_0x15337a){return{..._0x15337a,async 'execute'(_0x1014a2){const _0x20b070=a251_0x59e2,_0x53fb99=shouldResolveUpdateNotice(_0x1014a2)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x20b070(0x1bb)](null),_0x211557=await _0x15337a['execute'](_0x1014a2);return attachUpdateNotice(_0x211557,await _0x53fb99);}};}function shouldResolveUpdateNotice(_0x53e22e){const _0x229994=a251_0x59e2;return _0x53e22e[_0x229994(0x1ad)]==='pretty'&&!_0x53e22e[_0x229994(0x186)];}function attachUpdateNotice(_0x5ee9d1,_0x4c971e){const _0x302115=a251_0x59e2;if(!_0x4c971e||!_0x5ee9d1||typeof _0x5ee9d1!=='object')return _0x5ee9d1;const _0x324f73=_0x5ee9d1,_0x9de6ad=typeof _0x324f73[_0x302115(0x1a9)]===_0x302115(0x1ba)&&_0x324f73[_0x302115(0x1a9)]!==null?_0x324f73[_0x302115(0x1a9)]:{};return{..._0x324f73,'_notice':{..._0x9de6ad,'update':_0x4c971e}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a252_0x246d(_0x3a2009,_0x2fe768){_0x3a2009=_0x3a2009-0x1a0;const _0xaa7b3a=a252_0xaa7b();let _0x246dd0=_0xaa7b3a[_0x3a2009];return _0x246dd0;}function a252_0xaa7b(){const _0x4a8126=['8ArQWty','792962SHYyOd','8HSuPbV','4484028KHPKiM','448450diMiHn','2eeRnFn','1544715YjJDUZ','5SMkyEm','1743511ELcJYQ','228RvJTEZ','99473zoUMjU','325194xsIgkZ'];a252_0xaa7b=function(){return _0x4a8126;};return a252_0xaa7b();}(function(_0x15f07e,_0x47d700){const _0x226439=a252_0x246d,_0xf93fd6=_0x15f07e();while(!![]){try{const _0x4f2f1d=-parseInt(_0x226439(0x1a1))/0x1*(-parseInt(_0x226439(0x1a9))/0x2)+-parseInt(_0x226439(0x1a7))/0x3*(-parseInt(_0x226439(0x1a8))/0x4)+-parseInt(_0x226439(0x1a3))/0x5*(parseInt(_0x226439(0x1ab))/0x6)+-parseInt(_0x226439(0x1a4))/0x7+-parseInt(_0x226439(0x1aa))/0x8*(-parseInt(_0x226439(0x1a2))/0x9)+parseInt(_0x226439(0x1a0))/0xa+-parseInt(_0x226439(0x1a6))/0xb*(-parseInt(_0x226439(0x1a5))/0xc);if(_0x4f2f1d===_0x47d700)break;else _0xf93fd6['push'](_0xf93fd6['shift']());}catch(_0x594266){_0xf93fd6['push'](_0xf93fd6['shift']());}}}(a252_0xaa7b,0x620ec));import{buildSchemaPayload as a252_0x41f924}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const {serviceRegistry:_0x34fdcb,findDefinition:_0xa8b039}=await import('../commands/registry.js');return a252_0x41f924({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x34fdcb,'buildAllFlags':buildAllFlags,'findDefinition':_0xa8b039});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3908c6,_0x22eefd){var _0x44b1a9=a253_0x54f1,_0x144ddf=_0x3908c6();while(!![]){try{var _0x1d4455=-parseInt(_0x44b1a9(0x96))/0x1*(parseInt(_0x44b1a9(0x9d))/0x2)+-parseInt(_0x44b1a9(0x97))/0x3+parseInt(_0x44b1a9(0x9b))/0x4+-parseInt(_0x44b1a9(0x99))/0x5+-parseInt(_0x44b1a9(0x9c))/0x6*(-parseInt(_0x44b1a9(0x9a))/0x7)+parseInt(_0x44b1a9(0x98))/0x8+parseInt(_0x44b1a9(0x95))/0x9;if(_0x1d4455===_0x22eefd)break;else _0x144ddf['push'](_0x144ddf['shift']());}catch(_0xc54b79){_0x144ddf['push'](_0x144ddf['shift']());}}}(a253_0x4233,0x5dafe));function a253_0x4233(){var _0x238fbe=['304516GQtvKw','4790529KWdXle','1OTgFKS','1863309FuDGIu','3167384hqiOhB','911540WvNmms','56SDDdLm','707676VsKGSX','175716EqbrDq'];a253_0x4233=function(){return _0x238fbe;};return a253_0x4233();}function a253_0x54f1(_0x1daec5,_0x424088){_0x1daec5=_0x1daec5-0x95;var _0x423314=a253_0x4233();var _0x54f1d8=_0x423314[_0x1daec5];return _0x54f1d8;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.4.7-beta.
|
|
2
|
-
export declare const GIT_TAG = "v2.4.7-beta.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.4.7-beta.2";
|
|
2
|
+
export declare const GIT_TAG = "v2.4.7-beta.2";
|
|
3
|
+
export declare const GIT_COMMIT = "ea5c8fe";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-20T11:17:24.267Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a254_0x2007(){const _0x4dfb3a=['v2.4.7-beta.2','8tPqvwO','2.4.7-beta.2','3170kDGsjN','1072680YBQWAe','9669066UGCakh','18Ocgiqe','1718550AxXWEb','139DsssCI','10IUVJmt','ea5c8fe','4890662HCozgZ','1027332HVMaRa','308760XDCkeJ'];a254_0x2007=function(){return _0x4dfb3a;};return a254_0x2007();}const a254_0x1631ec=a254_0x1275;function a254_0x1275(_0x14fe77,_0x1bb269){_0x14fe77=_0x14fe77-0x1f2;const _0x20072e=a254_0x2007();let _0x12755a=_0x20072e[_0x14fe77];return _0x12755a;}(function(_0x30f3e3,_0x2014ef){const _0x3d700a=a254_0x1275,_0x26f3d3=_0x30f3e3();while(!![]){try{const _0x318ad7=parseInt(_0x3d700a(0x1f6))/0x1*(-parseInt(_0x3d700a(0x1ff))/0x2)+-parseInt(_0x3d700a(0x1f5))/0x3+parseInt(_0x3d700a(0x1fa))/0x4*(-parseInt(_0x3d700a(0x1f7))/0x5)+-parseInt(_0x3d700a(0x1fb))/0x6+parseInt(_0x3d700a(0x1f9))/0x7*(parseInt(_0x3d700a(0x1fd))/0x8)+parseInt(_0x3d700a(0x1f4))/0x9*(parseInt(_0x3d700a(0x1f2))/0xa)+parseInt(_0x3d700a(0x1f3))/0xb;if(_0x318ad7===_0x2014ef)break;else _0x26f3d3['push'](_0x26f3d3['shift']());}catch(_0x19171d){_0x26f3d3['push'](_0x26f3d3['shift']());}}}(a254_0x2007,0x69efd));export const VERSION=a254_0x1631ec(0x1fe);export const GIT_TAG=a254_0x1631ec(0x1fc);export const GIT_COMMIT=a254_0x1631ec(0x1f8);export const BUILD_TIME='2026-08-20T11:17:24.267Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x251415,_0x10270a){var _0x57e3cb=a255_0x3259,_0x30fc63=_0x251415();while(!![]){try{var _0x265315=parseInt(_0x57e3cb(0x1d6))/0x1*(parseInt(_0x57e3cb(0x1d8))/0x2)+parseInt(_0x57e3cb(0x1d3))/0x3+-parseInt(_0x57e3cb(0x1cf))/0x4+parseInt(_0x57e3cb(0x1d2))/0x5*(-parseInt(_0x57e3cb(0x1da))/0x6)+parseInt(_0x57e3cb(0x1d5))/0x7+parseInt(_0x57e3cb(0x1d0))/0x8*(parseInt(_0x57e3cb(0x1ce))/0x9)+-parseInt(_0x57e3cb(0x1db))/0xa;if(_0x265315===_0x10270a)break;else _0x30fc63['push'](_0x30fc63['shift']());}catch(_0x7e29a9){_0x30fc63['push'](_0x30fc63['shift']());}}}(a255_0x3b60,0x41cee));import a255_0x40e054 from'chalk';function a255_0x3259(_0x23d6ca,_0xc04dc9){_0x23d6ca=_0x23d6ca-0x1ce;var _0x3b605f=a255_0x3b60();var _0x3259d7=_0x3b605f[_0x23d6ca];return _0x3259d7;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x4d519f=a255_0x3259;console['log'](),console['log'](a255_0x40e054['green']['bold']('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x4d519f(0x1d1)](),console[_0x4d519f(0x1d1)](_0x4d519f(0x1d4)+a255_0x40e054[_0x4d519f(0x1dd)][_0x4d519f(0x1d7)](CLI_BIN_NAME+_0x4d519f(0x1d9))+_0x4d519f(0x1dc)),console[_0x4d519f(0x1d1)]();}function a255_0x3b60(){var _0x40a412=['10wnoKeJ','601542gWXxjp','\x20\x20Use\x20','3369821rugRbc','269509UBmtBG','bold','2RyONxC','\x20--help','1166646jdvKYm','4803720ZBqJqj','\x20to\x20view\x20available\x20commands.','green','9dNgtcQ','761040AeNNTJ','3021104IZaKLS','log'];a255_0x3b60=function(){return _0x40a412;};return a255_0x3b60();}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a256_0x3130(){const _0x274778=['changed','Rabetbase\x20Built-in\x20Skill\x20','skillVersion','installed','log','16vnflsB','Installation\x20failed','531077gBSDdz','530310qODEFo','Repair\x20with:\x20','\x20at\x20','repairCommand','[BUILTIN_SKILL_INSTALL_','warn','2702768gKTfoo','152XCIDyB','45AvuYWg','5970dCELNs','already\x20current','29496IUhXBG','code','installedPath','error','SOURCE_INVALID','1475782sYufbe','135iIduZQ','5639557WgwwFT','\x20via\x20skills@latest'];a256_0x3130=function(){return _0x274778;};return a256_0x3130();}(function(_0x39959f,_0x40d27e){const _0x10e2d3=a256_0x24e4,_0x33fa1f=_0x39959f();while(!![]){try{const _0x23e542=parseInt(_0x10e2d3(0x7e))/0x1+-parseInt(_0x10e2d3(0x86))/0x2*(-parseInt(_0x10e2d3(0x88))/0x3)+-parseInt(_0x10e2d3(0x85))/0x4+-parseInt(_0x10e2d3(0x90))/0x5*(-parseInt(_0x10e2d3(0x8a))/0x6)+-parseInt(_0x10e2d3(0x8f))/0x7*(parseInt(_0x10e2d3(0x98))/0x8)+parseInt(_0x10e2d3(0x87))/0x9*(parseInt(_0x10e2d3(0x7f))/0xa)+parseInt(_0x10e2d3(0x91))/0xb;if(_0x23e542===_0x40d27e)break;else _0x33fa1f['push'](_0x33fa1f['shift']());}catch(_0x56fe54){_0x33fa1f['push'](_0x33fa1f['shift']());}}}(a256_0x3130,0x78fbb));import{installBuiltinSkill}from'./skills/builtin-skill.js';function a256_0x24e4(_0x54bf6d,_0x1ffed2){_0x54bf6d=_0x54bf6d-0x7d;const _0x313028=a256_0x3130();let _0x24e4b7=_0x313028[_0x54bf6d];return _0x24e4b7;}export async function runPostinstall(_0x103f4b={}){const _0x28f6f1=a256_0x24e4,_0x1b5408=installBuiltinSkill(_0x103f4b);if(_0x1b5408['ok']){const _0x119bbd=_0x1b5408[_0x28f6f1(0x93)]?_0x28f6f1(0x96):_0x28f6f1(0x89),_0x3336ef=_0x1b5408[_0x28f6f1(0x8c)]?_0x28f6f1(0x81)+_0x1b5408[_0x28f6f1(0x8c)]:_0x28f6f1(0x92);return console[_0x28f6f1(0x97)](_0x28f6f1(0x94)+_0x1b5408[_0x28f6f1(0x95)]+'\x20'+_0x119bbd+_0x3336ef),_0x1b5408;}const _0x1276ba=_0x28f6f1(0x83)+(_0x1b5408[_0x28f6f1(0x8b)]??'FAILED')+']\x20'+(_0x1b5408[_0x28f6f1(0x8d)]??_0x28f6f1(0x7d))+'.\x20'+(_0x28f6f1(0x80)+_0x1b5408[_0x28f6f1(0x82)]);if(_0x1b5408[_0x28f6f1(0x8b)]===_0x28f6f1(0x8e))throw new Error(_0x1276ba);return console[_0x28f6f1(0x84)](_0x1276ba),_0x1b5408;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25fdee,_0x35edcd){const _0x565000=a257_0x9248,_0x47d226=_0x25fdee();while(!![]){try{const _0x4c32b=-parseInt(_0x565000(0x1b4))/0x1+-parseInt(_0x565000(0x1b7))/0x2*(parseInt(_0x565000(0x1bb))/0x3)+parseInt(_0x565000(0x1c5))/0x4*(-parseInt(_0x565000(0x1b8))/0x5)+parseInt(_0x565000(0x1c0))/0x6+-parseInt(_0x565000(0x1be))/0x7+-parseInt(_0x565000(0x1b9))/0x8*(-parseInt(_0x565000(0x1c2))/0x9)+parseInt(_0x565000(0x1c1))/0xa;if(_0x4c32b===_0x35edcd)break;else _0x47d226['push'](_0x47d226['shift']());}catch(_0x217585){_0x47d226['push'](_0x47d226['shift']());}}}(a257_0x20b6,0x5784a));function a257_0x20b6(){const _0x526d9c=['high-risk-write','write','Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.','468756Boichz','将执行高风险写入操作\x20',';该操作可能创建或修改业务数据或本地配置。','843796fEnclP','3195BPljVx','2296RWdWhk','risk','3yYHtrp',';该操作可能覆盖、删除或明显影响线上运行行为。','trim','2466485iwXXlS','confirmationDescription','2494644BgEfFT','16059670gCywnO','7641FIuLmW','replace','slice','4156ERvzPv'];a257_0x20b6=function(){return _0x526d9c;};return a257_0x20b6();}const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildRabetbaseConfirmationRequest(_0x2821b5,_0x194fad,_0x289e0a){const _0x577892=a257_0x9248,_0x2de0d8=normalizeText(_0x2821b5[_0x577892(0x1bf)],DESCRIPTION_MAX_LENGTH),_0xeeb059=_0x2de0d8||normalizeText(defaultDescription(requireWriteRisk(_0x2821b5),_0x194fad),DESCRIPTION_MAX_LENGTH);return{'operation':_0x194fad,'risk':requireWriteRisk(_0x2821b5),'description':_0xeeb059,..._0x289e0a?{'signal':_0x289e0a}:{}};}function requireWriteRisk(_0x4960fa){const _0x53d184=a257_0x9248;if(_0x4960fa[_0x53d184(0x1ba)]===_0x53d184(0x1c7)||_0x4960fa['risk']===_0x53d184(0x1c6))return _0x4960fa[_0x53d184(0x1ba)];throw new Error(_0x53d184(0x1b3));}function a257_0x9248(_0x4e7f44,_0x285a90){_0x4e7f44=_0x4e7f44-0x1b3;const _0x20b61d=a257_0x20b6();let _0x9248ce=_0x20b61d[_0x4e7f44];return _0x9248ce;}function defaultDescription(_0x10da96,_0x4f9cf4){const _0x10f606=a257_0x9248;if(_0x10da96==='high-risk-write')return _0x10f606(0x1b5)+_0x4f9cf4+_0x10f606(0x1bc);return'将执行写入操作\x20'+_0x4f9cf4+_0x10f606(0x1b6);}function normalizeText(_0x19fc3c,_0x6c48b1){const _0x40e256=a257_0x9248;if(typeof _0x19fc3c!=='string')return'';return _0x19fc3c[_0x40e256(0x1c3)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x40e256(0x1c3)](/\s+/g,'\x20')[_0x40e256(0x1bd)]()[_0x40e256(0x1c4)](0x0,_0x6c48b1);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x27f22a,_0x4b248f){var _0x411fa8=a258_0x52e6,_0x42cac7=_0x27f22a();while(!![]){try{var _0x5ad088=-parseInt(_0x411fa8(0xfa))/0x1+-parseInt(_0x411fa8(0xfb))/0x2+parseInt(_0x411fa8(0x101))/0x3+-parseInt(_0x411fa8(0xff))/0x4+parseInt(_0x411fa8(0xf6))/0x5+-parseInt(_0x411fa8(0xf7))/0x6*(-parseInt(_0x411fa8(0xf5))/0x7)+parseInt(_0x411fa8(0x102))/0x8;if(_0x5ad088===_0x4b248f)break;else _0x42cac7['push'](_0x42cac7['shift']());}catch(_0x4ad6b7){_0x42cac7['push'](_0x42cac7['shift']());}}}(a258_0x40c8,0xbdf0e));function a258_0x40c8(){var _0x448742=['1604680zgrTpr','12918UEgDNM','risk','join','785868TzxudL','129722ZzScla','rabetbase.write.completed','service','trim','1876656OBkteR','filter','2264340KfcHAN','2338464XYlSMh','high-risk-write','2373MUtQXx'];a258_0x40c8=function(){return _0x448742;};return a258_0x40c8();}export function canonicalRabetbaseOperation(_0x3db461){var _0x156776=a258_0x52e6;return[_0x3db461[_0x156776(0xfd)],..._0x3db461['command'][_0x156776(0xfe)]()['split'](/\s+/)][_0x156776(0x100)](Boolean)[_0x156776(0xf9)]('.');}function a258_0x52e6(_0x541350,_0x225f1d){_0x541350=_0x541350-0xf4;var _0x40c8f7=a258_0x40c8();var _0x52e6be=_0x40c8f7[_0x541350];return _0x52e6be;}export function createRabetbaseWriteMetadata(_0x28c63a,_0x30a3b7,_0x57f006,_0x89f724){var _0x50e63b=a258_0x52e6;if(_0x89f724||_0x57f006['ok']!==!![]||_0x28c63a['risk']!=='write'&&_0x28c63a[_0x50e63b(0xf8)]!==_0x50e63b(0xf4))return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x50e63b(0xfc),'operation':_0x30a3b7,'risk':_0x28c63a[_0x50e63b(0xf8)]}}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x104049,_0x8b2eb7){const _0x18264f=a259_0x1627,_0x4264e0=_0x104049();while(!![]){try{const _0x5a4511=parseInt(_0x18264f(0x1c7))/0x1*(-parseInt(_0x18264f(0x1a9))/0x2)+-parseInt(_0x18264f(0x1c4))/0x3+-parseInt(_0x18264f(0x1bf))/0x4*(-parseInt(_0x18264f(0x1cb))/0x5)+-parseInt(_0x18264f(0x1ad))/0x6*(parseInt(_0x18264f(0x1b4))/0x7)+-parseInt(_0x18264f(0x1bc))/0x8*(-parseInt(_0x18264f(0x1be))/0x9)+-parseInt(_0x18264f(0x1c6))/0xa*(-parseInt(_0x18264f(0x1ab))/0xb)+-parseInt(_0x18264f(0x1b2))/0xc*(parseInt(_0x18264f(0x1c3))/0xd);if(_0x5a4511===_0x8b2eb7)break;else _0x4264e0['push'](_0x4264e0['shift']());}catch(_0xac5138){_0x4264e0['push'](_0x4264e0['shift']());}}}(a259_0x2128,0x8a40b));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createPipelineEnv,createRabetbaseRunnerAdapter,finalizeRabetbaseRuntimeState,runCommand}from'../framework/runner.js';import{buildRabetbaseConfirmationRequest}from'../runtime/confirmation.js';import{canonicalRabetbaseOperation,createRabetbaseWriteMetadata}from'../runtime/event.js';import{runSerialized}from'../runtime/queue.js';import{resolveRabetbaseInvocation}from'../runtime/resolve.js';const defaultPresentation={'present'({result:_0x41e07b,command:_0x227105,risk:_0x4cd3d9,dryRun:_0x3f7823}){const _0x215005=a259_0x1627;return JSON[_0x215005(0x1aa)]({'ok':_0x41e07b['ok'],'command':_0x227105,'risk':_0x4cd3d9,..._0x3f7823?{'dryRun':!![]}:{},..._0x41e07b['data']!==undefined?{'data':_0x41e07b['data']}:{},..._0x41e07b[_0x215005(0x1ae)]?{'message':_0x41e07b[_0x215005(0x1ae)]}:{}});}};export async function invokeRabetbase(_0x261ffe,_0x2d4377){const _0x103e24=a259_0x1627;throwIfAborted(_0x2d4377[_0x103e24(0x1c8)]);const _0x33a691=await resolveRabetbaseInvocation(_0x261ffe),_0x4993cb=canonicalRabetbaseOperation(_0x33a691[_0x103e24(0x1af)]);return await confirmWriteBeforeQueue(_0x33a691['definition'],_0x33a691[_0x103e24(0x1ac)],_0x4993cb,_0x2d4377),runSerialized(async()=>{const _0xf67d1e=_0x103e24,_0x5e4a24={};try{throwIfAborted(_0x2d4377['signal']);const _0x517c2f=buildConfigFromFlags(_0x33a691[_0xf67d1e(0x1ac)]);await initGlobalEnvironment(_0x517c2f);const _0x365c96=createPipelineEnv(_0x517c2f,{..._0x33a691['rawFlags'],'yes':_0x33a691[_0xf67d1e(0x1af)][_0xf67d1e(0x1b9)]==='high-risk-write'?!![]:_0x33a691['rawFlags'][_0xf67d1e(0x1bd)],'nonInteractive':!![]},_0x33a691[_0xf67d1e(0x1c9)]);_0x365c96[_0xf67d1e(0x1b3)]=!![],_0x365c96['riskLevel']=_0xf67d1e(0x1b5);const _0x15e382=withAbortSignal(_0x33a691['definition'],_0x2d4377[_0xf67d1e(0x1c8)]),_0x3b15ba=createRabetbaseRunnerAdapter({'formatOutput'(_0x1fd1c9,_0x424d22){const _0x17d5f3=_0xf67d1e;_0x5e4a24['result']=_0x1fd1c9,_0x5e4a24[_0x17d5f3(0x1b8)]=_0x424d22[_0x17d5f3(0x1b8)],_0x5e4a24[_0x17d5f3(0x1b9)]=_0x424d22[_0x17d5f3(0x1b9)],_0x5e4a24[_0x17d5f3(0x1a5)]=_0x424d22[_0x17d5f3(0x1a5)],_0x5e4a24[_0x17d5f3(0x1b7)]=_0x424d22['dryRun']===!![];},async 'confirmHighRisk'(){const _0x481ca6=_0xf67d1e;throw new Error(_0x481ca6(0x1ca));}});await runCommand(_0x15e382,_0x365c96,_0x3b15ba);if(!_0x5e4a24['result']||!_0x5e4a24[_0xf67d1e(0x1b8)]||!_0x5e4a24[_0xf67d1e(0x1b9)]||!_0x5e4a24['format'])throw new Error(_0xf67d1e(0x1a8));const _0x3a2cc3=_0x5e4a24['dryRun']===!![],_0x4806b4=_0x2d4377[_0xf67d1e(0x1c1)]??defaultPresentation,_0x5611a8={'result':_0x5e4a24[_0xf67d1e(0x1c0)],'command':_0x5e4a24[_0xf67d1e(0x1b8)],'operation':_0x4993cb,'risk':_0x5e4a24[_0xf67d1e(0x1b9)],'format':_0x5e4a24[_0xf67d1e(0x1a5)],'dryRun':_0x3a2cc3},_0x2ed701=createRabetbaseWriteMetadata(_0x33a691['definition'],_0x4993cb,_0x5e4a24[_0xf67d1e(0x1c0)],_0x3a2cc3);let _0x972854;try{_0x972854=await _0x4806b4[_0xf67d1e(0x1bb)](_0x5611a8);}catch(_0x48ba39){if(!_0x2ed701||_0x4806b4===defaultPresentation)throw _0x48ba39;_0x972854=await defaultPresentation[_0xf67d1e(0x1bb)](_0x5611a8);}return{'operation':_0x4993cb,'risk':_0x5e4a24['risk'],'mode':_0x3a2cc3?_0xf67d1e(0x1a7):_0xf67d1e(0x1c2),'result':_0x5e4a24[_0xf67d1e(0x1c0)],'output':_0x972854,..._0x2ed701?{'metadata':_0x2ed701}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}function a259_0x2128(){const _0x4b0f6b=['6415atzMah','confirmation','format','Rabetbase\x20invocation\x20aborted.','dry-run','Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','7454HUIpdY','stringify','44NNulsU','rawFlags','2101602IZRNOe','message','definition','aborted','write','1559976qEwoBK','isNonInteractive','7GHVLaf','high-risk-write','reason','dryRun','command','risk','confirm','present','568iegDMh','yes','81846Trmbbk','3204wHSVux','result','presentation','execute','13rwZwno','2668464sOLGFw','AbortError','2324530gadceE','179GcERbh','signal','args','Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.'];a259_0x2128=function(){return _0x4b0f6b;};return a259_0x2128();}async function confirmWriteBeforeQueue(_0x45e7e6,_0x4bda10,_0x36fc23,_0x3e18ac){const _0x221d7d=a259_0x1627;if(_0x4bda10[_0x221d7d(0x1b7)]===!![]||_0x45e7e6['risk']!==_0x221d7d(0x1b1)&&_0x45e7e6['risk']!==_0x221d7d(0x1b5))return;await _0x3e18ac[_0x221d7d(0x1cc)][_0x221d7d(0x1ba)](buildRabetbaseConfirmationRequest(_0x45e7e6,_0x36fc23,_0x3e18ac[_0x221d7d(0x1c8)]));}function withAbortSignal(_0x3687c4,_0x29afb6){return{..._0x3687c4,async 'execute'(_0x16a03e){const _0x5333c4=a259_0x1627;return throwIfAborted(_0x29afb6),_0x3687c4[_0x5333c4(0x1c2)](_0x16a03e);}};}function a259_0x1627(_0x140a90,_0x39992c){_0x140a90=_0x140a90-0x1a5;const _0x21283c=a259_0x2128();let _0x1627b2=_0x21283c[_0x140a90];return _0x1627b2;}function throwIfAborted(_0x4ca1ee){const _0x230270=a259_0x1627;if(_0x4ca1ee?.[_0x230270(0x1b0)])throw _0x4ca1ee[_0x230270(0x1b6)]instanceof Error?_0x4ca1ee[_0x230270(0x1b6)]:new DOMException(_0x230270(0x1a6),_0x230270(0x1c5));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d0e23,_0x1f4ecb){const _0x30ddef=a260_0x39c9,_0x455657=_0x4d0e23();while(!![]){try{const _0x2b63d7=parseInt(_0x30ddef(0xf9))/0x1+-parseInt(_0x30ddef(0xf5))/0x2+parseInt(_0x30ddef(0xf8))/0x3*(parseInt(_0x30ddef(0xf4))/0x4)+parseInt(_0x30ddef(0xf7))/0x5+-parseInt(_0x30ddef(0xf3))/0x6+-parseInt(_0x30ddef(0xfa))/0x7+-parseInt(_0x30ddef(0xf6))/0x8;if(_0x2b63d7===_0x1f4ecb)break;else _0x455657['push'](_0x455657['shift']());}catch(_0x5ad41b){_0x455657['push'](_0x455657['shift']());}}}(a260_0x6d40,0x641c2));let tail=Promise['resolve']();export async function runSerialized(_0x23741a){const _0x96df43=a260_0x39c9,_0x11b0a0=tail;let _0x5527af;tail=new Promise(_0x6bc4f4=>{_0x5527af=_0x6bc4f4;}),await _0x11b0a0[_0x96df43(0xf2)](()=>undefined);try{return await _0x23741a();}finally{_0x5527af();}}function a260_0x39c9(_0x2ea47f,_0x47503f){_0x2ea47f=_0x2ea47f-0xf2;const _0x6d40e8=a260_0x6d40();let _0x39c93e=_0x6d40e8[_0x2ea47f];return _0x39c93e;}function a260_0x6d40(){const _0x456d3d=['117xwwbwX','387779EsSvsB','3114160YEqnNR','catch','1317720QfpPMu','75968LxnWSe','1270640GHHiyQ','855264YgnKWd','3441555LZLnZZ'];a260_0x6d40=function(){return _0x456d3d;};return a260_0x6d40();}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x346bd4,_0x5299d0){const _0x19bd63=a261_0x1f6b,_0x589b30=_0x346bd4();while(!![]){try{const _0x20024f=-parseInt(_0x19bd63(0x1d1))/0x1+-parseInt(_0x19bd63(0x1ca))/0x2*(-parseInt(_0x19bd63(0x1d5))/0x3)+-parseInt(_0x19bd63(0x1c8))/0x4*(-parseInt(_0x19bd63(0x1d2))/0x5)+-parseInt(_0x19bd63(0x1c4))/0x6+parseInt(_0x19bd63(0x1cc))/0x7*(parseInt(_0x19bd63(0x1d7))/0x8)+parseInt(_0x19bd63(0x1ce))/0x9+parseInt(_0x19bd63(0x1c6))/0xa*(parseInt(_0x19bd63(0x1c5))/0xb);if(_0x20024f===_0x5299d0)break;else _0x589b30['push'](_0x589b30['shift']());}catch(_0x5b3ffc){_0x589b30['push'](_0x589b30['shift']());}}}(a261_0x1219,0x5da56));function a261_0x1f6b(_0x57fc53,_0x3aab74){_0x57fc53=_0x57fc53-0x1c4;const _0x121966=a261_0x1219();let _0x1f6bb5=_0x121966[_0x57fc53];return _0x1f6bb5;}function a261_0x1219(){const _0x4ff033=['Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','309611NNduYS','40YZWOqn','run','defaultCommand','6cPQXpA','hint','8BnGAaX','wildcardDef','unknownCommand','2670354Fsxfln','22smiDlb','983470ucmbEf','validation','39860CYqDMZ','message','671712aOfJmX','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','182420ipqoke','input','1476522xPCILn'];a261_0x1219=function(){return _0x4ff033;};return a261_0x1219();}import a261_0xc5f6ec from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveRabetbaseInvocation(_0x4a85cc){const _0x14e35c=a261_0x1f6b,_0x40596a=a261_0xc5f6ec('',{'importMeta':import.meta,'argv':[..._0x4a85cc],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x10252c=[..._0x40596a[_0x14e35c(0x1cd)]],_0xa8c790=_0x40596a['flags'],_0x404249=_0x10252c[0x0];if(!_0x404249)throw CliErrors[_0x14e35c(0x1c7)](_0x14e35c(0x1cf));const _0x54b7c7=resolveRemovedCommand(_0x404249,_0x10252c[0x1]);if(_0x54b7c7)throw CliErrors[_0x14e35c(0x1c7)](_0x54b7c7[_0x14e35c(0x1c9)],_0x54b7c7[_0x14e35c(0x1d6)]);if(_0x404249===_0x14e35c(0x1d3))throw CliErrors[_0x14e35c(0x1c7)](_0x14e35c(0x1cb),'Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.');if(!isKnownService(_0x404249))throw CliErrors[_0x14e35c(0x1d9)](_0x10252c['join']('\x20'));const _0x5a3928=getServiceEntry(_0x404249),_0x4be9cd=_0x10252c[0x1],_0x37e7ee=_0x4be9cd||_0x5a3928[_0x14e35c(0x1d4)];if(!_0x37e7ee){if(_0x5a3928[_0x14e35c(0x1d8)])return{'definition':_0x5a3928[_0x14e35c(0x1d8)],'rawFlags':_0xa8c790,'args':[]};throw CliErrors[_0x14e35c(0x1c7)](_0x14e35c(0x1d0)+_0x404249+'\x22.');}const _0x40e068=findDefinition(_0x404249,_0x37e7ee);if(_0x40e068)return{'definition':_0x40e068,'rawFlags':_0xa8c790,'args':_0x10252c['slice'](0x2)};if(_0x5a3928[_0x14e35c(0x1d8)])return{'definition':_0x5a3928[_0x14e35c(0x1d8)],'rawFlags':_0xa8c790,'args':[_0x37e7ee,..._0x10252c['slice'](0x2)]};throw CliErrors[_0x14e35c(0x1d9)](_0x404249+'\x20'+_0x37e7ee);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a263_0x3da00c=a263_0x3582;(function(_0x2046c0,_0x4ef474){const _0x5074ee=a263_0x3582,_0x23b815=_0x2046c0();while(!![]){try{const _0x1b4ddb=parseInt(_0x5074ee(0xbf))/0x1+-parseInt(_0x5074ee(0xc7))/0x2*(parseInt(_0x5074ee(0xaf))/0x3)+parseInt(_0x5074ee(0xc8))/0x4*(-parseInt(_0x5074ee(0xd5))/0x5)+-parseInt(_0x5074ee(0xbb))/0x6*(parseInt(_0x5074ee(0xa4))/0x7)+parseInt(_0x5074ee(0xb0))/0x8+parseInt(_0x5074ee(0xa0))/0x9+parseInt(_0x5074ee(0xb3))/0xa;if(_0x1b4ddb===_0x4ef474)break;else _0x23b815['push'](_0x23b815['shift']());}catch(_0x4dbab6){_0x23b815['push'](_0x23b815['shift']());}}}(a263_0x1981,0x8a8a4));function a263_0x3582(_0x2b1ecf,_0x12f374){_0x2b1ecf=_0x2b1ecf-0x9d;const _0x198150=a263_0x1981();let _0x35827b=_0x198150[_0x2b1ecf];return _0x35827b;}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{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=a263_0x3da00c(0xa7),SKILL_NAME=a263_0x3da00c(0xd7);function frontmatterValue(_0x201c67,_0x17af2b){const _0x46d103=a263_0x3da00c;return _0x201c67[_0x46d103(0xc9)](new RegExp('^'+_0x17af2b+_0x46d103(0xcd),'m'))?.[0x1]?.[_0x46d103(0xcf)]()??'';}function listFiles(_0x2edf16,_0x3c106a=_0x2edf16){const _0x20415a=a263_0x3da00c;return readdirSync(_0x3c106a,{'withFileTypes':!![]})['flatMap'](_0x35973c=>{const _0x20ec5b=a263_0x3582,_0x31cb04=join(_0x3c106a,_0x35973c[_0x20ec5b(0xa1)]),_0x5cd4ca=lstatSync(_0x31cb04);if(_0x5cd4ca[_0x20ec5b(0xa8)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0x31cb04);if(_0x5cd4ca['isDirectory']())return listFiles(_0x2edf16,_0x31cb04);if(!_0x5cd4ca[_0x20ec5b(0xb4)]())throw new Error(_0x20ec5b(0xad)+_0x31cb04);return[relative(_0x2edf16,_0x31cb04)['split'](sep)['join']('/')];})[_0x20415a(0x9d)]((_0x1a645b,_0x7ce8d8)=>_0x1a645b<_0x7ce8d8?-0x1:_0x1a645b>_0x7ce8d8?0x1:0x0);}function digestFiles(_0x53728b,_0x4047f8){const _0x4fa0ed=a263_0x3da00c,_0x2b12d9=createHash(_0x4fa0ed(0xd8));for(const _0xe20e48 of _0x4047f8){if(_0xe20e48[_0x4fa0ed(0xab)]('/')||_0xe20e48[_0x4fa0ed(0xce)]('/')[_0x4fa0ed(0xa9)]('..')||_0xe20e48[_0x4fa0ed(0xa9)]('\x5c'))throw new Error(_0x4fa0ed(0xd4)+_0xe20e48);_0x2b12d9['update'](_0xe20e48),_0x2b12d9[_0x4fa0ed(0xa3)]('\x00'),_0x2b12d9[_0x4fa0ed(0xa3)](readFileSync(join(_0x53728b,..._0xe20e48[_0x4fa0ed(0xce)]('/')))),_0x2b12d9[_0x4fa0ed(0xa3)]('\x00');}return _0x2b12d9[_0x4fa0ed(0xd0)](_0x4fa0ed(0xae));}function sameFiles(_0x4c4fde,_0x340e32){const _0x159b0b=a263_0x3da00c;return _0x4c4fde['length']===_0x340e32[_0x159b0b(0xb1)]&&_0x4c4fde['every']((_0x55fb66,_0x329021)=>_0x55fb66===_0x340e32[_0x329021]);}function a263_0x1981(){const _0x449738=['startsWith','skipped','Unsupported\x20Skill\x20entry:\x20','hex','131244NDGnxS','345776GbrzwA','length','version','8301800yfRUMm','isFile','home','message','reason','utf8','version_mismatch','schemaVersion','153030DzGeYF','rabetbase.manifest.json','packageRoot','current','612447UyflQe','parse','skills','Installed\x20Skill\x20state\x20is\x20','unknown','manifest','SOURCE_INVALID','root','28XHXmoc','79620QsZVHh','match','path','missing','unverifiable',':\x5cs*(.+)$','split','trim','digest','packageVersion','state','skillVersion','Unsafe\x20manifest\x20path:\x20','245WySbOi','present','rabetbase','sha256','sort','VERIFY_FAILED','SKILL.md','6483942PeJYxT','name','pipe','update','14FIqTrb','installedPath','error','rabetbase\x20cli-skill\x20install','isSymbolicLink','includes','files'];a263_0x1981=function(){return _0x449738;};return a263_0x1981();}function readSource(_0x2e9303){const _0x306a94=a263_0x3da00c,_0x55615f=JSON[_0x306a94(0xc0)](readFileSync(join(_0x2e9303,'package.json'),_0x306a94(0xb8))),_0x1793bf=JSON[_0x306a94(0xc0)](readFileSync(join(_0x2e9303,_0x306a94(0xc1),_0x306a94(0xbc)),'utf8')),_0x496193=join(_0x2e9303,'skills',SKILL_NAME),_0xe3f1fa=frontmatterValue(readFileSync(join(_0x496193,'SKILL.md'),_0x306a94(0xb8)),_0x306a94(0xb2)),_0x417955=listFiles(_0x496193);if(_0x1793bf[_0x306a94(0xba)]!==0x1||_0x1793bf[_0x306a94(0xa1)]!==SKILL_NAME||!_0x55615f['version']||_0x1793bf[_0x306a94(0xd1)]!==_0x55615f[_0x306a94(0xb2)]||_0x1793bf[_0x306a94(0xd3)]!==_0x55615f['version']||_0xe3f1fa!==_0x55615f[_0x306a94(0xb2)]||!sameFiles(_0x417955,_0x1793bf[_0x306a94(0xaa)])||digestFiles(_0x496193,_0x417955)!==_0x1793bf[_0x306a94(0xd0)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x55615f[_0x306a94(0xb2)],'skillVersion':_0xe3f1fa,'root':_0x496193,'manifest':_0x1793bf};}function installedSkillPath(_0x4d4c2f){const _0x20a988=a263_0x3da00c,_0x5e8995=resolveInstalledSkill(SKILL_NAME,{'home':_0x4d4c2f});if(_0x5e8995['state']===_0x20a988(0xd6))return{'state':_0x20a988(0xd6),'path':dirname(_0x5e8995['path'])};if(_0x5e8995[_0x20a988(0xd2)]==='absent')return{'state':_0x20a988(0xcb)};return{'state':_0x20a988(0xcc),'reason':_0x5e8995[_0x20a988(0xb7)]};}export function inspectInstalledBuiltinSkillVersion(_0xa4d9a3,_0x60e76b={}){const _0x33b7a9=a263_0x3da00c,_0x58d2cf=installedSkillPath(_0x60e76b[_0x33b7a9(0xb5)]??homedir());if(_0x58d2cf[_0x33b7a9(0xd2)]===_0x33b7a9(0xcb))return{'state':_0x33b7a9(0xcb),'expectedVersion':_0xa4d9a3,'repairCommand':REPAIR_COMMAND};if(_0x58d2cf['state']===_0x33b7a9(0xcc))return{'state':'unverifiable','expectedVersion':_0xa4d9a3,'reason':_0x58d2cf['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x4e82e8=frontmatterValue(readFileSync(join(_0x58d2cf[_0x33b7a9(0xca)],'SKILL.md'),'utf8'),_0x33b7a9(0xb2));return{'state':_0x4e82e8===_0xa4d9a3?_0x33b7a9(0xbe):_0x33b7a9(0xb9),'expectedVersion':_0xa4d9a3,'skillVersion':_0x4e82e8,'installedPath':_0x58d2cf[_0x33b7a9(0xca)],'repairCommand':REPAIR_COMMAND};}catch(_0x2539bb){return{'state':_0x33b7a9(0xcc),'expectedVersion':_0xa4d9a3,'installedPath':_0x58d2cf[_0x33b7a9(0xca)],'reason':_0x2539bb instanceof Error?_0x2539bb['message']:String(_0x2539bb),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x14506a={}){const _0x586c17=a263_0x3da00c,_0x384f64=_0x14506a[_0x586c17(0xbd)]??DEFAULT_PACKAGE_ROOT;let _0x3e4d22;try{_0x3e4d22=readSource(_0x384f64);}catch(_0x570138){return{'state':'unverifiable','packageVersion':_0x586c17(0xc3),'reason':_0x570138 instanceof Error?_0x570138[_0x586c17(0xb6)]:String(_0x570138),'repairCommand':REPAIR_COMMAND};}const _0x4a31a3=installedSkillPath(_0x14506a[_0x586c17(0xb5)]??homedir());if(_0x4a31a3['state']==='missing')return{'state':_0x586c17(0xcb),'packageVersion':_0x3e4d22[_0x586c17(0xd1)],'repairCommand':REPAIR_COMMAND};if(_0x4a31a3[_0x586c17(0xd2)]===_0x586c17(0xcc))return{'state':_0x586c17(0xcc),'packageVersion':_0x3e4d22[_0x586c17(0xd1)],'reason':_0x4a31a3['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x26b096=frontmatterValue(readFileSync(join(_0x4a31a3[_0x586c17(0xca)],_0x586c17(0x9f)),'utf8'),_0x586c17(0xb2));if(_0x26b096!==_0x3e4d22[_0x586c17(0xd3)])return{'state':_0x586c17(0xb9),'packageVersion':_0x3e4d22[_0x586c17(0xd1)],'skillVersion':_0x26b096,'installedPath':_0x4a31a3[_0x586c17(0xca)],'repairCommand':REPAIR_COMMAND};const _0x53d524=listFiles(_0x4a31a3[_0x586c17(0xca)]),_0x4969a0=digestFiles(_0x4a31a3[_0x586c17(0xca)],_0x53d524);return{'state':sameFiles(_0x53d524,_0x3e4d22[_0x586c17(0xc4)][_0x586c17(0xaa)])&&_0x4969a0===_0x3e4d22[_0x586c17(0xc4)][_0x586c17(0xd0)]?_0x586c17(0xbe):'content_mismatch','packageVersion':_0x3e4d22[_0x586c17(0xd1)],'skillVersion':_0x26b096,'installedPath':_0x4a31a3[_0x586c17(0xca)],'digest':_0x4969a0,'repairCommand':REPAIR_COMMAND};}catch(_0x14cfd2){return{'state':_0x586c17(0xcc),'packageVersion':_0x3e4d22[_0x586c17(0xd1)],'installedPath':_0x4a31a3[_0x586c17(0xca)],'reason':_0x14cfd2 instanceof Error?_0x14cfd2[_0x586c17(0xb6)]:String(_0x14cfd2),'repairCommand':REPAIR_COMMAND};}}function failure(_0x5bd1e3,_0x44e200,_0x167246,_0x165667){const _0x462466=a263_0x3da00c;return{'ok':![],'code':_0x5bd1e3,'packageVersion':_0x44e200[_0x462466(0xd1)],'skillVersion':_0x44e200[_0x462466(0xd3)],'installedPath':_0x165667,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x167246 instanceof Error?_0x167246[_0x462466(0xb6)]:String(_0x167246)};}export function installBuiltinSkill(_0x111b8b={}){const _0x686515=a263_0x3da00c,_0xc373f2=_0x111b8b[_0x686515(0xbd)]??DEFAULT_PACKAGE_ROOT,_0x36d51c=_0x111b8b[_0x686515(0xb5)]??homedir();let _0x42c907;try{_0x42c907=readSource(_0xc373f2);}catch(_0x520cbe){return failure(_0x686515(0xc5),{'packageVersion':'unknown','skillVersion':'unknown'},_0x520cbe);}const _0x116e60=inspectBuiltinSkill({'packageRoot':_0xc373f2,'home':_0x36d51c}),_0xb04cd6=runNpxSkillsAddGlobal(_0xc373f2,_0x42c907[_0x686515(0xc6)],{'stdio':_0x111b8b['stdio']??_0x686515(0xa2),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x36d51c}});if(_0xb04cd6[_0x686515(0xac)])return{'ok':!![],'packageVersion':_0x42c907['packageVersion'],'skillVersion':_0x42c907[_0x686515(0xd3)],'installedPath':_0x116e60[_0x686515(0xa5)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0xb04cd6['ok'])return failure('INSTALL_FAILED',_0x42c907,_0xb04cd6[_0x686515(0xa6)]??'skills@latest\x20exited\x20'+_0xb04cd6['status']);const _0x242573=inspectBuiltinSkill({'packageRoot':_0xc373f2,'home':_0x36d51c});if(_0x242573[_0x686515(0xd2)]!=='current')return failure(_0x686515(0x9e),_0x42c907,_0x242573['reason']??_0x686515(0xc2)+_0x242573[_0x686515(0xd2)],_0x242573[_0x686515(0xa5)]);return{'ok':!![],'packageVersion':_0x42c907[_0x686515(0xd1)],'skillVersion':_0x42c907[_0x686515(0xd3)],'installedPath':_0x242573[_0x686515(0xa5)],'changed':_0x116e60[_0x686515(0xd2)]!==_0x686515(0xbe),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36e351,_0x3b6232){const _0x568b1f=a264_0xe01e,_0x2cfa0d=_0x36e351();while(!![]){try{const _0x5f0c91=parseInt(_0x568b1f(0xf7))/0x1+parseInt(_0x568b1f(0x109))/0x2*(-parseInt(_0x568b1f(0xe8))/0x3)+-parseInt(_0x568b1f(0x100))/0x4*(-parseInt(_0x568b1f(0xe9))/0x5)+-parseInt(_0x568b1f(0xf6))/0x6+-parseInt(_0x568b1f(0x10a))/0x7+-parseInt(_0x568b1f(0xfd))/0x8*(parseInt(_0x568b1f(0xf5))/0x9)+parseInt(_0x568b1f(0xea))/0xa*(parseInt(_0x568b1f(0x10b))/0xb);if(_0x5f0c91===_0x3b6232)break;else _0x2cfa0d['push'](_0x2cfa0d['shift']());}catch(_0x1311ee){_0x2cfa0d['push'](_0x2cfa0d['shift']());}}}(a264_0x3503,0x5b86e));import{logger}from'../utils/logger.js';function a264_0xe01e(_0x4c1aa5,_0x5674d9){_0x4c1aa5=_0x4c1aa5-0xe6;const _0x3503d6=a264_0x3503();let _0xe01ef4=_0x3503d6[_0x4c1aa5];return _0xe01ef4;}import{CLI_BIN_NAME}from'../constant/cli.js';function a264_0x3503(){const _0x42c99f=['cwd','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','271058yuHzUb','1569127CWvKJs','2149477ehczSL','add','skill','from','9kXowIw','16820tHdvEh','30HlukEI','length','push','--help','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','slice','help','includes','\x0aAvailable\x20commands:','-$1','startsWith','4851pNjfhE','1306308uLsefp','693680qaUAWu','Public\x20Open\x20Skill\x20source:\x20','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','Error:\x20Unsupported\x20command:\x20','has','replace','1688XWQDXI','argv','log','68vTqBVH','enable-bff-save','entries','setLogPath','exit','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','error'];a264_0x3503=function(){return _0x42c99f;};return a264_0x3503();}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x41ddf5){const _0x57f672=a264_0xe01e,_0x45fd76=[];for(const [_0x328d0e,_0x5b4373]of Object[_0x57f672(0x102)](_0x41ddf5)){if(_0x5b4373===!![]){const _0x235ac6=_0x328d0e[_0x57f672(0xfc)](/([A-Z])/g,_0x57f672(0xf3))['toLowerCase']();_0x45fd76[_0x57f672(0xec)](_0x235ac6);}}return _0x45fd76;}export function parseDynamicFlags(){const _0x4d5458=a264_0xe01e,_0x2ca62f=[];for(let _0x358a4e=0x3;_0x358a4e<process[_0x4d5458(0xfe)][_0x4d5458(0xeb)];_0x358a4e++){const _0x586fc2=process[_0x4d5458(0xfe)][_0x358a4e];if(_0x586fc2&&_0x586fc2[_0x4d5458(0xf4)]('--')){const _0x7d5870=_0x586fc2[_0x4d5458(0xef)](0x2);_0x7d5870&&!_0x7d5870[_0x4d5458(0xf1)]('=')&&_0x2ca62f[_0x4d5458(0xec)](_0x7d5870);}}return _0x2ca62f;}export function getAllProvidedFlags(_0x110d78){const _0x213c43=a264_0xe01e,_0x233850=camelCaseFlagsToKebab(_0x110d78),_0x137ad3=parseDynamicFlags(),_0x67ee6=new Set([..._0x233850,..._0x137ad3]);return Array[_0x213c43(0xe7)](_0x67ee6);}export function normalizeLegacyBffSaveFlags(_0x545f7e){const _0xc81114=a264_0xe01e,_0x2ce72c=new Set(_0x545f7e);return _0x2ce72c[_0xc81114(0xfb)]('dangerously-bff-save')&&_0x2ce72c[_0xc81114(0x10c)](_0xc81114(0x101)),Array[_0xc81114(0xe7)](_0x2ce72c);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x27b837,_0x1f774b,_0x243347){const _0x3b0b57=a264_0xe01e;logger[_0x3b0b57(0x103)](process[_0x3b0b57(0x107)]());if(_0x243347?.[_0x3b0b57(0xf0)]||_0x27b837===_0x3b0b57(0xed)){showHelp();return;}console[_0x3b0b57(0x106)](_0x3b0b57(0xfa)+(_0x27b837||'(empty)')),console[_0x3b0b57(0xff)](_0x3b0b57(0xf2)),console[_0x3b0b57(0xff)]('\x20\x20'+CLI_BIN_NAME+_0x3b0b57(0x108)),console['log'](''),console[_0x3b0b57(0xff)](_0x3b0b57(0xf8)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x3b0b57(0x106)](_0x3b0b57(0xe6),'不支持的命令:\x20'+_0x27b837),process[_0x3b0b57(0x104)](0x1);}function showHelp(){const _0x549538=a264_0xe01e;console[_0x549538(0xff)](_0x549538(0xee)+CLI_BIN_NAME+_0x549538(0x105)+SKILLS_INSTALL_COMMAND_LINE+_0x549538(0xf9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a265_0x4f5347=a265_0x43f1;(function(_0x4118d2,_0x474c6b){const _0x857e25=a265_0x43f1,_0x24bdf5=_0x4118d2();while(!![]){try{const _0x5928c6=-parseInt(_0x857e25(0x1ce))/0x1*(-parseInt(_0x857e25(0x1c6))/0x2)+-parseInt(_0x857e25(0x1c4))/0x3*(parseInt(_0x857e25(0x201))/0x4)+parseInt(_0x857e25(0x1e4))/0x5*(-parseInt(_0x857e25(0x1c9))/0x6)+parseInt(_0x857e25(0x1ef))/0x7*(parseInt(_0x857e25(0x1f0))/0x8)+parseInt(_0x857e25(0x202))/0x9*(parseInt(_0x857e25(0x1f5))/0xa)+parseInt(_0x857e25(0x1f3))/0xb*(parseInt(_0x857e25(0x1c5))/0xc)+parseInt(_0x857e25(0x1e9))/0xd*(-parseInt(_0x857e25(0x1f4))/0xe);if(_0x5928c6===_0x474c6b)break;else _0x24bdf5['push'](_0x24bdf5['shift']());}catch(_0x15ba84){_0x24bdf5['push'](_0x24bdf5['shift']());}}}(a265_0x581f,0xf09a4));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI='skills@latest';export const NPX_SKILLS_SUBCOMMAND_ADD=a265_0x4f5347(0x1e5);export const NPX_SKILLS_FLAG_SKILL=a265_0x4f5347(0x1d1);export const RABETBASE_SKILL_SOURCE=a265_0x4f5347(0x1f8);export const LEGACY_RABETBASE_SKILL_SOURCE=a265_0x4f5347(0x1d7);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export const RABETBASE_GLOBAL_SKILL_NAME=a265_0x4f5347(0x1ca);export const RABETBASE_SKILL_GIT_SOURCE=a265_0x4f5347(0x1e2);export function resolveGlobalSkillName(_0x5a3496){switch(_0x5a3496['trim']()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x3a379a){const _0x117720=a265_0x4f5347,_0x83f925=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x3a379a&&_0x83f925[_0x117720(0x1d5)](NPX_SKILLS_FLAG_SKILL,_0x3a379a),_0x83f925;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a265_0x4f5347(0x1d3),...buildNpxSkillsAddArgv()][a265_0x4f5347(0x1e8)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a265_0x4f5347(0x1d3),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a265_0x4f5347(0x1e8)]('\x20');function a265_0x581f(){const _0x5073ac=['error','EACCES','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','unverifiable','166610LWWoce','add','signal','SKILL_NOT_INSTALLED','join','24089frqcjc','presence','present','exit\x20','inherit','match','8743vJMaBj','8XoKNif','PERMISSION_DENIED','stderr','1089xEwedy','13286xcnBQe','30svUnap','trim','NPM_CONFIG_GLOBAL','lovrabet/rabetbase','warn','ENOENT','code','npm_config_global','expectedSkillName','reason','toString','EPERM','434524LppqSW','974367irXehx','INSTALL_PARTIAL','pipe','NPX_NOT_FOUND','15cvdSRx','214284YJeWHv','78zWzPGO','CHILD_EXIT_NONZERO','stdout','60BQUWNQ','rabetbase','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','skill','npx\x20terminated\x20by\x20signal\x20','39141oTgZCt','\x22\x20install\x20state:\x20','\x20failed\x20target(s)','--skill','Skill\x20\x22','npx','checked','push','log','lovrabet/lovrabet-skill','state','stdio','message','status','remove','Installer\x20reported\x20','CHILD_TERMINATED','filter'];a265_0x581f=function(){return _0x5073ac;};return a265_0x581f();}const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0xbbb4d5,_0x15ea53,_0xa41e05){return{'ok':![],'status':_0x15ea53,'code':_0xbbb4d5,'error':'['+_0xbbb4d5+']\x20'+_0xa41e05};}function a265_0x43f1(_0x5dbf4b,_0x26ff4a){_0x5dbf4b=_0x5dbf4b-0x1c3;const _0x581f34=a265_0x581f();let _0x43f144=_0x581f34[_0x5dbf4b];return _0x43f144;}function spawnOptions(_0x5c54d7,_0x90e330){const _0x2283cd=a265_0x4f5347,_0x482a35={...process.env};return delete _0x482a35[_0x2283cd(0x1fc)],delete _0x482a35[_0x2283cd(0x1f7)],{'cwd':_0x5c54d7,'stdio':_0x90e330,'env':_0x482a35,'shell':![],..._0x90e330===_0x2283cd(0x204)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x3d2bb8,_0x3c4c37,_0x499540,_0x18ff28){const _0x23e448=a265_0x4f5347,_0x46260d=[_0x3d2bb8[_0x23e448(0x1c8)]?_0x3d2bb8['stdout'][_0x23e448(0x1ff)]():'',_0x3d2bb8['stderr']?_0x3d2bb8[_0x23e448(0x1f2)][_0x23e448(0x1ff)]():''][_0x23e448(0x1df)](Boolean)[_0x23e448(0x1e8)]('\x0a')[_0x23e448(0x1f6)]();_0x18ff28!==_0x23e448(0x204)&&_0x46260d&&console[_0x23e448(0x1d6)](_0x46260d);if(_0x3d2bb8['error']){const _0x41811a=_0x3d2bb8[_0x23e448(0x1e0)],_0x1b5d1c=_0x41811a[_0x23e448(0x1fb)]===_0x23e448(0x1fa)?_0x23e448(0x1c3):_0x41811a[_0x23e448(0x1fb)]===_0x23e448(0x200)||_0x41811a[_0x23e448(0x1fb)]===_0x23e448(0x1e1)?_0x23e448(0x1f1):'SPAWN_FAILED';return failure(_0x1b5d1c,_0x3d2bb8[_0x23e448(0x1db)],_0x41811a[_0x23e448(0x1da)]);}if(_0x3d2bb8[_0x23e448(0x1e6)])return failure(_0x23e448(0x1de),_0x3d2bb8[_0x23e448(0x1db)],_0x23e448(0x1cd)+_0x3d2bb8[_0x23e448(0x1e6)]);if(_0x3d2bb8[_0x23e448(0x1db)]!==0x0)return failure(_0x23e448(0x1c7),_0x3d2bb8[_0x23e448(0x1db)],_0x46260d||_0x23e448(0x1ec)+(_0x3d2bb8[_0x23e448(0x1db)]??'unknown'));const _0x1f47bb=_0x3c4c37?resolveInstalledSkill(_0x3c4c37,_0x499540):undefined,_0x440a04=_0x46260d[_0x23e448(0x1ee)](/Failed to install\s+(\d+)/i);if(_0x440a04&&Number(_0x440a04[0x1])>0x0){const _0x1fee49=_0x23e448(0x1dd)+_0x440a04[0x1]+_0x23e448(0x1d0)+(_0x46260d?':\x0a'+_0x46260d:'');if(_0x1f47bb?.['state']===_0x23e448(0x1eb))return console[_0x23e448(0x1f9)]('!\x20'+_0x1fee49),{'ok':!![],'status':0x0};return failure(_0x23e448(0x203),0x0,_0x1fee49);}if(_0x1f47bb){if(_0x1f47bb[_0x23e448(0x1d8)]==='absent')return failure(_0x23e448(0x1e7),0x0,_0x23e448(0x1d2)+_0x3c4c37+_0x23e448(0x1cb)+_0x1f47bb[_0x23e448(0x1d4)]['join'](',\x20')+')');_0x1f47bb[_0x23e448(0x1d8)]===_0x23e448(0x1e3)&&console[_0x23e448(0x1f9)]('!\x20Could\x20not\x20verify\x20\x22'+_0x3c4c37+_0x23e448(0x1cf)+_0x1f47bb[_0x23e448(0x1fe)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x3be8cd,_0x3eb083){const _0x33e8a1=a265_0x4f5347;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1e4f68=_0x3eb083?.[_0x33e8a1(0x1d9)]??'inherit',_0xe948b5=resolveNpmBin('npx'),_0x434b16=buildNpxSkillsAddArgv(_0x3eb083?.['skill']),_0x2e637d=[_0x33e8a1(0x1d3),..._0x434b16][_0x33e8a1(0x1e8)]('\x20');console[_0x33e8a1(0x1d6)]('*\x20'+_0x2e637d);const _0x1755f3=spawnSync(_0xe948b5,_0x434b16,spawnOptions(_0x3be8cd,_0x1e4f68));return normalizeSpawnResult(_0x1755f3,undefined,undefined,_0x1e4f68);}export function runNpxSkillsRemove(_0x3302ea,_0x1b90f1,_0x584e36=LEGACY_RABETBASE_SKILL_SOURCE){const _0x5221a2=a265_0x4f5347;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x534433=_0x1b90f1?.['stdio']??_0x5221a2(0x1ed),_0xad14ae=resolveNpmBin('npx'),_0x1ffa82=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x5221a2(0x1dc),_0x584e36,NPX_SKILLS_FLAG_SKILL,_0x1b90f1?.[_0x5221a2(0x1cc)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x1b90f1?.['yes']?['-y']:[]],_0x346706=[_0xad14ae,..._0x1ffa82][_0x5221a2(0x1e8)]('\x20');console[_0x5221a2(0x1d6)]('*\x20'+_0x346706);const _0x2105cb=spawnSync(_0xad14ae,_0x1ffa82,spawnOptions(_0x3302ea,_0x534433));return normalizeSpawnResult(_0x2105cb,undefined,undefined,_0x534433);}export function runNpxSkillsAddGlobal(_0x3749b7,_0x53a4d5,_0x4689a0){const _0x675183=a265_0x4f5347;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5a2e7b=resolveNpmBin(_0x675183(0x1d3)),_0x5e9c99=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x53a4d5,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x23e9fc=[_0x675183(0x1d3),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x53a4d5,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');console['log']('*\x20'+_0x23e9fc);const _0x523863=spawnSync(_0x5a2e7b,_0x5e9c99,spawnOptions(_0x3749b7,_0x675183(0x204)));return normalizeSpawnResult(_0x523863,_0x4689a0?.[_0x675183(0x1fd)]??resolveGlobalSkillName(_0x53a4d5),_0x4689a0?.[_0x675183(0x1ea)],_0x4689a0?.[_0x675183(0x1d9)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a266_0x25042c=a266_0x908e;(function(_0x197d0d,_0x1f6dd2){const _0x39fb2e=a266_0x908e,_0x467e7f=_0x197d0d();while(!![]){try{const _0x673f62=parseInt(_0x39fb2e(0x16f))/0x1*(parseInt(_0x39fb2e(0x164))/0x2)+-parseInt(_0x39fb2e(0x16b))/0x3*(-parseInt(_0x39fb2e(0x16a))/0x4)+parseInt(_0x39fb2e(0x17a))/0x5*(parseInt(_0x39fb2e(0x16c))/0x6)+-parseInt(_0x39fb2e(0x17f))/0x7+parseInt(_0x39fb2e(0x167))/0x8+parseInt(_0x39fb2e(0x17c))/0x9+-parseInt(_0x39fb2e(0x17d))/0xa;if(_0x673f62===_0x1f6dd2)break;else _0x467e7f['push'](_0x467e7f['shift']());}catch(_0x23a0a2){_0x467e7f['push'](_0x467e7f['shift']());}}}(a266_0x9e93,0x2ad94));function a266_0x908e(_0x2d03e2,_0x140809){_0x2d03e2=_0x2d03e2-0x15b;const _0x9e935=a266_0x9e93();let _0x908e40=_0x9e935[_0x2d03e2];return _0x908e40;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a266_0x25042c(0x171),a266_0x25042c(0x162));function a266_0x9e93(){const _0x1b3efb=['4ABrRwl','254889JISFkQ','30EkDfuO','number','kind','3727yTQxzY','includes','.agents','\x20records\x20\x22','SKILL.md','join','version','\x20uses\x20unsupported\x20version\x20','absent','\x20has\x20no\x20skills\x20map','parse','242705ALZfkr','globalSkillsDirs','1098270sRbwQs','5177640UlxMQh','lockFile','243488JhhTrq','unusable','recorded','object','unverifiable','\x20is\x20unreadable:\x20','.claude','reason','skills','.skill-lock.json','present','52ViyzHl','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','home','1451648Sabbst','message','map'];a266_0x9e93=function(){return _0x1b3efb;};return a266_0x9e93();}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a266_0x25042c(0x171),a266_0x25042c(0x161)),join(a266_0x25042c(0x15f),a266_0x25042c(0x161))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x52d9da,_0x27d840){const _0x3a338f=a266_0x25042c;if(!existsSync(_0x52d9da))return{'kind':'not-recorded'};let _0x483b44;try{_0x483b44=JSON[_0x3a338f(0x179)](readFileSync(_0x52d9da,'utf8'));}catch(_0x38a5aa){return{'kind':_0x3a338f(0x180),'reason':_0x52d9da+_0x3a338f(0x15e)+_0x38a5aa[_0x3a338f(0x168)]};}const _0x354598=_0x483b44;if(typeof _0x354598?.[_0x3a338f(0x175)]!==_0x3a338f(0x16d)||!SUPPORTED_LOCK_VERSIONS[_0x3a338f(0x170)](_0x354598['version']))return{'kind':'unusable','reason':_0x52d9da+_0x3a338f(0x176)+String(_0x354598?.[_0x3a338f(0x175)])};if(!_0x354598[_0x3a338f(0x161)]||typeof _0x354598[_0x3a338f(0x161)]!==_0x3a338f(0x15c))return{'kind':_0x3a338f(0x180),'reason':_0x52d9da+_0x3a338f(0x178)};return _0x354598[_0x3a338f(0x161)][_0x27d840]?{'kind':_0x3a338f(0x15b)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x453a63,_0x2ab39){const _0x198f33=a266_0x25042c,_0x2180c1=_0x2ab39?.[_0x198f33(0x166)]??homedir(),_0x3f7b2b=_0x2ab39?.[_0x198f33(0x17b)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x5b6be8=>join(_0x2180c1,_0x5b6be8)),_0x555301=_0x2ab39?.[_0x198f33(0x17e)]??join(_0x2180c1,SKILL_LOCK_RELATIVE_PATH),_0x4ca34f=_0x3f7b2b[_0x198f33(0x169)](_0x4ba658=>join(_0x4ba658,_0x453a63,_0x198f33(0x173))),_0x5a3320=_0x4ca34f['find'](_0x363983=>existsSync(_0x363983));if(_0x5a3320)return{'state':_0x198f33(0x163),'path':_0x5a3320};const _0x4f3bee=readLockLookup(_0x555301,_0x453a63);if(_0x4f3bee[_0x198f33(0x16e)]===_0x198f33(0x180))return{'state':_0x198f33(0x15d),'reason':_0x4f3bee[_0x198f33(0x160)]};if(_0x4f3bee[_0x198f33(0x16e)]===_0x198f33(0x15b))return{'state':_0x198f33(0x15d),'reason':_0x555301+_0x198f33(0x172)+_0x453a63+_0x198f33(0x165)+('('+_0x4ca34f[_0x198f33(0x174)](',\x20')+')')};return{'state':_0x198f33(0x177),'checked':_0x4ca34f};}
|