@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.4
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/api/generate-sdk-config-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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.d.ts +13 -0
- package/lib/commands/db/table-diff-shared.js +1 -0
- 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/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1 -7
- 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/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +6 -6
- package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
- package/skills/rabetbase/guides/database-connection-workflow.md +9 -9
- package/skills/rabetbase/references/rabetbase-config.md +2 -3
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
- package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
- package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a249_0x296d(){const _0x4bb40c=['stdout','144UDVQFQ','30iLBgOk','3831HjpMFU','code','url','240vdixAr','trim','hint','jqFilter','write','risk','69047QEocGW','format','data','1403039neprmd','endsWith','950hAWTQr','stringify','json','pretty','update','command','14103eIlVoo','message','jq:\x20','1264UjWESC','error','67350nptGcq','2849630XWyHct','4380952kRxxaH'];a249_0x296d=function(){return _0x4bb40c;};return a249_0x296d();}(function(_0x57ae67,_0x4dfbb3){const _0x2b7db7=a249_0x58f4,_0x3b5eff=_0x57ae67();while(!![]){try{const _0x329b48=parseInt(_0x2b7db7(0xb4))/0x1*(parseInt(_0x2b7db7(0xaa))/0x2)+parseInt(_0x2b7db7(0xab))/0x3*(-parseInt(_0x2b7db7(0xc2))/0x4)+parseInt(_0x2b7db7(0xc4))/0x5*(-parseInt(_0x2b7db7(0xae))/0x6)+-parseInt(_0x2b7db7(0xc5))/0x7+-parseInt(_0x2b7db7(0xc6))/0x8+-parseInt(_0x2b7db7(0xbf))/0x9*(parseInt(_0x2b7db7(0xb9))/0xa)+parseInt(_0x2b7db7(0xb7))/0xb*(parseInt(_0x2b7db7(0xc8))/0xc);if(_0x329b48===_0x4dfbb3)break;else _0x3b5eff['push'](_0x3b5eff['shift']());}catch(_0x1a864b){_0x3b5eff['push'](_0x3b5eff['shift']());}}}(a249_0x296d,0x7f0c3));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a249_0x58f4(_0xb09a19,_0x1edbf2){_0xb09a19=_0xb09a19-0xaa;const _0x296d64=a249_0x296d();let _0x58f44e=_0x296d64[_0xb09a19];return _0x58f44e;}import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x2de0e7,_0x4de82d){const _0x5139da=a249_0x58f4,_0x2c70f2=_0x2de0e7['_notice'],{_notice:_0x49d433,..._0x43dbd6}=_0x2de0e7;void _0x49d433,baseFormatOutput(_0x43dbd6,_0x4de82d),_0x4de82d[_0x5139da(0xb5)]===_0x5139da(0xbc)&&printPrettyNotice(_0x2c70f2);}export function formatCliError(_0x2c9b2e,_0x4423eb){const _0x4a983e=a249_0x58f4;if(_0x4423eb[_0x4a983e(0xb5)]===_0x4a983e(0xbc))return![];const _0x4347bb=_0x2c9b2e[_0x4a983e(0xb6)],_0x53232e={'ok':![],'command':_0x4423eb[_0x4a983e(0xbe)],'risk':_0x4423eb[_0x4a983e(0xb3)],'data':_0x4347bb??null,'error':{'code':_0x2c9b2e['code'],'message':_0x2c9b2e['message'],..._0x2c9b2e['hint']?{'hint':_0x2c9b2e[_0x4a983e(0xb0)]}:{}}},_0x1750c5=_0x4423eb[_0x4a983e(0xb5)]===_0x4a983e(0xbb)?JSON[_0x4a983e(0xba)](_0x53232e,null,0x2):JSON[_0x4a983e(0xba)](_0x53232e);let _0x171fb9=_0x1750c5;if(_0x4423eb['jqFilter']?.[_0x4a983e(0xaf)]())try{_0x171fb9=applyJqFilter(_0x1750c5,_0x4423eb[_0x4a983e(0xb1)]);}catch(_0x359167){const _0x41663c=_0x359167 instanceof CliError?_0x359167:CliErrors['validation'](_0x4a983e(0xc1)+(_0x359167 instanceof Error?_0x359167[_0x4a983e(0xc0)]:String(_0x359167))),_0x28e5e3={..._0x53232e,'error':{'code':_0x41663c[_0x4a983e(0xac)],'message':_0x41663c[_0x4a983e(0xc0)],..._0x41663c[_0x4a983e(0xb0)]?{'hint':_0x41663c['hint']}:{},'cause':_0x53232e[_0x4a983e(0xc3)]}};_0x171fb9=_0x4423eb[_0x4a983e(0xb5)]===_0x4a983e(0xbb)?JSON[_0x4a983e(0xba)](_0x28e5e3,null,0x2):JSON[_0x4a983e(0xba)](_0x28e5e3);}return process[_0x4a983e(0xc7)][_0x4a983e(0xb2)](_0x171fb9[_0x4a983e(0xb8)]('\x0a')?_0x171fb9:_0x171fb9+'\x0a'),!![];}function printPrettyNotice(_0x5465c4){const _0x47a0e0=a249_0x58f4;if(!_0x5465c4?.[_0x47a0e0(0xbd)])return;console[_0x47a0e0(0xc3)](_0x5465c4[_0x47a0e0(0xbd)][_0x47a0e0(0xc0)]+'\x20('+_0x5465c4[_0x47a0e0(0xbd)][_0x47a0e0(0xad)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x194119,_0x1b2ad7){var _0xd2e926=a250_0x2559,_0x3db123=_0x194119();while(!![]){try{var _0x831314=parseInt(_0xd2e926(0x163))/0x1+-parseInt(_0xd2e926(0x15a))/0x2+-parseInt(_0xd2e926(0x15e))/0x3+parseInt(_0xd2e926(0x15b))/0x4*(-parseInt(_0xd2e926(0x162))/0x5)+-parseInt(_0xd2e926(0x161))/0x6*(parseInt(_0xd2e926(0x15c))/0x7)+-parseInt(_0xd2e926(0x15f))/0x8+parseInt(_0xd2e926(0x160))/0x9*(parseInt(_0xd2e926(0x15d))/0xa);if(_0x831314===_0x1b2ad7)break;else _0x3db123['push'](_0x3db123['shift']());}catch(_0x161ecb){_0x3db123['push'](_0x3db123['shift']());}}}(a250_0x29b9,0x4406e));function a250_0x2559(_0x2c9616,_0x50fb6e){_0x2c9616=_0x2c9616-0x15a;var _0x29b9b1=a250_0x29b9();var _0x2559a0=_0x29b9b1[_0x2c9616];return _0x2559a0;}function a250_0x29b9(){var _0x17b5d0=['133326ZcAlto','854796ibmdpG','5IzuJHo','133311povlWF','743622VLnlZH','1444208JEEeWr','7PRKWRQ','1220lSVkGu','1240935NpCzSt','2984056wUeCnG'];a250_0x29b9=function(){return _0x17b5d0;};return a250_0x29b9();}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43ee41,_0x41a432){const _0x1e35d4=a251_0x8cf7,_0x4987f7=_0x43ee41();while(!![]){try{const _0x5e81bf=-parseInt(_0x1e35d4(0x190))/0x1*(parseInt(_0x1e35d4(0x18e))/0x2)+-parseInt(_0x1e35d4(0x185))/0x3+parseInt(_0x1e35d4(0x184))/0x4+-parseInt(_0x1e35d4(0x197))/0x5*(parseInt(_0x1e35d4(0x186))/0x6)+parseInt(_0x1e35d4(0x19b))/0x7*(-parseInt(_0x1e35d4(0x199))/0x8)+parseInt(_0x1e35d4(0x191))/0x9+parseInt(_0x1e35d4(0x194))/0xa;if(_0x5e81bf===_0x41a432)break;else _0x4987f7['push'](_0x4987f7['shift']());}catch(_0x307837){_0x4987f7['push'](_0x4987f7['shift']());}}}(a251_0x1ca1,0xba384));import{CliErrors}from'../errors.js';function a251_0x8cf7(_0x3b960f,_0x22fb05){_0x3b960f=_0x3b960f-0x183;const _0x1ca14b=a251_0x1ca1();let _0x8cf799=_0x1ca14b[_0x3b960f];return _0x8cf799;}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x6b2755,_0x54e00b,_0x19d1de,_0x19b06f){const _0x125ee0=a251_0x8cf7,_0x533a84=_0x6b2755[_0x125ee0(0x18a)][_0x125ee0(0x18b)](_0x34ef02=>_0x34ef02[_0x125ee0(0x198)]==='code'&&_0x34ef02[_0x125ee0(0x18f)]===_0x125ee0(0x19a)),_0x249781=_0x6b2755[_0x125ee0(0x18a)][_0x125ee0(0x18b)](_0x264293=>_0x264293[_0x125ee0(0x198)]==='alias'&&_0x264293[_0x125ee0(0x18f)]===_0x125ee0(0x19a));if(!_0x533a84||!_0x249781)return;const _0x519024=_0x54e00b[_0x125ee0(0x196)]?String(_0x54e00b[_0x125ee0(0x196)]):'',_0x51f08d=_0x54e00b[_0x125ee0(0x188)]?String(_0x54e00b['alias']):'';if(!_0x519024&&!_0x51f08d)throw CliErrors[_0x125ee0(0x183)]('`'+_0x19b06f+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x51f08d&&!_0x519024){const _0x1b65f7=resolveAlias(_0x19d1de,_0x51f08d);if(!_0x1b65f7){const _0xcd0705=listAliases(_0x19d1de)[_0x125ee0(0x193)](_0xedc0fb=>_0xedc0fb[_0x125ee0(0x188)]),_0x3aa33a=_0xcd0705['length']?_0x125ee0(0x189)+_0xcd0705[_0x125ee0(0x18c)](',\x20'):_0x125ee0(0x187)+_0x19d1de+_0x125ee0(0x19c)+CLI_BIN_NAME+_0x125ee0(0x195);throw CliErrors[_0x125ee0(0x183)](_0x125ee0(0x18d)+_0x51f08d+_0x125ee0(0x192)+_0x3aa33a);}_0x54e00b['code']=_0x1b65f7;}}function a251_0x1ca1(){const _0x5886d0=['string','14SsQonj','.\x20Run\x20`','validation','1167000LAapyW','958134zeUHDd','40578BapJly','No\x20api.ts\x20found\x20in\x20','alias','Available\x20aliases:\x20','flags','some','join','Unknown\x20alias\x20\x22','2tdPWbF','type','1178582cWduLw','9453456ytsGcI','\x22.\x20','map','26609150WSYioj','\x20api\x20pull`\x20first.','code','605hzzRoW','name','3696040WojzTQ'];a251_0x1ca1=function(){return _0x5886d0;};return a251_0x1ca1();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x134d81,_0xf4f8fb){const _0x3c8341=a251_0x164b,_0x5a6ccf=_0x134d81();while(!![]){try{const _0x2b7f3c=parseInt(_0x3c8341(0x1d8))/0x1*(parseInt(_0x3c8341(0x1fe))/0x2)+parseInt(_0x3c8341(0x1ef))/0x3*(-parseInt(_0x3c8341(0x1db))/0x4)+parseInt(_0x3c8341(0x1e5))/0x5+-parseInt(_0x3c8341(0x1e0))/0x6+-parseInt(_0x3c8341(0x1f7))/0x7*(-parseInt(_0x3c8341(0x1ff))/0x8)+parseInt(_0x3c8341(0x1ea))/0x9*(-parseInt(_0x3c8341(0x21b))/0xa)+parseInt(_0x3c8341(0x219))/0xb*(parseInt(_0x3c8341(0x1d5))/0xc);if(_0x2b7f3c===_0xf4f8fb)break;else _0x5a6ccf['push'](_0x5a6ccf['shift']());}catch(_0x4de5d5){_0x5a6ccf['push'](_0x5a6ccf['shift']());}}}(a251_0x3de7,0x867a5));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a251_0x10ab79}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x2ca706){const _0xdefb5f=a251_0x164b;return typeof _0x2ca706==='string'&&_0x2ca706['trim']()?_0x2ca706[_0xdefb5f(0x1da)]():undefined;}function resolveEnvAppCode(){const _0x288e8e=a251_0x164b,_0xbe1a38=stringFlag(process.env.RABETBASE_APPCODE);if(_0xbe1a38)return{'name':_0x288e8e(0x213),'value':_0xbe1a38};const _0x251b65=stringFlag(process.env.LOVRABET_APPCODE);if(_0x251b65)return{'name':_0x288e8e(0x1ec),'value':_0x251b65};return undefined;}function hasExplicitAppCode(_0x3d402f,_0x28b188){const _0x440ec0=a251_0x164b;return!!(stringFlag(_0x3d402f[_0x440ec0(0x20c)])||stringFlag(_0x28b188['appcode']));}function assertEnvAppCodeNotIgnored(_0x3cf2a9,_0x3176e7,_0x32f03b){const _0x5b6a67=a251_0x164b;if(!_0x3176e7||_0x32f03b||_0x3cf2a9===_0x3176e7['value'])return;const _0x696b31=_0x3cf2a9?'Current\x20resolved\x20appcode\x20is\x20\x22'+_0x3cf2a9+'\x22.':_0x5b6a67(0x1fc);throw CliErrors[_0x5b6a67(0x200)](_0x3176e7[_0x5b6a67(0x1d4)]+'='+_0x3176e7['value']+'\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20'+_0x696b31+'\x20'+('To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$'+_0x3176e7[_0x5b6a67(0x1d4)]+'\x22.'));}export function createPipelineEnv(_0x446bc9,_0x51984f,_0x33e58c=[]){const _0x3a4d29=a251_0x164b;return{'rawFlags':_0x51984f,'args':_0x33e58c,'resolveAppCode':()=>_0x446bc9[_0x3a4d29(0x20e)],'resolveCookie':()=>_0x446bc9['cookie']||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a251_0x10ab79(_0x51984f),'defaultFormat':_0x446bc9[_0x3a4d29(0x20b)],'defaultPageSize':_0x446bc9[_0x3a4d29(0x1e6)],'defaultVerbose':_0x446bc9[_0x3a4d29(0x20d)],'apiDir':_0x446bc9[_0x3a4d29(0x1df)],'riskLevel':_0x446bc9[_0x3a4d29(0x207)],'selectedAppName':_0x446bc9[_0x3a4d29(0x1fa)],'mergedCli':{'defaultApp':_0x446bc9[_0x3a4d29(0x1e9)],'currentApp':_0x446bc9['currentApp'],'appCode':_0x446bc9[_0x3a4d29(0x20e)],'apps':_0x446bc9[_0x3a4d29(0x1ce)]}};}export function createRabetbaseRunnerAdapter(_0x7ca00f={}){const _0x30a520=a251_0x164b;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x30a520(0x1fb)](_0x1f8cd9=>PIPELINE_FLAG_NAMES[_0x30a520(0x1cd)](_0x1f8cd9['name']))[_0x30a520(0x221)](({name:_0x38da93,type:_0x4966ad,description:_0x415034})=>({'name':_0x38da93,'type':_0x4966ad,'description':_0x415034})),'formatOutput':_0x7ca00f[_0x30a520(0x21f)]??formatOutput,'getCommandLabel'(_0x3391a4){const _0x27ad1d=_0x30a520;return CLI_BIN_NAME+'\x20'+_0x3391a4[_0x27ad1d(0x21a)]+'\x20'+_0x3391a4['command'];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x3082e5,{def:_0x3d2d21}){const _0x57d69f=_0x30a520,_0x56610f=_0x3082e5[_0x57d69f(0x217)]('Edit\x20the\x20config\x20file\x20manually')?'AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.':_0x57d69f(0x1d0)+_0x3d2d21[_0x57d69f(0x1f8)]+_0x57d69f(0x211)+_0x57d69f(0x1eb);return CliErrors[_0x57d69f(0x200)](_0x3082e5+'\x0a\x20\x20'+_0x56610f);}},async 'prepare'(_0x2220dc,_0x4adef0,_0x138714,_0x287bbc){const _0x3c3722=_0x30a520,_0xb24c10=_0x4adef0[_0x3c3722(0x1df)]||DEFAULT_API_DIR;resolveAliasToCode(_0x2220dc,_0x138714,_0xb24c10,_0x287bbc);const _0x1e2245=resolveCommandAuthMode(_0x2220dc);let _0x18985b='';if(_0x1e2245!==_0x3c3722(0x1d9)){_0x18985b=_0x4adef0[_0x3c3722(0x208)]()||'';if(!_0x18985b){if(_0x1e2245==='required')throw CliErrors[_0x3c3722(0x206)]();}else{const {setActiveCookie:_0x1576ef}=await import('../core/api-client.js');_0x1576ef(_0x18985b);}}const _0x2d2648=_0x4adef0[_0x3c3722(0x212)]()??'';if(_0x2220dc[_0x3c3722(0x203)]!==![]){const _0x312451=hasExplicitAppCode(_0x138714,_0x4adef0[_0x3c3722(0x1f4)]),_0x503d1a=_0x4adef0[_0x3c3722(0x204)]?.[_0x3c3722(0x1ce)]??{},_0xa416d2=_0x4adef0['selectedAppName']||_0x4adef0[_0x3c3722(0x204)]?.[_0x3c3722(0x1f9)]||_0x4adef0[_0x3c3722(0x204)]?.[_0x3c3722(0x1e9)];if(!_0x312451&&_0xa416d2&&!_0x503d1a[_0xa416d2]){const _0x5bd355=Object['keys'](_0x503d1a);throw CliErrors[_0x3c3722(0x200)](_0x3c3722(0x1f0)+_0xa416d2+_0x3c3722(0x1f3),_0x5bd355['length']>0x0?_0x3c3722(0x1ee)+_0x5bd355[_0x3c3722(0x1e3)](',\x20')+'.\x20Use\x20--app/--appcode,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x3c3722(0x215):_0x3c3722(0x210)+CLI_BIN_NAME+_0x3c3722(0x215));}assertEnvAppCodeNotIgnored(_0x2d2648,resolveEnvAppCode(),_0x312451);if(!_0x2d2648){const _0x23947e=Object[_0x3c3722(0x1e7)](_0x503d1a);if(!_0xa416d2&&_0x23947e[_0x3c3722(0x216)]>0x1)throw CliErrors['configMissing'](_0x3c3722(0x1fd)+CLI_BIN_NAME+_0x3c3722(0x20a)+_0x23947e[_0x3c3722(0x1e3)](',\x20')+'.');throw CliErrors[_0x3c3722(0x1cc)]('Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+_0x3c3722(0x21d));}}return{'defaults':{'booleans':{'verbose':_0x4adef0[_0x3c3722(0x1d3)]},'numbers':{'pagesize':_0x4adef0[_0x3c3722(0x1cf)]}},'extras':{'appCode':_0x2d2648,'cookie':_0x18985b,'apiDomain':_0x4adef0[_0x3c3722(0x1d7)](),'apiDir':_0xb24c10,'selectedAppName':_0x4adef0[_0x3c3722(0x205)],'mergedCli':_0x4adef0[_0x3c3722(0x204)]}};},'confirmHighRisk':_0x7ca00f[_0x30a520(0x202)]??(async({env:_0x2c8bda,commandLabel:_0x1defd6})=>{const _0x22fcf6=_0x30a520;if(_0x2c8bda[_0x22fcf6(0x1e1)])throw CliErrors['validation'](_0x22fcf6(0x1dd)+_0x1defd6+_0x22fcf6(0x1d2));await requireConfirmationPrompt({'lines':['⚠\x20\x20High-risk\x20operation:\x20'+_0x1defd6,_0x22fcf6(0x1e2)],'createCancelledError':_0x54d327=>CliErrors['cancelled'](_0x54d327)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();function a251_0x3de7(){const _0x3d21b9=['\x20workspace\x20use\x20--app\x20<name>`.\x20Available:\x20','format','appcode','verbose','appCode','message','Use\x20--appcode,\x20add\x20the\x20app\x20to\x20the\x20project\x20workspace,\x20or\x20run\x20`','\x22\x20if\x20this\x20operation\x20is\x20intended.\x20','resolveAppCode','RABETBASE_APPCODE','_notice','\x20config\x20delete\x20defaultApp`\x20to\x20repair\x20the\x20selection.','length','includes','all','44gspGvV','service','246190acWGjb','production','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','object','formatOutput','rejectedFlags','map','../constant/domain.js','configMissing','has','apps','defaultPageSize','A\x20human\x20user\x20may\x20review\x20the\x20active\x20risk\x20ceilings\x20and\x20manually\x20edit\x20the\x20applicable\x20.rabetbase.json\x20file\x20to\x20set\x20riskLevel\x20to\x20\x22','execute','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','defaultVerbose','name','2916192DTPJHG','nonInteractive','resolveApiDomain','70TEHMMC','none','trim','92kKjqtn','resolve','High-risk\x20operation\x20`','doctor','apiDir','6511956rvojqk','isNonInteractive','\x20\x20\x20Continue?\x20[y/N]\x20','join','update','3538835ehFUSj','pageSize','keys','replace','defaultApp','72DmQIdm','AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.','LOVRABET_APPCODE','schema','Available:\x20','124569ogLjCg','App\x20\x22','hasFormat','hint','\x22\x20is\x20selected\x20but\x20not\x20defined\x20in\x20the\x20effective\x20project\x20apps.','rawFlags','pretty','../constant/env.js','7bIfGrM','risk','currentApp','explicitAppName','filter','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','Multiple\x20apps\x20are\x20configured\x20but\x20no\x20default\x20app\x20is\x20selected.\x20Use\x20--app\x20<name>\x20or\x20run\x20`','30366TnLNex','363896XvThXe','validation','catch','confirmHighRisk','requiresAppCode','mergedCli','selectedAppName','authRequired','riskLevel','resolveCookie','find'];a251_0x3de7=function(){return _0x3d21b9;};return a251_0x3de7();}async function clearRabetbaseCommandState(){const {clearActiveCookie:_0x5f581b}=await import('../core/api-client.js');_0x5f581b();}export async function finalizeRabetbaseRuntimeState(){const _0x127bdc=a251_0x164b;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x5df0e6},{initEnv:_0x184e34}]=await Promise[_0x127bdc(0x218)]([import(_0x127bdc(0x1cb)),import(_0x127bdc(0x1f6))]);_0x5df0e6(),_0x184e34(_0x127bdc(0x21c));}}export async function runCommand(_0x11c6fe,_0x471340,_0x3f5eec=terminalRunnerAdapter){const _0xcf3f48=a251_0x164b;assertRejectedFlags(_0x11c6fe,_0x471340[_0xcf3f48(0x1f4)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x11c6fe)?withUpdateNotice(_0x11c6fe):_0x11c6fe,_0x471340,_0x3f5eec);}function assertRejectedFlags(_0x39d2b2,_0x78abbb){const _0x21bfc9=a251_0x164b;for(const _0x2f7873 of _0x39d2b2[_0x21bfc9(0x220)]??[]){const _0x4cea8e=GLOBAL_FLAGS[_0x21bfc9(0x209)](_0x389089=>_0x389089[_0x21bfc9(0x1d4)]===_0x2f7873['name']),_0x4f38bd=new Set([_0x2f7873[_0x21bfc9(0x1d4)],toCamelCase(_0x2f7873[_0x21bfc9(0x1d4)]),_0x4cea8e?.['meowKey']]),_0x30ad85=[..._0x4f38bd]['some'](_0x74c186=>{if(!_0x74c186)return![];const _0x287145=_0x78abbb[_0x74c186];return _0x287145!==undefined&&_0x287145!==null&&_0x287145!==![];});if(_0x30ad85)throw CliErrors[_0x21bfc9(0x200)](_0x2f7873[_0x21bfc9(0x20f)],_0x2f7873[_0x21bfc9(0x1f2)]);}}function toCamelCase(_0x128ef8){const _0x1e6c12=a251_0x164b;return _0x128ef8[_0x1e6c12(0x1e8)](/-([a-z])/g,(_0x1c0738,_0x45c976)=>_0x45c976['toUpperCase']());}function shouldAttachUpdateNotice(_0x1e5252){const _0x14132f=a251_0x164b;if(_0x1e5252[_0x14132f(0x1f1)]===![])return![];return![_0x14132f(0x1e4),_0x14132f(0x1ed),_0x14132f(0x1de)][_0x14132f(0x217)](_0x1e5252['service']);}function withUpdateNotice(_0x7376a5){return{..._0x7376a5,async 'execute'(_0x5c5573){const _0x3f906f=a251_0x164b,_0x5be25d=shouldResolveUpdateNotice(_0x5c5573)?resolveLatestUpdateNotice()[_0x3f906f(0x201)](()=>null):Promise[_0x3f906f(0x1dc)](null),_0x52bec0=await _0x7376a5[_0x3f906f(0x1d1)](_0x5c5573);return attachUpdateNotice(_0x52bec0,await _0x5be25d);}};}function a251_0x164b(_0x3ea169,_0x100d97){_0x3ea169=_0x3ea169-0x1cb;const _0x3de7a4=a251_0x3de7();let _0x164b97=_0x3de7a4[_0x3ea169];return _0x164b97;}function shouldResolveUpdateNotice(_0x21cf5d){const _0x11752a=a251_0x164b;return _0x21cf5d[_0x11752a(0x20b)]===_0x11752a(0x1f5)&&!_0x21cf5d[_0x11752a(0x1d6)];}function attachUpdateNotice(_0x3c9aa8,_0x255764){const _0x3595a7=a251_0x164b;if(!_0x255764||!_0x3c9aa8||typeof _0x3c9aa8!==_0x3595a7(0x21e))return _0x3c9aa8;const _0x4b6b2c=_0x3c9aa8,_0xbf88d5=typeof _0x4b6b2c[_0x3595a7(0x214)]===_0x3595a7(0x21e)&&_0x4b6b2c[_0x3595a7(0x214)]!==null?_0x4b6b2c[_0x3595a7(0x214)]:{};return{..._0x4b6b2c,'_notice':{..._0xbf88d5,'update':_0x255764}};}
|
|
1
|
+
(function(_0x661f62,_0x472783){const _0x4230c8=a252_0x31e9,_0x1c6de7=_0x661f62();while(!![]){try{const _0x224133=parseInt(_0x4230c8(0x13d))/0x1+parseInt(_0x4230c8(0x121))/0x2*(parseInt(_0x4230c8(0x10f))/0x3)+parseInt(_0x4230c8(0x120))/0x4+-parseInt(_0x4230c8(0x14a))/0x5+parseInt(_0x4230c8(0x140))/0x6+parseInt(_0x4230c8(0x133))/0x7+-parseInt(_0x4230c8(0x112))/0x8;if(_0x224133===_0x472783)break;else _0x1c6de7['push'](_0x1c6de7['shift']());}catch(_0x3e113b){_0x1c6de7['push'](_0x1c6de7['shift']());}}}(a252_0x202d,0x1c7e5));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';function a252_0x202d(){const _0xd21c6d=['Multiple\x20apps\x20are\x20configured\x20but\x20no\x20default\x20app\x20is\x20selected.\x20Use\x20--app\x20<name>\x20or\x20run\x20`','330729PtOWEP','format','explicitAppName','resolveCookie','apps','execute','formatOutput','\x20workspace\x20use\x20--app\x20<name>`.\x20Available:\x20','production','has','88456EarPzt','join','update','659814HjedJZ','\x20\x20\x20Continue?\x20[y/N]\x20','nonInteractive','Use\x20--appcode,\x20add\x20the\x20app\x20to\x20the\x20project\x20workspace,\x20or\x20run\x20`','cookie','Available:\x20','name','defaultVerbose','Set\x20appcode\x20via\x20`','replace','526485BVdVkK','authRequired','meowKey','find','toUpperCase','keys','selectedAppName','catch','length','validation','verbose','includes','doctor','appcode','string','service','object','defaultApp','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','all','isNonInteractive','defaultPageSize','\x20config\x20delete\x20defaultApp`\x20to\x20repair\x20the\x20selection.','../constant/domain.js','9dcqlCC','../core/api-client.js','_notice','1385872KMIFRD','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','resolve','A\x20human\x20user\x20may\x20review\x20the\x20active\x20risk\x20ceilings\x20and\x20manually\x20edit\x20the\x20applicable\x20.rabetbase.json\x20file\x20to\x20set\x20riskLevel\x20to\x20\x22','configMissing','schema','currentApp','trim','mergedCli','risk','apiDir','appCode','hasFormat','requiresAppCode','260580MQITaR','56282CUIFjn','\x22\x20is\x20selected\x20but\x20not\x20defined\x20in\x20the\x20effective\x20project\x20apps.','Edit\x20the\x20config\x20file\x20manually','rawFlags','RABETBASE_APPCODE','cancelled','Current\x20resolved\x20appcode\x20is\x20\x22','none','AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.','command','\x22\x20if\x20this\x20operation\x20is\x20intended.\x20','required','High-risk\x20operation\x20`','hint','some','filter','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.'];a252_0x202d=function(){return _0xd21c6d;};return a252_0x202d();}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 a252_0x4ad677}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x97fced){const _0x536503=a252_0x31e9;return typeof _0x97fced===_0x536503(0x158)&&_0x97fced[_0x536503(0x119)]()?_0x97fced[_0x536503(0x119)]():undefined;}function resolveEnvAppCode(){const _0x1d4f9d=a252_0x31e9,_0x4dad69=stringFlag(process.env.RABETBASE_APPCODE);if(_0x4dad69)return{'name':_0x1d4f9d(0x125),'value':_0x4dad69};const _0x291390=stringFlag(process.env.LOVRABET_APPCODE);if(_0x291390)return{'name':'LOVRABET_APPCODE','value':_0x291390};return undefined;}function hasExplicitAppCode(_0x519c89,_0x28c219){const _0x3eda24=a252_0x31e9;return!!(stringFlag(_0x519c89[_0x3eda24(0x157)])||stringFlag(_0x28c219['appcode']));}function assertEnvAppCodeNotIgnored(_0x2eb680,_0x44798f,_0x285c23){const _0x4efca5=a252_0x31e9;if(!_0x44798f||_0x285c23||_0x2eb680===_0x44798f['value'])return;const _0x2bb573=_0x2eb680?_0x4efca5(0x127)+_0x2eb680+'\x22.':'No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.';throw CliErrors['validation'](_0x44798f[_0x4efca5(0x146)]+'='+_0x44798f['value']+_0x4efca5(0x113)+_0x2bb573+'\x20'+('To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$'+_0x44798f['name']+'\x22.'));}export function createPipelineEnv(_0x5da54c,_0x15b554,_0x13a887=[]){const _0x17e217=a252_0x31e9;return{'rawFlags':_0x15b554,'args':_0x13a887,'resolveAppCode':()=>_0x5da54c[_0x17e217(0x11d)],'resolveCookie':()=>_0x5da54c[_0x17e217(0x144)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a252_0x4ad677(_0x15b554),'defaultFormat':_0x5da54c['format'],'defaultPageSize':_0x5da54c['pageSize'],'defaultVerbose':_0x5da54c[_0x17e217(0x154)],'apiDir':_0x5da54c[_0x17e217(0x11c)],'riskLevel':_0x5da54c['riskLevel'],'selectedAppName':_0x5da54c[_0x17e217(0x135)],'mergedCli':{'defaultApp':_0x5da54c[_0x17e217(0x15b)],'currentApp':_0x5da54c[_0x17e217(0x118)],'appCode':_0x5da54c[_0x17e217(0x11d)],'apps':_0x5da54c['apps']}};}export function createRabetbaseRunnerAdapter(_0x29e3be={}){const _0x132c9e=a252_0x31e9;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x132c9e(0x130)](_0xffa50b=>PIPELINE_FLAG_NAMES[_0x132c9e(0x13c)](_0xffa50b[_0x132c9e(0x146)]))['map'](({name:_0x170c0b,type:_0x5d3c61,description:_0x2aae52})=>({'name':_0x170c0b,'type':_0x5d3c61,'description':_0x2aae52})),'formatOutput':_0x29e3be[_0x132c9e(0x139)]??formatOutput,'getCommandLabel'(_0x3a9e3e){const _0x435726=_0x132c9e;return CLI_BIN_NAME+'\x20'+_0x3a9e3e['service']+'\x20'+_0x3a9e3e[_0x435726(0x12a)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x3f6c3a,{def:_0x3542d9}){const _0x449205=_0x132c9e,_0x2a652f=_0x3f6c3a[_0x449205(0x155)](_0x449205(0x123))?_0x449205(0x129):_0x449205(0x115)+_0x3542d9[_0x449205(0x11b)]+_0x449205(0x12b)+'AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.';return CliErrors['validation'](_0x3f6c3a+'\x0a\x20\x20'+_0x2a652f);}},async 'prepare'(_0x416983,_0x235165,_0x4157d5,_0x2ed825){const _0x49f702=_0x132c9e,_0x24a039=_0x235165[_0x49f702(0x11c)]||DEFAULT_API_DIR;resolveAliasToCode(_0x416983,_0x4157d5,_0x24a039,_0x2ed825);const _0x3cd77b=resolveCommandAuthMode(_0x416983);let _0x5a30f4='';if(_0x3cd77b!==_0x49f702(0x128)){_0x5a30f4=_0x235165[_0x49f702(0x136)]()||'';if(!_0x5a30f4){if(_0x3cd77b===_0x49f702(0x12c))throw CliErrors[_0x49f702(0x14b)]();}else{const {setActiveCookie:_0x5e5bb7}=await import(_0x49f702(0x110));_0x5e5bb7(_0x5a30f4);}}const _0x1b68df=_0x235165['resolveAppCode']()??'';if(_0x416983[_0x49f702(0x11f)]!==![]){const _0x1a5eba=hasExplicitAppCode(_0x4157d5,_0x235165[_0x49f702(0x124)]),_0x2ec805=_0x235165['mergedCli']?.[_0x49f702(0x137)]??{},_0x857c10=_0x235165[_0x49f702(0x150)]||_0x235165[_0x49f702(0x11a)]?.['currentApp']||_0x235165[_0x49f702(0x11a)]?.['defaultApp'];if(!_0x1a5eba&&_0x857c10&&!_0x2ec805[_0x857c10]){const _0x41f78e=Object[_0x49f702(0x14f)](_0x2ec805);throw CliErrors[_0x49f702(0x153)]('App\x20\x22'+_0x857c10+_0x49f702(0x122),_0x41f78e[_0x49f702(0x152)]>0x0?_0x49f702(0x145)+_0x41f78e[_0x49f702(0x13e)](',\x20')+'.\x20Use\x20--app/--appcode,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x49f702(0x10d):_0x49f702(0x143)+CLI_BIN_NAME+_0x49f702(0x10d));}assertEnvAppCodeNotIgnored(_0x1b68df,resolveEnvAppCode(),_0x1a5eba);if(!_0x1b68df){const _0x4ad229=Object[_0x49f702(0x14f)](_0x2ec805);if(!_0x857c10&&_0x4ad229[_0x49f702(0x152)]>0x1)throw CliErrors[_0x49f702(0x116)](_0x49f702(0x132)+CLI_BIN_NAME+_0x49f702(0x13a)+_0x4ad229[_0x49f702(0x13e)](',\x20')+'.');throw CliErrors[_0x49f702(0x116)](_0x49f702(0x148)+CLI_BIN_NAME+_0x49f702(0x131));}}return{'defaults':{'booleans':{'verbose':_0x235165[_0x49f702(0x147)]},'numbers':{'pagesize':_0x235165[_0x49f702(0x10c)]}},'extras':{'appCode':_0x1b68df,'cookie':_0x5a30f4,'apiDomain':_0x235165['resolveApiDomain'](),'apiDir':_0x24a039,'selectedAppName':_0x235165['selectedAppName'],'mergedCli':_0x235165[_0x49f702(0x11a)]}};},'confirmHighRisk':_0x29e3be['confirmHighRisk']??(async({env:_0xc6a5af,commandLabel:_0x52aa64})=>{const _0x452cce=_0x132c9e;if(_0xc6a5af[_0x452cce(0x10b)])throw CliErrors[_0x452cce(0x153)](_0x452cce(0x12d)+_0x52aa64+_0x452cce(0x15c));await requireConfirmationPrompt({'lines':['⚠\x20\x20High-risk\x20operation:\x20'+_0x52aa64,_0x452cce(0x141)],'createCancelledError':_0x3da2e1=>CliErrors[_0x452cce(0x126)](_0x3da2e1)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const _0xa92e2e=a252_0x31e9,{clearActiveCookie:_0x36b891}=await import(_0xa92e2e(0x110));_0x36b891();}export async function finalizeRabetbaseRuntimeState(){const _0x4fd39a=a252_0x31e9;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x6488aa},{initEnv:_0x3099a2}]=await Promise[_0x4fd39a(0x15d)]([import(_0x4fd39a(0x10e)),import('../constant/env.js')]);_0x6488aa(),_0x3099a2(_0x4fd39a(0x13b));}}export async function runCommand(_0x46a28b,_0x50e03a,_0x5868d2=terminalRunnerAdapter){assertRejectedFlags(_0x46a28b,_0x50e03a['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x46a28b)?withUpdateNotice(_0x46a28b):_0x46a28b,_0x50e03a,_0x5868d2);}function a252_0x31e9(_0x4aa0df,_0x5527ae){_0x4aa0df=_0x4aa0df-0x10b;const _0x202dda=a252_0x202d();let _0x31e992=_0x202dda[_0x4aa0df];return _0x31e992;}function assertRejectedFlags(_0x5646ed,_0x4076dd){const _0x21e21b=a252_0x31e9;for(const _0x20e47b of _0x5646ed['rejectedFlags']??[]){const _0x340cbf=GLOBAL_FLAGS[_0x21e21b(0x14d)](_0x7d3a54=>_0x7d3a54[_0x21e21b(0x146)]===_0x20e47b[_0x21e21b(0x146)]),_0x29ac94=new Set([_0x20e47b[_0x21e21b(0x146)],toCamelCase(_0x20e47b['name']),_0x340cbf?.[_0x21e21b(0x14c)]]),_0x3fe0ff=[..._0x29ac94][_0x21e21b(0x12f)](_0x46952b=>{if(!_0x46952b)return![];const _0x2e127a=_0x4076dd[_0x46952b];return _0x2e127a!==undefined&&_0x2e127a!==null&&_0x2e127a!==![];});if(_0x3fe0ff)throw CliErrors[_0x21e21b(0x153)](_0x20e47b['message'],_0x20e47b[_0x21e21b(0x12e)]);}}function toCamelCase(_0x18ee0f){const _0x3096b5=a252_0x31e9;return _0x18ee0f[_0x3096b5(0x149)](/-([a-z])/g,(_0x4771b7,_0x103fbd)=>_0x103fbd[_0x3096b5(0x14e)]());}function shouldAttachUpdateNotice(_0x43f812){const _0x162dd0=a252_0x31e9;if(_0x43f812[_0x162dd0(0x11e)]===![])return![];return![_0x162dd0(0x13f),_0x162dd0(0x117),_0x162dd0(0x156)][_0x162dd0(0x155)](_0x43f812[_0x162dd0(0x159)]);}function withUpdateNotice(_0x4f5288){return{..._0x4f5288,async 'execute'(_0x5a8544){const _0x222c82=a252_0x31e9,_0x533c44=shouldResolveUpdateNotice(_0x5a8544)?resolveLatestUpdateNotice()[_0x222c82(0x151)](()=>null):Promise[_0x222c82(0x114)](null),_0x9ab04c=await _0x4f5288[_0x222c82(0x138)](_0x5a8544);return attachUpdateNotice(_0x9ab04c,await _0x533c44);}};}function shouldResolveUpdateNotice(_0x27b076){const _0x45a620=a252_0x31e9;return _0x27b076[_0x45a620(0x134)]==='pretty'&&!_0x27b076[_0x45a620(0x142)];}function attachUpdateNotice(_0xd6a3e,_0x3bcd3e){const _0x2a25fd=a252_0x31e9;if(!_0x3bcd3e||!_0xd6a3e||typeof _0xd6a3e!==_0x2a25fd(0x15a))return _0xd6a3e;const _0x1b83b4=_0xd6a3e,_0xfde35d=typeof _0x1b83b4[_0x2a25fd(0x111)]===_0x2a25fd(0x15a)&&_0x1b83b4['_notice']!==null?_0x1b83b4['_notice']:{};return{..._0x1b83b4,'_notice':{..._0xfde35d,'update':_0x3bcd3e}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2af75a,_0x3bca66){const _0x1383d7=a253_0x4e92,_0x2cecfa=_0x2af75a();while(!![]){try{const _0x54abbe=parseInt(_0x1383d7(0x164))/0x1+parseInt(_0x1383d7(0x166))/0x2+-parseInt(_0x1383d7(0x162))/0x3+-parseInt(_0x1383d7(0x165))/0x4+parseInt(_0x1383d7(0x163))/0x5+parseInt(_0x1383d7(0x15f))/0x6*(-parseInt(_0x1383d7(0x160))/0x7)+parseInt(_0x1383d7(0x161))/0x8;if(_0x54abbe===_0x3bca66)break;else _0x2cecfa['push'](_0x2cecfa['shift']());}catch(_0x3f504f){_0x2cecfa['push'](_0x2cecfa['shift']());}}}(a253_0x4ad5,0x7b578));import{buildSchemaPayload as a253_0x76aec4}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a253_0x4e92(_0x569721,_0x4cbb78){_0x569721=_0x569721-0x15f;const _0x4ad509=a253_0x4ad5();let _0x4e9236=_0x4ad509[_0x569721];return _0x4e9236;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';function a253_0x4ad5(){const _0x444eff=['1527696UByRPP','78RvOhSZ','403396awZHEs','9170824fXfwJW','454548mAkWIj','1955060AnLEpF','49738SWyExf','3780252uAYOnx'];a253_0x4ad5=function(){return _0x444eff;};return a253_0x4ad5();}export async function buildSchemaPayload(){const {serviceRegistry:_0x2559b8,findDefinition:_0x427c17}=await import('../commands/registry.js');return a253_0x76aec4({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x2559b8,'buildAllFlags':buildAllFlags,'findDefinition':_0x427c17});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a254_0x284d(){var _0x20a496=['12uQMjqC','4665180jzMRMz','771043NwrInO','1569PVkPOb','28801531LeDuuh','4103148rhVuPv','2356cNQYUO','3343361PVtykN','1338867VKYRYv','10mlLTsB','56iiLcHL'];a254_0x284d=function(){return _0x20a496;};return a254_0x284d();}function a254_0xb3fa(_0x1c2f36,_0x3fbcd8){_0x1c2f36=_0x1c2f36-0x1a7;var _0x284d32=a254_0x284d();var _0xb3fa4c=_0x284d32[_0x1c2f36];return _0xb3fa4c;}(function(_0x11c89f,_0x3865b5){var _0x313c25=a254_0xb3fa,_0x3b25b0=_0x11c89f();while(!![]){try{var _0x283e41=parseInt(_0x313c25(0x1ad))/0x1+parseInt(_0x313c25(0x1b1))/0x2*(-parseInt(_0x313c25(0x1ae))/0x3)+-parseInt(_0x313c25(0x1b0))/0x4+parseInt(_0x313c25(0x1ac))/0x5+parseInt(_0x313c25(0x1ab))/0x6*(-parseInt(_0x313c25(0x1a7))/0x7)+parseInt(_0x313c25(0x1aa))/0x8*(-parseInt(_0x313c25(0x1a8))/0x9)+parseInt(_0x313c25(0x1a9))/0xa*(parseInt(_0x313c25(0x1af))/0xb);if(_0x283e41===_0x3865b5)break;else _0x3b25b0['push'](_0x3b25b0['shift']());}catch(_0x19c399){_0x3b25b0['push'](_0x3b25b0['shift']());}}}(a254_0x284d,0xa6f9c));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.5.0-beta.
|
|
2
|
-
export declare const GIT_TAG = "v2.5.0-beta.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.5.0-beta.4";
|
|
2
|
+
export declare const GIT_TAG = "v2.5.0-beta.4";
|
|
3
|
+
export declare const GIT_COMMIT = "640cd58";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-22T09:38:25.106Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a255_0x5c7c34=a255_0xcafa;(function(_0x379879,_0x3fa609){const _0x4b19f5=a255_0xcafa,_0x167ba9=_0x379879();while(!![]){try{const _0x3f09d7=-parseInt(_0x4b19f5(0xc5))/0x1*(parseInt(_0x4b19f5(0xc2))/0x2)+-parseInt(_0x4b19f5(0xc7))/0x3+-parseInt(_0x4b19f5(0xbf))/0x4+-parseInt(_0x4b19f5(0xcc))/0x5+parseInt(_0x4b19f5(0xc6))/0x6*(parseInt(_0x4b19f5(0xc8))/0x7)+-parseInt(_0x4b19f5(0xc1))/0x8*(parseInt(_0x4b19f5(0xc9))/0x9)+parseInt(_0x4b19f5(0xc4))/0xa*(parseInt(_0x4b19f5(0xc0))/0xb);if(_0x3f09d7===_0x3fa609)break;else _0x167ba9['push'](_0x167ba9['shift']());}catch(_0x490ae2){_0x167ba9['push'](_0x167ba9['shift']());}}}(a255_0x4ea4,0x753de));function a255_0xcafa(_0x28f492,_0x554c50){_0x28f492=_0x28f492-0xbf;const _0x4ea4e6=a255_0x4ea4();let _0xcafab2=_0x4ea4e6[_0x28f492];return _0xcafab2;}export const VERSION=a255_0x5c7c34(0xcd);function a255_0x4ea4(){const _0x4f3753=['4457144RAwLBr','42TeJAIX','2026-08-22T09:38:25.106Z','304940sCjxlz','43091xMzUFx','48Hllgoh','502452awruRW','48013gyWsSY','9gTDwbM','640cd58','v2.5.0-beta.4','4437720pieQeI','2.5.0-beta.4','2745416uaYNqO','1309dgtccc'];a255_0x4ea4=function(){return _0x4f3753;};return a255_0x4ea4();}export const GIT_TAG=a255_0x5c7c34(0xcb);export const GIT_COMMIT=a255_0x5c7c34(0xca);export const BUILD_TIME=a255_0x5c7c34(0xc3);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a256_0x3437(_0x2770de,_0x56cb04){_0x2770de=_0x2770de-0xec;var _0x278da0=a256_0x278d();var _0x3437a6=_0x278da0[_0x2770de];return _0x3437a6;}function a256_0x278d(){var _0x3aa1ce=['327798YBBSvb','5095811LSSchS','log','bold','\x20--help','270391SFGTPH','\x20to\x20view\x20available\x20commands.','green','200WZyxBJ','110TkXIxd','40804CwRHyM','5tfALUi','21WThUES','20328ofnKrO','5575302aBiTEW','367239aDrHCl','\x20\x20Use\x20'];a256_0x278d=function(){return _0x3aa1ce;};return a256_0x278d();}(function(_0x494610,_0x311d84){var _0x2ea921=a256_0x3437,_0x48f81c=_0x494610();while(!![]){try{var _0x4339cf=-parseInt(_0x2ea921(0xf0))/0x1+-parseInt(_0x2ea921(0xee))/0x2*(-parseInt(_0x2ea921(0xed))/0x3)+parseInt(_0x2ea921(0xfc))/0x4*(-parseInt(_0x2ea921(0xec))/0x5)+parseInt(_0x2ea921(0xef))/0x6+-parseInt(_0x2ea921(0xf3))/0x7+-parseInt(_0x2ea921(0xfa))/0x8*(-parseInt(_0x2ea921(0xf2))/0x9)+-parseInt(_0x2ea921(0xfb))/0xa*(parseInt(_0x2ea921(0xf7))/0xb);if(_0x4339cf===_0x311d84)break;else _0x48f81c['push'](_0x48f81c['shift']());}catch(_0x3b3db5){_0x48f81c['push'](_0x48f81c['shift']());}}}(a256_0x278d,0x82a47));import a256_0x1aee66 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x28853d=a256_0x3437;console['log'](),console[_0x28853d(0xf4)](a256_0x1aee66[_0x28853d(0xf9)][_0x28853d(0xf5)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x28853d(0xf4)](),console['log'](_0x28853d(0xf1)+a256_0x1aee66[_0x28853d(0xf9)]['bold'](CLI_BIN_NAME+_0x28853d(0xf6))+_0x28853d(0xf8)),console[_0x28853d(0xf4)]();}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xdb9434,_0x5b5f97){const _0x2487b7=a257_0x352c,_0x3c5927=_0xdb9434();while(!![]){try{const _0x3b1af3=parseInt(_0x2487b7(0x1d2))/0x1*(parseInt(_0x2487b7(0x1dc))/0x2)+parseInt(_0x2487b7(0x1db))/0x3+-parseInt(_0x2487b7(0x1ce))/0x4*(parseInt(_0x2487b7(0x1d0))/0x5)+-parseInt(_0x2487b7(0x1d5))/0x6*(-parseInt(_0x2487b7(0x1cb))/0x7)+-parseInt(_0x2487b7(0x1d8))/0x8+-parseInt(_0x2487b7(0x1d9))/0x9*(-parseInt(_0x2487b7(0x1d4))/0xa)+-parseInt(_0x2487b7(0x1d1))/0xb;if(_0x3b1af3===_0x5b5f97)break;else _0x3c5927['push'](_0x3c5927['shift']());}catch(_0x359d0f){_0x3c5927['push'](_0x3c5927['shift']());}}}(a257_0x5c98,0xeacce));import{installBuiltinSkill}from'./skills/builtin-skill.js';function a257_0x352c(_0x386fee,_0x4ba523){_0x386fee=_0x386fee-0x1c7;const _0x5c98a8=a257_0x5c98();let _0x352cdf=_0x5c98a8[_0x386fee];return _0x352cdf;}function a257_0x5c98(){const _0x4196b5=['[BUILTIN_SKILL_INSTALL_','installedPath','7532dkqnHG','error','5005kVJMFG','4764298akzAYz','2892WOYsYo','\x20via\x20skills@latest','10nxbyvm','8806704uSNdyE','code','Installation\x20failed','1182880YIpAIc','236043sKUKdI','installed','456360hTkjkV','1232MyMpYv','warn','Rabetbase\x20Built-in\x20Skill\x20','log','changed','repairCommand','\x20at\x20','skillVersion','7NrJpnx'];a257_0x5c98=function(){return _0x4196b5;};return a257_0x5c98();}export async function runPostinstall(_0x395050={}){const _0x486fb1=a257_0x352c,_0x2f9f4f=installBuiltinSkill(_0x395050);if(_0x2f9f4f['ok']){const _0x4bd3ed=_0x2f9f4f[_0x486fb1(0x1c7)]?_0x486fb1(0x1da):'already\x20current',_0x170857=_0x2f9f4f[_0x486fb1(0x1cd)]?_0x486fb1(0x1c9)+_0x2f9f4f[_0x486fb1(0x1cd)]:_0x486fb1(0x1d3);return console[_0x486fb1(0x1df)](_0x486fb1(0x1de)+_0x2f9f4f[_0x486fb1(0x1ca)]+'\x20'+_0x4bd3ed+_0x170857),_0x2f9f4f;}const _0x585694=_0x486fb1(0x1cc)+(_0x2f9f4f[_0x486fb1(0x1d6)]??'FAILED')+']\x20'+(_0x2f9f4f[_0x486fb1(0x1cf)]??_0x486fb1(0x1d7))+'.\x20'+('Repair\x20with:\x20'+_0x2f9f4f[_0x486fb1(0x1c8)]);if(_0x2f9f4f[_0x486fb1(0x1d6)]==='SOURCE_INVALID')throw new Error(_0x585694);return console[_0x486fb1(0x1dd)](_0x585694),_0x2f9f4f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e67c6,_0x5bc2fe){const _0x21093e=a258_0x5a20,_0x6a1e35=_0x3e67c6();while(!![]){try{const _0x4da088=parseInt(_0x21093e(0x1bf))/0x1+-parseInt(_0x21093e(0x1c6))/0x2*(parseInt(_0x21093e(0x1ba))/0x3)+-parseInt(_0x21093e(0x1c0))/0x4*(-parseInt(_0x21093e(0x1b9))/0x5)+-parseInt(_0x21093e(0x1bb))/0x6+parseInt(_0x21093e(0x1ca))/0x7+parseInt(_0x21093e(0x1bd))/0x8+-parseInt(_0x21093e(0x1c3))/0x9*(parseInt(_0x21093e(0x1c4))/0xa);if(_0x4da088===_0x5bc2fe)break;else _0x6a1e35['push'](_0x6a1e35['shift']());}catch(_0x5c0587){_0x6a1e35['push'](_0x6a1e35['shift']());}}}(a258_0x5c68,0x655b6));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildRabetbaseConfirmationRequest(_0x3c9db7,_0xd98f20,_0x49888c){const _0x454188=a258_0x5a20,_0xc0999e=normalizeText(_0x3c9db7[_0x454188(0x1c8)],DESCRIPTION_MAX_LENGTH),_0x39ece1=_0xc0999e||normalizeText(defaultDescription(requireWriteRisk(_0x3c9db7),_0xd98f20),DESCRIPTION_MAX_LENGTH);return{'operation':_0xd98f20,'risk':requireWriteRisk(_0x3c9db7),'description':_0x39ece1,..._0x49888c?{'signal':_0x49888c}:{}};}function requireWriteRisk(_0x38ea08){const _0x4772e8=a258_0x5a20;if(_0x38ea08['risk']===_0x4772e8(0x1c1)||_0x38ea08['risk']==='high-risk-write')return _0x38ea08[_0x4772e8(0x1bc)];throw new Error(_0x4772e8(0x1cb));}function defaultDescription(_0x5a7326,_0x511218){const _0x1ed191=a258_0x5a20;if(_0x5a7326==='high-risk-write')return _0x1ed191(0x1c2)+_0x511218+'.\x20It\x20may\x20overwrite,\x20delete,\x20or\x20materially\x20change\x20live\x20behavior.';return _0x1ed191(0x1c9)+_0x511218+'.\x20It\x20may\x20create\x20or\x20change\x20business\x20data\x20or\x20local\x20configuration.';}function a258_0x5a20(_0x23a31e,_0x323d35){_0x23a31e=_0x23a31e-0x1b9;const _0x5c68df=a258_0x5c68();let _0x5a20df=_0x5c68df[_0x23a31e];return _0x5a20df;}function a258_0x5c68(){const _0x4d7e57=['write','This\x20will\x20run\x20the\x20high-risk\x20write\x20','153CrOegP','395710hCDLQL','slice','6TEJUFs','replace','confirmationDescription','This\x20will\x20run\x20the\x20write\x20','4438217NIzjXc','Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.','35CsLNuY','357039StQBOw','4251024yOrsnH','risk','930832zbehkY','string','648094DpopBm','431388InvWke'];a258_0x5c68=function(){return _0x4d7e57;};return a258_0x5c68();}function normalizeText(_0x118256,_0x595b6a){const _0x267350=a258_0x5a20;if(typeof _0x118256!==_0x267350(0x1be))return'';return _0x118256[_0x267350(0x1c7)](/[\u0000-\u001f\u007f]+/g,'\x20')['replace'](/\s+/g,'\x20')['trim']()[_0x267350(0x1c5)](0x0,_0x595b6a);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a259_0x4f3d(_0x147bd3,_0x488172){_0x147bd3=_0x147bd3-0xa8;var _0x59e127=a259_0x59e1();var _0x4f3da7=_0x59e127[_0x147bd3];return _0x4f3da7;}(function(_0x8f6218,_0x143c20){var _0x29d1d8=a259_0x4f3d,_0x48694a=_0x8f6218();while(!![]){try{var _0x41980d=-parseInt(_0x29d1d8(0xaf))/0x1*(-parseInt(_0x29d1d8(0xb5))/0x2)+parseInt(_0x29d1d8(0xae))/0x3*(-parseInt(_0x29d1d8(0xab))/0x4)+parseInt(_0x29d1d8(0xa8))/0x5+parseInt(_0x29d1d8(0xb0))/0x6*(parseInt(_0x29d1d8(0xad))/0x7)+-parseInt(_0x29d1d8(0xa9))/0x8*(parseInt(_0x29d1d8(0xb9))/0x9)+-parseInt(_0x29d1d8(0xba))/0xa+-parseInt(_0x29d1d8(0xb2))/0xb*(parseInt(_0x29d1d8(0xb3))/0xc);if(_0x41980d===_0x143c20)break;else _0x48694a['push'](_0x48694a['shift']());}catch(_0x54e66c){_0x48694a['push'](_0x48694a['shift']());}}}(a259_0x59e1,0x7532c));function a259_0x59e1(){var _0x759113=['8BYjlng','trim','14296MBNqEC','risk','1133706RoBvbx','159eypTZc','204874qiPfNx','12rkCoZA','service','11noJUCf','5360664LjneXK','split','8xDihQQ','command','write','rabetbase.write.completed','1848213ZWJFms','4864510XRjHKH','filter','3322920UtZWVs'];a259_0x59e1=function(){return _0x759113;};return a259_0x59e1();}export function canonicalRabetbaseOperation(_0x5985d7){var _0x4b0849=a259_0x4f3d;return[_0x5985d7[_0x4b0849(0xb1)],..._0x5985d7[_0x4b0849(0xb6)][_0x4b0849(0xaa)]()[_0x4b0849(0xb4)](/\s+/)][_0x4b0849(0xbb)](Boolean)['join']('.');}export function createRabetbaseWriteMetadata(_0x50e420,_0xd916d,_0x5d4a5a,_0x22c562){var _0x421e67=a259_0x4f3d;if(_0x22c562||_0x5d4a5a['ok']!==!![]||_0x50e420[_0x421e67(0xac)]!==_0x421e67(0xb7)&&_0x50e420[_0x421e67(0xac)]!=='high-risk-write')return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x421e67(0xb8),'operation':_0xd916d,'risk':_0x50e420['risk']}}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x837e80,_0x550ba3){const _0xf7d56c=a260_0x22cc,_0x2869a4=_0x837e80();while(!![]){try{const _0x173162=-parseInt(_0xf7d56c(0x10b))/0x1*(parseInt(_0xf7d56c(0x10c))/0x2)+parseInt(_0xf7d56c(0xf4))/0x3+parseInt(_0xf7d56c(0xf7))/0x4+-parseInt(_0xf7d56c(0xfc))/0x5*(parseInt(_0xf7d56c(0x109))/0x6)+-parseInt(_0xf7d56c(0xf6))/0x7*(parseInt(_0xf7d56c(0xff))/0x8)+-parseInt(_0xf7d56c(0xfa))/0x9*(parseInt(_0xf7d56c(0xf9))/0xa)+parseInt(_0xf7d56c(0xea))/0xb;if(_0x173162===_0x550ba3)break;else _0x2869a4['push'](_0x2869a4['shift']());}catch(_0x42ad6a){_0x2869a4['push'](_0x2869a4['shift']());}}}(a260_0x1017,0xb24ca));function a260_0x22cc(_0x58d208,_0x1c67f0){_0x58d208=_0x58d208-0xe8;const _0x101761=a260_0x1017();let _0x22ccf1=_0x101761[_0x58d208];return _0x22ccf1;}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';function a260_0x1017(){const _0x35d0ff=['Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','presentation','dryRun','reason','definition','message','rawFlags','isNonInteractive','222702mgDGss','riskLevel','1BGDbQi','196262KGUFPZ','yes','risk','23043581YWuXlK','write','data','Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.','args','result','confirmation','signal','format','execute','1579404cKuCLe','high-risk-write','14JQOvWm','1750272IYQsdh','present','3698690WjWmRa','18DUPUcf','command','50pMDhzN','stringify','dry-run','4478216KUZXtL','AbortError'];a260_0x1017=function(){return _0x35d0ff;};return a260_0x1017();}import{resolveRabetbaseInvocation}from'../runtime/resolve.js';const defaultPresentation={'present'({result:_0x12e2cf,command:_0x121379,risk:_0xec2ee2,dryRun:_0x16d10a}){const _0x216453=a260_0x22cc;return JSON[_0x216453(0xfd)]({'ok':_0x12e2cf['ok'],'command':_0x121379,'risk':_0xec2ee2,..._0x16d10a?{'dryRun':!![]}:{},..._0x12e2cf[_0x216453(0xec)]!==undefined?{'data':_0x12e2cf['data']}:{},..._0x12e2cf[_0x216453(0x106)]?{'message':_0x12e2cf['message']}:{}});}};export async function invokeRabetbase(_0x3c8478,_0x92b48e){const _0x1e8dac=a260_0x22cc;throwIfAborted(_0x92b48e[_0x1e8dac(0xf1)]);const _0x53f5c0=await resolveRabetbaseInvocation(_0x3c8478),_0x557650=canonicalRabetbaseOperation(_0x53f5c0[_0x1e8dac(0x105)]);return await confirmWriteBeforeQueue(_0x53f5c0[_0x1e8dac(0x105)],_0x53f5c0[_0x1e8dac(0x107)],_0x557650,_0x92b48e),runSerialized(async()=>{const _0x22bce3=_0x1e8dac,_0x2c1e73={};try{throwIfAborted(_0x92b48e['signal']);const _0x5814cf=buildConfigFromFlags(_0x53f5c0['rawFlags']);await initGlobalEnvironment(_0x5814cf);const _0xeed5cf=createPipelineEnv(_0x5814cf,{..._0x53f5c0[_0x22bce3(0x107)],'yes':_0x53f5c0[_0x22bce3(0x105)][_0x22bce3(0xe9)]===_0x22bce3(0xf5)?!![]:_0x53f5c0[_0x22bce3(0x107)][_0x22bce3(0xe8)],'nonInteractive':!![]},_0x53f5c0[_0x22bce3(0xee)]);_0xeed5cf[_0x22bce3(0x108)]=!![],_0xeed5cf[_0x22bce3(0x10a)]=_0x22bce3(0xf5);const _0x172719=withAbortSignal(_0x53f5c0[_0x22bce3(0x105)],_0x92b48e[_0x22bce3(0xf1)]),_0x31ad4b=createRabetbaseRunnerAdapter({'formatOutput'(_0x3a7974,_0x4aa20e){const _0x5436b1=_0x22bce3;_0x2c1e73['result']=_0x3a7974,_0x2c1e73[_0x5436b1(0xfb)]=_0x4aa20e[_0x5436b1(0xfb)],_0x2c1e73[_0x5436b1(0xe9)]=_0x4aa20e['risk'],_0x2c1e73[_0x5436b1(0xf2)]=_0x4aa20e[_0x5436b1(0xf2)],_0x2c1e73[_0x5436b1(0x103)]=_0x4aa20e[_0x5436b1(0x103)]===!![];},async 'confirmHighRisk'(){const _0x3bffbc=_0x22bce3;throw new Error(_0x3bffbc(0xed));}});await runCommand(_0x172719,_0xeed5cf,_0x31ad4b);if(!_0x2c1e73[_0x22bce3(0xef)]||!_0x2c1e73[_0x22bce3(0xfb)]||!_0x2c1e73[_0x22bce3(0xe9)]||!_0x2c1e73[_0x22bce3(0xf2)])throw new Error(_0x22bce3(0x101));const _0x34d62b=_0x2c1e73['dryRun']===!![],_0x3589b1=_0x92b48e[_0x22bce3(0x102)]??defaultPresentation,_0x6a7772={'result':_0x2c1e73[_0x22bce3(0xef)],'command':_0x2c1e73[_0x22bce3(0xfb)],'operation':_0x557650,'risk':_0x2c1e73[_0x22bce3(0xe9)],'format':_0x2c1e73[_0x22bce3(0xf2)],'dryRun':_0x34d62b},_0x12b74a=createRabetbaseWriteMetadata(_0x53f5c0[_0x22bce3(0x105)],_0x557650,_0x2c1e73[_0x22bce3(0xef)],_0x34d62b);let _0x35cf1a;try{_0x35cf1a=await _0x3589b1['present'](_0x6a7772);}catch(_0x2a98a0){if(!_0x12b74a||_0x3589b1===defaultPresentation)throw _0x2a98a0;_0x35cf1a=await defaultPresentation[_0x22bce3(0xf8)](_0x6a7772);}return{'operation':_0x557650,'risk':_0x2c1e73[_0x22bce3(0xe9)],'mode':_0x34d62b?_0x22bce3(0xfe):_0x22bce3(0xf3),'result':_0x2c1e73['result'],'output':_0x35cf1a,..._0x12b74a?{'metadata':_0x12b74a}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}async function confirmWriteBeforeQueue(_0x5b6b2d,_0x4b13e8,_0x5587fa,_0x40e084){const _0x588521=a260_0x22cc;if(_0x4b13e8[_0x588521(0x103)]===!![]||_0x5b6b2d[_0x588521(0xe9)]!==_0x588521(0xeb)&&_0x5b6b2d[_0x588521(0xe9)]!==_0x588521(0xf5))return;await _0x40e084[_0x588521(0xf0)]['confirm'](buildRabetbaseConfirmationRequest(_0x5b6b2d,_0x5587fa,_0x40e084[_0x588521(0xf1)]));}function withAbortSignal(_0x43c247,_0x5714ad){return{..._0x43c247,async 'execute'(_0x528e84){return throwIfAborted(_0x5714ad),_0x43c247['execute'](_0x528e84);}};}function throwIfAborted(_0x10c730){const _0xd57a4f=a260_0x22cc;if(_0x10c730?.['aborted'])throw _0x10c730[_0xd57a4f(0x104)]instanceof Error?_0x10c730[_0xd57a4f(0x104)]:new DOMException('Rabetbase\x20invocation\x20aborted.',_0xd57a4f(0x100));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a261_0x4408(){const _0x178db6=['451844LkyMKd','844915mfLZVh','resolve','8anxsJD','882891AKLRKU','3Atodhk','16619770kIImQp','994312lUKYvu','3007760yUtwSw','6qJyPGq','412705kXHDxl'];a261_0x4408=function(){return _0x178db6;};return a261_0x4408();}function a261_0xe747(_0x59b6f0,_0xd12e96){_0x59b6f0=_0x59b6f0-0x174;const _0x44082e=a261_0x4408();let _0xe74725=_0x44082e[_0x59b6f0];return _0xe74725;}const a261_0x6d2191=a261_0xe747;(function(_0x42f7ef,_0x5aa8e8){const _0x1c6a92=a261_0xe747,_0x17d7ef=_0x42f7ef();while(!![]){try{const _0x522c56=-parseInt(_0x1c6a92(0x17c))/0x1+parseInt(_0x1c6a92(0x179))/0x2*(-parseInt(_0x1c6a92(0x177))/0x3)+-parseInt(_0x1c6a92(0x17d))/0x4+parseInt(_0x1c6a92(0x17e))/0x5+parseInt(_0x1c6a92(0x17b))/0x6*(-parseInt(_0x1c6a92(0x17a))/0x7)+-parseInt(_0x1c6a92(0x175))/0x8*(parseInt(_0x1c6a92(0x176))/0x9)+parseInt(_0x1c6a92(0x178))/0xa;if(_0x522c56===_0x5aa8e8)break;else _0x17d7ef['push'](_0x17d7ef['shift']());}catch(_0x169359){_0x17d7ef['push'](_0x17d7ef['shift']());}}}(a261_0x4408,0x44727));let tail=Promise[a261_0x6d2191(0x174)]();export async function runSerialized(_0xaa0c22){const _0x3e66e4=tail;let _0x3fd2d9;tail=new Promise(_0x1c6a0e=>{_0x3fd2d9=_0x1c6a0e;}),await _0x3e66e4['catch'](()=>undefined);try{return await _0xaa0c22();}finally{_0x3fd2d9();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4609a1,_0x52862b){const _0x2cc5d6=a262_0x20fa,_0x5807e4=_0x4609a1();while(!![]){try{const _0xf1da00=-parseInt(_0x2cc5d6(0x87))/0x1+parseInt(_0x2cc5d6(0x92))/0x2+-parseInt(_0x2cc5d6(0x8a))/0x3*(-parseInt(_0x2cc5d6(0x88))/0x4)+parseInt(_0x2cc5d6(0x99))/0x5*(-parseInt(_0x2cc5d6(0x91))/0x6)+-parseInt(_0x2cc5d6(0x8b))/0x7+parseInt(_0x2cc5d6(0x8d))/0x8+parseInt(_0x2cc5d6(0x9e))/0x9*(parseInt(_0x2cc5d6(0x8f))/0xa);if(_0xf1da00===_0x52862b)break;else _0x5807e4['push'](_0x5807e4['shift']());}catch(_0x371add){_0x5807e4['push'](_0x5807e4['shift']());}}}(a262_0x918a,0xd5d05));import a262_0x4c308e from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';function a262_0x20fa(_0x4961d9,_0x2d2f64){_0x4961d9=_0x4961d9-0x87;const _0x918aea=a262_0x918a();let _0x20fad3=_0x918aea[_0x4961d9];return _0x20fad3;}import{buildMeowFlags}from'../constant/cli.js';function a262_0x918a(){const _0x4d8196=['defaultCommand','validation','slice','Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','5wvPhXK','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.','flags','join','18LGZvGp','409618qGnPdK','2146444AsBEZu','hint','9WdwMfF','6591620QTDVkg','message','8565736SwiSta','wildcardDef','2451120henppF','unknownCommand','5925786Wcnhng','87832AEkldd','run','Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22'];a262_0x918a=function(){return _0x4d8196;};return a262_0x918a();}import{CliErrors}from'../errors.js';export async function resolveRabetbaseInvocation(_0x3ea536){const _0x30220a=a262_0x20fa,_0x2b65e8=a262_0x4c308e('',{'importMeta':import.meta,'argv':[..._0x3ea536],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x3600a5=[..._0x2b65e8['input']],_0x2adf49=_0x2b65e8[_0x30220a(0x9c)],_0x58090e=_0x3600a5[0x0];if(!_0x58090e)throw CliErrors[_0x30220a(0x96)](_0x30220a(0x98));const _0x2ad248=resolveRemovedCommand(_0x58090e,_0x3600a5[0x1]);if(_0x2ad248)throw CliErrors['validation'](_0x2ad248[_0x30220a(0x8c)],_0x2ad248[_0x30220a(0x89)]);if(_0x58090e===_0x30220a(0x93))throw CliErrors[_0x30220a(0x96)](_0x30220a(0x9a),_0x30220a(0x9b));if(!isKnownService(_0x58090e))throw CliErrors['unknownCommand'](_0x3600a5[_0x30220a(0x9d)]('\x20'));const _0x487aee=getServiceEntry(_0x58090e),_0x432f08=_0x3600a5[0x1],_0x1705f4=_0x432f08||_0x487aee[_0x30220a(0x95)];if(!_0x1705f4){if(_0x487aee[_0x30220a(0x8e)])return{'definition':_0x487aee[_0x30220a(0x8e)],'rawFlags':_0x2adf49,'args':[]};throw CliErrors[_0x30220a(0x96)](_0x30220a(0x94)+_0x58090e+'\x22.');}const _0x464539=findDefinition(_0x58090e,_0x1705f4);if(_0x464539)return{'definition':_0x464539,'rawFlags':_0x2adf49,'args':_0x3600a5[_0x30220a(0x97)](0x2)};if(_0x487aee[_0x30220a(0x8e)])return{'definition':_0x487aee[_0x30220a(0x8e)],'rawFlags':_0x2adf49,'args':[_0x1705f4,..._0x3600a5['slice'](0x2)]};throw CliErrors[_0x30220a(0x90)](_0x58090e+'\x20'+_0x1705f4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a264_0x51e9f1=a264_0x3905;(function(_0x20ed81,_0x5658e5){const _0x4841ed=a264_0x3905,_0xed4c34=_0x20ed81();while(!![]){try{const _0x566ad4=parseInt(_0x4841ed(0xd5))/0x1+-parseInt(_0x4841ed(0xea))/0x2+parseInt(_0x4841ed(0xe7))/0x3+-parseInt(_0x4841ed(0xf4))/0x4*(parseInt(_0x4841ed(0x104))/0x5)+-parseInt(_0x4841ed(0xe0))/0x6*(parseInt(_0x4841ed(0xd8))/0x7)+-parseInt(_0x4841ed(0xd3))/0x8+parseInt(_0x4841ed(0xec))/0x9*(parseInt(_0x4841ed(0xcb))/0xa);if(_0x566ad4===_0x5658e5)break;else _0xed4c34['push'](_0xed4c34['shift']());}catch(_0x4d6a15){_0xed4c34['push'](_0xed4c34['shift']());}}}(a264_0x59bd,0xd54d0));function a264_0x59bd(){const _0x30ac5c=['isSymbolicLink','files','skipped','12703432SESLAB','path','751761unBiGq','package.json','split','168Gvzeja','isDirectory','rabetbase\x20cli-skill\x20install','unverifiable','Symbolic\x20link\x20is\x20not\x20allowed:\x20','Unsafe\x20manifest\x20path:\x20','includes','absent','222978lmEwre','content_mismatch','SKILL.md','reason','unknown','Unsupported\x20Skill\x20entry:\x20','rabetbase.manifest.json','1341501fFzAQg','state','message','454068GWlcxL','current','1701xNMuex','missing','stdio','packageRoot','root','packageVersion','utf8','rabetbase','5174668QxYsEj','join','flatMap','hex','startsWith','parse','name','version',':\x5cs*(.+)$','digest','INSTALL_FAILED','skillVersion','every','installedPath','schemaVersion','skills@latest\x20exited\x20','5YjvDRz','trim','home','isFile','present','update','length','194460dOWNny','status','skills','manifest','version_mismatch'];a264_0x59bd=function(){return _0x30ac5c;};return a264_0x59bd();}import{createHash}from'node:crypto';function a264_0x3905(_0x498cba,_0x1aa893){_0x498cba=_0x498cba-0xc7;const _0x59bd34=a264_0x59bd();let _0x3905cd=_0x59bd34[_0x498cba];return _0x3905cd;}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=a264_0x51e9f1(0xda),SKILL_NAME=a264_0x51e9f1(0xf3);function frontmatterValue(_0x1a3f3f,_0x13b7e2){const _0x2ffc80=a264_0x51e9f1;return _0x1a3f3f['match'](new RegExp('^'+_0x13b7e2+_0x2ffc80(0xfc),'m'))?.[0x1]?.[_0x2ffc80(0x105)]()??'';}function listFiles(_0xa20d5d,_0x1da2ed=_0xa20d5d){const _0x16cef9=a264_0x51e9f1;return readdirSync(_0x1da2ed,{'withFileTypes':!![]})[_0x16cef9(0xf6)](_0x2504b7=>{const _0x538429=_0x16cef9,_0x37e971=join(_0x1da2ed,_0x2504b7[_0x538429(0xfa)]),_0x5060c6=lstatSync(_0x37e971);if(_0x5060c6[_0x538429(0xd0)]())throw new Error(_0x538429(0xdc)+_0x37e971);if(_0x5060c6[_0x538429(0xd9)]())return listFiles(_0xa20d5d,_0x37e971);if(!_0x5060c6[_0x538429(0xc7)]())throw new Error(_0x538429(0xe5)+_0x37e971);return[relative(_0xa20d5d,_0x37e971)[_0x538429(0xd7)](sep)[_0x538429(0xf5)]('/')];})['sort']((_0x3ffafb,_0xbac3b4)=>_0x3ffafb<_0xbac3b4?-0x1:_0x3ffafb>_0xbac3b4?0x1:0x0);}function digestFiles(_0x56e3fa,_0x3a7990){const _0x3cde5c=a264_0x51e9f1,_0x3752ca=createHash('sha256');for(const _0x2d9042 of _0x3a7990){if(_0x2d9042[_0x3cde5c(0xf8)]('/')||_0x2d9042[_0x3cde5c(0xd7)]('/')[_0x3cde5c(0xde)]('..')||_0x2d9042['includes']('\x5c'))throw new Error(_0x3cde5c(0xdd)+_0x2d9042);_0x3752ca[_0x3cde5c(0xc9)](_0x2d9042),_0x3752ca['update']('\x00'),_0x3752ca[_0x3cde5c(0xc9)](readFileSync(join(_0x56e3fa,..._0x2d9042['split']('/')))),_0x3752ca[_0x3cde5c(0xc9)]('\x00');}return _0x3752ca[_0x3cde5c(0xfd)](_0x3cde5c(0xf7));}function sameFiles(_0x4b8ecf,_0xc1ef6){const _0x673ea9=a264_0x51e9f1;return _0x4b8ecf[_0x673ea9(0xca)]===_0xc1ef6['length']&&_0x4b8ecf[_0x673ea9(0x100)]((_0x7dc8da,_0x3ed47b)=>_0x7dc8da===_0xc1ef6[_0x3ed47b]);}function readSource(_0x3ddc4f){const _0x4ae30b=a264_0x51e9f1,_0x27f233=JSON[_0x4ae30b(0xf9)](readFileSync(join(_0x3ddc4f,_0x4ae30b(0xd6)),_0x4ae30b(0xf2))),_0x14c22d=JSON[_0x4ae30b(0xf9)](readFileSync(join(_0x3ddc4f,_0x4ae30b(0xcd),_0x4ae30b(0xe6)),_0x4ae30b(0xf2))),_0x152891=join(_0x3ddc4f,_0x4ae30b(0xcd),SKILL_NAME),_0x2cbb57=frontmatterValue(readFileSync(join(_0x152891,_0x4ae30b(0xe2)),_0x4ae30b(0xf2)),_0x4ae30b(0xfb)),_0x52df67=listFiles(_0x152891);if(_0x14c22d[_0x4ae30b(0x102)]!==0x1||_0x14c22d[_0x4ae30b(0xfa)]!==SKILL_NAME||!_0x27f233[_0x4ae30b(0xfb)]||_0x14c22d[_0x4ae30b(0xf1)]!==_0x27f233['version']||_0x14c22d[_0x4ae30b(0xff)]!==_0x27f233[_0x4ae30b(0xfb)]||_0x2cbb57!==_0x27f233[_0x4ae30b(0xfb)]||!sameFiles(_0x52df67,_0x14c22d[_0x4ae30b(0xd1)])||digestFiles(_0x152891,_0x52df67)!==_0x14c22d[_0x4ae30b(0xfd)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x27f233['version'],'skillVersion':_0x2cbb57,'root':_0x152891,'manifest':_0x14c22d};}function installedSkillPath(_0x363baa){const _0x1bd4cd=a264_0x51e9f1,_0x313b52=resolveInstalledSkill(SKILL_NAME,{'home':_0x363baa});if(_0x313b52[_0x1bd4cd(0xe8)]==='present')return{'state':_0x1bd4cd(0xc8),'path':dirname(_0x313b52[_0x1bd4cd(0xd4)])};if(_0x313b52[_0x1bd4cd(0xe8)]===_0x1bd4cd(0xdf))return{'state':_0x1bd4cd(0xed)};return{'state':_0x1bd4cd(0xdb),'reason':_0x313b52['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x27a02f,_0xe9b17d={}){const _0x903fdd=a264_0x51e9f1,_0x28730c=installedSkillPath(_0xe9b17d[_0x903fdd(0x106)]??homedir());if(_0x28730c[_0x903fdd(0xe8)]===_0x903fdd(0xed))return{'state':'missing','expectedVersion':_0x27a02f,'repairCommand':REPAIR_COMMAND};if(_0x28730c[_0x903fdd(0xe8)]===_0x903fdd(0xdb))return{'state':_0x903fdd(0xdb),'expectedVersion':_0x27a02f,'reason':_0x28730c[_0x903fdd(0xe3)],'repairCommand':REPAIR_COMMAND};try{const _0x2c1942=frontmatterValue(readFileSync(join(_0x28730c[_0x903fdd(0xd4)],_0x903fdd(0xe2)),_0x903fdd(0xf2)),'version');return{'state':_0x2c1942===_0x27a02f?_0x903fdd(0xeb):'version_mismatch','expectedVersion':_0x27a02f,'skillVersion':_0x2c1942,'installedPath':_0x28730c[_0x903fdd(0xd4)],'repairCommand':REPAIR_COMMAND};}catch(_0x33bfe6){return{'state':'unverifiable','expectedVersion':_0x27a02f,'installedPath':_0x28730c[_0x903fdd(0xd4)],'reason':_0x33bfe6 instanceof Error?_0x33bfe6[_0x903fdd(0xe9)]:String(_0x33bfe6),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x5ade66={}){const _0x2004b2=a264_0x51e9f1,_0x4543f9=_0x5ade66[_0x2004b2(0xef)]??DEFAULT_PACKAGE_ROOT;let _0x4d3238;try{_0x4d3238=readSource(_0x4543f9);}catch(_0x2f8101){return{'state':'unverifiable','packageVersion':'unknown','reason':_0x2f8101 instanceof Error?_0x2f8101[_0x2004b2(0xe9)]:String(_0x2f8101),'repairCommand':REPAIR_COMMAND};}const _0x2cf7e1=installedSkillPath(_0x5ade66[_0x2004b2(0x106)]??homedir());if(_0x2cf7e1['state']===_0x2004b2(0xed))return{'state':'missing','packageVersion':_0x4d3238[_0x2004b2(0xf1)],'repairCommand':REPAIR_COMMAND};if(_0x2cf7e1[_0x2004b2(0xe8)]==='unverifiable')return{'state':_0x2004b2(0xdb),'packageVersion':_0x4d3238[_0x2004b2(0xf1)],'reason':_0x2cf7e1[_0x2004b2(0xe3)],'repairCommand':REPAIR_COMMAND};try{const _0x27b8e1=frontmatterValue(readFileSync(join(_0x2cf7e1[_0x2004b2(0xd4)],_0x2004b2(0xe2)),_0x2004b2(0xf2)),'version');if(_0x27b8e1!==_0x4d3238['skillVersion'])return{'state':_0x2004b2(0xcf),'packageVersion':_0x4d3238[_0x2004b2(0xf1)],'skillVersion':_0x27b8e1,'installedPath':_0x2cf7e1[_0x2004b2(0xd4)],'repairCommand':REPAIR_COMMAND};const _0xb8d888=listFiles(_0x2cf7e1[_0x2004b2(0xd4)]),_0x4bcaa0=digestFiles(_0x2cf7e1[_0x2004b2(0xd4)],_0xb8d888);return{'state':sameFiles(_0xb8d888,_0x4d3238['manifest'][_0x2004b2(0xd1)])&&_0x4bcaa0===_0x4d3238[_0x2004b2(0xce)]['digest']?_0x2004b2(0xeb):_0x2004b2(0xe1),'packageVersion':_0x4d3238[_0x2004b2(0xf1)],'skillVersion':_0x27b8e1,'installedPath':_0x2cf7e1[_0x2004b2(0xd4)],'digest':_0x4bcaa0,'repairCommand':REPAIR_COMMAND};}catch(_0x9466d6){return{'state':_0x2004b2(0xdb),'packageVersion':_0x4d3238[_0x2004b2(0xf1)],'installedPath':_0x2cf7e1[_0x2004b2(0xd4)],'reason':_0x9466d6 instanceof Error?_0x9466d6['message']:String(_0x9466d6),'repairCommand':REPAIR_COMMAND};}}function failure(_0x5c189e,_0x4233dd,_0x1a7fc3,_0x8ce004){const _0x11052e=a264_0x51e9f1;return{'ok':![],'code':_0x5c189e,'packageVersion':_0x4233dd['packageVersion'],'skillVersion':_0x4233dd[_0x11052e(0xff)],'installedPath':_0x8ce004,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x1a7fc3 instanceof Error?_0x1a7fc3[_0x11052e(0xe9)]:String(_0x1a7fc3)};}export function installBuiltinSkill(_0x57af7f={}){const _0x1b2b66=a264_0x51e9f1,_0x5d84dc=_0x57af7f['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x517858=_0x57af7f[_0x1b2b66(0x106)]??homedir();let _0xc50de2;try{_0xc50de2=readSource(_0x5d84dc);}catch(_0x4934f4){return failure('SOURCE_INVALID',{'packageVersion':'unknown','skillVersion':_0x1b2b66(0xe4)},_0x4934f4);}const _0x220a4a=inspectBuiltinSkill({'packageRoot':_0x5d84dc,'home':_0x517858}),_0x5661cf=runNpxSkillsAddGlobal(_0x5d84dc,_0xc50de2[_0x1b2b66(0xf0)],{'stdio':_0x57af7f[_0x1b2b66(0xee)]??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0x517858}});if(_0x5661cf[_0x1b2b66(0xd2)])return{'ok':!![],'packageVersion':_0xc50de2[_0x1b2b66(0xf1)],'skillVersion':_0xc50de2[_0x1b2b66(0xff)],'installedPath':_0x220a4a[_0x1b2b66(0x101)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x5661cf['ok'])return failure(_0x1b2b66(0xfe),_0xc50de2,_0x5661cf['error']??_0x1b2b66(0x103)+_0x5661cf[_0x1b2b66(0xcc)]);const _0x234a41=inspectBuiltinSkill({'packageRoot':_0x5d84dc,'home':_0x517858});if(_0x234a41[_0x1b2b66(0xe8)]!=='current')return failure('VERIFY_FAILED',_0xc50de2,_0x234a41[_0x1b2b66(0xe3)]??'Installed\x20Skill\x20state\x20is\x20'+_0x234a41[_0x1b2b66(0xe8)],_0x234a41[_0x1b2b66(0x101)]);return{'ok':!![],'packageVersion':_0xc50de2['packageVersion'],'skillVersion':_0xc50de2[_0x1b2b66(0xff)],'installedPath':_0x234a41[_0x1b2b66(0x101)],'changed':_0x220a4a[_0x1b2b66(0xe8)]!==_0x1b2b66(0xeb),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e81ba,_0x5aef7a){const _0x19b0d8=a265_0x2ab6,_0x1af423=_0x3e81ba();while(!![]){try{const _0xf58f10=-parseInt(_0x19b0d8(0x108))/0x1+-parseInt(_0x19b0d8(0x124))/0x2+-parseInt(_0x19b0d8(0x10d))/0x3+parseInt(_0x19b0d8(0x120))/0x4+-parseInt(_0x19b0d8(0x11e))/0x5+-parseInt(_0x19b0d8(0x126))/0x6*(parseInt(_0x19b0d8(0x109))/0x7)+parseInt(_0x19b0d8(0x122))/0x8;if(_0xf58f10===_0x5aef7a)break;else _0x1af423['push'](_0x1af423['shift']());}catch(_0x5a75e3){_0x1af423['push'](_0x1af423['shift']());}}}(a265_0x32c9,0x1caf1));import{logger}from'../utils/logger.js';function a265_0x2ab6(_0x267404,_0x41c737){_0x267404=_0x267404-0x108;const _0x32c996=a265_0x32c9();let _0x2ab66d=_0x32c996[_0x267404];return _0x2ab66d;}import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x1f626c){const _0x3b6c59=a265_0x2ab6,_0x39197e=[];for(const [_0x9f3015,_0x343a5e]of Object['entries'](_0x1f626c)){if(_0x343a5e===!![]){const _0x2265ae=_0x9f3015[_0x3b6c59(0x125)](/([A-Z])/g,_0x3b6c59(0x10b))[_0x3b6c59(0x11c)]();_0x39197e['push'](_0x2265ae);}}return _0x39197e;}export function parseDynamicFlags(){const _0x56b8ce=a265_0x2ab6,_0x593a2e=[];for(let _0x3ff463=0x3;_0x3ff463<process['argv'][_0x56b8ce(0x115)];_0x3ff463++){const _0x43a4da=process[_0x56b8ce(0x10a)][_0x3ff463];if(_0x43a4da&&_0x43a4da[_0x56b8ce(0x11d)]('--')){const _0x27c817=_0x43a4da[_0x56b8ce(0x10f)](0x2);_0x27c817&&!_0x27c817[_0x56b8ce(0x116)]('=')&&_0x593a2e[_0x56b8ce(0x121)](_0x27c817);}}return _0x593a2e;}export function getAllProvidedFlags(_0x1f3770){const _0x305eba=a265_0x2ab6,_0x417226=camelCaseFlagsToKebab(_0x1f3770),_0x3ab50a=parseDynamicFlags(),_0x1e1a3b=new Set([..._0x417226,..._0x3ab50a]);return Array[_0x305eba(0x118)](_0x1e1a3b);}export function normalizeLegacyBffSaveFlags(_0x158e88){const _0x4934ed=a265_0x2ab6,_0x4d4f4d=new Set(_0x158e88);return _0x4d4f4d[_0x4934ed(0x117)](_0x4934ed(0x110))&&_0x4d4f4d[_0x4934ed(0x10e)](_0x4934ed(0x113)),Array[_0x4934ed(0x118)](_0x4d4f4d);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a265_0x32c9(){const _0x5bfc3b=['-$1','\x0aAvailable\x20commands:','360873kIEjzz','add','slice','dangerously-bff-save','log','Unsupported\x20command:\x20','enable-bff-save','setLogPath','length','includes','has','from','cwd','Error:\x20Unsupported\x20command:\x20','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','toLowerCase','startsWith','304465SKMItB','help','906388FFiEHc','push','3104544GJhPnS','Public\x20Open\x20Skill\x20source:\x20','64170ZFEUBW','replace','301566DHQOQo','--help','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','skill','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','233646vNyuDO','7rWLPen','argv'];a265_0x32c9=function(){return _0x5bfc3b;};return a265_0x32c9();}export async function skillsCommand(_0x1f7ad1,_0x1f2f09,_0x3101c3){const _0x50b519=a265_0x2ab6;logger[_0x50b519(0x114)](process[_0x50b519(0x119)]());if(_0x3101c3?.[_0x50b519(0x11f)]||_0x1f7ad1===_0x50b519(0x127)){showHelp();return;}console['error'](_0x50b519(0x11a)+(_0x1f7ad1||'(empty)')),console['log'](_0x50b519(0x10c)),console[_0x50b519(0x111)]('\x20\x20'+CLI_BIN_NAME+_0x50b519(0x12a)),console['log'](''),console[_0x50b519(0x111)](_0x50b519(0x123)+SKILLS_INSTALL_COMMAND_LINE),logger['error'](_0x50b519(0x129),_0x50b519(0x112)+_0x1f7ad1),process['exit'](0x1);}function showHelp(){const _0xd67012=a265_0x2ab6;console[_0xd67012(0x111)](_0xd67012(0x11b)+CLI_BIN_NAME+_0xd67012(0x128)+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a266_0x220a1f=a266_0x5ef1;(function(_0x293427,_0x57b850){const _0xc3a31e=a266_0x5ef1,_0x5e80be=_0x293427();while(!![]){try{const _0x38f763=parseInt(_0xc3a31e(0x1db))/0x1+parseInt(_0xc3a31e(0x1f1))/0x2+-parseInt(_0xc3a31e(0x1c1))/0x3*(parseInt(_0xc3a31e(0x1dc))/0x4)+parseInt(_0xc3a31e(0x1ec))/0x5+-parseInt(_0xc3a31e(0x1be))/0x6+-parseInt(_0xc3a31e(0x1c9))/0x7*(parseInt(_0xc3a31e(0x1d1))/0x8)+-parseInt(_0xc3a31e(0x1e0))/0x9*(-parseInt(_0xc3a31e(0x1c8))/0xa);if(_0x38f763===_0x57b850)break;else _0x5e80be['push'](_0x5e80be['shift']());}catch(_0x501519){_0x5e80be['push'](_0x5e80be['shift']());}}}(a266_0x3bd5,0x8c0d8));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=a266_0x220a1f(0x1d6);export const NPX_SKILLS_SUBCOMMAND_ADD=a266_0x220a1f(0x1e9);export const NPX_SKILLS_FLAG_SKILL=a266_0x220a1f(0x1f0);export const RABETBASE_SKILL_SOURCE=a266_0x220a1f(0x1c7);export const LEGACY_RABETBASE_SKILL_SOURCE='lovrabet/lovrabet-skill';export const DEFAULT_RABETBASE_SKILL_NAME=a266_0x220a1f(0x1d3);export const RABETBASE_GLOBAL_SKILL_NAME=a266_0x220a1f(0x1d4);export const RABETBASE_SKILL_GIT_SOURCE=a266_0x220a1f(0x1c5);export function resolveGlobalSkillName(_0x80bdaf){const _0x49ce08=a266_0x220a1f;switch(_0x80bdaf[_0x49ce08(0x1bc)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x1798b9){const _0x291408=a266_0x220a1f,_0x1f9e4c=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x1798b9&&_0x1f9e4c[_0x291408(0x1f3)](NPX_SKILLS_FLAG_SKILL,_0x1798b9),_0x1f9e4c;}function a266_0x3bd5(){const _0x412c10=['EPERM','NPX_NOT_FOUND','filter','426025dLHwBm','12yIgEnv','ENOENT','absent','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','31383RSTxTd','message','\x22\x20install\x20state:\x20','signal','NPM_CONFIG_GLOBAL','status','PERMISSION_DENIED','error','warn','add','INSTALL_PARTIAL','log','5583135SnPQas','reason','match','CHILD_TERMINATED','--skill','1891562iUWYaO','EACCES','push','npx','stderr','exit\x20','trim','presence','2563800MRtHOY','state','inherit','855999wIBfur','join','checked','npx\x20terminated\x20by\x20signal\x20','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','stdout','lovrabet/rabetbase','1370SDkLOL','7764379IwdXKY','pipe','skill','SPAWN_FAILED','present','stdio','code','SKILL_NOT_INSTALLED','8XegkTz','CHILD_EXIT_NONZERO','Lovrabet','rabetbase','npm_config_global','skills@latest','toString'];a266_0x3bd5=function(){return _0x412c10;};return a266_0x3bd5();}export const NPX_SKILLS_ADD_COMMAND_LINE=[a266_0x220a1f(0x1f4),...buildNpxSkillsAddArgv()]['join']('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a266_0x220a1f(0x1f4),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a266_0x220a1f(0x1c2)]('\x20');function a266_0x5ef1(_0x4d65ea,_0x5d5490){_0x4d65ea=_0x4d65ea-0x1bb;const _0x3bd5fd=a266_0x3bd5();let _0x5ef127=_0x3bd5fd[_0x4d65ea];return _0x5ef127;}const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x54bbaf,_0x45a9d5,_0x5379e2){return{'ok':![],'status':_0x45a9d5,'code':_0x54bbaf,'error':'['+_0x54bbaf+']\x20'+_0x5379e2};}function spawnOptions(_0x2cd338,_0x438487){const _0x1ccb60=a266_0x220a1f,_0x4e2a02={...process.env};return delete _0x4e2a02[_0x1ccb60(0x1d5)],delete _0x4e2a02[_0x1ccb60(0x1e4)],{'cwd':_0x2cd338,'stdio':_0x438487,'env':_0x4e2a02,'shell':![],..._0x438487===_0x1ccb60(0x1ca)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x18502a,_0x5dc658,_0x337cd0,_0x2e859c){const _0xb924b0=a266_0x220a1f,_0x7c0589=[_0x18502a[_0xb924b0(0x1c6)]?_0x18502a[_0xb924b0(0x1c6)][_0xb924b0(0x1d7)]():'',_0x18502a['stderr']?_0x18502a[_0xb924b0(0x1f5)][_0xb924b0(0x1d7)]():''][_0xb924b0(0x1da)](Boolean)[_0xb924b0(0x1c2)]('\x0a')[_0xb924b0(0x1bc)]();_0x2e859c!=='pipe'&&_0x7c0589&&console[_0xb924b0(0x1eb)](_0x7c0589);if(_0x18502a[_0xb924b0(0x1e7)]){const _0x380781=_0x18502a['error'],_0x366931=_0x380781[_0xb924b0(0x1cf)]===_0xb924b0(0x1dd)?_0xb924b0(0x1d9):_0x380781[_0xb924b0(0x1cf)]===_0xb924b0(0x1d8)||_0x380781[_0xb924b0(0x1cf)]===_0xb924b0(0x1f2)?_0xb924b0(0x1e6):_0xb924b0(0x1cc);return failure(_0x366931,_0x18502a[_0xb924b0(0x1e5)],_0x380781[_0xb924b0(0x1e1)]);}if(_0x18502a[_0xb924b0(0x1e3)])return failure(_0xb924b0(0x1ef),_0x18502a[_0xb924b0(0x1e5)],_0xb924b0(0x1c4)+_0x18502a[_0xb924b0(0x1e3)]);if(_0x18502a['status']!==0x0)return failure(_0xb924b0(0x1d2),_0x18502a['status'],_0x7c0589||_0xb924b0(0x1bb)+(_0x18502a[_0xb924b0(0x1e5)]??'unknown'));const _0xc6af64=_0x5dc658?resolveInstalledSkill(_0x5dc658,_0x337cd0):undefined,_0x4400e0=_0x7c0589[_0xb924b0(0x1ee)](/Failed to install\s+(\d+)/i);if(_0x4400e0&&Number(_0x4400e0[0x1])>0x0){const _0x1a0952='Installer\x20reported\x20'+_0x4400e0[0x1]+'\x20failed\x20target(s)'+(_0x7c0589?':\x0a'+_0x7c0589:'');if(_0xc6af64?.[_0xb924b0(0x1bf)]===_0xb924b0(0x1cd))return console[_0xb924b0(0x1e8)]('!\x20'+_0x1a0952),{'ok':!![],'status':0x0};return failure(_0xb924b0(0x1ea),0x0,_0x1a0952);}if(_0xc6af64){if(_0xc6af64['state']===_0xb924b0(0x1de))return failure(_0xb924b0(0x1d0),0x0,'Skill\x20\x22'+_0x5dc658+_0xb924b0(0x1df)+_0xc6af64[_0xb924b0(0x1c3)]['join'](',\x20')+')');_0xc6af64['state']==='unverifiable'&&console['warn']('!\x20Could\x20not\x20verify\x20\x22'+_0x5dc658+_0xb924b0(0x1e2)+_0xc6af64[_0xb924b0(0x1ed)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x2fc77d,_0x3b8aae){const _0x344abf=a266_0x220a1f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2c2160=_0x3b8aae?.['stdio']??'inherit',_0x1e652a=resolveNpmBin(_0x344abf(0x1f4)),_0x48ff36=buildNpxSkillsAddArgv(_0x3b8aae?.['skill']),_0x447026=[_0x344abf(0x1f4),..._0x48ff36][_0x344abf(0x1c2)]('\x20');console[_0x344abf(0x1eb)]('*\x20'+_0x447026);const _0x5a620f=spawnSync(_0x1e652a,_0x48ff36,spawnOptions(_0x2fc77d,_0x2c2160));return normalizeSpawnResult(_0x5a620f,undefined,undefined,_0x2c2160);}export function runNpxSkillsRemove(_0x49e8dc,_0x5b08d3,_0x10f658=LEGACY_RABETBASE_SKILL_SOURCE){const _0x225ca6=a266_0x220a1f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x575e02=_0x5b08d3?.[_0x225ca6(0x1ce)]??_0x225ca6(0x1c0),_0x21f8f1=resolveNpmBin(_0x225ca6(0x1f4)),_0x434c15=[NPX_FLAG_YES,NPX_SKILLS_CLI,'remove',_0x10f658,NPX_SKILLS_FLAG_SKILL,_0x5b08d3?.[_0x225ca6(0x1cb)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x5b08d3?.['yes']?['-y']:[]],_0x1bc87c=[_0x21f8f1,..._0x434c15][_0x225ca6(0x1c2)]('\x20');console['log']('*\x20'+_0x1bc87c);const _0x4f19a0=spawnSync(_0x21f8f1,_0x434c15,spawnOptions(_0x49e8dc,_0x575e02));return normalizeSpawnResult(_0x4f19a0,undefined,undefined,_0x575e02);}export function runNpxSkillsAddGlobal(_0xc1cf3d,_0x5b97cd,_0x3e504f){const _0x3e979d=a266_0x220a1f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4a1c81=resolveNpmBin(_0x3e979d(0x1f4)),_0x620a51=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x5b97cd,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x3fb39e=[_0x3e979d(0x1f4),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x5b97cd,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x3e979d(0x1c2)]('\x20');console[_0x3e979d(0x1eb)]('*\x20'+_0x3fb39e);const _0x321c17=spawnSync(_0x4a1c81,_0x620a51,spawnOptions(_0xc1cf3d,_0x3e979d(0x1ca)));return normalizeSpawnResult(_0x321c17,_0x3e504f?.['expectedSkillName']??resolveGlobalSkillName(_0x5b97cd),_0x3e504f?.[_0x3e979d(0x1bd)],_0x3e504f?.['stdio']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a267_0x133acb=a267_0x2680;(function(_0x42cea4,_0x541c1b){const _0x5dd1b3=a267_0x2680,_0x4a9566=_0x42cea4();while(!![]){try{const _0x4bb7b2=-parseInt(_0x5dd1b3(0xa9))/0x1+-parseInt(_0x5dd1b3(0x99))/0x2+parseInt(_0x5dd1b3(0x96))/0x3+-parseInt(_0x5dd1b3(0xac))/0x4*(parseInt(_0x5dd1b3(0xa7))/0x5)+-parseInt(_0x5dd1b3(0xad))/0x6+-parseInt(_0x5dd1b3(0x9b))/0x7*(-parseInt(_0x5dd1b3(0xb8))/0x8)+parseInt(_0x5dd1b3(0xb5))/0x9;if(_0x4bb7b2===_0x541c1b)break;else _0x4a9566['push'](_0x4a9566['shift']());}catch(_0x521474){_0x4a9566['push'](_0x4a9566['shift']());}}}(a267_0x48cd,0xe2e71));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a267_0x2680(_0x47baf7,_0x30cde6){_0x47baf7=_0x47baf7-0x94;const _0x48cdeb=a267_0x48cd();let _0x2680cb=_0x48cdeb[_0x47baf7];return _0x2680cb;}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a267_0x133acb(0xb9),a267_0x133acb(0xab));function a267_0x48cd(){const _0x477256=['.claude','26340543VFPYyh','SKILL.md','message','768ZegYhH','.agents','utf8','version','\x20uses\x20unsupported\x20version\x20','4442154JUbvHF','present','\x20records\x20\x22','2901774iuSewi','object','61649ZuWAst','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','join','unusable','globalSkillsDirs','lockFile','skills','home','absent','map','unverifiable','reason','92710dIAPhF','recorded','1043299gLOAWi','not-recorded','.skill-lock.json','172zAmWEv','6192192eBFyBY','parse','number','find','includes','\x20has\x20no\x20skills\x20map','kind'];a267_0x48cd=function(){return _0x477256;};return a267_0x48cd();}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a267_0x133acb(0xb9),'skills'),join(a267_0x133acb(0xb4),a267_0x133acb(0xa1))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x178fa8,_0x4ca89d){const _0xcb89e2=a267_0x133acb;if(!existsSync(_0x178fa8))return{'kind':'not-recorded'};let _0x47263c;try{_0x47263c=JSON[_0xcb89e2(0xae)](readFileSync(_0x178fa8,_0xcb89e2(0xba)));}catch(_0x5449a3){return{'kind':_0xcb89e2(0x9e),'reason':_0x178fa8+'\x20is\x20unreadable:\x20'+_0x5449a3[_0xcb89e2(0xb7)]};}const _0x6390be=_0x47263c;if(typeof _0x6390be?.[_0xcb89e2(0x94)]!==_0xcb89e2(0xaf)||!SUPPORTED_LOCK_VERSIONS[_0xcb89e2(0xb1)](_0x6390be[_0xcb89e2(0x94)]))return{'kind':_0xcb89e2(0x9e),'reason':_0x178fa8+_0xcb89e2(0x95)+String(_0x6390be?.['version'])};if(!_0x6390be[_0xcb89e2(0xa1)]||typeof _0x6390be['skills']!==_0xcb89e2(0x9a))return{'kind':_0xcb89e2(0x9e),'reason':_0x178fa8+_0xcb89e2(0xb2)};return _0x6390be[_0xcb89e2(0xa1)][_0x4ca89d]?{'kind':_0xcb89e2(0xa8)}:{'kind':_0xcb89e2(0xaa)};}export function resolveInstalledSkill(_0x223def,_0x3f558f){const _0x2816a6=a267_0x133acb,_0x476099=_0x3f558f?.[_0x2816a6(0xa2)]??homedir(),_0x2d5c73=_0x3f558f?.[_0x2816a6(0x9f)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x2816a6(0xa4)](_0x557d50=>join(_0x476099,_0x557d50)),_0x122915=_0x3f558f?.[_0x2816a6(0xa0)]??join(_0x476099,SKILL_LOCK_RELATIVE_PATH),_0x5476bd=_0x2d5c73[_0x2816a6(0xa4)](_0x241000=>join(_0x241000,_0x223def,_0x2816a6(0xb6))),_0x596af2=_0x5476bd[_0x2816a6(0xb0)](_0x26313d=>existsSync(_0x26313d));if(_0x596af2)return{'state':_0x2816a6(0x97),'path':_0x596af2};const _0x20899d=readLockLookup(_0x122915,_0x223def);if(_0x20899d[_0x2816a6(0xb3)]===_0x2816a6(0x9e))return{'state':'unverifiable','reason':_0x20899d[_0x2816a6(0xa6)]};if(_0x20899d['kind']===_0x2816a6(0xa8))return{'state':_0x2816a6(0xa5),'reason':_0x122915+_0x2816a6(0x98)+_0x223def+_0x2816a6(0x9c)+('('+_0x5476bd[_0x2816a6(0x9d)](',\x20')+')')};return{'state':_0x2816a6(0xa3),'checked':_0x5476bd};}
|