@lovrabet/rabetbase-cli 2.4.2 → 2.4.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.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 +8 -4
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfb4c49,_0x3ed310){const _0x360c76=a247_0x1dde,_0x1a1228=_0xfb4c49();while(!![]){try{const _0x531f45=-parseInt(_0x360c76(0x1f7))/0x1*(parseInt(_0x360c76(0x205))/0x2)+parseInt(_0x360c76(0x1f9))/0x3+parseInt(_0x360c76(0x20c))/0x4+-parseInt(_0x360c76(0x20d))/0x5*(-parseInt(_0x360c76(0x204))/0x6)+-parseInt(_0x360c76(0x1fd))/0x7+-parseInt(_0x360c76(0x20f))/0x8*(parseInt(_0x360c76(0x1fc))/0x9)+parseInt(_0x360c76(0x1f6))/0xa*(parseInt(_0x360c76(0x20e))/0xb);if(_0x531f45===_0x3ed310)break;else _0x1a1228['push'](_0x1a1228['shift']());}catch(_0x3abe9b){_0x1a1228['push'](_0x1a1228['shift']());}}}(a247_0x18d4,0x93bc4));import{CliErrors}from'../errors.js';function a247_0x1dde(_0x40172f,_0x573f0b){_0x40172f=_0x40172f-0x1f4;const _0x18d47f=a247_0x18d4();let _0x1dde97=_0x18d47f[_0x40172f];return _0x1dde97;}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x3afb55,_0xc9d77c,_0x5052a6,_0x24d529){const _0x32c552=a247_0x1dde,_0x10d8fc=_0x3afb55[_0x32c552(0x1fa)][_0x32c552(0x209)](_0x40be98=>_0x40be98[_0x32c552(0x202)]===_0x32c552(0x1fe)&&_0x40be98[_0x32c552(0x203)]===_0x32c552(0x1f8)),_0x5b4070=_0x3afb55['flags'][_0x32c552(0x209)](_0xa44115=>_0xa44115['name']===_0x32c552(0x20b)&&_0xa44115['type']===_0x32c552(0x1f8));if(!_0x10d8fc||!_0x5b4070)return;const _0x16d51a=_0xc9d77c['code']?String(_0xc9d77c[_0x32c552(0x1fe)]):'',_0x268815=_0xc9d77c[_0x32c552(0x20b)]?String(_0xc9d77c['alias']):'';if(!_0x16d51a&&!_0x268815)throw CliErrors[_0x32c552(0x206)]('`'+_0x24d529+_0x32c552(0x1ff));if(_0x268815&&!_0x16d51a){const _0x2a4268=resolveAlias(_0x5052a6,_0x268815);if(!_0x2a4268){const _0x54be30=listAliases(_0x5052a6)[_0x32c552(0x1f4)](_0x2dfc56=>_0x2dfc56['alias']),_0x270b27=_0x54be30[_0x32c552(0x1fb)]?_0x32c552(0x200)+_0x54be30[_0x32c552(0x1f5)](',\x20'):_0x32c552(0x207)+_0x5052a6+_0x32c552(0x208)+CLI_BIN_NAME+_0x32c552(0x210);throw CliErrors[_0x32c552(0x206)](_0x32c552(0x20a)+_0x268815+_0x32c552(0x201)+_0x270b27);}_0xc9d77c[_0x32c552(0x1fe)]=_0x2a4268;}}function a247_0x18d4(){const _0x4f8ecc=['8hqgKIk','validation','No\x20api.ts\x20found\x20in\x20','.\x20Run\x20`','some','Unknown\x20alias\x20\x22','alias','859796VxCQyQ','26265eWhWtT','187VxtaSI','2826808exaBaF','\x20api\x20pull`\x20first.','map','join','21790WxNacG','124733XwfaOq','string','2295228IBcQaK','flags','length','9sBtOUO','3242239BhOVTm','code','`\x20requires\x20either\x20--code\x20or\x20--alias.','Available\x20aliases:\x20','\x22.\x20','name','type','1032rtfLrZ'];a247_0x18d4=function(){return _0x4f8ecc;};return a247_0x18d4();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14036c,_0x1b0481){const _0x3d6707=a248_0x397c,_0x379d31=_0x14036c();while(!![]){try{const _0x1f658a=parseInt(_0x3d6707(0x1f5))/0x1+parseInt(_0x3d6707(0x1ed))/0x2*(-parseInt(_0x3d6707(0x221))/0x3)+parseInt(_0x3d6707(0x21c))/0x4+-parseInt(_0x3d6707(0x203))/0x5*(-parseInt(_0x3d6707(0x1e7))/0x6)+parseInt(_0x3d6707(0x21e))/0x7+-parseInt(_0x3d6707(0x1ff))/0x8+parseInt(_0x3d6707(0x20f))/0x9*(parseInt(_0x3d6707(0x222))/0xa);if(_0x1f658a===_0x1b0481)break;else _0x379d31['push'](_0x379d31['shift']());}catch(_0x55f26a){_0x379d31['push'](_0x379d31['shift']());}}}(a248_0x35da,0x94a59));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 a248_0x527c05}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0xc15119){const _0xebd139=a248_0x397c;return typeof _0xc15119===_0xebd139(0x219)&&_0xc15119[_0xebd139(0x1f0)]()?_0xc15119[_0xebd139(0x1f0)]():undefined;}function resolveEnvAppCode(){const _0x39f22a=a248_0x397c,_0x550609=stringFlag(process.env.RABETBASE_APPCODE);if(_0x550609)return{'name':'RABETBASE_APPCODE','value':_0x550609};const _0x32be08=stringFlag(process.env.LOVRABET_APPCODE);if(_0x32be08)return{'name':_0x39f22a(0x1f9),'value':_0x32be08};return undefined;}function hasExplicitAppCode(_0x4fa22a,_0xe41c42){const _0x4db25f=a248_0x397c;return!!(stringFlag(_0x4fa22a['appcode'])||stringFlag(_0xe41c42[_0x4db25f(0x1f6)]));}function assertEnvAppCodeNotIgnored(_0x2fc265,_0x2714d9,_0x3f565f){const _0x14c20b=a248_0x397c;if(!_0x2714d9||_0x3f565f||_0x2fc265===_0x2714d9[_0x14c20b(0x1ea)])return;const _0x2e4e6d=_0x2fc265?_0x14c20b(0x201)+_0x2fc265+'\x22.':_0x14c20b(0x1f2);throw CliErrors[_0x14c20b(0x214)](_0x2714d9[_0x14c20b(0x1fc)]+'='+_0x2714d9[_0x14c20b(0x1ea)]+_0x14c20b(0x1f1)+_0x2e4e6d+'\x20'+('To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$'+_0x2714d9['name']+'\x22.'));}export function createPipelineEnv(_0x345a60,_0x53aa49,_0x17a4c9=[]){const _0x5cdf50=a248_0x397c;return{'rawFlags':_0x53aa49,'args':_0x17a4c9,'resolveAppCode':()=>_0x345a60[_0x5cdf50(0x1e5)],'resolveCookie':()=>_0x345a60[_0x5cdf50(0x211)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a248_0x527c05(_0x53aa49),'defaultFormat':_0x345a60[_0x5cdf50(0x204)],'defaultPageSize':_0x345a60[_0x5cdf50(0x213)],'defaultVerbose':_0x345a60[_0x5cdf50(0x205)],'apiDir':_0x345a60[_0x5cdf50(0x1f8)],'riskLevel':_0x345a60[_0x5cdf50(0x218)],'selectedAppName':_0x345a60[_0x5cdf50(0x1f3)],'mergedCli':{'defaultApp':_0x345a60['defaultApp'],'currentApp':_0x345a60['currentApp'],'appCode':_0x345a60[_0x5cdf50(0x1e5)],'apps':_0x345a60[_0x5cdf50(0x20e)]}};}export function createRabetbaseRunnerAdapter(_0x1755b0={}){const _0x37e774=a248_0x397c;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x37e774(0x21b)](_0x1417d4=>PIPELINE_FLAG_NAMES[_0x37e774(0x1fe)](_0x1417d4[_0x37e774(0x1fc)]))['map'](({name:_0x11ac82,type:_0x2fa6ea,description:_0xaa8cbd})=>({'name':_0x11ac82,'type':_0x2fa6ea,'description':_0xaa8cbd})),'formatOutput':_0x1755b0[_0x37e774(0x1e9)]??formatOutput,'getCommandLabel'(_0x117f81){return CLI_BIN_NAME+'\x20'+_0x117f81['service']+'\x20'+_0x117f81['command'];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x1b35b9){const _0x137fbe=_0x37e774;return CliErrors[_0x137fbe(0x214)](_0x1b35b9);}},async 'prepare'(_0x1eddbe,_0x2788a0,_0xb9991b,_0x4d3731){const _0x50ca8a=_0x37e774,_0x346b4a=_0x2788a0[_0x50ca8a(0x1f8)]||DEFAULT_API_DIR;resolveAliasToCode(_0x1eddbe,_0xb9991b,_0x346b4a,_0x4d3731);const _0x223744=resolveCommandAuthMode(_0x1eddbe);let _0x55ed26='';if(_0x223744!==_0x50ca8a(0x1fa)){_0x55ed26=_0x2788a0[_0x50ca8a(0x220)]()||'';if(!_0x55ed26){if(_0x223744==='required')throw CliErrors[_0x50ca8a(0x208)]();}else{const {setActiveCookie:_0x414013}=await import('../core/api-client.js');_0x414013(_0x55ed26);}}const _0x48f43b=_0x2788a0[_0x50ca8a(0x212)]()??'';if(_0x1eddbe[_0x50ca8a(0x1eb)]!==![]){assertEnvAppCodeNotIgnored(_0x48f43b,resolveEnvAppCode(),hasExplicitAppCode(_0xb9991b,_0x2788a0[_0x50ca8a(0x210)]));if(!_0x48f43b)throw CliErrors['configMissing'](_0x50ca8a(0x1fd)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}return{'defaults':{'booleans':{'verbose':_0x2788a0[_0x50ca8a(0x209)]},'numbers':{'pagesize':_0x2788a0[_0x50ca8a(0x20c)]}},'extras':{'appCode':_0x48f43b,'cookie':_0x55ed26,'apiDomain':_0x2788a0[_0x50ca8a(0x1e8)](),'apiDir':_0x346b4a,'selectedAppName':_0x2788a0['selectedAppName'],'mergedCli':_0x2788a0[_0x50ca8a(0x1f7)]}};},'confirmHighRisk':_0x1755b0['confirmHighRisk']??(async({env:_0x433da3,commandLabel:_0x43a7eb})=>{const _0x524e17=_0x37e774;if(_0x433da3[_0x524e17(0x20b)])throw CliErrors[_0x524e17(0x214)]('High-risk\x20operation\x20`'+_0x43a7eb+_0x524e17(0x215));await requireConfirmationPrompt({'lines':['⚠\x20\x20High-risk\x20operation:\x20'+_0x43a7eb,_0x524e17(0x21f)],'createCancelledError':_0x548123=>CliErrors['cancelled'](_0x548123)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const {clearActiveCookie:_0x3dffa9}=await import('../core/api-client.js');_0x3dffa9();}export async function finalizeRabetbaseRuntimeState(){const _0x338ee7=a248_0x397c;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x588fdf},{initEnv:_0x360345}]=await Promise['all']([import(_0x338ee7(0x1ec)),import(_0x338ee7(0x1ef))]);_0x588fdf(),_0x360345('production');}}export async function runCommand(_0xd03824,_0x16a9aa,_0x4059c8=terminalRunnerAdapter){assertRejectedFlags(_0xd03824,_0x16a9aa['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0xd03824)?withUpdateNotice(_0xd03824):_0xd03824,_0x16a9aa,_0x4059c8);}function assertRejectedFlags(_0x453234,_0x3e1c37){const _0x30e8bf=a248_0x397c;for(const _0x5d9cea of _0x453234['rejectedFlags']??[]){const _0x1ecd42=GLOBAL_FLAGS[_0x30e8bf(0x200)](_0x1a100f=>_0x1a100f['name']===_0x5d9cea[_0x30e8bf(0x1fc)]),_0x530d1b=new Set([_0x5d9cea[_0x30e8bf(0x1fc)],toCamelCase(_0x5d9cea[_0x30e8bf(0x1fc)]),_0x1ecd42?.[_0x30e8bf(0x1fb)]]),_0x2909d5=[..._0x530d1b][_0x30e8bf(0x20d)](_0x38994c=>{if(!_0x38994c)return![];const _0x30b314=_0x3e1c37[_0x38994c];return _0x30b314!==undefined&&_0x30b314!==null&&_0x30b314!==![];});if(_0x2909d5)throw CliErrors['validation'](_0x5d9cea[_0x30e8bf(0x1f4)],_0x5d9cea['hint']);}}function toCamelCase(_0x40a5b5){return _0x40a5b5['replace'](/-([a-z])/g,(_0x280e82,_0x1ba32c)=>_0x1ba32c['toUpperCase']());}function shouldAttachUpdateNotice(_0x203269){const _0x3d6708=a248_0x397c;if(_0x203269[_0x3d6708(0x206)]===![])return![];return![_0x3d6708(0x1e6),_0x3d6708(0x21a),_0x3d6708(0x1ee)][_0x3d6708(0x217)](_0x203269['service']);}function withUpdateNotice(_0x2b2d0b){return{..._0x2b2d0b,async 'execute'(_0xee95d5){const _0x3b551c=a248_0x397c,_0x2ddfd7=shouldResolveUpdateNotice(_0xee95d5)?resolveLatestUpdateNotice()[_0x3b551c(0x1e4)](()=>null):Promise[_0x3b551c(0x202)](null),_0x585ad2=await _0x2b2d0b[_0x3b551c(0x207)](_0xee95d5);return attachUpdateNotice(_0x585ad2,await _0x2ddfd7);}};}function shouldResolveUpdateNotice(_0x56233e){const _0x4a6f37=a248_0x397c;return _0x56233e[_0x4a6f37(0x204)]===_0x4a6f37(0x21d)&&!_0x56233e[_0x4a6f37(0x216)];}function a248_0x397c(_0x5e82df,_0x54708a){_0x5e82df=_0x5e82df-0x1e4;const _0x35dad6=a248_0x35da();let _0x397c33=_0x35dad6[_0x5e82df];return _0x397c33;}function attachUpdateNotice(_0x35d9ca,_0x446bba){const _0x456ee4=a248_0x397c;if(!_0x446bba||!_0x35d9ca||typeof _0x35d9ca!==_0x456ee4(0x20a))return _0x35d9ca;const _0x49f49c=_0x35d9ca,_0x71e0b9=typeof _0x49f49c[_0x456ee4(0x223)]===_0x456ee4(0x20a)&&_0x49f49c['_notice']!==null?_0x49f49c[_0x456ee4(0x223)]:{};return{..._0x49f49c,'_notice':{..._0x71e0b9,'update':_0x446bba}};}function a248_0x35da(){const _0x54461a=['catch','appCode','update','169836vtaYXU','resolveApiDomain','formatOutput','value','requiresAppCode','../constant/domain.js','2EtoHnF','doctor','../constant/env.js','trim','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','explicitAppName','message','21577KXmhra','appcode','mergedCli','apiDir','LOVRABET_APPCODE','none','meowKey','name','Set\x20appcode\x20via\x20`','has','3226232BShbyl','find','Current\x20resolved\x20appcode\x20is\x20\x22','resolve','90kCiJUU','format','verbose','hasFormat','execute','authRequired','defaultVerbose','object','isNonInteractive','defaultPageSize','some','apps','38907shqfPk','rawFlags','cookie','resolveAppCode','pageSize','validation','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','nonInteractive','includes','riskLevel','string','schema','filter','747764xGskne','pretty','2412375egdqxD','\x20\x20\x20Continue?\x20[y/N]\x20','resolveCookie','1954236FLZVfo','1390DiVdhC','_notice'];a248_0x35da=function(){return _0x54461a;};return a248_0x35da();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x839de6,_0xb1db60){const _0x2b4ccd=a249_0x2265,_0x437e0c=_0x839de6();while(!![]){try{const _0x4d5aa4=-parseInt(_0x2b4ccd(0xe2))/0x1*(-parseInt(_0x2b4ccd(0xe1))/0x2)+parseInt(_0x2b4ccd(0xea))/0x3+parseInt(_0x2b4ccd(0xe5))/0x4+parseInt(_0x2b4ccd(0xeb))/0x5*(-parseInt(_0x2b4ccd(0xe6))/0x6)+parseInt(_0x2b4ccd(0xe4))/0x7+parseInt(_0x2b4ccd(0xe3))/0x8+-parseInt(_0x2b4ccd(0xe8))/0x9*(parseInt(_0x2b4ccd(0xe7))/0xa);if(_0x4d5aa4===_0xb1db60)break;else _0x437e0c['push'](_0x437e0c['shift']());}catch(_0x49f140){_0x437e0c['push'](_0x437e0c['shift']());}}}(a249_0x41cd,0x2406f));import{buildSchemaPayload as a249_0x54a1f1}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a249_0x2265(_0x1dec38,_0x21ed57){_0x1dec38=_0x1dec38-0xe1;const _0x41cda7=a249_0x41cd();let _0x226591=_0x41cda7[_0x1dec38];return _0x226591;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';function a249_0x41cd(){const _0x598f21=['2lDixOx','690312CPDfnZ','1984668lZwkLI','131692yXEtLR','38310LEOFcs','6280620FPAeMh','9WwJvNA','../commands/registry.js','486489Uhzust','50IrVJmj','274580qQqlqm'];a249_0x41cd=function(){return _0x598f21;};return a249_0x41cd();}export async function buildSchemaPayload(){const _0x42a04a=a249_0x2265,{serviceRegistry:_0x44440f,findDefinition:_0x5c8ed2}=await import(_0x42a04a(0xe9));return a249_0x54a1f1({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x44440f,'buildAllFlags':buildAllFlags,'findDefinition':_0x5c8ed2});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a250_0x1099(){var _0x1b433f=['4JsMFmm','6945072eqllbN','1872240ifuXRz','38017330UBJiTd','9AIxthu','9532516bWklJF','20HAQQdS','2944806fFvekS','663468HGgLAx','908816CtcCtR'];a250_0x1099=function(){return _0x1b433f;};return a250_0x1099();}(function(_0x4e7b40,_0x59a1d6){var _0x1a360a=a250_0x32bc,_0x90e1a2=_0x4e7b40();while(!![]){try{var _0x489d73=parseInt(_0x1a360a(0x130))/0x1+parseInt(_0x1a360a(0x132))/0x2*(-parseInt(_0x1a360a(0x12f))/0x3)+parseInt(_0x1a360a(0x131))/0x4+parseInt(_0x1a360a(0x12e))/0x5*(-parseInt(_0x1a360a(0x134))/0x6)+-parseInt(_0x1a360a(0x12d))/0x7+parseInt(_0x1a360a(0x133))/0x8+parseInt(_0x1a360a(0x12c))/0x9*(parseInt(_0x1a360a(0x135))/0xa);if(_0x489d73===_0x59a1d6)break;else _0x90e1a2['push'](_0x90e1a2['shift']());}catch(_0x4644ae){_0x90e1a2['push'](_0x90e1a2['shift']());}}}(a250_0x1099,0xf10fb));function a250_0x32bc(_0x2ded68,_0x1e95c3){_0x2ded68=_0x2ded68-0x12c;var _0x1099e0=a250_0x1099();var _0x32bcfc=_0x1099e0[_0x2ded68];return _0x32bcfc;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.4.
|
|
2
|
-
export declare const GIT_TAG = "v2.4.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.4.3-beta.1";
|
|
2
|
+
export declare const GIT_TAG = "v2.4.3-beta.1";
|
|
3
|
+
export declare const GIT_COMMIT = "8f5eb35";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-13T05:56:27.910Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a251_0x2110(){const _0x1b5ee0=['1048wJCuZy','2.4.3-beta.1','2578959uakNBv','8rKoJhV','8f5eb35','4316340rEfJkN','2541jQISDl','834750PiEAFs','5PAChFt','2519268nRjVCS','v2.4.3-beta.1','33hibDqj','59172HVdgcX','3087924cjeUdh'];a251_0x2110=function(){return _0x1b5ee0;};return a251_0x2110();}function a251_0x2492(_0x115a9c,_0x154c9a){_0x115a9c=_0x115a9c-0x18a;const _0x211036=a251_0x2110();let _0x249281=_0x211036[_0x115a9c];return _0x249281;}const a251_0x547e2d=a251_0x2492;(function(_0x20affc,_0x178fd1){const _0x400676=a251_0x2492,_0x445c02=_0x20affc();while(!![]){try{const _0x2ca938=-parseInt(_0x400676(0x18d))/0x1+-parseInt(_0x400676(0x196))/0x2+parseInt(_0x400676(0x195))/0x3*(-parseInt(_0x400676(0x18f))/0x4)+-parseInt(_0x400676(0x197))/0x5*(-parseInt(_0x400676(0x18a))/0x6)+-parseInt(_0x400676(0x18e))/0x7*(parseInt(_0x400676(0x192))/0x8)+-parseInt(_0x400676(0x191))/0x9+parseInt(_0x400676(0x194))/0xa*(parseInt(_0x400676(0x18c))/0xb);if(_0x2ca938===_0x178fd1)break;else _0x445c02['push'](_0x445c02['shift']());}catch(_0x5d9427){_0x445c02['push'](_0x445c02['shift']());}}}(a251_0x2110,0x4677c));export const VERSION=a251_0x547e2d(0x190);export const GIT_TAG=a251_0x547e2d(0x18b);export const GIT_COMMIT=a251_0x547e2d(0x193);export const BUILD_TIME='2026-08-13T05:56:27.910Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x39198f,_0x1d84db){var _0x39c8e7=a252_0x246c,_0x73eb0=_0x39198f();while(!![]){try{var _0x4a2db4=-parseInt(_0x39c8e7(0x197))/0x1*(parseInt(_0x39c8e7(0x195))/0x2)+parseInt(_0x39c8e7(0x18f))/0x3*(parseInt(_0x39c8e7(0x18a))/0x4)+-parseInt(_0x39c8e7(0x192))/0x5*(-parseInt(_0x39c8e7(0x18c))/0x6)+parseInt(_0x39c8e7(0x190))/0x7*(parseInt(_0x39c8e7(0x191))/0x8)+-parseInt(_0x39c8e7(0x193))/0x9+-parseInt(_0x39c8e7(0x18d))/0xa*(parseInt(_0x39c8e7(0x194))/0xb)+-parseInt(_0x39c8e7(0x196))/0xc*(-parseInt(_0x39c8e7(0x19a))/0xd);if(_0x4a2db4===_0x1d84db)break;else _0x73eb0['push'](_0x73eb0['shift']());}catch(_0xa12db2){_0x73eb0['push'](_0x73eb0['shift']());}}}(a252_0x2964,0x37b1c));import a252_0x2ff25e from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a252_0x2964(){var _0x327f7e=['1354083yHJukY','119AGppij','22648YlndGG','5mWQBRJ','1049985IhyBJE','10516MSIZaF','3236AyyfuO','192pAopvP','100QBAMPL','bold','\x20--help','103142vDmRbC','4vAbYbo','log','1724478fsxjPJ','4260fsHXkG','\x20\x20Use\x20'];a252_0x2964=function(){return _0x327f7e;};return a252_0x2964();}function a252_0x246c(_0x5d3c82,_0x41e4a9){_0x5d3c82=_0x5d3c82-0x18a;var _0x2964b3=a252_0x2964();var _0x246ccb=_0x2964b3[_0x5d3c82];return _0x246ccb;}export function showHelp(){var _0x4855c1=a252_0x246c;console[_0x4855c1(0x18b)](),console[_0x4855c1(0x18b)](a252_0x2ff25e['green']['bold']('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x4855c1(0x18b)](),console[_0x4855c1(0x18b)](_0x4855c1(0x18e)+a252_0x2ff25e['green'][_0x4855c1(0x198)](CLI_BIN_NAME+_0x4855c1(0x199))+'\x20to\x20view\x20available\x20commands.'),console[_0x4855c1(0x18b)]();}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a253_0x4647(_0x5cc37b,_0x3d1e92){_0x5cc37b=_0x5cc37b-0xba;const _0x444f9b=a253_0x444f();let _0x4647ae=_0x444f9b[_0x5cc37b];return _0x4647ae;}(function(_0xc55de0,_0x2c7859){const _0x1c313f=a253_0x4647,_0x4e53f2=_0xc55de0();while(!![]){try{const _0x2ff28f=parseInt(_0x1c313f(0xc9))/0x1+parseInt(_0x1c313f(0xc1))/0x2+parseInt(_0x1c313f(0xc8))/0x3+parseInt(_0x1c313f(0xc0))/0x4+parseInt(_0x1c313f(0xc2))/0x5*(-parseInt(_0x1c313f(0xca))/0x6)+parseInt(_0x1c313f(0xcb))/0x7+-parseInt(_0x1c313f(0xd0))/0x8;if(_0x2ff28f===_0x2c7859)break;else _0x4e53f2['push'](_0x4e53f2['shift']());}catch(_0x490aed){_0x4e53f2['push'](_0x4e53f2['shift']());}}}(a253_0x444f,0x573a2));import{installBuiltinSkill}from'./skills/builtin-skill.js';export async function runPostinstall(_0x3830b9={}){const _0x123458=a253_0x4647,_0x5b01ce=installBuiltinSkill(_0x3830b9);if(_0x5b01ce['ok']){const _0xcd9634=_0x5b01ce['changed']?'installed':_0x123458(0xcf),_0x8c028f=_0x5b01ce[_0x123458(0xbc)]?_0x123458(0xbd)+_0x5b01ce[_0x123458(0xbc)]:_0x123458(0xc3);return console[_0x123458(0xc7)](_0x123458(0xc4)+_0x5b01ce[_0x123458(0xbb)]+'\x20'+_0xcd9634+_0x8c028f),_0x5b01ce;}const _0x48a3f9=_0x123458(0xcc)+(_0x5b01ce['code']??_0x123458(0xce))+']\x20'+(_0x5b01ce[_0x123458(0xbf)]??_0x123458(0xcd))+'.\x20'+(_0x123458(0xba)+_0x5b01ce[_0x123458(0xbe)]);if(_0x5b01ce[_0x123458(0xc6)]==='SOURCE_INVALID')throw new Error(_0x48a3f9);return console[_0x123458(0xc5)](_0x48a3f9),_0x5b01ce;}function a253_0x444f(){const _0x5d5466=['166916CIWCnj','1550148MxHCfQ','4657793yjjuiz','[BUILTIN_SKILL_INSTALL_','Installation\x20failed','FAILED','already\x20current','13811784njVGrC','Repair\x20with:\x20','skillVersion','installedPath','\x20at\x20','repairCommand','error','2618060tcPebP','1237844upxAkg','5zphrnJ','\x20via\x20skills@latest','Rabetbase\x20Built-in\x20Skill\x20','warn','code','log','709083MzvnFN'];a253_0x444f=function(){return _0x5d5466;};return a253_0x444f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x205856,_0xc70afe){const _0x5333be=a254_0x1d11,_0x1c4b4a=_0x205856();while(!![]){try{const _0xfc0a70=parseInt(_0x5333be(0xcb))/0x1*(-parseInt(_0x5333be(0xdb))/0x2)+parseInt(_0x5333be(0xc5))/0x3*(parseInt(_0x5333be(0xd1))/0x4)+-parseInt(_0x5333be(0xda))/0x5*(parseInt(_0x5333be(0xca))/0x6)+-parseInt(_0x5333be(0xd4))/0x7*(-parseInt(_0x5333be(0xcf))/0x8)+-parseInt(_0x5333be(0xd6))/0x9*(-parseInt(_0x5333be(0xd5))/0xa)+-parseInt(_0x5333be(0xcc))/0xb*(parseInt(_0x5333be(0xd9))/0xc)+-parseInt(_0x5333be(0xd2))/0xd;if(_0xfc0a70===_0xc70afe)break;else _0x1c4b4a['push'](_0x1c4b4a['shift']());}catch(_0x23ead4){_0x1c4b4a['push'](_0x1c4b4a['shift']());}}}(a254_0x5a26,0x857d2));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildRabetbaseConfirmationRequest(_0x126b6a,_0x5119f2,_0x4b4f52){const _0x93a256=a254_0x1d11,_0x4dc6f4=normalizeText(_0x126b6a[_0x93a256(0xc6)],DESCRIPTION_MAX_LENGTH),_0x1f69de=_0x4dc6f4||normalizeText(defaultDescription(requireWriteRisk(_0x126b6a),_0x5119f2),DESCRIPTION_MAX_LENGTH);return{'operation':_0x5119f2,'risk':requireWriteRisk(_0x126b6a),'description':_0x1f69de,..._0x4b4f52?{'signal':_0x4b4f52}:{}};}function requireWriteRisk(_0x306384){const _0x1c0858=a254_0x1d11;if(_0x306384[_0x1c0858(0xdc)]===_0x1c0858(0xd3)||_0x306384[_0x1c0858(0xdc)]===_0x1c0858(0xcd))return _0x306384['risk'];throw new Error(_0x1c0858(0xc7));}function a254_0x5a26(){const _0xef3dca=['string','12416vByXZz','replace','68jKNKZW','18515848uShyaZ','write','3962WpBPZq','1230ukLjwn','77940chuDqM','slice',';该操作可能覆盖、删除或明显影响线上运行行为。','59316NUIZDq','135aEiutk','2wSJqGz','risk','170763FJNUat','confirmationDescription','Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.','trim','将执行高风险写入操作\x20','32028TqtbLC','118886KavbUV','1507nPsuwv','high-risk-write'];a254_0x5a26=function(){return _0xef3dca;};return a254_0x5a26();}function defaultDescription(_0x26f695,_0x5a3219){const _0x2dcf1c=a254_0x1d11;if(_0x26f695===_0x2dcf1c(0xcd))return _0x2dcf1c(0xc9)+_0x5a3219+_0x2dcf1c(0xd8);return'将执行写入操作\x20'+_0x5a3219+';该操作可能创建或修改业务数据或本地配置。';}function a254_0x1d11(_0x23b8e,_0xd7ad23){_0x23b8e=_0x23b8e-0xc5;const _0x5a265d=a254_0x5a26();let _0x1d117c=_0x5a265d[_0x23b8e];return _0x1d117c;}function normalizeText(_0x30bcf1,_0x57f533){const _0x385260=a254_0x1d11;if(typeof _0x30bcf1!==_0x385260(0xce))return'';return _0x30bcf1[_0x385260(0xd0)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x385260(0xd0)](/\s+/g,'\x20')[_0x385260(0xc8)]()[_0x385260(0xd7)](0x0,_0x57f533);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a255_0x4ece(){var _0x5e762f=['1460481IdHzqU','rabetbase.write.completed','1051896DyDKiC','filter','join','8uOFAGe','1812735EiTDLR','6494100EwNTaM','173283xuHVKb','risk','2038084uGMLDb','7176176LxyQGc','command','service','5mvOkAl','write','split','high-risk-write'];a255_0x4ece=function(){return _0x5e762f;};return a255_0x4ece();}(function(_0x5479df,_0xa849b7){var _0x2e6e26=a255_0x20dd,_0x2601ae=_0x5479df();while(!![]){try{var _0x492ef2=parseInt(_0x2e6e26(0x1a0))/0x1+-parseInt(_0x2e6e26(0x1a5))/0x2*(parseInt(_0x2e6e26(0x1a8))/0x3)+-parseInt(_0x2e6e26(0x1aa))/0x4+-parseInt(_0x2e6e26(0x1ae))/0x5*(-parseInt(_0x2e6e26(0x1a7))/0x6)+-parseInt(_0x2e6e26(0x1ab))/0x7+-parseInt(_0x2e6e26(0x1a2))/0x8+parseInt(_0x2e6e26(0x1a6))/0x9;if(_0x492ef2===_0xa849b7)break;else _0x2601ae['push'](_0x2601ae['shift']());}catch(_0x3dcd24){_0x2601ae['push'](_0x2601ae['shift']());}}}(a255_0x4ece,0xcecb2));function a255_0x20dd(_0x29f0f5,_0x39481a){_0x29f0f5=_0x29f0f5-0x1a0;var _0x4eceeb=a255_0x4ece();var _0x20dd5e=_0x4eceeb[_0x29f0f5];return _0x20dd5e;}export function canonicalRabetbaseOperation(_0x183d6a){var _0xf588e6=a255_0x20dd;return[_0x183d6a[_0xf588e6(0x1ad)],..._0x183d6a[_0xf588e6(0x1ac)]['trim']()[_0xf588e6(0x1b0)](/\s+/)][_0xf588e6(0x1a3)](Boolean)[_0xf588e6(0x1a4)]('.');}export function createRabetbaseWriteMetadata(_0x55c31f,_0x59fd4d,_0x521546,_0x468ff7){var _0x29bd67=a255_0x20dd;if(_0x468ff7||_0x521546['ok']!==!![]||_0x55c31f[_0x29bd67(0x1a9)]!==_0x29bd67(0x1af)&&_0x55c31f[_0x29bd67(0x1a9)]!==_0x29bd67(0x1b1))return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x29bd67(0x1a1),'operation':_0x59fd4d,'risk':_0x55c31f[_0x29bd67(0x1a9)]}}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a256_0x41ae(_0x475fac,_0x4de0d8){_0x475fac=_0x475fac-0x1c2;const _0x497897=a256_0x4978();let _0x41ae7a=_0x497897[_0x475fac];return _0x41ae7a;}(function(_0x3915f4,_0x2be0cd){const _0x547afb=a256_0x41ae,_0x4173e2=_0x3915f4();while(!![]){try{const _0x230650=parseInt(_0x547afb(0x1c6))/0x1*(-parseInt(_0x547afb(0x1d1))/0x2)+-parseInt(_0x547afb(0x1d2))/0x3*(parseInt(_0x547afb(0x1db))/0x4)+parseInt(_0x547afb(0x1c7))/0x5*(parseInt(_0x547afb(0x1de))/0x6)+parseInt(_0x547afb(0x1e1))/0x7*(parseInt(_0x547afb(0x1da))/0x8)+-parseInt(_0x547afb(0x1c3))/0x9+-parseInt(_0x547afb(0x1c4))/0xa+-parseInt(_0x547afb(0x1d3))/0xb*(-parseInt(_0x547afb(0x1d6))/0xc);if(_0x230650===_0x2be0cd)break;else _0x4173e2['push'](_0x4173e2['shift']());}catch(_0x12e6d){_0x4173e2['push'](_0x4173e2['shift']());}}}(a256_0x4978,0x7fd62));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:_0x23f490,command:_0x16a117,risk:_0x4ac105,dryRun:_0x3e3144}){const _0x831a6b=a256_0x41ae;return JSON[_0x831a6b(0x1dd)]({'ok':_0x23f490['ok'],'command':_0x16a117,'risk':_0x4ac105,..._0x3e3144?{'dryRun':!![]}:{},..._0x23f490['data']!==undefined?{'data':_0x23f490[_0x831a6b(0x1d4)]}:{},..._0x23f490[_0x831a6b(0x1d5)]?{'message':_0x23f490[_0x831a6b(0x1d5)]}:{}});}};function a256_0x4978(){const _0x20c020=['riskLevel','present','signal','definition','execute','Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','confirm','isNonInteractive','dry-run','1938936VwOBAC','980223teONdn','66aVfZnx','data','message','4770264VtGxBu','yes','presentation','Rabetbase\x20invocation\x20aborted.','2486072lRRDEq','8Skdzkt','command','stringify','129348yviJoH','rawFlags','reason','7IPehkv','Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.','confirmation','high-risk-write','result','risk','dryRun','8467902vYBYtY','2336270VdKNOl','args','1dwGmwp','145nSLniy'];a256_0x4978=function(){return _0x20c020;};return a256_0x4978();}export async function invokeRabetbase(_0x11591a,_0x495183){const _0x58ad92=a256_0x41ae;throwIfAborted(_0x495183[_0x58ad92(0x1ca)]);const _0x2ea772=await resolveRabetbaseInvocation(_0x11591a),_0x15d993=canonicalRabetbaseOperation(_0x2ea772['definition']);return await confirmWriteBeforeQueue(_0x2ea772[_0x58ad92(0x1cb)],_0x2ea772[_0x58ad92(0x1df)],_0x15d993,_0x495183),runSerialized(async()=>{const _0x395a8d=_0x58ad92,_0x4a604e={};try{throwIfAborted(_0x495183[_0x395a8d(0x1ca)]);const _0x1e33bc=buildConfigFromFlags(_0x2ea772[_0x395a8d(0x1df)]);await initGlobalEnvironment(_0x1e33bc);const _0x2353aa=createPipelineEnv(_0x1e33bc,{..._0x2ea772[_0x395a8d(0x1df)],'yes':_0x2ea772[_0x395a8d(0x1cb)]['risk']===_0x395a8d(0x1e4)?!![]:_0x2ea772[_0x395a8d(0x1df)][_0x395a8d(0x1d7)],'nonInteractive':!![]},_0x2ea772[_0x395a8d(0x1c5)]);_0x2353aa[_0x395a8d(0x1cf)]=!![],_0x2353aa[_0x395a8d(0x1c8)]=_0x395a8d(0x1e4);const _0x239c52=withAbortSignal(_0x2ea772[_0x395a8d(0x1cb)],_0x495183[_0x395a8d(0x1ca)]),_0x3bc91b=createRabetbaseRunnerAdapter({'formatOutput'(_0x3d72de,_0x249f81){const _0x3f876f=_0x395a8d;_0x4a604e['result']=_0x3d72de,_0x4a604e[_0x3f876f(0x1dc)]=_0x249f81[_0x3f876f(0x1dc)],_0x4a604e[_0x3f876f(0x1e6)]=_0x249f81[_0x3f876f(0x1e6)],_0x4a604e['format']=_0x249f81['format'],_0x4a604e[_0x3f876f(0x1c2)]=_0x249f81[_0x3f876f(0x1c2)]===!![];},async 'confirmHighRisk'(){const _0x3d8c1d=_0x395a8d;throw new Error(_0x3d8c1d(0x1e2));}});await runCommand(_0x239c52,_0x2353aa,_0x3bc91b);if(!_0x4a604e['result']||!_0x4a604e[_0x395a8d(0x1dc)]||!_0x4a604e[_0x395a8d(0x1e6)]||!_0x4a604e['format'])throw new Error(_0x395a8d(0x1cd));const _0x3a52ed=_0x4a604e['dryRun']===!![],_0x49f7d8=_0x495183[_0x395a8d(0x1d8)]??defaultPresentation,_0x210fee={'result':_0x4a604e[_0x395a8d(0x1e5)],'command':_0x4a604e['command'],'operation':_0x15d993,'risk':_0x4a604e[_0x395a8d(0x1e6)],'format':_0x4a604e['format'],'dryRun':_0x3a52ed},_0x1eb65a=createRabetbaseWriteMetadata(_0x2ea772[_0x395a8d(0x1cb)],_0x15d993,_0x4a604e[_0x395a8d(0x1e5)],_0x3a52ed);let _0x1b3661;try{_0x1b3661=await _0x49f7d8['present'](_0x210fee);}catch(_0x36a75e){if(!_0x1eb65a||_0x49f7d8===defaultPresentation)throw _0x36a75e;_0x1b3661=await defaultPresentation[_0x395a8d(0x1c9)](_0x210fee);}return{'operation':_0x15d993,'risk':_0x4a604e[_0x395a8d(0x1e6)],'mode':_0x3a52ed?_0x395a8d(0x1d0):'execute','result':_0x4a604e[_0x395a8d(0x1e5)],'output':_0x1b3661,..._0x1eb65a?{'metadata':_0x1eb65a}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}async function confirmWriteBeforeQueue(_0x12f278,_0x2a551d,_0x4d1a79,_0x415f1e){const _0x32f3a4=a256_0x41ae;if(_0x2a551d[_0x32f3a4(0x1c2)]===!![]||_0x12f278['risk']!=='write'&&_0x12f278['risk']!==_0x32f3a4(0x1e4))return;await _0x415f1e[_0x32f3a4(0x1e3)][_0x32f3a4(0x1ce)](buildRabetbaseConfirmationRequest(_0x12f278,_0x4d1a79,_0x415f1e[_0x32f3a4(0x1ca)]));}function withAbortSignal(_0x3e3a01,_0x3c9664){return{..._0x3e3a01,async 'execute'(_0x31f850){const _0x4bdd3c=a256_0x41ae;return throwIfAborted(_0x3c9664),_0x3e3a01[_0x4bdd3c(0x1cc)](_0x31f850);}};}function throwIfAborted(_0x3c516f){const _0x31681c=a256_0x41ae;if(_0x3c516f?.['aborted'])throw _0x3c516f[_0x31681c(0x1e0)]instanceof Error?_0x3c516f[_0x31681c(0x1e0)]:new DOMException(_0x31681c(0x1d9),'AbortError');}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a257_0x6bbc(_0x730e1f,_0x63a824){_0x730e1f=_0x730e1f-0x1d6;const _0x1f4b9c=a257_0x1f4b();let _0x6bbcf6=_0x1f4b9c[_0x730e1f];return _0x6bbcf6;}function a257_0x1f4b(){const _0x3c5e82=['775LBRqJR','9ykoNwf','223342HSGaaV','1428328VPbKOU','1375715JWusFa','3YbUSUi','912388zwzsDQ','catch','6582RLsEpO','resolve','30woGsRC','246920yYxtgF','651336BIZJXV'];a257_0x1f4b=function(){return _0x3c5e82;};return a257_0x1f4b();}const a257_0x37e841=a257_0x6bbc;(function(_0x2e8c14,_0xeb75){const _0x46616f=a257_0x6bbc,_0x20c386=_0x2e8c14();while(!![]){try{const _0x13f89e=-parseInt(_0x46616f(0x1db))/0x1+parseInt(_0x46616f(0x1d7))/0x2+-parseInt(_0x46616f(0x1de))/0x3*(parseInt(_0x46616f(0x1df))/0x4)+parseInt(_0x46616f(0x1d9))/0x5*(-parseInt(_0x46616f(0x1e1))/0x6)+parseInt(_0x46616f(0x1d8))/0x7+parseInt(_0x46616f(0x1dc))/0x8*(parseInt(_0x46616f(0x1da))/0x9)+parseInt(_0x46616f(0x1d6))/0xa*(parseInt(_0x46616f(0x1dd))/0xb);if(_0x13f89e===_0xeb75)break;else _0x20c386['push'](_0x20c386['shift']());}catch(_0xc06177){_0x20c386['push'](_0x20c386['shift']());}}}(a257_0x1f4b,0x24522));let tail=Promise[a257_0x37e841(0x1e2)]();export async function runSerialized(_0x22605b){const _0x3254d8=a257_0x37e841,_0x4ea7f4=tail;let _0x1a1564;tail=new Promise(_0x558982=>{_0x1a1564=_0x558982;}),await _0x4ea7f4[_0x3254d8(0x1e0)](()=>undefined);try{return await _0x22605b();}finally{_0x1a1564();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5bf36c,_0x315e15){const _0x54953e=a258_0x9a6e,_0x4445c8=_0x5bf36c();while(!![]){try{const _0x76bc09=-parseInt(_0x54953e(0x110))/0x1+parseInt(_0x54953e(0x112))/0x2*(parseInt(_0x54953e(0x125))/0x3)+-parseInt(_0x54953e(0x119))/0x4+parseInt(_0x54953e(0x121))/0x5*(parseInt(_0x54953e(0x116))/0x6)+-parseInt(_0x54953e(0x120))/0x7+parseInt(_0x54953e(0x114))/0x8+parseInt(_0x54953e(0x11c))/0x9;if(_0x76bc09===_0x315e15)break;else _0x4445c8['push'](_0x4445c8['shift']());}catch(_0xc6041c){_0x4445c8['push'](_0x4445c8['shift']());}}}(a258_0x2128,0xdc284));import a258_0x41f1e2 from'meow';function a258_0x9a6e(_0x5218a5,_0x272e18){_0x5218a5=_0x5218a5-0x110;const _0x212854=a258_0x2128();let _0x9a6ead=_0x212854[_0x5218a5];return _0x9a6ead;}import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';function a258_0x2128(){const _0x5df66a=['10392272EWOJQS','Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','6vANHeR','validation','unknownCommand','7086036UngDri','run','Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','7749063hpAuPY','wildcardDef','join','defaultCommand','6808354FpUnQV','1504985jQPAoO','message','flags','hint','242139cqdxRV','slice','429403OrsCkI','input','40KEApoY','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.'];a258_0x2128=function(){return _0x5df66a;};return a258_0x2128();}import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveRabetbaseInvocation(_0x3e3cf8){const _0x1ff1c9=a258_0x9a6e,_0xadc11a=a258_0x41f1e2('',{'importMeta':import.meta,'argv':[..._0x3e3cf8],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x51d31d=[..._0xadc11a[_0x1ff1c9(0x111)]],_0x1053c9=_0xadc11a[_0x1ff1c9(0x123)],_0x213a3b=_0x51d31d[0x0];if(!_0x213a3b)throw CliErrors['validation'](_0x1ff1c9(0x115));const _0x1acba3=resolveRemovedCommand(_0x213a3b,_0x51d31d[0x1]);if(_0x1acba3)throw CliErrors[_0x1ff1c9(0x117)](_0x1acba3[_0x1ff1c9(0x122)],_0x1acba3[_0x1ff1c9(0x124)]);if(_0x213a3b===_0x1ff1c9(0x11a))throw CliErrors[_0x1ff1c9(0x117)](_0x1ff1c9(0x113),'Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.');if(!isKnownService(_0x213a3b))throw CliErrors[_0x1ff1c9(0x118)](_0x51d31d[_0x1ff1c9(0x11e)]('\x20'));const _0x198361=getServiceEntry(_0x213a3b),_0x58bf67=_0x51d31d[0x1],_0x226383=_0x58bf67||_0x198361[_0x1ff1c9(0x11f)];if(!_0x226383){if(_0x198361[_0x1ff1c9(0x11d)])return{'definition':_0x198361['wildcardDef'],'rawFlags':_0x1053c9,'args':[]};throw CliErrors['validation'](_0x1ff1c9(0x11b)+_0x213a3b+'\x22.');}const _0x503929=findDefinition(_0x213a3b,_0x226383);if(_0x503929)return{'definition':_0x503929,'rawFlags':_0x1053c9,'args':_0x51d31d[_0x1ff1c9(0x126)](0x2)};if(_0x198361[_0x1ff1c9(0x11d)])return{'definition':_0x198361[_0x1ff1c9(0x11d)],'rawFlags':_0x1053c9,'args':[_0x226383,..._0x51d31d[_0x1ff1c9(0x126)](0x2)]};throw CliErrors['unknownCommand'](_0x213a3b+'\x20'+_0x226383);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a260_0x1d99(){const _0x2ce55d=['status','path','content_mismatch','isFile','includes','280QbQmIp','3356ImwVJY','skillVersion','Unsupported\x20Skill\x20entry:\x20','Installed\x20Skill\x20state\x20is\x20','match','update','package.json','VERIFY_FAILED','message','installedPath','name','present','rabetbase\x20cli-skill\x20install','8435150DlxCNI','stdio','skipped','SKILL.md','packageRoot','1681345AsOWgK','332606DLbVQY','version_mismatch','startsWith','root','isSymbolicLink','isDirectory','current','unverifiable','utf8','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','split','files','digest','flatMap','reason','version','133405wRoLAH','home','trim','every','skills',':\x5cs*(.+)$','manifest','unknown','packageVersion','Symbolic\x20link\x20is\x20not\x20allowed:\x20','parse','801KQPJbc','rabetbase.manifest.json','length','74168PyeqDa','61998fjXAZp','pipe','state','join','Unsafe\x20manifest\x20path:\x20','sort','171QrAHVE','hex','missing'];a260_0x1d99=function(){return _0x2ce55d;};return a260_0x1d99();}const a260_0xc609fa=a260_0x312b;(function(_0x48784c,_0x3f22c9){const _0x2ef8eb=a260_0x312b,_0xf4b1c3=_0x48784c();while(!![]){try{const _0x1151d7=-parseInt(_0x2ef8eb(0x13e))/0x1+-parseInt(_0x2ef8eb(0x16f))/0x2+-parseInt(_0x2ef8eb(0x149))/0x3*(parseInt(_0x2ef8eb(0x15c))/0x4)+-parseInt(_0x2ef8eb(0x16e))/0x5+-parseInt(_0x2ef8eb(0x14d))/0x6*(-parseInt(_0x2ef8eb(0x15b))/0x7)+parseInt(_0x2ef8eb(0x14c))/0x8*(-parseInt(_0x2ef8eb(0x153))/0x9)+parseInt(_0x2ef8eb(0x169))/0xa;if(_0x1151d7===_0x3f22c9)break;else _0xf4b1c3['push'](_0xf4b1c3['shift']());}catch(_0x5731b6){_0xf4b1c3['push'](_0xf4b1c3['shift']());}}}(a260_0x1d99,0x35e18));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_0xc609fa(0x168),SKILL_NAME='rabetbase';function frontmatterValue(_0x157cb2,_0xfb7f83){const _0x6cc09c=a260_0xc609fa;return _0x157cb2[_0x6cc09c(0x160)](new RegExp('^'+_0xfb7f83+_0x6cc09c(0x143),'m'))?.[0x1]?.[_0x6cc09c(0x140)]()??'';}function listFiles(_0x2ce568,_0x6c9592=_0x2ce568){const _0x3fdc4b=a260_0xc609fa;return readdirSync(_0x6c9592,{'withFileTypes':!![]})[_0x3fdc4b(0x13b)](_0x53b7a6=>{const _0x576a5a=_0x3fdc4b,_0x764cfd=join(_0x6c9592,_0x53b7a6['name']),_0x283c07=lstatSync(_0x764cfd);if(_0x283c07[_0x576a5a(0x132)]())throw new Error(_0x576a5a(0x147)+_0x764cfd);if(_0x283c07[_0x576a5a(0x133)]())return listFiles(_0x2ce568,_0x764cfd);if(!_0x283c07[_0x576a5a(0x159)]())throw new Error(_0x576a5a(0x15e)+_0x764cfd);return[relative(_0x2ce568,_0x764cfd)['split'](sep)[_0x576a5a(0x150)]('/')];})[_0x3fdc4b(0x152)]((_0x3afba2,_0x5d98e2)=>_0x3afba2<_0x5d98e2?-0x1:_0x3afba2>_0x5d98e2?0x1:0x0);}function digestFiles(_0x1f2842,_0x3d925c){const _0x440a4e=a260_0xc609fa,_0x1fba7d=createHash('sha256');for(const _0x4702bc of _0x3d925c){if(_0x4702bc[_0x440a4e(0x130)]('/')||_0x4702bc[_0x440a4e(0x138)]('/')[_0x440a4e(0x15a)]('..')||_0x4702bc[_0x440a4e(0x15a)]('\x5c'))throw new Error(_0x440a4e(0x151)+_0x4702bc);_0x1fba7d[_0x440a4e(0x161)](_0x4702bc),_0x1fba7d['update']('\x00'),_0x1fba7d[_0x440a4e(0x161)](readFileSync(join(_0x1f2842,..._0x4702bc['split']('/')))),_0x1fba7d[_0x440a4e(0x161)]('\x00');}return _0x1fba7d[_0x440a4e(0x13a)](_0x440a4e(0x154));}function sameFiles(_0x2a8c86,_0xf2de40){const _0xe72006=a260_0xc609fa;return _0x2a8c86[_0xe72006(0x14b)]===_0xf2de40[_0xe72006(0x14b)]&&_0x2a8c86[_0xe72006(0x141)]((_0x3618d0,_0x5ce958)=>_0x3618d0===_0xf2de40[_0x5ce958]);}function readSource(_0x3ec9e1){const _0x2146da=a260_0xc609fa,_0x248478=JSON[_0x2146da(0x148)](readFileSync(join(_0x3ec9e1,_0x2146da(0x162)),_0x2146da(0x136))),_0x203fe8=JSON[_0x2146da(0x148)](readFileSync(join(_0x3ec9e1,'skills',_0x2146da(0x14a)),_0x2146da(0x136))),_0x4615ea=join(_0x3ec9e1,_0x2146da(0x142),SKILL_NAME),_0xbb1f34=frontmatterValue(readFileSync(join(_0x4615ea,_0x2146da(0x16c)),'utf8'),_0x2146da(0x13d)),_0x31ca10=listFiles(_0x4615ea);if(_0x203fe8['schemaVersion']!==0x1||_0x203fe8[_0x2146da(0x166)]!==SKILL_NAME||!_0x248478['version']||_0x203fe8[_0x2146da(0x146)]!==_0x248478['version']||_0x203fe8['skillVersion']!==_0x248478[_0x2146da(0x13d)]||_0xbb1f34!==_0x248478[_0x2146da(0x13d)]||!sameFiles(_0x31ca10,_0x203fe8['files'])||digestFiles(_0x4615ea,_0x31ca10)!==_0x203fe8[_0x2146da(0x13a)])throw new Error(_0x2146da(0x137));return{'packageVersion':_0x248478[_0x2146da(0x13d)],'skillVersion':_0xbb1f34,'root':_0x4615ea,'manifest':_0x203fe8};}function a260_0x312b(_0x1efc05,_0x579821){_0x1efc05=_0x1efc05-0x12f;const _0x1d998f=a260_0x1d99();let _0x312be7=_0x1d998f[_0x1efc05];return _0x312be7;}function installedSkillPath(_0x2b84fb){const _0x5b5184=a260_0xc609fa,_0x3380ff=resolveInstalledSkill(SKILL_NAME,{'home':_0x2b84fb});if(_0x3380ff[_0x5b5184(0x14f)]===_0x5b5184(0x167))return{'state':'present','path':dirname(_0x3380ff['path'])};if(_0x3380ff[_0x5b5184(0x14f)]==='absent')return{'state':_0x5b5184(0x155)};return{'state':'unverifiable','reason':_0x3380ff[_0x5b5184(0x13c)]};}export function inspectInstalledBuiltinSkillVersion(_0x17ba4e,_0x2e58ae={}){const _0x2b0b2f=a260_0xc609fa,_0x28c7c2=installedSkillPath(_0x2e58ae[_0x2b0b2f(0x13f)]??homedir());if(_0x28c7c2[_0x2b0b2f(0x14f)]==='missing')return{'state':'missing','expectedVersion':_0x17ba4e,'repairCommand':REPAIR_COMMAND};if(_0x28c7c2[_0x2b0b2f(0x14f)]===_0x2b0b2f(0x135))return{'state':_0x2b0b2f(0x135),'expectedVersion':_0x17ba4e,'reason':_0x28c7c2[_0x2b0b2f(0x13c)],'repairCommand':REPAIR_COMMAND};try{const _0x208218=frontmatterValue(readFileSync(join(_0x28c7c2['path'],_0x2b0b2f(0x16c)),'utf8'),_0x2b0b2f(0x13d));return{'state':_0x208218===_0x17ba4e?_0x2b0b2f(0x134):_0x2b0b2f(0x12f),'expectedVersion':_0x17ba4e,'skillVersion':_0x208218,'installedPath':_0x28c7c2[_0x2b0b2f(0x157)],'repairCommand':REPAIR_COMMAND};}catch(_0x2f1be7){return{'state':_0x2b0b2f(0x135),'expectedVersion':_0x17ba4e,'installedPath':_0x28c7c2[_0x2b0b2f(0x157)],'reason':_0x2f1be7 instanceof Error?_0x2f1be7[_0x2b0b2f(0x164)]:String(_0x2f1be7),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x30334c={}){const _0xebf690=a260_0xc609fa,_0x47508e=_0x30334c[_0xebf690(0x16d)]??DEFAULT_PACKAGE_ROOT;let _0x3bbe54;try{_0x3bbe54=readSource(_0x47508e);}catch(_0x311b1f){return{'state':_0xebf690(0x135),'packageVersion':'unknown','reason':_0x311b1f instanceof Error?_0x311b1f[_0xebf690(0x164)]:String(_0x311b1f),'repairCommand':REPAIR_COMMAND};}const _0x4594a8=installedSkillPath(_0x30334c[_0xebf690(0x13f)]??homedir());if(_0x4594a8[_0xebf690(0x14f)]===_0xebf690(0x155))return{'state':_0xebf690(0x155),'packageVersion':_0x3bbe54[_0xebf690(0x146)],'repairCommand':REPAIR_COMMAND};if(_0x4594a8[_0xebf690(0x14f)]===_0xebf690(0x135))return{'state':_0xebf690(0x135),'packageVersion':_0x3bbe54[_0xebf690(0x146)],'reason':_0x4594a8[_0xebf690(0x13c)],'repairCommand':REPAIR_COMMAND};try{const _0xa56975=frontmatterValue(readFileSync(join(_0x4594a8[_0xebf690(0x157)],_0xebf690(0x16c)),_0xebf690(0x136)),_0xebf690(0x13d));if(_0xa56975!==_0x3bbe54[_0xebf690(0x15d)])return{'state':'version_mismatch','packageVersion':_0x3bbe54[_0xebf690(0x146)],'skillVersion':_0xa56975,'installedPath':_0x4594a8['path'],'repairCommand':REPAIR_COMMAND};const _0x69d7de=listFiles(_0x4594a8[_0xebf690(0x157)]),_0x396bfc=digestFiles(_0x4594a8[_0xebf690(0x157)],_0x69d7de);return{'state':sameFiles(_0x69d7de,_0x3bbe54['manifest'][_0xebf690(0x139)])&&_0x396bfc===_0x3bbe54[_0xebf690(0x144)][_0xebf690(0x13a)]?_0xebf690(0x134):_0xebf690(0x158),'packageVersion':_0x3bbe54[_0xebf690(0x146)],'skillVersion':_0xa56975,'installedPath':_0x4594a8['path'],'digest':_0x396bfc,'repairCommand':REPAIR_COMMAND};}catch(_0x1834f){return{'state':_0xebf690(0x135),'packageVersion':_0x3bbe54[_0xebf690(0x146)],'installedPath':_0x4594a8[_0xebf690(0x157)],'reason':_0x1834f instanceof Error?_0x1834f[_0xebf690(0x164)]:String(_0x1834f),'repairCommand':REPAIR_COMMAND};}}function failure(_0xde5f00,_0x3e6719,_0x15ec46,_0x3e15a1){const _0x37a16f=a260_0xc609fa;return{'ok':![],'code':_0xde5f00,'packageVersion':_0x3e6719[_0x37a16f(0x146)],'skillVersion':_0x3e6719[_0x37a16f(0x15d)],'installedPath':_0x3e15a1,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x15ec46 instanceof Error?_0x15ec46[_0x37a16f(0x164)]:String(_0x15ec46)};}export function installBuiltinSkill(_0xb70218={}){const _0x42e7f3=a260_0xc609fa,_0x20399f=_0xb70218[_0x42e7f3(0x16d)]??DEFAULT_PACKAGE_ROOT,_0x2201f8=_0xb70218[_0x42e7f3(0x13f)]??homedir();let _0x59f536;try{_0x59f536=readSource(_0x20399f);}catch(_0x5d0f80){return failure('SOURCE_INVALID',{'packageVersion':'unknown','skillVersion':_0x42e7f3(0x145)},_0x5d0f80);}const _0xb7f1da=inspectBuiltinSkill({'packageRoot':_0x20399f,'home':_0x2201f8}),_0x5d1114=runNpxSkillsAddGlobal(_0x20399f,_0x59f536[_0x42e7f3(0x131)],{'stdio':_0xb70218[_0x42e7f3(0x16a)]??_0x42e7f3(0x14e),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x2201f8}});if(_0x5d1114[_0x42e7f3(0x16b)])return{'ok':!![],'packageVersion':_0x59f536[_0x42e7f3(0x146)],'skillVersion':_0x59f536[_0x42e7f3(0x15d)],'installedPath':_0xb7f1da[_0x42e7f3(0x165)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x5d1114['ok'])return failure('INSTALL_FAILED',_0x59f536,_0x5d1114['error']??'skills@latest\x20exited\x20'+_0x5d1114[_0x42e7f3(0x156)]);const _0x3d7493=inspectBuiltinSkill({'packageRoot':_0x20399f,'home':_0x2201f8});if(_0x3d7493[_0x42e7f3(0x14f)]!=='current')return failure(_0x42e7f3(0x163),_0x59f536,_0x3d7493[_0x42e7f3(0x13c)]??_0x42e7f3(0x15f)+_0x3d7493[_0x42e7f3(0x14f)],_0x3d7493['installedPath']);return{'ok':!![],'packageVersion':_0x59f536[_0x42e7f3(0x146)],'skillVersion':_0x59f536['skillVersion'],'installedPath':_0x3d7493['installedPath'],'changed':_0xb7f1da[_0x42e7f3(0x14f)]!=='current','repairCommand':REPAIR_COMMAND};}
|
|
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};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ea8f8,_0x4299d0){const _0x53a5b5=a261_0x4bf3,_0x1d692a=_0x4ea8f8();while(!![]){try{const _0x87541f=-parseInt(_0x53a5b5(0x127))/0x1*(parseInt(_0x53a5b5(0x117))/0x2)+parseInt(_0x53a5b5(0x115))/0x3+parseInt(_0x53a5b5(0x110))/0x4+-parseInt(_0x53a5b5(0x10f))/0x5*(parseInt(_0x53a5b5(0x113))/0x6)+-parseInt(_0x53a5b5(0x10b))/0x7+parseInt(_0x53a5b5(0x121))/0x8+parseInt(_0x53a5b5(0x11c))/0x9;if(_0x87541f===_0x4299d0)break;else _0x1d692a['push'](_0x1d692a['shift']());}catch(_0x36a0ac){_0x1d692a['push'](_0x1d692a['shift']());}}}(a261_0xd3ca,0x40de6));import{logger}from'../utils/logger.js';function a261_0x4bf3(_0x265ce8,_0x24cae1){_0x265ce8=_0x265ce8-0x104;const _0xd3cad8=a261_0xd3ca();let _0x4bf375=_0xd3cad8[_0x265ce8];return _0x4bf375;}import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x58289e){const _0x3ec3c1=a261_0x4bf3,_0x43c969=[];for(const [_0x1e02a7,_0x5984e4]of Object[_0x3ec3c1(0x11d)](_0x58289e)){if(_0x5984e4===!![]){const _0x22e4c7=_0x1e02a7[_0x3ec3c1(0x10c)](/([A-Z])/g,_0x3ec3c1(0x10a))[_0x3ec3c1(0x11e)]();_0x43c969['push'](_0x22e4c7);}}return _0x43c969;}export function parseDynamicFlags(){const _0xd19dd=a261_0x4bf3,_0x2f5a12=[];for(let _0x334569=0x3;_0x334569<process[_0xd19dd(0x10e)][_0xd19dd(0x108)];_0x334569++){const _0x16c82b=process['argv'][_0x334569];if(_0x16c82b&&_0x16c82b['startsWith']('--')){const _0x19eea5=_0x16c82b[_0xd19dd(0x125)](0x2);_0x19eea5&&!_0x19eea5[_0xd19dd(0x116)]('=')&&_0x2f5a12[_0xd19dd(0x104)](_0x19eea5);}}return _0x2f5a12;}export function getAllProvidedFlags(_0x4fa1ac){const _0x1b05dd=camelCaseFlagsToKebab(_0x4fa1ac),_0x3b8c56=parseDynamicFlags(),_0x24880d=new Set([..._0x1b05dd,..._0x3b8c56]);return Array['from'](_0x24880d);}export function normalizeLegacyBffSaveFlags(_0x33d974){const _0x24bf1b=a261_0x4bf3,_0x216e69=new Set(_0x33d974);return _0x216e69[_0x24bf1b(0x106)](_0x24bf1b(0x105))&&_0x216e69[_0x24bf1b(0x11b)](_0x24bf1b(0x107)),Array['from'](_0x216e69);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x19ae20,_0x46652c,_0x385f5d){const _0x5eb5aa=a261_0x4bf3;logger[_0x5eb5aa(0x111)](process[_0x5eb5aa(0x122)]());if(_0x385f5d?.[_0x5eb5aa(0x10d)]||_0x19ae20==='--help'){showHelp();return;}console[_0x5eb5aa(0x124)]('Error:\x20Unsupported\x20command:\x20'+(_0x19ae20||_0x5eb5aa(0x126))),console[_0x5eb5aa(0x11f)](_0x5eb5aa(0x123)),console['log']('\x20\x20'+CLI_BIN_NAME+_0x5eb5aa(0x119)),console[_0x5eb5aa(0x11f)](''),console[_0x5eb5aa(0x11f)](_0x5eb5aa(0x112)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x5eb5aa(0x124)](_0x5eb5aa(0x109),_0x5eb5aa(0x118)+_0x19ae20),process['exit'](0x1);}function a261_0xd3ca(){const _0x27b3d9=['dangerously-bff-save','has','enable-bff-save','length','skill','-$1','2766953YgJFSw','replace','help','argv','5RcoUMb','974488dJiSiT','setLogPath','Public\x20Open\x20Skill\x20source:\x20','1151868VXYFwR','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','579339Vkanwg','includes','102556aHmrXZ','不支持的命令:\x20','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','add','3173634WwwACm','entries','toLowerCase','log','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','1329232jNClBp','cwd','\x0aAvailable\x20commands:','error','slice','(empty)','2WbPMsG','push'];a261_0xd3ca=function(){return _0x27b3d9;};return a261_0xd3ca();}function showHelp(){const _0x11eba8=a261_0x4bf3;console['log'](_0x11eba8(0x114)+CLI_BIN_NAME+_0x11eba8(0x11a)+SKILLS_INSTALL_COMMAND_LINE+_0x11eba8(0x120));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a262_0x4046(_0xf04690,_0x428571){_0xf04690=_0xf04690-0x1d1;const _0x464fd5=a262_0x464f();let _0x4046d1=_0x464fd5[_0xf04690];return _0x4046d1;}const a262_0x384d76=a262_0x4046;(function(_0x16d648,_0x1422c9){const _0x46d7f5=a262_0x4046,_0x44221d=_0x16d648();while(!![]){try{const _0x5d58f6=parseInt(_0x46d7f5(0x1e8))/0x1+parseInt(_0x46d7f5(0x201))/0x2*(parseInt(_0x46d7f5(0x1ea))/0x3)+parseInt(_0x46d7f5(0x1f8))/0x4+parseInt(_0x46d7f5(0x1df))/0x5+-parseInt(_0x46d7f5(0x1e7))/0x6+-parseInt(_0x46d7f5(0x200))/0x7+-parseInt(_0x46d7f5(0x1ff))/0x8*(parseInt(_0x46d7f5(0x1d8))/0x9);if(_0x5d58f6===_0x1422c9)break;else _0x44221d['push'](_0x44221d['shift']());}catch(_0x3eacf0){_0x44221d['push'](_0x44221d['shift']());}}}(a262_0x464f,0x8f05a));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_0x384d76(0x1e0);export const NPX_SKILLS_SUBCOMMAND_ADD=a262_0x384d76(0x208);export const NPX_SKILLS_FLAG_SKILL=a262_0x384d76(0x1e5);export const RABETBASE_SKILL_SOURCE='lovrabet/rabetbase';export const LEGACY_RABETBASE_SKILL_SOURCE=a262_0x384d76(0x1ed);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export const RABETBASE_GLOBAL_SKILL_NAME='rabetbase';export const RABETBASE_SKILL_GIT_SOURCE=a262_0x384d76(0x207);export function resolveGlobalSkillName(_0x4bd8ce){const _0x237929=a262_0x384d76;switch(_0x4bd8ce[_0x237929(0x206)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x2afbde){const _0x82d30f=a262_0x384d76,_0xc5590e=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x2afbde&&_0xc5590e[_0x82d30f(0x1f7)](NPX_SKILLS_FLAG_SKILL,_0x2afbde),_0xc5590e;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a262_0x384d76(0x1f2),...buildNpxSkillsAddArgv()][a262_0x384d76(0x1f5)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a262_0x384d76(0x1f2),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a262_0x384d76(0x1f5)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0xa51a22,_0x3b9557,_0x1a1d98){return{'ok':![],'status':_0x3b9557,'code':_0xa51a22,'error':'['+_0xa51a22+']\x20'+_0x1a1d98};}function spawnOptions(_0x3377e0,_0x24e7c1){const _0xbdf664=a262_0x384d76,_0x244de0={...process.env};return delete _0x244de0[_0xbdf664(0x1f4)],delete _0x244de0[_0xbdf664(0x1f1)],{'cwd':_0x3377e0,'stdio':_0x24e7c1,'env':_0x244de0,'shell':![],..._0x24e7c1===_0xbdf664(0x1d7)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x1d637b,_0x5c7840,_0x2deb4d,_0x1e6f96){const _0x183b2b=a262_0x384d76,_0x20c6e8=[_0x1d637b[_0x183b2b(0x1d5)]?_0x1d637b['stdout'][_0x183b2b(0x1ef)]():'',_0x1d637b[_0x183b2b(0x1d1)]?_0x1d637b[_0x183b2b(0x1d1)]['toString']():''][_0x183b2b(0x1dc)](Boolean)[_0x183b2b(0x1f5)]('\x0a')[_0x183b2b(0x206)]();_0x1e6f96!==_0x183b2b(0x1d7)&&_0x20c6e8&&console[_0x183b2b(0x204)](_0x20c6e8);if(_0x1d637b[_0x183b2b(0x1fe)]){const _0x37fff5=_0x1d637b[_0x183b2b(0x1fe)],_0x29524b=_0x37fff5[_0x183b2b(0x1d9)]===_0x183b2b(0x1e6)?'NPX_NOT_FOUND':_0x37fff5[_0x183b2b(0x1d9)]===_0x183b2b(0x1fc)||_0x37fff5[_0x183b2b(0x1d9)]===_0x183b2b(0x1f6)?_0x183b2b(0x1da):_0x183b2b(0x203);return failure(_0x29524b,_0x1d637b[_0x183b2b(0x1e4)],_0x37fff5['message']);}if(_0x1d637b['signal'])return failure('CHILD_TERMINATED',_0x1d637b[_0x183b2b(0x1e4)],_0x183b2b(0x202)+_0x1d637b[_0x183b2b(0x1fd)]);if(_0x1d637b[_0x183b2b(0x1e4)]!==0x0)return failure('CHILD_EXIT_NONZERO',_0x1d637b['status'],_0x20c6e8||_0x183b2b(0x1d3)+(_0x1d637b[_0x183b2b(0x1e4)]??_0x183b2b(0x1e9)));const _0x199818=_0x5c7840?resolveInstalledSkill(_0x5c7840,_0x2deb4d):undefined,_0x34ea5c=_0x20c6e8[_0x183b2b(0x1d2)](/Failed to install\s+(\d+)/i);if(_0x34ea5c&&Number(_0x34ea5c[0x1])>0x0){const _0x7a3b07=_0x183b2b(0x1ec)+_0x34ea5c[0x1]+_0x183b2b(0x1f9)+(_0x20c6e8?':\x0a'+_0x20c6e8:'');if(_0x199818?.[_0x183b2b(0x1db)]===_0x183b2b(0x1d4))return console[_0x183b2b(0x205)]('!\x20'+_0x7a3b07),{'ok':!![],'status':0x0};return failure(_0x183b2b(0x1f3),0x0,_0x7a3b07);}if(_0x199818){if(_0x199818[_0x183b2b(0x1db)]===_0x183b2b(0x1de))return failure(_0x183b2b(0x20a),0x0,'Skill\x20\x22'+_0x5c7840+_0x183b2b(0x1fa)+_0x199818[_0x183b2b(0x1fb)]['join'](',\x20')+')');_0x199818[_0x183b2b(0x1db)]==='unverifiable'&&console[_0x183b2b(0x205)](_0x183b2b(0x1dd)+_0x5c7840+'\x22\x20install\x20state:\x20'+_0x199818[_0x183b2b(0x1e1)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}function a262_0x464f(){const _0x202c25=['yes','pipe','36YTXGHn','code','PERMISSION_DENIED','state','filter','!\x20Could\x20not\x20verify\x20\x22','absent','4943025ypmdFz','skills@latest','reason','stdio','expectedSkillName','status','--skill','ENOENT','2314068bKPBcz','551108BsIwvp','unknown','6ATciDE','presence','Installer\x20reported\x20','lovrabet/lovrabet-skill','skill','toString','inherit','NPM_CONFIG_GLOBAL','npx','INSTALL_PARTIAL','npm_config_global','join','EACCES','push','4386936KsYfsm','\x20failed\x20target(s)','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','checked','EPERM','signal','error','2779256djaXRQ','2142945pBDweL','30812JjpeNT','npx\x20terminated\x20by\x20signal\x20','SPAWN_FAILED','log','warn','trim','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','add','remove','SKILL_NOT_INSTALLED','stderr','match','exit\x20','present','stdout'];a262_0x464f=function(){return _0x202c25;};return a262_0x464f();}export function runNpxSkillsAdd(_0x4cad94,_0x2420ca){const _0x1c845d=a262_0x384d76;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x51fd9f=_0x2420ca?.[_0x1c845d(0x1e2)]??_0x1c845d(0x1f0),_0x2bc6dc=resolveNpmBin('npx'),_0x6312c8=buildNpxSkillsAddArgv(_0x2420ca?.['skill']),_0x4ca0d8=[_0x1c845d(0x1f2),..._0x6312c8][_0x1c845d(0x1f5)]('\x20');console[_0x1c845d(0x204)]('*\x20'+_0x4ca0d8);const _0x729b3e=spawnSync(_0x2bc6dc,_0x6312c8,spawnOptions(_0x4cad94,_0x51fd9f));return normalizeSpawnResult(_0x729b3e,undefined,undefined,_0x51fd9f);}export function runNpxSkillsRemove(_0x595e4e,_0x472501,_0x45b68a=LEGACY_RABETBASE_SKILL_SOURCE){const _0xe1f9b1=a262_0x384d76;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5a98c5=_0x472501?.[_0xe1f9b1(0x1e2)]??_0xe1f9b1(0x1f0),_0x2c8449=resolveNpmBin(_0xe1f9b1(0x1f2)),_0xb4a2ff=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0xe1f9b1(0x209),_0x45b68a,NPX_SKILLS_FLAG_SKILL,_0x472501?.[_0xe1f9b1(0x1ee)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x472501?.[_0xe1f9b1(0x1d6)]?['-y']:[]],_0x233345=[_0x2c8449,..._0xb4a2ff][_0xe1f9b1(0x1f5)]('\x20');console[_0xe1f9b1(0x204)]('*\x20'+_0x233345);const _0x4205ac=spawnSync(_0x2c8449,_0xb4a2ff,spawnOptions(_0x595e4e,_0x5a98c5));return normalizeSpawnResult(_0x4205ac,undefined,undefined,_0x5a98c5);}export function runNpxSkillsAddGlobal(_0x582fe0,_0x36ca02,_0xb1b0f4){const _0x147289=a262_0x384d76;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1d2ad8=resolveNpmBin('npx'),_0x30e30c=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x36ca02,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x5dbbd4=[_0x147289(0x1f2),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x36ca02,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');console[_0x147289(0x204)]('*\x20'+_0x5dbbd4);const _0x52b2dd=spawnSync(_0x1d2ad8,_0x30e30c,spawnOptions(_0x582fe0,_0x147289(0x1d7)));return normalizeSpawnResult(_0x52b2dd,_0xb1b0f4?.[_0x147289(0x1e3)]??resolveGlobalSkillName(_0x36ca02),_0xb1b0f4?.[_0x147289(0x1eb)],_0xb1b0f4?.['stdio']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a263_0x5f2720=a263_0x38cd;(function(_0x72ef09,_0x27f724){const _0x348e82=a263_0x38cd,_0x2e0f94=_0x72ef09();while(!![]){try{const _0x38c528=-parseInt(_0x348e82(0x1d1))/0x1+-parseInt(_0x348e82(0x1e0))/0x2+parseInt(_0x348e82(0x1d7))/0x3+-parseInt(_0x348e82(0x1d6))/0x4+parseInt(_0x348e82(0x1de))/0x5*(parseInt(_0x348e82(0x1c1))/0x6)+-parseInt(_0x348e82(0x1df))/0x7+-parseInt(_0x348e82(0x1c5))/0x8*(-parseInt(_0x348e82(0x1d5))/0x9);if(_0x38c528===_0x27f724)break;else _0x2e0f94['push'](_0x2e0f94['shift']());}catch(_0x75d291){_0x2e0f94['push'](_0x2e0f94['shift']());}}}(a263_0x19ef,0xeb016));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a263_0x5f2720(0x1c8));function a263_0x38cd(_0x1bfffc,_0x42febd){_0x1bfffc=_0x1bfffc-0x1c1;const _0x19ef67=a263_0x19ef();let _0x38cdc1=_0x19ef67[_0x1bfffc];return _0x38cdc1;}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a263_0x5f2720(0x1c6),a263_0x5f2720(0x1cd)),join(a263_0x5f2720(0x1c2),'skills')];function a263_0x19ef(){const _0x2a6e42=['number','object','10455bCsDDL','12007576kazbDN','1653962UhexQY','parse','3132CmWRYB','.claude','lockFile','kind','8XeukcE','.agents','version','.skill-lock.json','join','\x20has\x20no\x20skills\x20map','find','home','skills','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','\x20is\x20unreadable:\x20','map','1119741oQoPMp','reason','unusable','unverifiable','39705183zvhgxP','6108904cvfXYk','1946127pKcMuG','present','absent','not-recorded','utf8'];a263_0x19ef=function(){return _0x2a6e42;};return a263_0x19ef();}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x30f23c,_0x5d644d){const _0x16c2cd=a263_0x5f2720;if(!existsSync(_0x30f23c))return{'kind':_0x16c2cd(0x1da)};let _0x4c770d;try{_0x4c770d=JSON[_0x16c2cd(0x1e1)](readFileSync(_0x30f23c,_0x16c2cd(0x1db)));}catch(_0x242e98){return{'kind':_0x16c2cd(0x1d3),'reason':_0x30f23c+_0x16c2cd(0x1cf)+_0x242e98['message']};}const _0x4a53c1=_0x4c770d;if(typeof _0x4a53c1?.[_0x16c2cd(0x1c7)]!==_0x16c2cd(0x1dc)||!SUPPORTED_LOCK_VERSIONS['includes'](_0x4a53c1['version']))return{'kind':_0x16c2cd(0x1d3),'reason':_0x30f23c+'\x20uses\x20unsupported\x20version\x20'+String(_0x4a53c1?.['version'])};if(!_0x4a53c1[_0x16c2cd(0x1cd)]||typeof _0x4a53c1[_0x16c2cd(0x1cd)]!==_0x16c2cd(0x1dd))return{'kind':_0x16c2cd(0x1d3),'reason':_0x30f23c+_0x16c2cd(0x1ca)};return _0x4a53c1['skills'][_0x5d644d]?{'kind':'recorded'}:{'kind':_0x16c2cd(0x1da)};}export function resolveInstalledSkill(_0x4da6e5,_0x29827f){const _0x5ce3e4=a263_0x5f2720,_0x3de013=_0x29827f?.[_0x5ce3e4(0x1cc)]??homedir(),_0x3a054f=_0x29827f?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x45d0cb=>join(_0x3de013,_0x45d0cb)),_0x3cdd99=_0x29827f?.[_0x5ce3e4(0x1c3)]??join(_0x3de013,SKILL_LOCK_RELATIVE_PATH),_0x507511=_0x3a054f[_0x5ce3e4(0x1d0)](_0x14a70b=>join(_0x14a70b,_0x4da6e5,'SKILL.md')),_0x30bd6d=_0x507511[_0x5ce3e4(0x1cb)](_0x5ba434=>existsSync(_0x5ba434));if(_0x30bd6d)return{'state':_0x5ce3e4(0x1d8),'path':_0x30bd6d};const _0x55bf67=readLockLookup(_0x3cdd99,_0x4da6e5);if(_0x55bf67[_0x5ce3e4(0x1c4)]===_0x5ce3e4(0x1d3))return{'state':_0x5ce3e4(0x1d4),'reason':_0x55bf67[_0x5ce3e4(0x1d2)]};if(_0x55bf67[_0x5ce3e4(0x1c4)]==='recorded')return{'state':_0x5ce3e4(0x1d4),'reason':_0x3cdd99+'\x20records\x20\x22'+_0x4da6e5+_0x5ce3e4(0x1ce)+('('+_0x507511[_0x5ce3e4(0x1c9)](',\x20')+')')};return{'state':_0x5ce3e4(0x1d9),'checked':_0x507511};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3b0c26,_0x33e02e){const _0x31e369=a264_0x796b,_0x2ec3ce=_0x3b0c26();while(!![]){try{const _0x105014=-parseInt(_0x31e369(0x9c))/0x1*(-parseInt(_0x31e369(0x9f))/0x2)+-parseInt(_0x31e369(0xa3))/0x3+-parseInt(_0x31e369(0x94))/0x4*(-parseInt(_0x31e369(0x9b))/0x5)+-parseInt(_0x31e369(0xa8))/0x6+parseInt(_0x31e369(0xa4))/0x7*(parseInt(_0x31e369(0xa0))/0x8)+parseInt(_0x31e369(0x9d))/0x9*(parseInt(_0x31e369(0x98))/0xa)+-parseInt(_0x31e369(0xa5))/0xb*(parseInt(_0x31e369(0x97))/0xc);if(_0x105014===_0x33e02e)break;else _0x2ec3ce['push'](_0x2ec3ce['shift']());}catch(_0x260039){_0x2ec3ce['push'](_0x2ec3ce['shift']());}}}(a264_0x28b3,0x2c761));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a264_0x796b(_0x1dbe3c,_0x3f75e7){_0x1dbe3c=_0x1dbe3c-0x94;const _0x28b398=a264_0x28b3();let _0x796b64=_0x28b398[_0x1dbe3c];return _0x796b64;}import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x1af77a){const _0x45c62c=a264_0x796b;return SENSITIVE_PATTERNS['some'](_0x767fcd=>_0x767fcd[_0x45c62c(0xa7)](_0x1af77a));}function a264_0x28b3(){const _0x57ff77=['service','rabetbase.command','4716hdInNj','1653410hyJilX','error','[REDACTED]','110ApsTIW','10viBpxO','9jXcrda','entries','13584tZnuGf','232siLpYF','message','flags','867651qIEfXa','57589ViPBnw','2574tKgFqD','command','test','895524btHWqG','43764qiWmxG'];a264_0x28b3=function(){return _0x57ff77;};return a264_0x28b3();}function sanitizeFlags(_0x4125df){const _0x174703=a264_0x796b,_0x164bcb={};for(const [_0x3ab994,_0x45498f]of Object[_0x174703(0x9e)](_0x4125df)){isSensitiveKey(_0x3ab994)?_0x164bcb[_0x3ab994]=_0x45498f!=null&&_0x45498f!==''?_0x174703(0x9a):_0x45498f:_0x164bcb[_0x3ab994]=_0x45498f;}return _0x164bcb;}export async function reportCommandTrace(_0x50c710){const _0x5ce2c5=a264_0x796b;try{const _0x1c0ffd=sanitizeFlags(_0x50c710[_0x5ce2c5(0xa2)]);await sendCliTraceLog({'spanName':_0x5ce2c5(0x96),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x50c710[_0x5ce2c5(0x95)],'command.name':_0x50c710[_0x5ce2c5(0xa6)],'command.flags':JSON['stringify'](_0x1c0ffd),..._0x50c710['durationMs']!=null?{'command.duration_ms':_0x50c710['durationMs']}:{},..._0x50c710[_0x5ce2c5(0x99)]?{'command.error':_0x50c710[_0x5ce2c5(0x99)]instanceof Error?_0x50c710[_0x5ce2c5(0x99)][_0x5ce2c5(0xa1)]:String(_0x50c710[_0x5ce2c5(0x99)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54a4b4,_0x24eeca){var _0x3a2d2c=a265_0x1e06,_0x2abd90=_0x54a4b4();while(!![]){try{var _0x4e8567=-parseInt(_0x3a2d2c(0x1b6))/0x1*(parseInt(_0x3a2d2c(0x1b5))/0x2)+parseInt(_0x3a2d2c(0x1ae))/0x3*(-parseInt(_0x3a2d2c(0x1b7))/0x4)+parseInt(_0x3a2d2c(0x1af))/0x5+-parseInt(_0x3a2d2c(0x1b3))/0x6+parseInt(_0x3a2d2c(0x1b4))/0x7+-parseInt(_0x3a2d2c(0x1b0))/0x8*(parseInt(_0x3a2d2c(0x1b8))/0x9)+parseInt(_0x3a2d2c(0x1b2))/0xa;if(_0x4e8567===_0x24eeca)break;else _0x2abd90['push'](_0x2abd90['shift']());}catch(_0x5b57e3){_0x2abd90['push'](_0x2abd90['shift']());}}}(a265_0x5124,0x3b0fd));function a265_0x5124(){var _0x342e9d=['284YZTplX','225pZjzRU','Failed\x20to\x20report\x20CLI\x20help\x20trace:','error','12570JgxwJw','1272690KysPCW','12696vdGYZQ','service','4202120uTTYuD','108132TYvEzq','1878513ehbXiD','6990eeqRis','99IRHbGt'];a265_0x5124=function(){return _0x342e9d;};return a265_0x5124();}function a265_0x1e06(_0x42bb4d,_0x32a435){_0x42bb4d=_0x42bb4d-0x1ad;var _0x5124fa=a265_0x5124();var _0x1e0646=_0x5124fa[_0x42bb4d];return _0x1e0646;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x32f9a3,_0x2a748c){var _0x5f221c=a265_0x1e06;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x32f9a3,..._0x2a748c?.[_0x5f221c(0x1b1)]&&{'rabetbase.help.service':_0x2a748c[_0x5f221c(0x1b1)]}}});}catch(_0x2bac05){console[_0x5f221c(0x1ad)](_0x5f221c(0x1b9),_0x2bac05);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51091a,_0x297c7c){const _0x559428=a266_0x1153,_0x39be35=_0x51091a();while(!![]){try{const _0x30a46c=parseInt(_0x559428(0x1d5))/0x1*(parseInt(_0x559428(0x1e2))/0x2)+parseInt(_0x559428(0x1db))/0x3*(parseInt(_0x559428(0x1e3))/0x4)+-parseInt(_0x559428(0x1d7))/0x5+parseInt(_0x559428(0x1de))/0x6+-parseInt(_0x559428(0x1d8))/0x7+parseInt(_0x559428(0x1d6))/0x8*(-parseInt(_0x559428(0x1e0))/0x9)+-parseInt(_0x559428(0x1d9))/0xa*(-parseInt(_0x559428(0x1e1))/0xb);if(_0x30a46c===_0x297c7c)break;else _0x39be35['push'](_0x39be35['shift']());}catch(_0x558878){_0x39be35['push'](_0x39be35['shift']());}}}(a266_0x3c18,0x3de61));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';let cliOtelTraceInitialized=![];function a266_0x1153(_0x156c18,_0x549421){_0x156c18=_0x156c18-0x1d4;const _0x3c1883=a266_0x3c18();let _0x115321=_0x3c1883[_0x156c18];return _0x115321;}export async function ensureCliOtelTraceConfig(){const _0x2bbf6f=a266_0x1153,_0x5133f1=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x3547d7=_0x5133f1?.[_0x2bbf6f(0x1dd)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':_0x2bbf6f(0x1da))}),setUserContext({'id':_0x3547d7?.['id'],'username':_0x3547d7?.['username'],'nickname':_0x3547d7?.[_0x2bbf6f(0x1dc)],'email':_0x3547d7?.['email'],'tenantCode':_0x3547d7?.[_0x2bbf6f(0x1df)]?.[_0x2bbf6f(0x1d4)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x5133f1;}function a266_0x3c18(){const _0x10e5b7=['80znzFtK','tenant_code','13qyyebn','3968DkPapR','2140830prQIah','1296113bEEeHl','24010bqOolY','production','33729jImyXv','nickname','user','518268prONOp','tenant','3429tubOgj','2541rlOZFo','29226dKlKhB'];a266_0x3c18=function(){return _0x10e5b7;};return a266_0x3c18();}
|