@lovrabet/rabetbase-cli 2.4.3-beta.1 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/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.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/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.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-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/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/react-custom-page-workflow.md +9 -3
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +13 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d76f6,_0x4425c3){const _0x6ff4d2=a247_0x32f2,_0x35466c=_0x3d76f6();while(!![]){try{const _0x4c7af9=parseInt(_0x6ff4d2(0xda))/0x1*(-parseInt(_0x6ff4d2(0xe5))/0x2)+-parseInt(_0x6ff4d2(0xd3))/0x3*(parseInt(_0x6ff4d2(0xd9))/0x4)+-parseInt(_0x6ff4d2(0xd5))/0x5*(-parseInt(_0x6ff4d2(0xe0))/0x6)+parseInt(_0x6ff4d2(0xe1))/0x7*(-parseInt(_0x6ff4d2(0xe8))/0x8)+-parseInt(_0x6ff4d2(0xeb))/0x9+parseInt(_0x6ff4d2(0xe7))/0xa+-parseInt(_0x6ff4d2(0xe3))/0xb*(-parseInt(_0x6ff4d2(0xe4))/0xc);if(_0x4c7af9===_0x4425c3)break;else _0x35466c['push'](_0x35466c['shift']());}catch(_0x45bc8f){_0x35466c['push'](_0x35466c['shift']());}}}(a247_0x3d9a,0xf24d9));import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';function a247_0x3d9a(){const _0x3b9ed5=['Unknown\x20alias\x20\x22','flags','19948MqvlDo','2722pjcVIx','\x20api\x20pull`\x20first.','Available\x20aliases:\x20','No\x20api.ts\x20found\x20in\x20','type','\x22.\x20','890394kAdFCV','28pvRfMk','string','879538YcGqnt','372jzVWdq','292RSmmmv','code','15516320ziFzjS','2255720aqFSZa','join','name','7162299vadwbd','alias','validation','`\x20requires\x20either\x20--code\x20or\x20--alias.','699PXvVFL','some','15FCjAEQ','map'];a247_0x3d9a=function(){return _0x3b9ed5;};return a247_0x3d9a();}function a247_0x32f2(_0x5ca6c8,_0x2cd7a8){_0x5ca6c8=_0x5ca6c8-0xd0;const _0x3d9a4b=a247_0x3d9a();let _0x32f210=_0x3d9a4b[_0x5ca6c8];return _0x32f210;}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x211822,_0x1f585c,_0x5b11da,_0xd970a7){const _0x354968=a247_0x32f2,_0x13ea61=_0x211822[_0x354968(0xd8)][_0x354968(0xd4)](_0x1194d1=>_0x1194d1[_0x354968(0xea)]===_0x354968(0xe6)&&_0x1194d1[_0x354968(0xde)]===_0x354968(0xe2)),_0x5edf4b=_0x211822[_0x354968(0xd8)][_0x354968(0xd4)](_0x111157=>_0x111157['name']==='alias'&&_0x111157[_0x354968(0xde)]===_0x354968(0xe2));if(!_0x13ea61||!_0x5edf4b)return;const _0x552810=_0x1f585c[_0x354968(0xe6)]?String(_0x1f585c[_0x354968(0xe6)]):'',_0xfceaae=_0x1f585c[_0x354968(0xd0)]?String(_0x1f585c[_0x354968(0xd0)]):'';if(!_0x552810&&!_0xfceaae)throw CliErrors[_0x354968(0xd1)]('`'+_0xd970a7+_0x354968(0xd2));if(_0xfceaae&&!_0x552810){const _0x184402=resolveAlias(_0x5b11da,_0xfceaae);if(!_0x184402){const _0x3815ce=listAliases(_0x5b11da)[_0x354968(0xd6)](_0x3b8925=>_0x3b8925[_0x354968(0xd0)]),_0x339d6f=_0x3815ce['length']?_0x354968(0xdc)+_0x3815ce[_0x354968(0xe9)](',\x20'):_0x354968(0xdd)+_0x5b11da+'.\x20Run\x20`'+CLI_BIN_NAME+_0x354968(0xdb);throw CliErrors['validation'](_0x354968(0xd7)+_0xfceaae+_0x354968(0xdf)+_0x339d6f);}_0x1f585c[_0x354968(0xe6)]=_0x184402;}}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3283e0,_0x352890){const _0x12ca5d=a248_0x20ff,_0x505552=_0x3283e0();while(!![]){try{const _0x50f1e2=-parseInt(_0x12ca5d(0x212))/0x1+parseInt(_0x12ca5d(0x228))/0x2+parseInt(_0x12ca5d(0x1e3))/0x3*(-parseInt(_0x12ca5d(0x1ff))/0x4)+-parseInt(_0x12ca5d(0x1e6))/0x5*(-parseInt(_0x12ca5d(0x209))/0x6)+parseInt(_0x12ca5d(0x224))/0x7+-parseInt(_0x12ca5d(0x220))/0x8+-parseInt(_0x12ca5d(0x200))/0x9*(-parseInt(_0x12ca5d(0x20f))/0xa);if(_0x50f1e2===_0x352890)break;else _0x505552['push'](_0x505552['shift']());}catch(_0x49e809){_0x505552['push'](_0x505552['shift']());}}}(a248_0x273f,0xa6440));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';function a248_0x273f(){const _0x3aea70=['update','appCode','map','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','confirmHighRisk','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','mergedCli','1513364KKdcLU','1048563besopx','value','../constant/env.js','rejectedFlags','validation','defaultVerbose','find','service','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','2022jaJVWN','production','none','LOVRABET_APPCODE','nonInteractive','configMissing','20MEyPxk','execute','appcode','851850wePwYt','Current\x20resolved\x20appcode\x20is\x20\x22','apiDir','string','object','selectedAppName','resolveAppCode','apps','catch','cancelled','rawFlags','all','requiresAppCode','Set\x20appcode\x20via\x20`','7401192nLAbAE','High-risk\x20operation\x20`','RABETBASE_APPCODE','resolve','8611932AMGHNo','currentApp','../core/api-client.js','../constant/domain.js','2184706UWRoJm','resolveCookie','trim','name','3tBZIuy','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','cookie','4165qmnALj','explicitAppName','required','format','formatOutput','message','_notice','includes','⚠\x20\x20High-risk\x20operation:\x20','schema','command','replace','filter','toUpperCase','hasFormat','doctor','riskLevel','defaultPageSize'];a248_0x273f=function(){return _0x3aea70;};return a248_0x273f();}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';function a248_0x20ff(_0x38972e,_0x1ab755){_0x38972e=_0x38972e-0x1e1;const _0x273f36=a248_0x273f();let _0x20ff74=_0x273f36[_0x38972e];return _0x20ff74;}import{isNonInteractive as a248_0x375e23}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x233c83){const _0x77fb8d=a248_0x20ff;return typeof _0x233c83===_0x77fb8d(0x215)&&_0x233c83[_0x77fb8d(0x1e1)]()?_0x233c83[_0x77fb8d(0x1e1)]():undefined;}function resolveEnvAppCode(){const _0x139d1a=a248_0x20ff,_0x1fff4b=stringFlag(process.env.RABETBASE_APPCODE);if(_0x1fff4b)return{'name':_0x139d1a(0x222),'value':_0x1fff4b};const _0x5d464e=stringFlag(process.env.LOVRABET_APPCODE);if(_0x5d464e)return{'name':_0x139d1a(0x20c),'value':_0x5d464e};return undefined;}function hasExplicitAppCode(_0x1e6848,_0x16972f){const _0x4424ce=a248_0x20ff;return!!(stringFlag(_0x1e6848['appcode'])||stringFlag(_0x16972f[_0x4424ce(0x211)]));}function assertEnvAppCodeNotIgnored(_0x4bc5c4,_0x35330b,_0x882309){const _0x386321=a248_0x20ff;if(!_0x35330b||_0x882309||_0x4bc5c4===_0x35330b['value'])return;const _0x5b0e15=_0x4bc5c4?_0x386321(0x213)+_0x4bc5c4+'\x22.':_0x386321(0x1e4);throw CliErrors['validation'](_0x35330b['name']+'='+_0x35330b[_0x386321(0x201)]+'\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20'+_0x5b0e15+'\x20'+(_0x386321(0x208)+_0x35330b[_0x386321(0x1e2)]+'\x22.'));}export function createPipelineEnv(_0xd2d1,_0x50d8f0,_0x3f4a7c=[]){const _0x5903af=a248_0x20ff;return{'rawFlags':_0x50d8f0,'args':_0x3f4a7c,'resolveAppCode':()=>_0xd2d1['appCode'],'resolveCookie':()=>_0xd2d1[_0x5903af(0x1e5)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a248_0x375e23(_0x50d8f0),'defaultFormat':_0xd2d1[_0x5903af(0x1e9)],'defaultPageSize':_0xd2d1['pageSize'],'defaultVerbose':_0xd2d1['verbose'],'apiDir':_0xd2d1[_0x5903af(0x214)],'riskLevel':_0xd2d1[_0x5903af(0x1f6)],'selectedAppName':_0xd2d1[_0x5903af(0x1e7)],'mergedCli':{'defaultApp':_0xd2d1['defaultApp'],'currentApp':_0xd2d1[_0x5903af(0x225)],'appCode':_0xd2d1[_0x5903af(0x1f9)],'apps':_0xd2d1[_0x5903af(0x219)]}};}export function createRabetbaseRunnerAdapter(_0x3de7be={}){const _0x52a309=a248_0x20ff;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x52a309(0x1f2)](_0x1d373f=>PIPELINE_FLAG_NAMES['has'](_0x1d373f[_0x52a309(0x1e2)]))[_0x52a309(0x1fa)](({name:_0x139f5d,type:_0x970db0,description:_0x2a5932})=>({'name':_0x139f5d,'type':_0x970db0,'description':_0x2a5932})),'formatOutput':_0x3de7be[_0x52a309(0x1ea)]??formatOutput,'getCommandLabel'(_0x207df0){const _0x5d69fe=_0x52a309;return CLI_BIN_NAME+'\x20'+_0x207df0[_0x5d69fe(0x207)]+'\x20'+_0x207df0[_0x5d69fe(0x1f0)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x484bc2){const _0x694bb2=_0x52a309;return CliErrors[_0x694bb2(0x204)](_0x484bc2);}},async 'prepare'(_0x368f2f,_0x28c5a4,_0x41a992,_0x2c1871){const _0xad4add=_0x52a309,_0x207e84=_0x28c5a4[_0xad4add(0x214)]||DEFAULT_API_DIR;resolveAliasToCode(_0x368f2f,_0x41a992,_0x207e84,_0x2c1871);const _0xf5ec83=resolveCommandAuthMode(_0x368f2f);let _0x31527c='';if(_0xf5ec83!==_0xad4add(0x20b)){_0x31527c=_0x28c5a4[_0xad4add(0x229)]()||'';if(!_0x31527c){if(_0xf5ec83===_0xad4add(0x1e8))throw CliErrors['authRequired']();}else{const {setActiveCookie:_0x42056e}=await import(_0xad4add(0x226));_0x42056e(_0x31527c);}}const _0x5bbc44=_0x28c5a4[_0xad4add(0x218)]()??'';if(_0x368f2f[_0xad4add(0x21e)]!==![]){assertEnvAppCodeNotIgnored(_0x5bbc44,resolveEnvAppCode(),hasExplicitAppCode(_0x41a992,_0x28c5a4[_0xad4add(0x21c)]));if(!_0x5bbc44)throw CliErrors[_0xad4add(0x20e)](_0xad4add(0x21f)+CLI_BIN_NAME+_0xad4add(0x1fb));}return{'defaults':{'booleans':{'verbose':_0x28c5a4[_0xad4add(0x205)]},'numbers':{'pagesize':_0x28c5a4[_0xad4add(0x1f7)]}},'extras':{'appCode':_0x5bbc44,'cookie':_0x31527c,'apiDomain':_0x28c5a4['resolveApiDomain'](),'apiDir':_0x207e84,'selectedAppName':_0x28c5a4[_0xad4add(0x217)],'mergedCli':_0x28c5a4[_0xad4add(0x1fe)]}};},'confirmHighRisk':_0x3de7be[_0x52a309(0x1fc)]??(async({env:_0x3ba0e7,commandLabel:_0x2f3cb1})=>{const _0x3b56de=_0x52a309;if(_0x3ba0e7['isNonInteractive'])throw CliErrors['validation'](_0x3b56de(0x221)+_0x2f3cb1+_0x3b56de(0x1fd));await requireConfirmationPrompt({'lines':[_0x3b56de(0x1ee)+_0x2f3cb1,'\x20\x20\x20Continue?\x20[y/N]\x20'],'createCancelledError':_0x4872a0=>CliErrors[_0x3b56de(0x21b)](_0x4872a0)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const _0x37521c=a248_0x20ff,{clearActiveCookie:_0x5b247e}=await import(_0x37521c(0x226));_0x5b247e();}export async function finalizeRabetbaseRuntimeState(){const _0x4b95ed=a248_0x20ff;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x5812ec},{initEnv:_0x1f584a}]=await Promise[_0x4b95ed(0x21d)]([import(_0x4b95ed(0x227)),import(_0x4b95ed(0x202))]);_0x5812ec(),_0x1f584a(_0x4b95ed(0x20a));}}export async function runCommand(_0x452d8a,_0x5d40f2,_0x138068=terminalRunnerAdapter){const _0xa40dd2=a248_0x20ff;assertRejectedFlags(_0x452d8a,_0x5d40f2[_0xa40dd2(0x21c)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x452d8a)?withUpdateNotice(_0x452d8a):_0x452d8a,_0x5d40f2,_0x138068);}function assertRejectedFlags(_0x4659bb,_0x21fb12){const _0x4fb834=a248_0x20ff;for(const _0x4655c9 of _0x4659bb[_0x4fb834(0x203)]??[]){const _0x440bb8=GLOBAL_FLAGS[_0x4fb834(0x206)](_0x5b3518=>_0x5b3518[_0x4fb834(0x1e2)]===_0x4655c9[_0x4fb834(0x1e2)]),_0x1c2967=new Set([_0x4655c9[_0x4fb834(0x1e2)],toCamelCase(_0x4655c9[_0x4fb834(0x1e2)]),_0x440bb8?.['meowKey']]),_0x5bb7f0=[..._0x1c2967]['some'](_0x3fdac8=>{if(!_0x3fdac8)return![];const _0x4f63d9=_0x21fb12[_0x3fdac8];return _0x4f63d9!==undefined&&_0x4f63d9!==null&&_0x4f63d9!==![];});if(_0x5bb7f0)throw CliErrors['validation'](_0x4655c9[_0x4fb834(0x1eb)],_0x4655c9['hint']);}}function toCamelCase(_0x15d710){const _0x4fcf2f=a248_0x20ff;return _0x15d710[_0x4fcf2f(0x1f1)](/-([a-z])/g,(_0x1e9ad7,_0x1fe4f9)=>_0x1fe4f9[_0x4fcf2f(0x1f3)]());}function shouldAttachUpdateNotice(_0x43b649){const _0x30b666=a248_0x20ff;if(_0x43b649[_0x30b666(0x1f4)]===![])return![];return![_0x30b666(0x1f8),_0x30b666(0x1ef),_0x30b666(0x1f5)][_0x30b666(0x1ed)](_0x43b649[_0x30b666(0x207)]);}function withUpdateNotice(_0x1d86fc){return{..._0x1d86fc,async 'execute'(_0x1e9924){const _0x3e80d7=a248_0x20ff,_0x50335b=shouldResolveUpdateNotice(_0x1e9924)?resolveLatestUpdateNotice()[_0x3e80d7(0x21a)](()=>null):Promise[_0x3e80d7(0x223)](null),_0x3925b5=await _0x1d86fc[_0x3e80d7(0x210)](_0x1e9924);return attachUpdateNotice(_0x3925b5,await _0x50335b);}};}function shouldResolveUpdateNotice(_0x3689df){const _0x29d7bd=a248_0x20ff;return _0x3689df['format']==='pretty'&&!_0x3689df[_0x29d7bd(0x20d)];}function attachUpdateNotice(_0x356da5,_0x1b7a8d){const _0x5bac48=a248_0x20ff;if(!_0x1b7a8d||!_0x356da5||typeof _0x356da5!==_0x5bac48(0x216))return _0x356da5;const _0x586596=_0x356da5,_0x26c719=typeof _0x586596[_0x5bac48(0x1ec)]===_0x5bac48(0x216)&&_0x586596['_notice']!==null?_0x586596['_notice']:{};return{..._0x586596,'_notice':{..._0x26c719,'update':_0x1b7a8d}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a249_0x3d03(){const _0x4a5890=['35QDfcmK','2185916alwVsa','71268pYaZQk','840719xEnudt','../commands/registry.js','4299393eUFWMo','2523696reZfZB','2725176kRjEwc','1307558yDoiVa'];a249_0x3d03=function(){return _0x4a5890;};return a249_0x3d03();}(function(_0xb28fe3,_0x4ac7c8){const _0x47d1e3=a249_0x18c9,_0x25e82=_0xb28fe3();while(!![]){try{const _0x4f6e41=parseInt(_0x47d1e3(0xf5))/0x1+parseInt(_0x47d1e3(0xf1))/0x2+-parseInt(_0x47d1e3(0xef))/0x3+-parseInt(_0x47d1e3(0xf3))/0x4+parseInt(_0x47d1e3(0xf2))/0x5*(parseInt(_0x47d1e3(0xf4))/0x6)+parseInt(_0x47d1e3(0xee))/0x7+-parseInt(_0x47d1e3(0xf0))/0x8;if(_0x4f6e41===_0x4ac7c8)break;else _0x25e82['push'](_0x25e82['shift']());}catch(_0x3d7baa){_0x25e82['push'](_0x25e82['shift']());}}}(a249_0x3d03,0x7127d));import{buildSchemaPayload as a249_0x1b93c1}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a249_0x18c9(_0x30190c,_0x3a70b3){_0x30190c=_0x30190c-0xee;const _0x3d03da=a249_0x3d03();let _0x18c95c=_0x3d03da[_0x30190c];return _0x18c95c;}import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x552c0f=a249_0x18c9,{serviceRegistry:_0x1836b5,findDefinition:_0x391d46}=await import(_0x552c0f(0xf6));return a249_0x1b93c1({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x1836b5,'buildAllFlags':buildAllFlags,'findDefinition':_0x391d46});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3b8b81,_0x2e16f4){var _0x4c2eb5=a250_0xb051,_0x33a746=_0x3b8b81();while(!![]){try{var _0x3aa25b=parseInt(_0x4c2eb5(0x6d))/0x1*(-parseInt(_0x4c2eb5(0x67))/0x2)+-parseInt(_0x4c2eb5(0x6e))/0x3+-parseInt(_0x4c2eb5(0x65))/0x4*(-parseInt(_0x4c2eb5(0x6c))/0x5)+-parseInt(_0x4c2eb5(0x6a))/0x6*(-parseInt(_0x4c2eb5(0x66))/0x7)+-parseInt(_0x4c2eb5(0x69))/0x8+-parseInt(_0x4c2eb5(0x68))/0x9*(parseInt(_0x4c2eb5(0x6b))/0xa)+parseInt(_0x4c2eb5(0x6f))/0xb;if(_0x3aa25b===_0x2e16f4)break;else _0x33a746['push'](_0x33a746['shift']());}catch(_0x51283e){_0x33a746['push'](_0x33a746['shift']());}}}(a250_0x8011,0x4a9ba));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';function a250_0xb051(_0x4ffcc8,_0x284847){_0x4ffcc8=_0x4ffcc8-0x65;var _0x801188=a250_0x8011();var _0xb05117=_0x801188[_0x4ffcc8];return _0xb05117;}function a250_0x8011(){var _0x4a1f99=['81NzFWzA','109064uKnKMd','21522MzRapN','298010rUQPjw','387145HJpslG','2269TDTvvj','134838ioFfKf','6683875ubqYnC','4DOIKDe','371banmnC','214YRFlam'];a250_0x8011=function(){return _0x4a1f99;};return a250_0x8011();}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.4.3
|
|
2
|
-
export declare const GIT_TAG = "v2.4.3
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.4.3";
|
|
2
|
+
export declare const GIT_TAG = "v2.4.3";
|
|
3
|
+
export declare const GIT_COMMIT = "ec23860";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-13T06:43:19.931Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a251_0x3618(_0x524a22,_0x41a976){_0x524a22=_0x524a22-0x193;const _0x3749ad=a251_0x3749();let _0x361805=_0x3749ad[_0x524a22];return _0x361805;}const a251_0x49ed90=a251_0x3618;(function(_0x8c5cc,_0x21b6df){const _0x85a564=a251_0x3618,_0x545c1d=_0x8c5cc();while(!![]){try{const _0x1da103=-parseInt(_0x85a564(0x196))/0x1*(-parseInt(_0x85a564(0x195))/0x2)+-parseInt(_0x85a564(0x19d))/0x3+parseInt(_0x85a564(0x19f))/0x4*(-parseInt(_0x85a564(0x193))/0x5)+parseInt(_0x85a564(0x19e))/0x6*(parseInt(_0x85a564(0x199))/0x7)+parseInt(_0x85a564(0x1a0))/0x8+-parseInt(_0x85a564(0x1a1))/0x9*(parseInt(_0x85a564(0x19c))/0xa)+-parseInt(_0x85a564(0x197))/0xb*(-parseInt(_0x85a564(0x19b))/0xc);if(_0x1da103===_0x21b6df)break;else _0x545c1d['push'](_0x545c1d['shift']());}catch(_0x507bb4){_0x545c1d['push'](_0x545c1d['shift']());}}}(a251_0x3749,0x23340));export const VERSION=a251_0x49ed90(0x194);export const GIT_TAG='v2.4.3';export const GIT_COMMIT=a251_0x49ed90(0x19a);export const BUILD_TIME=a251_0x49ed90(0x198);function a251_0x3749(){const _0x4a17ef=['24dzvWzV','237872oSoxcD','59553pXCvNC','221040pqWDeu','2.4.3','4IaXlYC','134ipbkJO','110KUiNul','2026-08-13T06:43:19.931Z','112woRKEH','ec23860','352380dNuRIh','130fbfFti','196269RaHqWk','88962NPydib'];a251_0x3749=function(){return _0x4a17ef;};return a251_0x3749();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5134aa,_0x55fba8){var _0x1dfb95=a252_0x12d3,_0x21972f=_0x5134aa();while(!![]){try{var _0x11fb77=-parseInt(_0x1dfb95(0x1df))/0x1*(parseInt(_0x1dfb95(0x1d3))/0x2)+-parseInt(_0x1dfb95(0x1d4))/0x3+parseInt(_0x1dfb95(0x1dc))/0x4*(parseInt(_0x1dfb95(0x1e2))/0x5)+parseInt(_0x1dfb95(0x1de))/0x6+-parseInt(_0x1dfb95(0x1d9))/0x7+parseInt(_0x1dfb95(0x1e0))/0x8*(parseInt(_0x1dfb95(0x1e1))/0x9)+parseInt(_0x1dfb95(0x1d6))/0xa*(-parseInt(_0x1dfb95(0x1da))/0xb);if(_0x11fb77===_0x55fba8)break;else _0x21972f['push'](_0x21972f['shift']());}catch(_0x36bc5c){_0x21972f['push'](_0x21972f['shift']());}}}(a252_0x217b,0x779ae));function a252_0x217b(){var _0x5d7569=['6342568nfczjs','9LoCpPv','5gynFWz','108182qbwFLY','990138tLcANf','\x20to\x20view\x20available\x20commands.','890ymICCE','\x20--help','green','688723Ydmtml','1485PlNTSd','log','117416AUSsAN','bold','4543614NuuhMI','12ZcliMh'];a252_0x217b=function(){return _0x5d7569;};return a252_0x217b();}import a252_0x481700 from'chalk';function a252_0x12d3(_0x13d603,_0x2b8e83){_0x13d603=_0x13d603-0x1d3;var _0x217b3c=a252_0x217b();var _0x12d347=_0x217b3c[_0x13d603];return _0x12d347;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x576110=a252_0x12d3;console[_0x576110(0x1db)](),console[_0x576110(0x1db)](a252_0x481700[_0x576110(0x1d8)][_0x576110(0x1dd)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x576110(0x1db)](),console[_0x576110(0x1db)]('\x20\x20Use\x20'+a252_0x481700['green'][_0x576110(0x1dd)](CLI_BIN_NAME+_0x576110(0x1d7))+_0x576110(0x1d5)),console[_0x576110(0x1db)]();}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x33c180,_0x148588){const _0x1a1ee4=a253_0x1a7a,_0x155eff=_0x33c180();while(!![]){try{const _0x45026a=parseInt(_0x1a1ee4(0x13f))/0x1*(-parseInt(_0x1a1ee4(0x144))/0x2)+-parseInt(_0x1a1ee4(0x152))/0x3*(parseInt(_0x1a1ee4(0x151))/0x4)+-parseInt(_0x1a1ee4(0x14a))/0x5+parseInt(_0x1a1ee4(0x13e))/0x6*(parseInt(_0x1a1ee4(0x14e))/0x7)+-parseInt(_0x1a1ee4(0x141))/0x8+-parseInt(_0x1a1ee4(0x150))/0x9+parseInt(_0x1a1ee4(0x14c))/0xa;if(_0x45026a===_0x148588)break;else _0x155eff['push'](_0x155eff['shift']());}catch(_0x290819){_0x155eff['push'](_0x155eff['shift']());}}}(a253_0x3201,0x2db18));function a253_0x1a7a(_0x5afb8e,_0xea9fb7){_0x5afb8e=_0x5afb8e-0x13e;const _0x320192=a253_0x3201();let _0x1a7ae5=_0x320192[_0x5afb8e];return _0x1a7ae5;}function a253_0x3201(){const _0x24ea45=['log','repairCommand','Rabetbase\x20Built-in\x20Skill\x20','1760215mTqNeT','warn','11541760KInthv','[BUILTIN_SKILL_INSTALL_','7KsoWXi','\x20at\x20','2643120LPsrKd','559628VSwjeJ','6UihMGj','1464942WnUtzj','2FYhLPC','installedPath','303616ciGexR','SOURCE_INVALID','code','247684NWWBqv','FAILED','Installation\x20failed'];a253_0x3201=function(){return _0x24ea45;};return a253_0x3201();}import{installBuiltinSkill}from'./skills/builtin-skill.js';export async function runPostinstall(_0x28aa05={}){const _0x351868=a253_0x1a7a,_0x3e434f=installBuiltinSkill(_0x28aa05);if(_0x3e434f['ok']){const _0x455d04=_0x3e434f['changed']?'installed':'already\x20current',_0x3c1a9d=_0x3e434f[_0x351868(0x140)]?_0x351868(0x14f)+_0x3e434f[_0x351868(0x140)]:'\x20via\x20skills@latest';return console[_0x351868(0x147)](_0x351868(0x149)+_0x3e434f['skillVersion']+'\x20'+_0x455d04+_0x3c1a9d),_0x3e434f;}const _0x296f17=_0x351868(0x14d)+(_0x3e434f[_0x351868(0x143)]??_0x351868(0x145))+']\x20'+(_0x3e434f['error']??_0x351868(0x146))+'.\x20'+('Repair\x20with:\x20'+_0x3e434f[_0x351868(0x148)]);if(_0x3e434f[_0x351868(0x143)]===_0x351868(0x142))throw new Error(_0x296f17);return console[_0x351868(0x14b)](_0x296f17),_0x3e434f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c3174,_0x7457b7){const _0x42f063=a254_0x2099,_0x107bc5=_0x2c3174();while(!![]){try{const _0x31b362=parseInt(_0x42f063(0x183))/0x1*(-parseInt(_0x42f063(0x17d))/0x2)+parseInt(_0x42f063(0x180))/0x3*(-parseInt(_0x42f063(0x18d))/0x4)+-parseInt(_0x42f063(0x188))/0x5+parseInt(_0x42f063(0x184))/0x6+parseInt(_0x42f063(0x18e))/0x7+-parseInt(_0x42f063(0x17f))/0x8*(parseInt(_0x42f063(0x18c))/0x9)+parseInt(_0x42f063(0x17c))/0xa;if(_0x31b362===_0x7457b7)break;else _0x107bc5['push'](_0x107bc5['shift']());}catch(_0x4d1241){_0x107bc5['push'](_0x107bc5['shift']());}}}(a254_0x4c3b,0x2c7bd));const DESCRIPTION_MAX_LENGTH=0x1f4;function a254_0x4c3b(){const _0x447ab6=['101026FVvXwD',';该操作可能创建或修改业务数据或本地配置。','2456dSpFIF','10809drygVD',';该操作可能覆盖、删除或明显影响线上运行行为。','将执行写入操作\x20','7DjWojz','2112234XkSobj','high-risk-write','risk','replace','943685OMFhlN','confirmationDescription','slice','write','486ynRrBE','212nmNPqW','2106125kPyIfh','trim','2791560OwLARI'];a254_0x4c3b=function(){return _0x447ab6;};return a254_0x4c3b();}export function buildRabetbaseConfirmationRequest(_0x23ba97,_0x1a5979,_0x1f6691){const _0x57574d=a254_0x2099,_0x5a8454=normalizeText(_0x23ba97[_0x57574d(0x189)],DESCRIPTION_MAX_LENGTH),_0x3cd264=_0x5a8454||normalizeText(defaultDescription(requireWriteRisk(_0x23ba97),_0x1a5979),DESCRIPTION_MAX_LENGTH);return{'operation':_0x1a5979,'risk':requireWriteRisk(_0x23ba97),'description':_0x3cd264,..._0x1f6691?{'signal':_0x1f6691}:{}};}function requireWriteRisk(_0x23943f){const _0x79b5d8=a254_0x2099;if(_0x23943f[_0x79b5d8(0x186)]===_0x79b5d8(0x18b)||_0x23943f[_0x79b5d8(0x186)]===_0x79b5d8(0x185))return _0x23943f['risk'];throw new Error('Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.');}function a254_0x2099(_0x3981f2,_0xffaf35){_0x3981f2=_0x3981f2-0x17b;const _0x4c3b07=a254_0x4c3b();let _0x209984=_0x4c3b07[_0x3981f2];return _0x209984;}function defaultDescription(_0x149110,_0x3e3536){const _0x2de216=a254_0x2099;if(_0x149110===_0x2de216(0x185))return'将执行高风险写入操作\x20'+_0x3e3536+_0x2de216(0x181);return _0x2de216(0x182)+_0x3e3536+_0x2de216(0x17e);}function normalizeText(_0x5d79e6,_0x549caa){const _0x599c9a=a254_0x2099;if(typeof _0x5d79e6!=='string')return'';return _0x5d79e6[_0x599c9a(0x187)](/[\u0000-\u001f\u007f]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x599c9a(0x17b)]()[_0x599c9a(0x18a)](0x0,_0x549caa);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe6b991,_0x55078c){var _0x372d3b=a255_0x4b98,_0x27bac6=_0xe6b991();while(!![]){try{var _0x59679a=parseInt(_0x372d3b(0x115))/0x1+parseInt(_0x372d3b(0x112))/0x2*(parseInt(_0x372d3b(0x10f))/0x3)+parseInt(_0x372d3b(0x114))/0x4+parseInt(_0x372d3b(0x110))/0x5*(-parseInt(_0x372d3b(0x111))/0x6)+-parseInt(_0x372d3b(0x11f))/0x7*(parseInt(_0x372d3b(0x10e))/0x8)+parseInt(_0x372d3b(0x119))/0x9+parseInt(_0x372d3b(0x11b))/0xa*(parseInt(_0x372d3b(0x11c))/0xb);if(_0x59679a===_0x55078c)break;else _0x27bac6['push'](_0x27bac6['shift']());}catch(_0x2acd36){_0x27bac6['push'](_0x27bac6['shift']());}}}(a255_0x2f49,0x9c792));function a255_0x4b98(_0x52f588,_0x4bcc53){_0x52f588=_0x52f588-0x10d;var _0x2f49fa=a255_0x2f49();var _0x4b98d4=_0x2f49fa[_0x52f588];return _0x4b98d4;}function a255_0x2f49(){var _0x39523e=['169769bAfKtZ','write','filter','split','6226326ObBmPZ','join','10geAUgT','3734489vHQuRx','risk','command','35945YLOlgb','service','high-risk-write','600ISdfmv','3wrDtiE','15tHAfmD','1628766vLjDTm','593246lqoVeU','rabetbase.write.completed','1370868dNameH'];a255_0x2f49=function(){return _0x39523e;};return a255_0x2f49();}export function canonicalRabetbaseOperation(_0x3e0568){var _0x20b5ae=a255_0x4b98;return[_0x3e0568[_0x20b5ae(0x120)],..._0x3e0568[_0x20b5ae(0x11e)]['trim']()[_0x20b5ae(0x118)](/\s+/)][_0x20b5ae(0x117)](Boolean)[_0x20b5ae(0x11a)]('.');}export function createRabetbaseWriteMetadata(_0x521e72,_0x4a882d,_0x29b936,_0x1c9838){var _0x56bd34=a255_0x4b98;if(_0x1c9838||_0x29b936['ok']!==!![]||_0x521e72[_0x56bd34(0x11d)]!==_0x56bd34(0x116)&&_0x521e72[_0x56bd34(0x11d)]!==_0x56bd34(0x10d))return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x56bd34(0x113),'operation':_0x4a882d,'risk':_0x521e72[_0x56bd34(0x11d)]}}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x50bc51,_0x1f3d85){const _0x445e9a=a256_0xd48c,_0x3f3379=_0x50bc51();while(!![]){try{const _0x544985=parseInt(_0x445e9a(0x84))/0x1+-parseInt(_0x445e9a(0x7a))/0x2*(parseInt(_0x445e9a(0x81))/0x3)+-parseInt(_0x445e9a(0x8e))/0x4*(parseInt(_0x445e9a(0x7e))/0x5)+-parseInt(_0x445e9a(0x7d))/0x6+parseInt(_0x445e9a(0x72))/0x7+parseInt(_0x445e9a(0x82))/0x8*(parseInt(_0x445e9a(0x73))/0x9)+parseInt(_0x445e9a(0x77))/0xa*(parseInt(_0x445e9a(0x83))/0xb);if(_0x544985===_0x1f3d85)break;else _0x3f3379['push'](_0x3f3379['shift']());}catch(_0x5a4c8b){_0x3f3379['push'](_0x3f3379['shift']());}}}(a256_0x3735,0x679cd));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:_0x4b05f4,command:_0x2fdde8,risk:_0x2bd40a,dryRun:_0x312519}){const _0x4beba9=a256_0xd48c;return JSON['stringify']({'ok':_0x4b05f4['ok'],'command':_0x2fdde8,'risk':_0x2bd40a,..._0x312519?{'dryRun':!![]}:{},..._0x4b05f4[_0x4beba9(0x8a)]!==undefined?{'data':_0x4b05f4[_0x4beba9(0x8a)]}:{},..._0x4b05f4[_0x4beba9(0x88)]?{'message':_0x4b05f4[_0x4beba9(0x88)]}:{}});}};export async function invokeRabetbase(_0x5b3a34,_0x15e507){const _0x54a617=a256_0xd48c;throwIfAborted(_0x15e507[_0x54a617(0x87)]);const _0x51fd29=await resolveRabetbaseInvocation(_0x5b3a34),_0x1f00ed=canonicalRabetbaseOperation(_0x51fd29[_0x54a617(0x80)]);return await confirmWriteBeforeQueue(_0x51fd29[_0x54a617(0x80)],_0x51fd29['rawFlags'],_0x1f00ed,_0x15e507),runSerialized(async()=>{const _0x452670=_0x54a617,_0x5e8494={};try{throwIfAborted(_0x15e507[_0x452670(0x87)]);const _0x1f5feb=buildConfigFromFlags(_0x51fd29['rawFlags']);await initGlobalEnvironment(_0x1f5feb);const _0x5a2e7d=createPipelineEnv(_0x1f5feb,{..._0x51fd29[_0x452670(0x76)],'yes':_0x51fd29[_0x452670(0x80)]['risk']===_0x452670(0x7b)?!![]:_0x51fd29['rawFlags'][_0x452670(0x92)],'nonInteractive':!![]},_0x51fd29['args']);_0x5a2e7d[_0x452670(0x78)]=!![],_0x5a2e7d[_0x452670(0x8f)]=_0x452670(0x7b);const _0x2a7924=withAbortSignal(_0x51fd29[_0x452670(0x80)],_0x15e507['signal']),_0x749169=createRabetbaseRunnerAdapter({'formatOutput'(_0x5251b2,_0x4c9d26){const _0x25f848=_0x452670;_0x5e8494[_0x25f848(0x8b)]=_0x5251b2,_0x5e8494[_0x25f848(0x8d)]=_0x4c9d26[_0x25f848(0x8d)],_0x5e8494[_0x25f848(0x75)]=_0x4c9d26['risk'],_0x5e8494[_0x25f848(0x74)]=_0x4c9d26[_0x25f848(0x74)],_0x5e8494[_0x25f848(0x79)]=_0x4c9d26['dryRun']===!![];},async 'confirmHighRisk'(){const _0x3201f7=_0x452670;throw new Error(_0x3201f7(0x7f));}});await runCommand(_0x2a7924,_0x5a2e7d,_0x749169);if(!_0x5e8494[_0x452670(0x8b)]||!_0x5e8494[_0x452670(0x8d)]||!_0x5e8494[_0x452670(0x75)]||!_0x5e8494[_0x452670(0x74)])throw new Error(_0x452670(0x7c));const _0x4fe8ae=_0x5e8494[_0x452670(0x79)]===!![],_0x405ba2=_0x15e507['presentation']??defaultPresentation,_0x477ba9={'result':_0x5e8494[_0x452670(0x8b)],'command':_0x5e8494[_0x452670(0x8d)],'operation':_0x1f00ed,'risk':_0x5e8494[_0x452670(0x75)],'format':_0x5e8494['format'],'dryRun':_0x4fe8ae},_0x55e21a=createRabetbaseWriteMetadata(_0x51fd29[_0x452670(0x80)],_0x1f00ed,_0x5e8494[_0x452670(0x8b)],_0x4fe8ae);let _0x3c148b;try{_0x3c148b=await _0x405ba2[_0x452670(0x91)](_0x477ba9);}catch(_0x51ef66){if(!_0x55e21a||_0x405ba2===defaultPresentation)throw _0x51ef66;_0x3c148b=await defaultPresentation['present'](_0x477ba9);}return{'operation':_0x1f00ed,'risk':_0x5e8494[_0x452670(0x75)],'mode':_0x4fe8ae?_0x452670(0x8c):'execute','result':_0x5e8494[_0x452670(0x8b)],'output':_0x3c148b,..._0x55e21a?{'metadata':_0x55e21a}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}async function confirmWriteBeforeQueue(_0x109095,_0x3b1263,_0x35f8b8,_0xe5493d){const _0x53fbbc=a256_0xd48c;if(_0x3b1263[_0x53fbbc(0x79)]===!![]||_0x109095[_0x53fbbc(0x75)]!==_0x53fbbc(0x93)&&_0x109095[_0x53fbbc(0x75)]!==_0x53fbbc(0x7b))return;await _0xe5493d[_0x53fbbc(0x85)]['confirm'](buildRabetbaseConfirmationRequest(_0x109095,_0x35f8b8,_0xe5493d[_0x53fbbc(0x87)]));}function withAbortSignal(_0x355d52,_0x1abbdb){return{..._0x355d52,async 'execute'(_0x286c59){const _0x386323=a256_0xd48c;return throwIfAborted(_0x1abbdb),_0x355d52[_0x386323(0x90)](_0x286c59);}};}function throwIfAborted(_0x5a124c){const _0x27ea7f=a256_0xd48c;if(_0x5a124c?.['aborted'])throw _0x5a124c[_0x27ea7f(0x86)]instanceof Error?_0x5a124c['reason']:new DOMException(_0x27ea7f(0x89),'AbortError');}function a256_0xd48c(_0x3bcce6,_0x1335f1){_0x3bcce6=_0x3bcce6-0x72;const _0x3735fa=a256_0x3735();let _0xd48c6b=_0x3735fa[_0x3bcce6];return _0xd48c6b;}function a256_0x3735(){const _0x548086=['yes','write','4256903FJuzxi','563967nvnFXn','format','risk','rawFlags','56390xnqhEb','isNonInteractive','dryRun','424736lljVrp','high-risk-write','Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','1763172TXvaOJ','5kvDjdq','Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.','definition','9XoMMJt','32gTshKt','418YCxleO','295913vhdWTB','confirmation','reason','signal','message','Rabetbase\x20invocation\x20aborted.','data','result','dry-run','command','54452Npslww','riskLevel','execute','present'];a256_0x3735=function(){return _0x548086;};return a256_0x3735();}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a257_0x374c(_0xfef8cf,_0x157748){_0xfef8cf=_0xfef8cf-0xfd;const _0x5a7485=a257_0x5a74();let _0x374cd6=_0x5a7485[_0xfef8cf];return _0x374cd6;}const a257_0x18c6ea=a257_0x374c;function a257_0x5a74(){const _0x27bcde=['256977ngCOpS','resolve','32NjjVim','1192mcxJDo','10510eRULFo','6064302uuqAHS','catch','15761124NGghhk','2986258QlEVdZ','6XgUGdb','5409JoRnkE','155728krjkDJ','5rTrgRW','13013xeMySD'];a257_0x5a74=function(){return _0x27bcde;};return a257_0x5a74();}(function(_0x4393e0,_0xfe02c5){const _0x379769=a257_0x374c,_0x9721f2=_0x4393e0();while(!![]){try{const _0xf07bc0=parseInt(_0x379769(0xfe))/0x1*(-parseInt(_0x379769(0x100))/0x2)+parseInt(_0x379769(0x103))/0x3*(-parseInt(_0x379769(0x105))/0x4)+-parseInt(_0x379769(0x101))/0x5*(-parseInt(_0x379769(0x108))/0x6)+parseInt(_0x379769(0x102))/0x7*(parseInt(_0x379769(0x106))/0x8)+-parseInt(_0x379769(0xff))/0x9*(parseInt(_0x379769(0x107))/0xa)+-parseInt(_0x379769(0xfd))/0xb+parseInt(_0x379769(0x10a))/0xc;if(_0xf07bc0===_0xfe02c5)break;else _0x9721f2['push'](_0x9721f2['shift']());}catch(_0x395723){_0x9721f2['push'](_0x9721f2['shift']());}}}(a257_0x5a74,0x8530e));let tail=Promise[a257_0x18c6ea(0x104)]();export async function runSerialized(_0x165785){const _0xfddbe0=a257_0x18c6ea,_0x549703=tail;let _0x20807d;tail=new Promise(_0xf19981=>{_0x20807d=_0xf19981;}),await _0x549703[_0xfddbe0(0x109)](()=>undefined);try{return await _0x165785();}finally{_0x20807d();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a258_0x3683(){const _0x390f2e=['input','2939148SNCiWz','6117ybiPxP','360548vEjlvy','run','184458MExAne','unknownCommand','wildcardDef','5CkrdpR','234btPLpk','4619713CBQjjm','slice','defaultCommand','hint','message','join','337205QXeeLG','Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.','Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','16lUkGXm','flags','validation','88738nkgLKd','Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','290hIJHUq'];a258_0x3683=function(){return _0x390f2e;};return a258_0x3683();}(function(_0x51d04a,_0x4bf618){const _0x4368f7=a258_0x5e94,_0x7da54b=_0x51d04a();while(!![]){try{const _0x5be8e6=parseInt(_0x4368f7(0x14a))/0x1+-parseInt(_0x4368f7(0x157))/0x2*(parseInt(_0x4368f7(0x150))/0x3)+-parseInt(_0x4368f7(0x151))/0x4*(-parseInt(_0x4368f7(0x156))/0x5)+-parseInt(_0x4368f7(0x153))/0x6+parseInt(_0x4368f7(0x158))/0x7+parseInt(_0x4368f7(0x147))/0x8*(parseInt(_0x4368f7(0x14f))/0x9)+-parseInt(_0x4368f7(0x14d))/0xa*(parseInt(_0x4368f7(0x144))/0xb);if(_0x5be8e6===_0x4bf618)break;else _0x7da54b['push'](_0x7da54b['shift']());}catch(_0x167476){_0x7da54b['push'](_0x7da54b['shift']());}}}(a258_0x3683,0x5176d));import a258_0x294d0f from'meow';function a258_0x5e94(_0x2d9005,_0x2b5a32){_0x2d9005=_0x2d9005-0x143;const _0x3683dd=a258_0x3683();let _0x5e9478=_0x3683dd[_0x2d9005];return _0x5e9478;}import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveRabetbaseInvocation(_0x5b509c){const _0x7ac595=a258_0x5e94,_0x463d9b=a258_0x294d0f('',{'importMeta':import.meta,'argv':[..._0x5b509c],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x3d4739=[..._0x463d9b[_0x7ac595(0x14e)]],_0x5a6b04=_0x463d9b[_0x7ac595(0x148)],_0x410cb1=_0x3d4739[0x0];if(!_0x410cb1)throw CliErrors['validation'](_0x7ac595(0x14b));const _0x1dafb3=resolveRemovedCommand(_0x410cb1,_0x3d4739[0x1]);if(_0x1dafb3)throw CliErrors[_0x7ac595(0x149)](_0x1dafb3[_0x7ac595(0x15c)],_0x1dafb3[_0x7ac595(0x15b)]);if(_0x410cb1===_0x7ac595(0x152))throw CliErrors[_0x7ac595(0x149)](_0x7ac595(0x14c),_0x7ac595(0x145));if(!isKnownService(_0x410cb1))throw CliErrors[_0x7ac595(0x154)](_0x3d4739[_0x7ac595(0x143)]('\x20'));const _0x3c2ef4=getServiceEntry(_0x410cb1),_0x496cd4=_0x3d4739[0x1],_0x21ba68=_0x496cd4||_0x3c2ef4[_0x7ac595(0x15a)];if(!_0x21ba68){if(_0x3c2ef4[_0x7ac595(0x155)])return{'definition':_0x3c2ef4[_0x7ac595(0x155)],'rawFlags':_0x5a6b04,'args':[]};throw CliErrors[_0x7ac595(0x149)](_0x7ac595(0x146)+_0x410cb1+'\x22.');}const _0x19296f=findDefinition(_0x410cb1,_0x21ba68);if(_0x19296f)return{'definition':_0x19296f,'rawFlags':_0x5a6b04,'args':_0x3d4739['slice'](0x2)};if(_0x3c2ef4['wildcardDef'])return{'definition':_0x3c2ef4['wildcardDef'],'rawFlags':_0x5a6b04,'args':[_0x21ba68,..._0x3d4739[_0x7ac595(0x159)](0x2)]};throw CliErrors['unknownCommand'](_0x410cb1+'\x20'+_0x21ba68);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a260_0x385ca6=a260_0x1d26;(function(_0x4c1090,_0x334e82){const _0x2bfacd=a260_0x1d26,_0x414bfe=_0x4c1090();while(!![]){try{const _0x25165b=parseInt(_0x2bfacd(0x1a1))/0x1*(parseInt(_0x2bfacd(0x180))/0x2)+-parseInt(_0x2bfacd(0x19d))/0x3*(parseInt(_0x2bfacd(0x17f))/0x4)+parseInt(_0x2bfacd(0x190))/0x5*(-parseInt(_0x2bfacd(0x15f))/0x6)+parseInt(_0x2bfacd(0x177))/0x7+-parseInt(_0x2bfacd(0x189))/0x8+parseInt(_0x2bfacd(0x178))/0x9*(parseInt(_0x2bfacd(0x176))/0xa)+-parseInt(_0x2bfacd(0x19e))/0xb*(-parseInt(_0x2bfacd(0x195))/0xc);if(_0x25165b===_0x334e82)break;else _0x414bfe['push'](_0x414bfe['shift']());}catch(_0x6ee74e){_0x414bfe['push'](_0x414bfe['shift']());}}}(a260_0x1f01,0xe367b));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=a260_0x385ca6(0x175),SKILL_NAME=a260_0x385ca6(0x160);function frontmatterValue(_0x50910d,_0xb14e84){const _0x3388aa=a260_0x385ca6;return _0x50910d[_0x3388aa(0x199)](new RegExp('^'+_0xb14e84+_0x3388aa(0x194),'m'))?.[0x1]?.[_0x3388aa(0x17a)]()??'';}function listFiles(_0x58fb7b,_0x26ec52=_0x58fb7b){const _0x11ef45=a260_0x385ca6;return readdirSync(_0x26ec52,{'withFileTypes':!![]})[_0x11ef45(0x18c)](_0x3afb6f=>{const _0x259470=_0x11ef45,_0x20a648=join(_0x26ec52,_0x3afb6f[_0x259470(0x162)]),_0x7e8af8=lstatSync(_0x20a648);if(_0x7e8af8[_0x259470(0x15e)]())throw new Error(_0x259470(0x19a)+_0x20a648);if(_0x7e8af8[_0x259470(0x166)]())return listFiles(_0x58fb7b,_0x20a648);if(!_0x7e8af8[_0x259470(0x168)]())throw new Error(_0x259470(0x182)+_0x20a648);return[relative(_0x58fb7b,_0x20a648)[_0x259470(0x197)](sep)[_0x259470(0x167)]('/')];})[_0x11ef45(0x188)]((_0x391cca,_0x26d882)=>_0x391cca<_0x26d882?-0x1:_0x391cca>_0x26d882?0x1:0x0);}function digestFiles(_0xaa61f7,_0x13f350){const _0x25eeda=a260_0x385ca6,_0x4d147c=createHash('sha256');for(const _0x269f92 of _0x13f350){if(_0x269f92[_0x25eeda(0x19c)]('/')||_0x269f92[_0x25eeda(0x197)]('/')['includes']('..')||_0x269f92[_0x25eeda(0x17b)]('\x5c'))throw new Error(_0x25eeda(0x161)+_0x269f92);_0x4d147c['update'](_0x269f92),_0x4d147c['update']('\x00'),_0x4d147c['update'](readFileSync(join(_0xaa61f7,..._0x269f92[_0x25eeda(0x197)]('/')))),_0x4d147c[_0x25eeda(0x17d)]('\x00');}return _0x4d147c[_0x25eeda(0x16c)](_0x25eeda(0x187));}function a260_0x1d26(_0x1a51ca,_0x190e17){_0x1a51ca=_0x1a51ca-0x15e;const _0x1f01b6=a260_0x1f01();let _0x1d26c8=_0x1f01b6[_0x1a51ca];return _0x1d26c8;}function sameFiles(_0x5abcfd,_0xa96d1b){const _0x29838f=a260_0x385ca6;return _0x5abcfd[_0x29838f(0x171)]===_0xa96d1b[_0x29838f(0x171)]&&_0x5abcfd[_0x29838f(0x17e)]((_0x887d53,_0x509a66)=>_0x887d53===_0xa96d1b[_0x509a66]);}function readSource(_0x102a59){const _0x57c90b=a260_0x385ca6,_0x217f94=JSON[_0x57c90b(0x192)](readFileSync(join(_0x102a59,_0x57c90b(0x191)),_0x57c90b(0x172))),_0x56480b=JSON[_0x57c90b(0x192)](readFileSync(join(_0x102a59,_0x57c90b(0x183),'rabetbase.manifest.json'),_0x57c90b(0x172))),_0x2bf4a6=join(_0x102a59,_0x57c90b(0x183),SKILL_NAME),_0x2e614a=frontmatterValue(readFileSync(join(_0x2bf4a6,_0x57c90b(0x174)),_0x57c90b(0x172)),_0x57c90b(0x181)),_0x1414da=listFiles(_0x2bf4a6);if(_0x56480b['schemaVersion']!==0x1||_0x56480b[_0x57c90b(0x162)]!==SKILL_NAME||!_0x217f94[_0x57c90b(0x181)]||_0x56480b['packageVersion']!==_0x217f94[_0x57c90b(0x181)]||_0x56480b[_0x57c90b(0x186)]!==_0x217f94[_0x57c90b(0x181)]||_0x2e614a!==_0x217f94['version']||!sameFiles(_0x1414da,_0x56480b['files'])||digestFiles(_0x2bf4a6,_0x1414da)!==_0x56480b[_0x57c90b(0x16c)])throw new Error(_0x57c90b(0x18a));return{'packageVersion':_0x217f94[_0x57c90b(0x181)],'skillVersion':_0x2e614a,'root':_0x2bf4a6,'manifest':_0x56480b};}function installedSkillPath(_0x3e9838){const _0x1406d4=a260_0x385ca6,_0x3d538c=resolveInstalledSkill(SKILL_NAME,{'home':_0x3e9838});if(_0x3d538c[_0x1406d4(0x164)]===_0x1406d4(0x16a))return{'state':_0x1406d4(0x16a),'path':dirname(_0x3d538c[_0x1406d4(0x18e)])};if(_0x3d538c[_0x1406d4(0x164)]===_0x1406d4(0x173))return{'state':_0x1406d4(0x19f)};return{'state':_0x1406d4(0x170),'reason':_0x3d538c[_0x1406d4(0x165)]};}export function inspectInstalledBuiltinSkillVersion(_0x43e0e2,_0x4c992c={}){const _0x5f248d=a260_0x385ca6,_0x5411f5=installedSkillPath(_0x4c992c['home']??homedir());if(_0x5411f5[_0x5f248d(0x164)]===_0x5f248d(0x19f))return{'state':_0x5f248d(0x19f),'expectedVersion':_0x43e0e2,'repairCommand':REPAIR_COMMAND};if(_0x5411f5['state']==='unverifiable')return{'state':_0x5f248d(0x170),'expectedVersion':_0x43e0e2,'reason':_0x5411f5['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x2f9e9a=frontmatterValue(readFileSync(join(_0x5411f5[_0x5f248d(0x18e)],_0x5f248d(0x174)),'utf8'),_0x5f248d(0x181));return{'state':_0x2f9e9a===_0x43e0e2?_0x5f248d(0x193):_0x5f248d(0x16f),'expectedVersion':_0x43e0e2,'skillVersion':_0x2f9e9a,'installedPath':_0x5411f5[_0x5f248d(0x18e)],'repairCommand':REPAIR_COMMAND};}catch(_0x1627f6){return{'state':_0x5f248d(0x170),'expectedVersion':_0x43e0e2,'installedPath':_0x5411f5[_0x5f248d(0x18e)],'reason':_0x1627f6 instanceof Error?_0x1627f6['message']:String(_0x1627f6),'repairCommand':REPAIR_COMMAND};}}function a260_0x1f01(){const _0x344ad9=['flatMap','packageRoot','path','stdio','10osgWhW','package.json','parse','current',':\x5cs*(.+)$','324QZfluh','INSTALL_FAILED','split','skills@latest\x20exited\x20','match','Symbolic\x20link\x20is\x20not\x20allowed:\x20','content_mismatch','startsWith','711MzmVHw','1141041xKWcOH','missing','root','31FSxkQF','files','isSymbolicLink','4202556fCcmgl','rabetbase','Unsafe\x20manifest\x20path:\x20','name','error','state','reason','isDirectory','join','isFile','unknown','present','packageVersion','digest','message','VERIFY_FAILED','version_mismatch','unverifiable','length','utf8','absent','SKILL.md','rabetbase\x20cli-skill\x20install','4694560VaNMqY','1591842wXjulZ','18CZgUqm','pipe','trim','includes','installedPath','update','every','20324idOgaX','66238fMPvIv','version','Unsupported\x20Skill\x20entry:\x20','skills','home','manifest','skillVersion','hex','sort','11657952QCLWnf','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','SOURCE_INVALID'];a260_0x1f01=function(){return _0x344ad9;};return a260_0x1f01();}export function inspectBuiltinSkill(_0x5d22e3={}){const _0x330324=a260_0x385ca6,_0x2a1d02=_0x5d22e3[_0x330324(0x18d)]??DEFAULT_PACKAGE_ROOT;let _0x557368;try{_0x557368=readSource(_0x2a1d02);}catch(_0x5bb82d){return{'state':_0x330324(0x170),'packageVersion':_0x330324(0x169),'reason':_0x5bb82d instanceof Error?_0x5bb82d[_0x330324(0x16d)]:String(_0x5bb82d),'repairCommand':REPAIR_COMMAND};}const _0x16bcd9=installedSkillPath(_0x5d22e3[_0x330324(0x184)]??homedir());if(_0x16bcd9['state']===_0x330324(0x19f))return{'state':_0x330324(0x19f),'packageVersion':_0x557368['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x16bcd9['state']===_0x330324(0x170))return{'state':'unverifiable','packageVersion':_0x557368[_0x330324(0x16b)],'reason':_0x16bcd9[_0x330324(0x165)],'repairCommand':REPAIR_COMMAND};try{const _0x170e94=frontmatterValue(readFileSync(join(_0x16bcd9[_0x330324(0x18e)],'SKILL.md'),_0x330324(0x172)),_0x330324(0x181));if(_0x170e94!==_0x557368[_0x330324(0x186)])return{'state':_0x330324(0x16f),'packageVersion':_0x557368[_0x330324(0x16b)],'skillVersion':_0x170e94,'installedPath':_0x16bcd9[_0x330324(0x18e)],'repairCommand':REPAIR_COMMAND};const _0x304c8c=listFiles(_0x16bcd9[_0x330324(0x18e)]),_0xf16d0f=digestFiles(_0x16bcd9[_0x330324(0x18e)],_0x304c8c);return{'state':sameFiles(_0x304c8c,_0x557368[_0x330324(0x185)][_0x330324(0x1a2)])&&_0xf16d0f===_0x557368['manifest'][_0x330324(0x16c)]?_0x330324(0x193):_0x330324(0x19b),'packageVersion':_0x557368[_0x330324(0x16b)],'skillVersion':_0x170e94,'installedPath':_0x16bcd9['path'],'digest':_0xf16d0f,'repairCommand':REPAIR_COMMAND};}catch(_0x1d7fa2){return{'state':'unverifiable','packageVersion':_0x557368[_0x330324(0x16b)],'installedPath':_0x16bcd9[_0x330324(0x18e)],'reason':_0x1d7fa2 instanceof Error?_0x1d7fa2[_0x330324(0x16d)]:String(_0x1d7fa2),'repairCommand':REPAIR_COMMAND};}}function failure(_0x46efc9,_0x1eb71f,_0x21fbd5,_0x1cd4f4){const _0x56f116=a260_0x385ca6;return{'ok':![],'code':_0x46efc9,'packageVersion':_0x1eb71f[_0x56f116(0x16b)],'skillVersion':_0x1eb71f[_0x56f116(0x186)],'installedPath':_0x1cd4f4,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x21fbd5 instanceof Error?_0x21fbd5[_0x56f116(0x16d)]:String(_0x21fbd5)};}export function installBuiltinSkill(_0x50bd8a={}){const _0x4cb889=a260_0x385ca6,_0x56e0c6=_0x50bd8a[_0x4cb889(0x18d)]??DEFAULT_PACKAGE_ROOT,_0x37918c=_0x50bd8a[_0x4cb889(0x184)]??homedir();let _0x5a3eac;try{_0x5a3eac=readSource(_0x56e0c6);}catch(_0x5a6bbb){return failure(_0x4cb889(0x18b),{'packageVersion':_0x4cb889(0x169),'skillVersion':'unknown'},_0x5a6bbb);}const _0x342e0e=inspectBuiltinSkill({'packageRoot':_0x56e0c6,'home':_0x37918c}),_0x3d670d=runNpxSkillsAddGlobal(_0x56e0c6,_0x5a3eac[_0x4cb889(0x1a0)],{'stdio':_0x50bd8a[_0x4cb889(0x18f)]??_0x4cb889(0x179),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x37918c}});if(_0x3d670d['skipped'])return{'ok':!![],'packageVersion':_0x5a3eac[_0x4cb889(0x16b)],'skillVersion':_0x5a3eac[_0x4cb889(0x186)],'installedPath':_0x342e0e[_0x4cb889(0x17c)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3d670d['ok'])return failure(_0x4cb889(0x196),_0x5a3eac,_0x3d670d[_0x4cb889(0x163)]??_0x4cb889(0x198)+_0x3d670d['status']);const _0x4742a7=inspectBuiltinSkill({'packageRoot':_0x56e0c6,'home':_0x37918c});if(_0x4742a7[_0x4cb889(0x164)]!=='current')return failure(_0x4cb889(0x16e),_0x5a3eac,_0x4742a7[_0x4cb889(0x165)]??'Installed\x20Skill\x20state\x20is\x20'+_0x4742a7[_0x4cb889(0x164)],_0x4742a7[_0x4cb889(0x17c)]);return{'ok':!![],'packageVersion':_0x5a3eac[_0x4cb889(0x16b)],'skillVersion':_0x5a3eac[_0x4cb889(0x186)],'installedPath':_0x4742a7[_0x4cb889(0x17c)],'changed':_0x342e0e[_0x4cb889(0x164)]!==_0x4cb889(0x193),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a260_0x1d1d62=a260_0x14c5;function a260_0x14c5(_0x235478,_0x2f8836){_0x235478=_0x235478-0x118;const _0x345546=a260_0x3455();let _0x14c512=_0x345546[_0x235478];return _0x14c512;}(function(_0x13f342,_0x7887e1){const _0xba3346=a260_0x14c5,_0x4379e1=_0x13f342();while(!![]){try{const _0x46f3f5=parseInt(_0xba3346(0x11b))/0x1+-parseInt(_0xba3346(0x11d))/0x2*(-parseInt(_0xba3346(0x156))/0x3)+-parseInt(_0xba3346(0x123))/0x4+parseInt(_0xba3346(0x147))/0x5*(-parseInt(_0xba3346(0x14a))/0x6)+parseInt(_0xba3346(0x145))/0x7+-parseInt(_0xba3346(0x154))/0x8+-parseInt(_0xba3346(0x136))/0x9*(-parseInt(_0xba3346(0x144))/0xa);if(_0x46f3f5===_0x7887e1)break;else _0x4379e1['push'](_0x4379e1['shift']());}catch(_0x26190a){_0x4379e1['push'](_0x4379e1['shift']());}}}(a260_0x3455,0x46350));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='rabetbase\x20cli-skill\x20install',SKILL_NAME=a260_0x1d1d62(0x13e);function frontmatterValue(_0x2758c9,_0x502832){const _0x1d07d3=a260_0x1d1d62;return _0x2758c9[_0x1d07d3(0x135)](new RegExp('^'+_0x502832+_0x1d07d3(0x12c),'m'))?.[0x1]?.[_0x1d07d3(0x12e)]()??'';}function listFiles(_0x4f1d69,_0x11a2f9=_0x4f1d69){const _0x3068ef=a260_0x1d1d62;return readdirSync(_0x11a2f9,{'withFileTypes':!![]})[_0x3068ef(0x133)](_0x4fb904=>{const _0x30d902=_0x3068ef,_0x1898ea=join(_0x11a2f9,_0x4fb904[_0x30d902(0x140)]),_0x237e8c=lstatSync(_0x1898ea);if(_0x237e8c[_0x30d902(0x143)]())throw new Error(_0x30d902(0x14e)+_0x1898ea);if(_0x237e8c[_0x30d902(0x152)]())return listFiles(_0x4f1d69,_0x1898ea);if(!_0x237e8c['isFile']())throw new Error(_0x30d902(0x14c)+_0x1898ea);return[relative(_0x4f1d69,_0x1898ea)[_0x30d902(0x127)](sep)[_0x30d902(0x128)]('/')];})[_0x3068ef(0x124)]((_0x5d378f,_0x23abab)=>_0x5d378f<_0x23abab?-0x1:_0x5d378f>_0x23abab?0x1:0x0);}function digestFiles(_0x15e14c,_0x29983f){const _0x392cba=a260_0x1d1d62,_0x1d13ce=createHash(_0x392cba(0x155));for(const _0x4e0639 of _0x29983f){if(_0x4e0639[_0x392cba(0x13b)]('/')||_0x4e0639[_0x392cba(0x127)]('/')[_0x392cba(0x11c)]('..')||_0x4e0639[_0x392cba(0x11c)]('\x5c'))throw new Error(_0x392cba(0x149)+_0x4e0639);_0x1d13ce['update'](_0x4e0639),_0x1d13ce[_0x392cba(0x130)]('\x00'),_0x1d13ce['update'](readFileSync(join(_0x15e14c,..._0x4e0639['split']('/')))),_0x1d13ce[_0x392cba(0x130)]('\x00');}return _0x1d13ce[_0x392cba(0x14b)](_0x392cba(0x142));}function sameFiles(_0x21c7ab,_0x373bb7){const _0x8c2d35=a260_0x1d1d62;return _0x21c7ab[_0x8c2d35(0x131)]===_0x373bb7['length']&&_0x21c7ab[_0x8c2d35(0x11e)]((_0x15fee7,_0x40ce87)=>_0x15fee7===_0x373bb7[_0x40ce87]);}function readSource(_0x38ad0e){const _0x5063b7=a260_0x1d1d62,_0x37d657=JSON[_0x5063b7(0x139)](readFileSync(join(_0x38ad0e,'package.json'),_0x5063b7(0x150))),_0x3bd19e=JSON[_0x5063b7(0x139)](readFileSync(join(_0x38ad0e,'skills',_0x5063b7(0x14f)),_0x5063b7(0x150))),_0x4a8193=join(_0x38ad0e,_0x5063b7(0x138),SKILL_NAME),_0x1ea0a7=frontmatterValue(readFileSync(join(_0x4a8193,_0x5063b7(0x13c)),_0x5063b7(0x150)),'version'),_0x4e4869=listFiles(_0x4a8193);if(_0x3bd19e[_0x5063b7(0x148)]!==0x1||_0x3bd19e['name']!==SKILL_NAME||!_0x37d657[_0x5063b7(0x129)]||_0x3bd19e[_0x5063b7(0x11a)]!==_0x37d657[_0x5063b7(0x129)]||_0x3bd19e['skillVersion']!==_0x37d657[_0x5063b7(0x129)]||_0x1ea0a7!==_0x37d657['version']||!sameFiles(_0x4e4869,_0x3bd19e['files'])||digestFiles(_0x4a8193,_0x4e4869)!==_0x3bd19e[_0x5063b7(0x14b)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x37d657[_0x5063b7(0x129)],'skillVersion':_0x1ea0a7,'root':_0x4a8193,'manifest':_0x3bd19e};}function installedSkillPath(_0x10348f){const _0x591306=a260_0x1d1d62,_0x56265e=resolveInstalledSkill(SKILL_NAME,{'home':_0x10348f});if(_0x56265e[_0x591306(0x118)]===_0x591306(0x121))return{'state':_0x591306(0x121),'path':dirname(_0x56265e['path'])};if(_0x56265e['state']===_0x591306(0x122))return{'state':_0x591306(0x13f)};return{'state':'unverifiable','reason':_0x56265e[_0x591306(0x119)]};}export function inspectInstalledBuiltinSkillVersion(_0x2f7d72,_0x537b3c={}){const _0x19945d=a260_0x1d1d62,_0x5e50be=installedSkillPath(_0x537b3c[_0x19945d(0x125)]??homedir());if(_0x5e50be['state']===_0x19945d(0x13f))return{'state':_0x19945d(0x13f),'expectedVersion':_0x2f7d72,'repairCommand':REPAIR_COMMAND};if(_0x5e50be[_0x19945d(0x118)]===_0x19945d(0x146))return{'state':'unverifiable','expectedVersion':_0x2f7d72,'reason':_0x5e50be['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x329791=frontmatterValue(readFileSync(join(_0x5e50be['path'],_0x19945d(0x13c)),_0x19945d(0x150)),'version');return{'state':_0x329791===_0x2f7d72?_0x19945d(0x134):_0x19945d(0x141),'expectedVersion':_0x2f7d72,'skillVersion':_0x329791,'installedPath':_0x5e50be[_0x19945d(0x12d)],'repairCommand':REPAIR_COMMAND};}catch(_0x4ca306){return{'state':_0x19945d(0x146),'expectedVersion':_0x2f7d72,'installedPath':_0x5e50be[_0x19945d(0x12d)],'reason':_0x4ca306 instanceof Error?_0x4ca306['message']:String(_0x4ca306),'repairCommand':REPAIR_COMMAND};}}function a260_0x3455(){const _0x1aa5d9=['2536830OmyHaS','digest','Unsupported\x20Skill\x20entry:\x20','message','Symbolic\x20link\x20is\x20not\x20allowed:\x20','rabetbase.manifest.json','utf8','INSTALL_FAILED','isDirectory','Installed\x20Skill\x20state\x20is\x20','1892968DgJJOe','sha256','858mBpFfV','state','reason','packageVersion','338790PLwtFQ','includes','3004bALpte','every','VERIFY_FAILED','unknown','present','absent','1108476MCtzgs','sort','home','installedPath','split','join','version','error','stdio',':\x5cs*(.+)$','path','trim','root','update','length','packageRoot','flatMap','current','match','3664071QVRfcz','manifest','skills','parse','skillVersion','startsWith','SKILL.md','content_mismatch','rabetbase','missing','name','version_mismatch','hex','isSymbolicLink','10ZXZhKR','340424teXItV','unverifiable','5IlwyDQ','schemaVersion','Unsafe\x20manifest\x20path:\x20'];a260_0x3455=function(){return _0x1aa5d9;};return a260_0x3455();}export function inspectBuiltinSkill(_0x3770d3={}){const _0x4c79f0=a260_0x1d1d62,_0x5e0cdd=_0x3770d3[_0x4c79f0(0x132)]??DEFAULT_PACKAGE_ROOT;let _0x1c922e;try{_0x1c922e=readSource(_0x5e0cdd);}catch(_0x2939bf){return{'state':'unverifiable','packageVersion':_0x4c79f0(0x120),'reason':_0x2939bf instanceof Error?_0x2939bf['message']:String(_0x2939bf),'repairCommand':REPAIR_COMMAND};}const _0x4a01e6=installedSkillPath(_0x3770d3['home']??homedir());if(_0x4a01e6[_0x4c79f0(0x118)]==='missing')return{'state':'missing','packageVersion':_0x1c922e[_0x4c79f0(0x11a)],'repairCommand':REPAIR_COMMAND};if(_0x4a01e6[_0x4c79f0(0x118)]===_0x4c79f0(0x146))return{'state':_0x4c79f0(0x146),'packageVersion':_0x1c922e[_0x4c79f0(0x11a)],'reason':_0x4a01e6[_0x4c79f0(0x119)],'repairCommand':REPAIR_COMMAND};try{const _0x5470d6=frontmatterValue(readFileSync(join(_0x4a01e6[_0x4c79f0(0x12d)],_0x4c79f0(0x13c)),'utf8'),_0x4c79f0(0x129));if(_0x5470d6!==_0x1c922e[_0x4c79f0(0x13a)])return{'state':_0x4c79f0(0x141),'packageVersion':_0x1c922e[_0x4c79f0(0x11a)],'skillVersion':_0x5470d6,'installedPath':_0x4a01e6[_0x4c79f0(0x12d)],'repairCommand':REPAIR_COMMAND};const _0x487066=listFiles(_0x4a01e6[_0x4c79f0(0x12d)]),_0x86809a=digestFiles(_0x4a01e6[_0x4c79f0(0x12d)],_0x487066);return{'state':sameFiles(_0x487066,_0x1c922e[_0x4c79f0(0x137)]['files'])&&_0x86809a===_0x1c922e[_0x4c79f0(0x137)][_0x4c79f0(0x14b)]?_0x4c79f0(0x134):_0x4c79f0(0x13d),'packageVersion':_0x1c922e[_0x4c79f0(0x11a)],'skillVersion':_0x5470d6,'installedPath':_0x4a01e6[_0x4c79f0(0x12d)],'digest':_0x86809a,'repairCommand':REPAIR_COMMAND};}catch(_0xa2901e){return{'state':_0x4c79f0(0x146),'packageVersion':_0x1c922e[_0x4c79f0(0x11a)],'installedPath':_0x4a01e6[_0x4c79f0(0x12d)],'reason':_0xa2901e instanceof Error?_0xa2901e['message']:String(_0xa2901e),'repairCommand':REPAIR_COMMAND};}}function failure(_0x5e2a61,_0xccd3b2,_0x236d33,_0x56a4b7){const _0x1a738d=a260_0x1d1d62;return{'ok':![],'code':_0x5e2a61,'packageVersion':_0xccd3b2[_0x1a738d(0x11a)],'skillVersion':_0xccd3b2['skillVersion'],'installedPath':_0x56a4b7,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x236d33 instanceof Error?_0x236d33[_0x1a738d(0x14d)]:String(_0x236d33)};}export function installBuiltinSkill(_0x2c8418={}){const _0x4666b0=a260_0x1d1d62,_0x527900=_0x2c8418[_0x4666b0(0x132)]??DEFAULT_PACKAGE_ROOT,_0x3f23da=_0x2c8418[_0x4666b0(0x125)]??homedir();let _0x37f09c;try{_0x37f09c=readSource(_0x527900);}catch(_0x260c79){return failure('SOURCE_INVALID',{'packageVersion':_0x4666b0(0x120),'skillVersion':'unknown'},_0x260c79);}const _0x335300=inspectBuiltinSkill({'packageRoot':_0x527900,'home':_0x3f23da}),_0x418ade=runNpxSkillsAddGlobal(_0x527900,_0x37f09c[_0x4666b0(0x12f)],{'stdio':_0x2c8418[_0x4666b0(0x12b)]??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0x3f23da}});if(_0x418ade['skipped'])return{'ok':!![],'packageVersion':_0x37f09c[_0x4666b0(0x11a)],'skillVersion':_0x37f09c[_0x4666b0(0x13a)],'installedPath':_0x335300[_0x4666b0(0x126)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x418ade['ok'])return failure(_0x4666b0(0x151),_0x37f09c,_0x418ade[_0x4666b0(0x12a)]??'skills@latest\x20exited\x20'+_0x418ade['status']);const _0x5f5b40=inspectBuiltinSkill({'packageRoot':_0x527900,'home':_0x3f23da});if(_0x5f5b40[_0x4666b0(0x118)]!=='current')return failure(_0x4666b0(0x11f),_0x37f09c,_0x5f5b40[_0x4666b0(0x119)]??_0x4666b0(0x153)+_0x5f5b40['state'],_0x5f5b40['installedPath']);return{'ok':!![],'packageVersion':_0x37f09c[_0x4666b0(0x11a)],'skillVersion':_0x37f09c[_0x4666b0(0x13a)],'installedPath':_0x5f5b40[_0x4666b0(0x126)],'changed':_0x335300[_0x4666b0(0x118)]!==_0x4666b0(0x134),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x100ff4,_0x1dc0bc){const _0x395034=a261_0x329e,_0x24197c=_0x100ff4();while(!![]){try{const _0x2c68a3=parseInt(_0x395034(0x1df))/0x1*(parseInt(_0x395034(0x1e7))/0x2)+parseInt(_0x395034(0x1d4))/0x3*(-parseInt(_0x395034(0x1d2))/0x4)+parseInt(_0x395034(0x1d5))/0x5+-parseInt(_0x395034(0x1f3))/0x6+parseInt(_0x395034(0x1f2))/0x7+-parseInt(_0x395034(0x1dc))/0x8+parseInt(_0x395034(0x1db))/0x9;if(_0x2c68a3===_0x1dc0bc)break;else _0x24197c['push'](_0x24197c['shift']());}catch(_0x4c38b8){_0x24197c['push'](_0x24197c['shift']());}}}(a261_0x2c8e,0x477aa));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a261_0x2c8e(){const _0x422142=['--help','enable-bff-save','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','exit','Public\x20Open\x20Skill\x20source:\x20','不支持的命令:\x20','-$1','dangerously-bff-save','1665454docgbt','285456opSPCy','cwd','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','256364yvLdvh','slice','3mJSSbm','2519570VNyYZy','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','length','push','error','argv','1575ImCSBG','3285576GbUvWr','(empty)','Error:\x20Unsupported\x20command:\x20','1283AztJzY','replace','skill','setLogPath','\x0aAvailable\x20commands:','toLowerCase','entries','from','114wJdQqd','add','log'];a261_0x2c8e=function(){return _0x422142;};return a261_0x2c8e();}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x2ac12b){const _0x550b82=a261_0x329e,_0x320b7d=[];for(const [_0x44a263,_0x20251e]of Object[_0x550b82(0x1e5)](_0x2ac12b)){if(_0x20251e===!![]){const _0x1732af=_0x44a263[_0x550b82(0x1e0)](/([A-Z])/g,_0x550b82(0x1f0))[_0x550b82(0x1e4)]();_0x320b7d[_0x550b82(0x1d8)](_0x1732af);}}return _0x320b7d;}function a261_0x329e(_0x3628ee,_0x3e7ba2){_0x3628ee=_0x3628ee-0x1d1;const _0x2c8ee0=a261_0x2c8e();let _0x329eaa=_0x2c8ee0[_0x3628ee];return _0x329eaa;}export function parseDynamicFlags(){const _0x56be37=a261_0x329e,_0xee9f37=[];for(let _0x4bdd6e=0x3;_0x4bdd6e<process[_0x56be37(0x1da)][_0x56be37(0x1d7)];_0x4bdd6e++){const _0x1eed9d=process[_0x56be37(0x1da)][_0x4bdd6e];if(_0x1eed9d&&_0x1eed9d['startsWith']('--')){const _0x5666fd=_0x1eed9d[_0x56be37(0x1d3)](0x2);_0x5666fd&&!_0x5666fd['includes']('=')&&_0xee9f37[_0x56be37(0x1d8)](_0x5666fd);}}return _0xee9f37;}export function getAllProvidedFlags(_0x4a672f){const _0x3dfbb7=a261_0x329e,_0x3a6800=camelCaseFlagsToKebab(_0x4a672f),_0x33dbbe=parseDynamicFlags(),_0x249192=new Set([..._0x3a6800,..._0x33dbbe]);return Array[_0x3dfbb7(0x1e6)](_0x249192);}export function normalizeLegacyBffSaveFlags(_0x3802a7){const _0x4cbd8f=a261_0x329e,_0x560089=new Set(_0x3802a7);return _0x560089['has'](_0x4cbd8f(0x1f1))&&_0x560089[_0x4cbd8f(0x1e8)](_0x4cbd8f(0x1eb)),Array[_0x4cbd8f(0x1e6)](_0x560089);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x18eddf,_0x3c4eb6,_0x36fb93){const _0x1d91f3=a261_0x329e;logger[_0x1d91f3(0x1e2)](process[_0x1d91f3(0x1f4)]());if(_0x36fb93?.['help']||_0x18eddf===_0x1d91f3(0x1ea)){showHelp();return;}console['error'](_0x1d91f3(0x1de)+(_0x18eddf||_0x1d91f3(0x1dd))),console[_0x1d91f3(0x1e9)](_0x1d91f3(0x1e3)),console[_0x1d91f3(0x1e9)]('\x20\x20'+CLI_BIN_NAME+_0x1d91f3(0x1d6)),console[_0x1d91f3(0x1e9)](''),console[_0x1d91f3(0x1e9)](_0x1d91f3(0x1ee)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x1d91f3(0x1d9)](_0x1d91f3(0x1e1),_0x1d91f3(0x1ef)+_0x18eddf),process[_0x1d91f3(0x1ed)](0x1);}function showHelp(){const _0x387873=a261_0x329e;console[_0x387873(0x1e9)]('\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+_0x387873(0x1ec)+SKILLS_INSTALL_COMMAND_LINE+_0x387873(0x1d1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a262_0x398936=a262_0x35bb;(function(_0x29d4fb,_0x40dff6){const _0x271ce5=a262_0x35bb,_0x1e122e=_0x29d4fb();while(!![]){try{const _0x5dc833=parseInt(_0x271ce5(0xbc))/0x1*(-parseInt(_0x271ce5(0xe3))/0x2)+-parseInt(_0x271ce5(0xe5))/0x3+-parseInt(_0x271ce5(0xb1))/0x4*(parseInt(_0x271ce5(0xb0))/0x5)+-parseInt(_0x271ce5(0xc3))/0x6+-parseInt(_0x271ce5(0xd5))/0x7*(-parseInt(_0x271ce5(0xdf))/0x8)+parseInt(_0x271ce5(0xc5))/0x9*(parseInt(_0x271ce5(0xd3))/0xa)+-parseInt(_0x271ce5(0xb4))/0xb*(-parseInt(_0x271ce5(0xd0))/0xc);if(_0x5dc833===_0x40dff6)break;else _0x1e122e['push'](_0x1e122e['shift']());}catch(_0x3ada1){_0x1e122e['push'](_0x1e122e['shift']());}}}(a262_0x3763,0x56574));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=a262_0x398936(0xc9);export const NPX_SKILLS_SUBCOMMAND_ADD=a262_0x398936(0xdd);function a262_0x3763(){const _0xfd6098=['lovrabet/lovrabet-skill','state','INSTALL_PARTIAL','message','35825dcFTlN','28cGTMBf','ENOENT','\x20failed\x20target(s)','11ebEerV','expectedSkillName','presence','stdout','reason','EPERM','remove','yes','10702nSrECr','trim','lovrabet/rabetbase','code','toString','push','CHILD_EXIT_NONZERO','126588EOMjSU','join','85851FzPOKb','npx','npm_config_global','NPM_CONFIG_GLOBAL','skills@latest','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','Installer\x20reported\x20','stdio','pipe','present','filter','3047340kRzDcI','checked','inherit','530cqxNIj','absent','711641TmPstu','EACCES','error','status','match','signal','NPX_NOT_FOUND','SKILL_NOT_INSTALLED','add','stderr','16ewRWeF','\x22\x20install\x20state:\x20','--skill','npx\x20terminated\x20by\x20signal\x20','88WpqIoQ','warn','201135CfYPPY','log'];a262_0x3763=function(){return _0xfd6098;};return a262_0x3763();}export const NPX_SKILLS_FLAG_SKILL=a262_0x398936(0xe1);export const RABETBASE_SKILL_SOURCE=a262_0x398936(0xbe);export const LEGACY_RABETBASE_SKILL_SOURCE=a262_0x398936(0xe7);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export const RABETBASE_GLOBAL_SKILL_NAME='rabetbase';export const RABETBASE_SKILL_GIT_SOURCE='git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git';function a262_0x35bb(_0x3b9b73,_0x33cb47){_0x3b9b73=_0x3b9b73-0xae;const _0x37636b=a262_0x3763();let _0x35bbb2=_0x37636b[_0x3b9b73];return _0x35bbb2;}export function resolveGlobalSkillName(_0x4e1cc0){const _0x22aaa5=a262_0x398936;switch(_0x4e1cc0[_0x22aaa5(0xbd)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x535c35){const _0xade39a=a262_0x398936,_0x218971=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x535c35&&_0x218971[_0xade39a(0xc1)](NPX_SKILLS_FLAG_SKILL,_0x535c35),_0x218971;}export const NPX_SKILLS_ADD_COMMAND_LINE=['npx',...buildNpxSkillsAddArgv()]['join']('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a262_0x398936(0xc6),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a262_0x398936(0xc4)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x191fde,_0x591c7b,_0x5369a9){return{'ok':![],'status':_0x591c7b,'code':_0x191fde,'error':'['+_0x191fde+']\x20'+_0x5369a9};}function spawnOptions(_0x1d2881,_0x1a7ac6){const _0x48ef1=a262_0x398936,_0x524ad8={...process.env};return delete _0x524ad8[_0x48ef1(0xc7)],delete _0x524ad8[_0x48ef1(0xc8)],{'cwd':_0x1d2881,'stdio':_0x1a7ac6,'env':_0x524ad8,'shell':![],..._0x1a7ac6===_0x48ef1(0xcd)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x218631,_0x45785e,_0x3294db,_0x2f4510){const _0x8635a7=a262_0x398936,_0x511d0a=[_0x218631[_0x8635a7(0xb7)]?_0x218631[_0x8635a7(0xb7)][_0x8635a7(0xc0)]():'',_0x218631[_0x8635a7(0xde)]?_0x218631[_0x8635a7(0xde)][_0x8635a7(0xc0)]():''][_0x8635a7(0xcf)](Boolean)[_0x8635a7(0xc4)]('\x0a')['trim']();_0x2f4510!=='pipe'&&_0x511d0a&&console[_0x8635a7(0xe6)](_0x511d0a);if(_0x218631[_0x8635a7(0xd7)]){const _0x58cb86=_0x218631[_0x8635a7(0xd7)],_0x39c454=_0x58cb86[_0x8635a7(0xbf)]===_0x8635a7(0xb2)?_0x8635a7(0xdb):_0x58cb86[_0x8635a7(0xbf)]===_0x8635a7(0xb9)||_0x58cb86[_0x8635a7(0xbf)]===_0x8635a7(0xd6)?'PERMISSION_DENIED':'SPAWN_FAILED';return failure(_0x39c454,_0x218631['status'],_0x58cb86[_0x8635a7(0xaf)]);}if(_0x218631[_0x8635a7(0xda)])return failure('CHILD_TERMINATED',_0x218631['status'],_0x8635a7(0xe2)+_0x218631[_0x8635a7(0xda)]);if(_0x218631['status']!==0x0)return failure(_0x8635a7(0xc2),_0x218631[_0x8635a7(0xd8)],_0x511d0a||'exit\x20'+(_0x218631[_0x8635a7(0xd8)]??'unknown'));const _0x1e0e79=_0x45785e?resolveInstalledSkill(_0x45785e,_0x3294db):undefined,_0x7b4a0f=_0x511d0a[_0x8635a7(0xd9)](/Failed to install\s+(\d+)/i);if(_0x7b4a0f&&Number(_0x7b4a0f[0x1])>0x0){const _0x4539fd=_0x8635a7(0xcb)+_0x7b4a0f[0x1]+_0x8635a7(0xb3)+(_0x511d0a?':\x0a'+_0x511d0a:'');if(_0x1e0e79?.[_0x8635a7(0xe8)]===_0x8635a7(0xce))return console[_0x8635a7(0xe4)]('!\x20'+_0x4539fd),{'ok':!![],'status':0x0};return failure(_0x8635a7(0xae),0x0,_0x4539fd);}if(_0x1e0e79){if(_0x1e0e79[_0x8635a7(0xe8)]===_0x8635a7(0xd4))return failure(_0x8635a7(0xdc),0x0,'Skill\x20\x22'+_0x45785e+_0x8635a7(0xca)+_0x1e0e79[_0x8635a7(0xd1)][_0x8635a7(0xc4)](',\x20')+')');_0x1e0e79['state']==='unverifiable'&&console[_0x8635a7(0xe4)]('!\x20Could\x20not\x20verify\x20\x22'+_0x45785e+_0x8635a7(0xe0)+_0x1e0e79[_0x8635a7(0xb8)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x20d7db,_0x17191b){const _0x36be7d=a262_0x398936;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1e512f=_0x17191b?.[_0x36be7d(0xcc)]??_0x36be7d(0xd2),_0x53ff10=resolveNpmBin(_0x36be7d(0xc6)),_0x3520a4=buildNpxSkillsAddArgv(_0x17191b?.['skill']),_0x20a59f=[_0x36be7d(0xc6),..._0x3520a4][_0x36be7d(0xc4)]('\x20');console[_0x36be7d(0xe6)]('*\x20'+_0x20a59f);const _0x2c7d55=spawnSync(_0x53ff10,_0x3520a4,spawnOptions(_0x20d7db,_0x1e512f));return normalizeSpawnResult(_0x2c7d55,undefined,undefined,_0x1e512f);}export function runNpxSkillsRemove(_0x574cf6,_0x7c21fc,_0x4f0082=LEGACY_RABETBASE_SKILL_SOURCE){const _0x51220a=a262_0x398936;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0xfcbb20=_0x7c21fc?.[_0x51220a(0xcc)]??_0x51220a(0xd2),_0x19e267=resolveNpmBin('npx'),_0x316989=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x51220a(0xba),_0x4f0082,NPX_SKILLS_FLAG_SKILL,_0x7c21fc?.['skill']??DEFAULT_RABETBASE_SKILL_NAME,..._0x7c21fc?.[_0x51220a(0xbb)]?['-y']:[]],_0x2f9cca=[_0x19e267,..._0x316989][_0x51220a(0xc4)]('\x20');console[_0x51220a(0xe6)]('*\x20'+_0x2f9cca);const _0x5c727b=spawnSync(_0x19e267,_0x316989,spawnOptions(_0x574cf6,_0xfcbb20));return normalizeSpawnResult(_0x5c727b,undefined,undefined,_0xfcbb20);}export function runNpxSkillsAddGlobal(_0x463a26,_0x16e62d,_0x323424){const _0xcc72a=a262_0x398936;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3b6d5a=resolveNpmBin(_0xcc72a(0xc6)),_0x433ce0=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x16e62d,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x6f49c2=['npx',NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x16e62d,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0xcc72a(0xc4)]('\x20');console['log']('*\x20'+_0x6f49c2);const _0x2d54f7=spawnSync(_0x3b6d5a,_0x433ce0,spawnOptions(_0x463a26,'pipe'));return normalizeSpawnResult(_0x2d54f7,_0x323424?.[_0xcc72a(0xb5)]??resolveGlobalSkillName(_0x16e62d),_0x323424?.[_0xcc72a(0xb6)],_0x323424?.[_0xcc72a(0xcc)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a263_0x306e84=a263_0xf0ca;(function(_0x5054be,_0x173eda){const _0x226e03=a263_0xf0ca,_0x431998=_0x5054be();while(!![]){try{const _0x4cf906=parseInt(_0x226e03(0x179))/0x1*(-parseInt(_0x226e03(0x161))/0x2)+-parseInt(_0x226e03(0x15b))/0x3*(parseInt(_0x226e03(0x15c))/0x4)+parseInt(_0x226e03(0x167))/0x5+parseInt(_0x226e03(0x15d))/0x6+parseInt(_0x226e03(0x169))/0x7+-parseInt(_0x226e03(0x165))/0x8*(-parseInt(_0x226e03(0x15f))/0x9)+parseInt(_0x226e03(0x16b))/0xa*(-parseInt(_0x226e03(0x168))/0xb);if(_0x4cf906===_0x173eda)break;else _0x431998['push'](_0x431998['shift']());}catch(_0x3cef0f){_0x431998['push'](_0x431998['shift']());}}}(a263_0x25bf,0x7f56f));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a263_0x25bf(){const _0x210248=['3274765jhCkaN','35255sMEaaT','3096177aKiraD','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','2700rDROXo','.agents','reason','join','home','unverifiable','skills','lockFile','recorded','map','not-recorded','SKILL.md','\x20records\x20\x22','find','756827zNKFqu','version','object','kind','.claude','289290bMNKvr','24wPHXDV','4874766cVUmme','\x20is\x20unreadable:\x20','45WQswNC','utf8','2YAkHYI','unusable','\x20has\x20no\x20skills\x20map','\x20uses\x20unsupported\x20version\x20','1300184GWuFfc','present'];a263_0x25bf=function(){return _0x210248;};return a263_0x25bf();}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a263_0x306e84(0x16c),'skills'),join(a263_0x306e84(0x15a),'skills')];function a263_0xf0ca(_0x15a32d,_0x257398){_0x15a32d=_0x15a32d-0x159;const _0x25bf69=a263_0x25bf();let _0xf0ca34=_0x25bf69[_0x15a32d];return _0xf0ca34;}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x1067ed,_0x51c833){const _0x5965e7=a263_0x306e84;if(!existsSync(_0x1067ed))return{'kind':_0x5965e7(0x175)};let _0x498034;try{_0x498034=JSON['parse'](readFileSync(_0x1067ed,_0x5965e7(0x160)));}catch(_0x3ae427){return{'kind':'unusable','reason':_0x1067ed+_0x5965e7(0x15e)+_0x3ae427['message']};}const _0x5bb8c0=_0x498034;if(typeof _0x5bb8c0?.['version']!=='number'||!SUPPORTED_LOCK_VERSIONS['includes'](_0x5bb8c0[_0x5965e7(0x17a)]))return{'kind':_0x5965e7(0x162),'reason':_0x1067ed+_0x5965e7(0x164)+String(_0x5bb8c0?.['version'])};if(!_0x5bb8c0['skills']||typeof _0x5bb8c0['skills']!==_0x5965e7(0x17b))return{'kind':_0x5965e7(0x162),'reason':_0x1067ed+_0x5965e7(0x163)};return _0x5bb8c0[_0x5965e7(0x171)][_0x51c833]?{'kind':_0x5965e7(0x173)}:{'kind':_0x5965e7(0x175)};}export function resolveInstalledSkill(_0x3f6f2c,_0x1e8320){const _0x12a32f=a263_0x306e84,_0x40f1b3=_0x1e8320?.[_0x12a32f(0x16f)]??homedir(),_0xf97792=_0x1e8320?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x12a32f(0x174)](_0x5169ba=>join(_0x40f1b3,_0x5169ba)),_0x476a14=_0x1e8320?.[_0x12a32f(0x172)]??join(_0x40f1b3,SKILL_LOCK_RELATIVE_PATH),_0xa4703e=_0xf97792[_0x12a32f(0x174)](_0x4cbc7c=>join(_0x4cbc7c,_0x3f6f2c,_0x12a32f(0x176))),_0x813013=_0xa4703e[_0x12a32f(0x178)](_0x3250d8=>existsSync(_0x3250d8));if(_0x813013)return{'state':_0x12a32f(0x166),'path':_0x813013};const _0x3fc466=readLockLookup(_0x476a14,_0x3f6f2c);if(_0x3fc466[_0x12a32f(0x159)]===_0x12a32f(0x162))return{'state':_0x12a32f(0x170),'reason':_0x3fc466[_0x12a32f(0x16d)]};if(_0x3fc466[_0x12a32f(0x159)]===_0x12a32f(0x173))return{'state':_0x12a32f(0x170),'reason':_0x476a14+_0x12a32f(0x177)+_0x3f6f2c+_0x12a32f(0x16a)+('('+_0xa4703e[_0x12a32f(0x16e)](',\x20')+')')};return{'state':'absent','checked':_0xa4703e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1311c8,_0x40aa2b){const _0xf0d1d2=a264_0x349e,_0x46b8ea=_0x1311c8();while(!![]){try{const _0x11dd9a=parseInt(_0xf0d1d2(0xfa))/0x1*(-parseInt(_0xf0d1d2(0xfc))/0x2)+-parseInt(_0xf0d1d2(0xf3))/0x3*(parseInt(_0xf0d1d2(0xfd))/0x4)+-parseInt(_0xf0d1d2(0xfe))/0x5*(parseInt(_0xf0d1d2(0xf7))/0x6)+-parseInt(_0xf0d1d2(0xf1))/0x7*(-parseInt(_0xf0d1d2(0xfb))/0x8)+-parseInt(_0xf0d1d2(0xea))/0x9*(parseInt(_0xf0d1d2(0xf8))/0xa)+-parseInt(_0xf0d1d2(0xf0))/0xb*(-parseInt(_0xf0d1d2(0xf4))/0xc)+parseInt(_0xf0d1d2(0xf9))/0xd*(parseInt(_0xf0d1d2(0xf5))/0xe);if(_0x11dd9a===_0x40aa2b)break;else _0x46b8ea['push'](_0x46b8ea['shift']());}catch(_0x727756){_0x46b8ea['push'](_0x46b8ea['shift']());}}}(a264_0x4dfb,0x60cdd));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function a264_0x4dfb(){const _0xa20145=['service','rabetbase.command','5931DCoahg','test','durationMs','[REDACTED]','message','entries','11jEbxjt','2680741FzgIjh','flags','861BorPoh','1144812byDzTh','143402ITVPjj','error','34746daWCbH','5140TIbkKK','819NxxdgT','113bvGMXF','16awANnr','7600lfKRgt','1296rWakBD','215vwCroJ'];a264_0x4dfb=function(){return _0xa20145;};return a264_0x4dfb();}function isSensitiveKey(_0x2c7b64){const _0x1d1612=a264_0x349e;return SENSITIVE_PATTERNS['some'](_0x3082d0=>_0x3082d0[_0x1d1612(0xeb)](_0x2c7b64));}function a264_0x349e(_0x4d7672,_0x567ac1){_0x4d7672=_0x4d7672-0xe9;const _0x4dfb37=a264_0x4dfb();let _0x349e12=_0x4dfb37[_0x4d7672];return _0x349e12;}function sanitizeFlags(_0x3423bd){const _0x3ab6e6=a264_0x349e,_0x258cba={};for(const [_0x59475a,_0x4a451c]of Object[_0x3ab6e6(0xef)](_0x3423bd)){isSensitiveKey(_0x59475a)?_0x258cba[_0x59475a]=_0x4a451c!=null&&_0x4a451c!==''?_0x3ab6e6(0xed):_0x4a451c:_0x258cba[_0x59475a]=_0x4a451c;}return _0x258cba;}export async function reportCommandTrace(_0x19b89e){const _0x1a512e=a264_0x349e;try{const _0x33e2f4=sanitizeFlags(_0x19b89e[_0x1a512e(0xf2)]);await sendCliTraceLog({'spanName':_0x1a512e(0xe9),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x19b89e[_0x1a512e(0xff)],'command.name':_0x19b89e['command'],'command.flags':JSON['stringify'](_0x33e2f4),..._0x19b89e[_0x1a512e(0xec)]!=null?{'command.duration_ms':_0x19b89e[_0x1a512e(0xec)]}:{},..._0x19b89e[_0x1a512e(0xf6)]?{'command.error':_0x19b89e[_0x1a512e(0xf6)]instanceof Error?_0x19b89e['error'][_0x1a512e(0xee)]:String(_0x19b89e[_0x1a512e(0xf6)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a265_0x1f0e(){var _0x2e3717=['707923MYFneG','22ttxXsk','6MAsVMw','16EpvfRY','cli.help','1023393qIDTih','258867xXOugO','1718336FhtmEC','4446710eWwynC','2451788YSSUnE','service','12832596ZmJxWU','3YlrFoW','50cNTyRZ','Failed\x20to\x20report\x20CLI\x20help\x20trace:'];a265_0x1f0e=function(){return _0x2e3717;};return a265_0x1f0e();}(function(_0x508221,_0x138933){var _0x14cfbf=a265_0x527c,_0x565b4c=_0x508221();while(!![]){try{var _0xf5d68b=parseInt(_0x14cfbf(0x11d))/0x1+-parseInt(_0x14cfbf(0x117))/0x2*(-parseInt(_0x14cfbf(0x11a))/0x3)+parseInt(_0x14cfbf(0x124))/0x4+-parseInt(_0x14cfbf(0x116))/0x5*(-parseInt(_0x14cfbf(0x11f))/0x6)+parseInt(_0x14cfbf(0x122))/0x7*(-parseInt(_0x14cfbf(0x120))/0x8)+parseInt(_0x14cfbf(0x123))/0x9*(-parseInt(_0x14cfbf(0x11b))/0xa)+-parseInt(_0x14cfbf(0x11e))/0xb*(parseInt(_0x14cfbf(0x119))/0xc);if(_0xf5d68b===_0x138933)break;else _0x565b4c['push'](_0x565b4c['shift']());}catch(_0x581108){_0x565b4c['push'](_0x565b4c['shift']());}}}(a265_0x1f0e,0xa5784));function a265_0x527c(_0x278da8,_0x57be82){_0x278da8=_0x278da8-0x116;var _0x1f0e46=a265_0x1f0e();var _0x527c58=_0x1f0e46[_0x278da8];return _0x527c58;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x59f47a,_0x562a00){var _0xdbac92=a265_0x527c;try{await sendCliTraceLog({'spanName':_0xdbac92(0x121),'logData':{'rabetbase.help.kind':_0x59f47a,..._0x562a00?.[_0xdbac92(0x118)]&&{'rabetbase.help.service':_0x562a00[_0xdbac92(0x118)]}}});}catch(_0x3a75d0){console['error'](_0xdbac92(0x11c),_0x3a75d0);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a266_0x3a5a(){const _0x1b3be6=['24AWMFTv','606lmMDHC','7044608bWnnLL','5rQwzkG','tenant','3126134VRJnNb','2106764OGohFo','nickname','956579ykeVfs','username','unknown','tenant_code','production','3086qNmEbh','40306oYLyRv','7357896ItSKdV','80lguNtd'];a266_0x3a5a=function(){return _0x1b3be6;};return a266_0x3a5a();}(function(_0x7bd7ec,_0x4287c2){const _0x17ae22=a266_0x209c,_0x35fb40=_0x7bd7ec();while(!![]){try{const _0x2413c6=parseInt(_0x17ae22(0x191))/0x1+-parseInt(_0x17ae22(0x196))/0x2*(parseInt(_0x17ae22(0x19b))/0x3)+parseInt(_0x17ae22(0x1a0))/0x4*(-parseInt(_0x17ae22(0x19d))/0x5)+parseInt(_0x17ae22(0x19a))/0x6*(-parseInt(_0x17ae22(0x197))/0x7)+-parseInt(_0x17ae22(0x19c))/0x8+-parseInt(_0x17ae22(0x198))/0x9+parseInt(_0x17ae22(0x199))/0xa*(parseInt(_0x17ae22(0x19f))/0xb);if(_0x2413c6===_0x4287c2)break;else _0x35fb40['push'](_0x35fb40['shift']());}catch(_0x2dbf99){_0x35fb40['push'](_0x35fb40['shift']());}}}(a266_0x3a5a,0xa3b8a));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';function a266_0x209c(_0x21c3e5,_0x37e7c7){_0x21c3e5=_0x21c3e5-0x191;const _0x3a5a18=a266_0x3a5a();let _0x209c13=_0x3a5a18[_0x21c3e5];return _0x209c13;}let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x47d3a3=a266_0x209c,_0x15ff1f=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x23848e=_0x15ff1f?.['user'];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x47d3a3(0x193)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':_0x47d3a3(0x195))}),setUserContext({'id':_0x23848e?.['id'],'username':_0x23848e?.[_0x47d3a3(0x192)],'nickname':_0x23848e?.[_0x47d3a3(0x1a1)],'email':_0x23848e?.['email'],'tenantCode':_0x23848e?.[_0x47d3a3(0x19e)]?.[_0x47d3a3(0x194)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x15ff1f;}
|