@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-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/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +7 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +30 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +5 -3
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +2 -0
- 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.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +6 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +0 -10
- 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/types/index.d.ts +11 -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.d.ts +19 -0
- 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 +6 -1
- package/skills/rabetbase/SKILL.md +16 -10
- package/skills/rabetbase/guides/backend-function.md +5 -1
- package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
- package/skills/rabetbase/guides/cross-database-bff.md +70 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +64 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +5 -3
- package/templates/README.md +46 -6
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36668a,_0x1482c0){const _0x5603b8=a317_0x35f8,_0x492304=_0x36668a();while(!![]){try{const _0x3ce3d3=parseInt(_0x5603b8(0x9f))/0x1+parseInt(_0x5603b8(0xa5))/0x2+parseInt(_0x5603b8(0xa2))/0x3*(parseInt(_0x5603b8(0xa7))/0x4)+-parseInt(_0x5603b8(0xab))/0x5+parseInt(_0x5603b8(0xad))/0x6+-parseInt(_0x5603b8(0x9e))/0x7*(parseInt(_0x5603b8(0xa1))/0x8)+-parseInt(_0x5603b8(0xae))/0x9;if(_0x3ce3d3===_0x1482c0)break;else _0x492304['push'](_0x492304['shift']());}catch(_0x3b8d44){_0x492304['push'](_0x492304['shift']());}}}(a317_0x1f02,0xd5fd3));export function canonicalRabetbaseOperation(_0x4def7e){const _0x55d3ea=a317_0x35f8;return[_0x4def7e[_0x55d3ea(0x9d)],..._0x4def7e[_0x55d3ea(0xa6)][_0x55d3ea(0x9b)]()[_0x55d3ea(0xac)](/\s+/)]['filter'](Boolean)[_0x55d3ea(0xa9)]('.');}function a317_0x35f8(_0x45e2a1,_0x22a6cb){_0x45e2a1=_0x45e2a1-0x9b;const _0x1f026e=a317_0x1f02();let _0x35f8a7=_0x1f026e[_0x45e2a1];return _0x35f8a7;}export function createRabetbaseWriteMetadata(_0x485b2a,_0x411b57,_0x2a44bc,_0x345508){const _0x59a01b=a317_0x35f8;if(_0x345508||_0x2a44bc['ok']!==!![]||hasUnresolvedConflicts(_0x2a44bc)||_0x485b2a[_0x59a01b(0xa8)]!=='write'&&_0x485b2a[_0x59a01b(0xa8)]!=='high-risk-write')return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x59a01b(0x9c),'operation':_0x411b57,'risk':_0x485b2a['risk']}}};}function hasUnresolvedConflicts(_0x41a741){const _0x2c0198=a317_0x35f8,_0x1cef86=_0x41a741[_0x2c0198(0xa0)];return Boolean(_0x1cef86&&typeof _0x1cef86===_0x2c0198(0xa4)&&!Array[_0x2c0198(0xa3)](_0x1cef86)&&Array['isArray'](_0x1cef86[_0x2c0198(0xaa)])&&_0x1cef86[_0x2c0198(0xaa)]['length']>0x0);}function a317_0x1f02(){const _0x213adb=['324282gNduOi','isArray','object','747524fiZnSN','command','12mVoQdF','risk','join','conflicts','5774620jFQMHv','split','6621030kETdrA','2309157qFNOhO','trim','rabetbase.write.completed','service','35LJAaEe','1261982rRXidn','data','1240856cHJdvC'];a317_0x1f02=function(){return _0x213adb;};return a317_0x1f02();}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e933c,_0x1bd5f0){const _0x4788aa=a318_0x4bba,_0x1875c2=_0x5e933c();while(!![]){try{const _0x5ed1e2=-parseInt(_0x4788aa(0x13f))/0x1+-parseInt(_0x4788aa(0x138))/0x2*(parseInt(_0x4788aa(0x158))/0x3)+-parseInt(_0x4788aa(0x152))/0x4*(-parseInt(_0x4788aa(0x139))/0x5)+parseInt(_0x4788aa(0x13d))/0x6+parseInt(_0x4788aa(0x147))/0x7*(-parseInt(_0x4788aa(0x156))/0x8)+parseInt(_0x4788aa(0x143))/0x9*(-parseInt(_0x4788aa(0x146))/0xa)+parseInt(_0x4788aa(0x151))/0xb*(parseInt(_0x4788aa(0x15b))/0xc);if(_0x5ed1e2===_0x1bd5f0)break;else _0x1875c2['push'](_0x1875c2['shift']());}catch(_0x1dd5b7){_0x1875c2['push'](_0x1875c2['shift']());}}}(a318_0x2f06,0x8e242));function a318_0x2f06(){const _0x360bc2=['1785182FxUGLt','result','definition','command','isNonInteractive','aborted','reason','message','Rabetbase\x20invocation\x20aborted.','stringify','290059mZjMnz','8NuESha','data','execute','args','16xQCdit','confirm','138Jgycon','risk','rawFlags','804NDCBJO','Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','present','20068wvIBzn','1325815eNHojR','dryRun','dry-run','confirmation','5082228fMOACn','high-risk-write','730746hneBAJ','presentation','format','Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.','135QLpSQN','yes','signal','573010JTcrNx'];a318_0x2f06=function(){return _0x360bc2;};return a318_0x2f06();}import{buildConfigFromFlags,initGlobalEnvironment,isRoutingRecoveryService}from'../context.js';import{createPipelineEnv,createRabetbaseRunnerAdapter,finalizeRabetbaseRuntimeState,runCommand}from'../framework/runner.js';import{buildRabetbaseConfirmationRequest}from'../runtime/confirmation.js';import{canonicalRabetbaseOperation,createRabetbaseWriteMetadata}from'../runtime/event.js';import{runSerialized}from'../runtime/queue.js';import{resolveRabetbaseInvocation}from'../runtime/resolve.js';const defaultPresentation={'present'({result:_0x403d9c,command:_0x26328a,risk:_0x59ab83,dryRun:_0x51e3f8}){const _0x4a335a=a318_0x4bba;return JSON[_0x4a335a(0x150)]({'ok':_0x403d9c['ok'],'command':_0x26328a,'risk':_0x59ab83,..._0x51e3f8?{'dryRun':!![]}:{},..._0x403d9c[_0x4a335a(0x153)]!==undefined?{'data':_0x403d9c[_0x4a335a(0x153)]}:{},..._0x403d9c[_0x4a335a(0x14e)]?{'message':_0x403d9c[_0x4a335a(0x14e)]}:{}});}};export async function invokeRabetbase(_0x44e83e,_0x138353){const _0x552e38=a318_0x4bba;throwIfAborted(_0x138353[_0x552e38(0x145)]);const _0x4345ec=await resolveRabetbaseInvocation(_0x44e83e),_0x4de4dc=canonicalRabetbaseOperation(_0x4345ec[_0x552e38(0x149)]);return await confirmWriteBeforeQueue(_0x4345ec[_0x552e38(0x149)],_0x4345ec[_0x552e38(0x15a)],_0x4de4dc,_0x138353),runSerialized(async()=>{const _0x5e0417=_0x552e38,_0x43449b={};try{throwIfAborted(_0x138353[_0x5e0417(0x145)]);const _0x3f0a19=buildConfigFromFlags(_0x4345ec[_0x5e0417(0x15a)]);!isRoutingRecoveryService(_0x4345ec[_0x5e0417(0x149)]['service'])&&await initGlobalEnvironment(_0x3f0a19);const _0x1c1ed6=createPipelineEnv(_0x3f0a19,{..._0x4345ec['rawFlags'],'yes':_0x4345ec[_0x5e0417(0x149)][_0x5e0417(0x159)]===_0x5e0417(0x13e)?!![]:_0x4345ec[_0x5e0417(0x15a)][_0x5e0417(0x144)],'nonInteractive':!![]},_0x4345ec[_0x5e0417(0x155)]);_0x1c1ed6[_0x5e0417(0x14b)]=!![],_0x1c1ed6['riskLevel']=_0x5e0417(0x13e);const _0x38ed4d=withAbortSignal(_0x4345ec[_0x5e0417(0x149)],_0x138353['signal']),_0x322a21=createRabetbaseRunnerAdapter({'formatOutput'(_0x288bed,_0x136160){const _0x3cbf6f=_0x5e0417;_0x43449b[_0x3cbf6f(0x148)]=_0x288bed,_0x43449b['command']=_0x136160[_0x3cbf6f(0x14a)],_0x43449b[_0x3cbf6f(0x159)]=_0x136160[_0x3cbf6f(0x159)],_0x43449b[_0x3cbf6f(0x141)]=_0x136160[_0x3cbf6f(0x141)],_0x43449b[_0x3cbf6f(0x13a)]=_0x136160[_0x3cbf6f(0x13a)]===!![];},async 'confirmHighRisk'(){const _0x4fc6d9=_0x5e0417;throw new Error(_0x4fc6d9(0x142));}});await runCommand(_0x38ed4d,_0x1c1ed6,_0x322a21);if(!_0x43449b[_0x5e0417(0x148)]||!_0x43449b[_0x5e0417(0x14a)]||!_0x43449b[_0x5e0417(0x159)]||!_0x43449b[_0x5e0417(0x141)])throw new Error(_0x5e0417(0x15c));const _0x264352=_0x43449b[_0x5e0417(0x13a)]===!![],_0x56367b=_0x138353[_0x5e0417(0x140)]??defaultPresentation,_0x406bdf={'result':_0x43449b[_0x5e0417(0x148)],'command':_0x43449b[_0x5e0417(0x14a)],'operation':_0x4de4dc,'risk':_0x43449b[_0x5e0417(0x159)],'format':_0x43449b[_0x5e0417(0x141)],'dryRun':_0x264352},_0x197a2b=createRabetbaseWriteMetadata(_0x4345ec[_0x5e0417(0x149)],_0x4de4dc,_0x43449b[_0x5e0417(0x148)],_0x264352);let _0x3cc4fc;try{_0x3cc4fc=await _0x56367b[_0x5e0417(0x15d)](_0x406bdf);}catch(_0x722ba8){if(!_0x197a2b||_0x56367b===defaultPresentation)throw _0x722ba8;_0x3cc4fc=await defaultPresentation[_0x5e0417(0x15d)](_0x406bdf);}return{'operation':_0x4de4dc,'risk':_0x43449b['risk'],'mode':_0x264352?_0x5e0417(0x13b):_0x5e0417(0x154),'result':_0x43449b[_0x5e0417(0x148)],'output':_0x3cc4fc,..._0x197a2b?{'metadata':_0x197a2b}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}function a318_0x4bba(_0x59bac0,_0x2cc035){_0x59bac0=_0x59bac0-0x138;const _0x2f06f1=a318_0x2f06();let _0x4bba92=_0x2f06f1[_0x59bac0];return _0x4bba92;}async function confirmWriteBeforeQueue(_0x4924ba,_0x76d7e4,_0x4ff0a2,_0x20ba1f){const _0x11355b=a318_0x4bba;if(_0x76d7e4[_0x11355b(0x13a)]===!![]||_0x4924ba[_0x11355b(0x159)]!=='write'&&_0x4924ba['risk']!==_0x11355b(0x13e))return;await _0x20ba1f[_0x11355b(0x13c)][_0x11355b(0x157)](buildRabetbaseConfirmationRequest(_0x4924ba,_0x4ff0a2,_0x20ba1f[_0x11355b(0x145)]));}function withAbortSignal(_0x3f056f,_0x222bec){return{..._0x3f056f,async 'execute'(_0x1ced85){return throwIfAborted(_0x222bec),_0x3f056f['execute']({..._0x1ced85,'signal':_0x222bec});}};}function throwIfAborted(_0x5a1249){const _0x57d33c=a318_0x4bba;if(_0x5a1249?.[_0x57d33c(0x14c)])throw _0x5a1249[_0x57d33c(0x14d)]instanceof Error?_0x5a1249['reason']:new DOMException(_0x57d33c(0x14f),'AbortError');}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3af4d1,_0x1101c9){const _0x5714a7=a319_0x35f7,_0x1e248c=_0x3af4d1();while(!![]){try{const _0x330455=-parseInt(_0x5714a7(0x181))/0x1+parseInt(_0x5714a7(0x18a))/0x2*(parseInt(_0x5714a7(0x189))/0x3)+-parseInt(_0x5714a7(0x184))/0x4*(-parseInt(_0x5714a7(0x188))/0x5)+parseInt(_0x5714a7(0x186))/0x6+parseInt(_0x5714a7(0x180))/0x7+parseInt(_0x5714a7(0x183))/0x8+parseInt(_0x5714a7(0x187))/0x9*(-parseInt(_0x5714a7(0x185))/0xa);if(_0x330455===_0x1101c9)break;else _0x1e248c['push'](_0x1e248c['shift']());}catch(_0x861f4f){_0x1e248c['push'](_0x1e248c['shift']());}}}(a319_0x487d,0xc070a));function a319_0x487d(){const _0x31537a=['30KmJyAX','3jmAMFj','146966xhrHPM','6115914ceDkQS','69475gtcMGN','catch','8358672lkPDNU','750504lBtSRc','3881050YbADyX','7397274XLETbD','81lbOFbm'];a319_0x487d=function(){return _0x31537a;};return a319_0x487d();}function a319_0x35f7(_0x1e45da,_0x345cb0){_0x1e45da=_0x1e45da-0x180;const _0x487d40=a319_0x487d();let _0x35f709=_0x487d40[_0x1e45da];return _0x35f709;}let tail=Promise['resolve']();export async function runSerialized(_0x56c475){const _0x1ebf0d=a319_0x35f7,_0x5cfcb7=tail;let _0x37a3c5;tail=new Promise(_0x5104e9=>{_0x37a3c5=_0x5104e9;}),await _0x5cfcb7[_0x1ebf0d(0x182)](()=>undefined);try{return await _0x56c475();}finally{_0x37a3c5();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37ef41,_0x11da68){const _0x4c1fb4=a320_0x22e1,_0x5527c6=_0x37ef41();while(!![]){try{const _0x377f41=parseInt(_0x4c1fb4(0x1d3))/0x1*(-parseInt(_0x4c1fb4(0x1c8))/0x2)+parseInt(_0x4c1fb4(0x1c1))/0x3+-parseInt(_0x4c1fb4(0x1cb))/0x4*(-parseInt(_0x4c1fb4(0x1d1))/0x5)+-parseInt(_0x4c1fb4(0x1c5))/0x6+-parseInt(_0x4c1fb4(0x1c6))/0x7+parseInt(_0x4c1fb4(0x1cf))/0x8+parseInt(_0x4c1fb4(0x1c3))/0x9;if(_0x377f41===_0x11da68)break;else _0x5527c6['push'](_0x5527c6['shift']());}catch(_0xa71c50){_0x5527c6['push'](_0x5527c6['shift']());}}}(a320_0x58ec,0xc9b32));function a320_0x58ec(){const _0x9a2edb=['4nBWQDd','unknownCommand','input','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','5574808SAhyhV','hint','5679595pCLixI','slice','7JrUxZR','wildcardDef','2861184vVOBYw','run','21846825eHWKce','validation','8323572YtQtpT','11107502RrZgDZ','join','403918SjgSnr','Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.','defaultCommand'];a320_0x58ec=function(){return _0x9a2edb;};return a320_0x58ec();}function a320_0x22e1(_0x40e78c,_0x1542be){_0x40e78c=_0x40e78c-0x1c1;const _0x58ecb4=a320_0x58ec();let _0x22e157=_0x58ecb4[_0x40e78c];return _0x22e157;}import a320_0x5b3502 from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{assertSupportedCommandFlags}from'../framework/supported-flags.js';export async function resolveRabetbaseInvocation(_0x1089e8){const _0x2f30c0=a320_0x22e1,_0x2c509b=a320_0x5b3502('',{'importMeta':import.meta,'argv':[..._0x1089e8],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x2b9ba8=[..._0x2c509b[_0x2f30c0(0x1cd)]],_0x5e5583=_0x2c509b['flags'],_0x372401=_0x2b9ba8[0x0];if(!_0x372401)throw CliErrors['validation']('Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');const _0x1e9320=resolveRemovedCommand(_0x372401,_0x2b9ba8[0x1]);if(_0x1e9320)throw CliErrors[_0x2f30c0(0x1c4)](_0x1e9320['message'],_0x1e9320[_0x2f30c0(0x1d0)]);if(_0x372401===_0x2f30c0(0x1c2))throw CliErrors[_0x2f30c0(0x1c4)](_0x2f30c0(0x1ce),_0x2f30c0(0x1c9));if(!isKnownService(_0x372401))throw CliErrors[_0x2f30c0(0x1cc)](_0x2b9ba8[_0x2f30c0(0x1c7)]('\x20'));const _0x4b253a=getServiceEntry(_0x372401),_0x15d8d8=_0x2b9ba8[0x1],_0x699aab=_0x15d8d8||_0x4b253a[_0x2f30c0(0x1ca)];if(!_0x699aab){if(_0x4b253a[_0x2f30c0(0x1d4)])return{'definition':_0x4b253a[_0x2f30c0(0x1d4)],'rawFlags':_0x5e5583,'args':[]};throw CliErrors[_0x2f30c0(0x1c4)]('Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22'+_0x372401+'\x22.');}const _0x3f45cb=findDefinition(_0x372401,_0x699aab);if(_0x3f45cb)return assertSupportedCommandFlags(_0x3f45cb,_0x5e5583),{'definition':_0x3f45cb,'rawFlags':_0x5e5583,'args':_0x2b9ba8[_0x2f30c0(0x1d2)](0x2)};if(_0x4b253a['wildcardDef'])return{'definition':_0x4b253a[_0x2f30c0(0x1d4)],'rawFlags':_0x5e5583,'args':[_0x699aab,..._0x2b9ba8['slice'](0x2)]};throw CliErrors[_0x2f30c0(0x1cc)](_0x372401+'\x20'+_0x699aab);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a310_0xe945=a310_0x2231;(function(_0xeaf95a,_0x5991c3){const _0x2f46f6=a310_0x2231,_0x1bda24=_0xeaf95a();while(!![]){try{const _0x48e812=parseInt(_0x2f46f6(0x14e))/0x1*(parseInt(_0x2f46f6(0x129))/0x2)+-parseInt(_0x2f46f6(0x146))/0x3+-parseInt(_0x2f46f6(0x12d))/0x4*(-parseInt(_0x2f46f6(0x14c))/0x5)+-parseInt(_0x2f46f6(0x133))/0x6+-parseInt(_0x2f46f6(0x15f))/0x7*(parseInt(_0x2f46f6(0x137))/0x8)+-parseInt(_0x2f46f6(0x12e))/0x9*(-parseInt(_0x2f46f6(0x15a))/0xa)+parseInt(_0x2f46f6(0x14a))/0xb;if(_0x48e812===_0x5991c3)break;else _0x1bda24['push'](_0x1bda24['shift']());}catch(_0xc68096){_0x1bda24['push'](_0x1bda24['shift']());}}}(a310_0x5190,0x8e786));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';function a310_0x5190(){const _0x311f84=['SOURCE_INVALID','skillVersion','Symbolic\x20link\x20is\x20not\x20allowed:\x20','VERIFY_FAILED','parse','skills@latest\x20exited\x20','path','every','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','includes','942087ZiTWOZ','skills','rabetbase','reason','5301065pHVWCH','match','15wCfFDl','trim','1UfpAIp','installedPath','rabetbase.manifest.json','packageRoot','flatMap','unknown','update','rabetbase\x20cli-skill\x20install','utf8','schemaVersion','name','split','670DGVRLh','Unsafe\x20manifest\x20path:\x20','status','unverifiable','message','28ePbZeV','isFile','files','content_mismatch','packageVersion','version','current','digest','Installed\x20Skill\x20state\x20is\x20','join','absent','214738PieIRQ','home','root','sha256','182388Ettoti','44766dCYbll','present','missing','length','error','264852lAAeIa','hex','version_mismatch','package.json','235208mWVCZj','state','startsWith','SKILL.md','manifest'];a310_0x5190=function(){return _0x311f84;};return a310_0x5190();}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';function a310_0x2231(_0x428bae,_0x16a4a2){_0x428bae=_0x428bae-0x11f;const _0x5190e5=a310_0x5190();let _0x2231d3=_0x5190e5[_0x428bae];return _0x2231d3;}import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a310_0xe945(0x155),SKILL_NAME=a310_0xe945(0x148);function frontmatterValue(_0x138199,_0x3535f1){const _0x2cffbb=a310_0xe945;return _0x138199[_0x2cffbb(0x14b)](new RegExp('^'+_0x3535f1+':\x5cs*(.+)$','m'))?.[0x1]?.[_0x2cffbb(0x14d)]()??'';}function listFiles(_0x2f8bc1,_0x3ebc7c=_0x2f8bc1){const _0xd57a2d=a310_0xe945;return readdirSync(_0x3ebc7c,{'withFileTypes':!![]})[_0xd57a2d(0x152)](_0x3d5d87=>{const _0x1435f0=_0xd57a2d,_0x2ca800=join(_0x3ebc7c,_0x3d5d87[_0x1435f0(0x158)]),_0x23db09=lstatSync(_0x2ca800);if(_0x23db09['isSymbolicLink']())throw new Error(_0x1435f0(0x13e)+_0x2ca800);if(_0x23db09['isDirectory']())return listFiles(_0x2f8bc1,_0x2ca800);if(!_0x23db09[_0x1435f0(0x11f)]())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x2ca800);return[relative(_0x2f8bc1,_0x2ca800)[_0x1435f0(0x159)](sep)[_0x1435f0(0x127)]('/')];})['sort']((_0x3fe239,_0x37a28b)=>_0x3fe239<_0x37a28b?-0x1:_0x3fe239>_0x37a28b?0x1:0x0);}function digestFiles(_0x4dd892,_0x18445a){const _0x114bec=a310_0xe945,_0x232781=createHash(_0x114bec(0x12c));for(const _0x335ee7 of _0x18445a){if(_0x335ee7[_0x114bec(0x139)]('/')||_0x335ee7[_0x114bec(0x159)]('/')['includes']('..')||_0x335ee7[_0x114bec(0x145)]('\x5c'))throw new Error(_0x114bec(0x15b)+_0x335ee7);_0x232781[_0x114bec(0x154)](_0x335ee7),_0x232781[_0x114bec(0x154)]('\x00'),_0x232781[_0x114bec(0x154)](readFileSync(join(_0x4dd892,..._0x335ee7[_0x114bec(0x159)]('/')))),_0x232781[_0x114bec(0x154)]('\x00');}return _0x232781[_0x114bec(0x125)](_0x114bec(0x134));}function sameFiles(_0x30e485,_0x294063){const _0x39734a=a310_0xe945;return _0x30e485[_0x39734a(0x131)]===_0x294063[_0x39734a(0x131)]&&_0x30e485[_0x39734a(0x143)]((_0x3696ee,_0x2b4795)=>_0x3696ee===_0x294063[_0x2b4795]);}function readSource(_0x5a1bc9){const _0x37e9e9=a310_0xe945,_0x12efa1=JSON[_0x37e9e9(0x140)](readFileSync(join(_0x5a1bc9,_0x37e9e9(0x136)),_0x37e9e9(0x156))),_0x1af52e=JSON['parse'](readFileSync(join(_0x5a1bc9,_0x37e9e9(0x147),_0x37e9e9(0x150)),_0x37e9e9(0x156))),_0x1d39f4=join(_0x5a1bc9,_0x37e9e9(0x147),SKILL_NAME),_0x2e8b8c=frontmatterValue(readFileSync(join(_0x1d39f4,_0x37e9e9(0x13a)),'utf8'),'version'),_0x198f94=listFiles(_0x1d39f4);if(_0x1af52e[_0x37e9e9(0x157)]!==0x1||_0x1af52e[_0x37e9e9(0x158)]!==SKILL_NAME||!_0x12efa1[_0x37e9e9(0x123)]||_0x1af52e[_0x37e9e9(0x122)]!==_0x12efa1[_0x37e9e9(0x123)]||_0x1af52e['skillVersion']!==_0x12efa1[_0x37e9e9(0x123)]||_0x2e8b8c!==_0x12efa1[_0x37e9e9(0x123)]||!sameFiles(_0x198f94,_0x1af52e[_0x37e9e9(0x120)])||digestFiles(_0x1d39f4,_0x198f94)!==_0x1af52e['digest'])throw new Error(_0x37e9e9(0x144));return{'packageVersion':_0x12efa1[_0x37e9e9(0x123)],'skillVersion':_0x2e8b8c,'root':_0x1d39f4,'manifest':_0x1af52e};}function installedSkillPath(_0x3efa38){const _0x47ad81=a310_0xe945,_0xf90c85=resolveInstalledSkill(SKILL_NAME,{'home':_0x3efa38});if(_0xf90c85[_0x47ad81(0x138)]===_0x47ad81(0x12f))return{'state':_0x47ad81(0x12f),'path':dirname(_0xf90c85['path'])};if(_0xf90c85[_0x47ad81(0x138)]===_0x47ad81(0x128))return{'state':'missing'};return{'state':_0x47ad81(0x15d),'reason':_0xf90c85['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x4ea1a6,_0x5ebcd6={}){const _0x21a660=a310_0xe945,_0x212c8a=installedSkillPath(_0x5ebcd6[_0x21a660(0x12a)]??homedir());if(_0x212c8a[_0x21a660(0x138)]===_0x21a660(0x130))return{'state':_0x21a660(0x130),'expectedVersion':_0x4ea1a6,'repairCommand':REPAIR_COMMAND};if(_0x212c8a[_0x21a660(0x138)]===_0x21a660(0x15d))return{'state':'unverifiable','expectedVersion':_0x4ea1a6,'reason':_0x212c8a[_0x21a660(0x149)],'repairCommand':REPAIR_COMMAND};try{const _0x5fb2bb=frontmatterValue(readFileSync(join(_0x212c8a[_0x21a660(0x142)],'SKILL.md'),_0x21a660(0x156)),_0x21a660(0x123));return{'state':_0x5fb2bb===_0x4ea1a6?_0x21a660(0x124):_0x21a660(0x135),'expectedVersion':_0x4ea1a6,'skillVersion':_0x5fb2bb,'installedPath':_0x212c8a['path'],'repairCommand':REPAIR_COMMAND};}catch(_0x52a790){return{'state':_0x21a660(0x15d),'expectedVersion':_0x4ea1a6,'installedPath':_0x212c8a[_0x21a660(0x142)],'reason':_0x52a790 instanceof Error?_0x52a790['message']:String(_0x52a790),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x20dc8e={}){const _0xb84f89=a310_0xe945,_0x53a2f0=_0x20dc8e[_0xb84f89(0x151)]??DEFAULT_PACKAGE_ROOT;let _0x205d14;try{_0x205d14=readSource(_0x53a2f0);}catch(_0x4eecfc){return{'state':_0xb84f89(0x15d),'packageVersion':_0xb84f89(0x153),'reason':_0x4eecfc instanceof Error?_0x4eecfc[_0xb84f89(0x15e)]:String(_0x4eecfc),'repairCommand':REPAIR_COMMAND};}const _0x259a49=installedSkillPath(_0x20dc8e[_0xb84f89(0x12a)]??homedir());if(_0x259a49[_0xb84f89(0x138)]===_0xb84f89(0x130))return{'state':_0xb84f89(0x130),'packageVersion':_0x205d14[_0xb84f89(0x122)],'repairCommand':REPAIR_COMMAND};if(_0x259a49[_0xb84f89(0x138)]===_0xb84f89(0x15d))return{'state':_0xb84f89(0x15d),'packageVersion':_0x205d14['packageVersion'],'reason':_0x259a49[_0xb84f89(0x149)],'repairCommand':REPAIR_COMMAND};try{const _0x8e88cd=frontmatterValue(readFileSync(join(_0x259a49['path'],_0xb84f89(0x13a)),_0xb84f89(0x156)),_0xb84f89(0x123));if(_0x8e88cd!==_0x205d14[_0xb84f89(0x13d)])return{'state':'version_mismatch','packageVersion':_0x205d14[_0xb84f89(0x122)],'skillVersion':_0x8e88cd,'installedPath':_0x259a49[_0xb84f89(0x142)],'repairCommand':REPAIR_COMMAND};const _0x5e3dbc=listFiles(_0x259a49[_0xb84f89(0x142)]),_0x53e822=digestFiles(_0x259a49['path'],_0x5e3dbc);return{'state':sameFiles(_0x5e3dbc,_0x205d14[_0xb84f89(0x13b)][_0xb84f89(0x120)])&&_0x53e822===_0x205d14[_0xb84f89(0x13b)]['digest']?'current':_0xb84f89(0x121),'packageVersion':_0x205d14[_0xb84f89(0x122)],'skillVersion':_0x8e88cd,'installedPath':_0x259a49[_0xb84f89(0x142)],'digest':_0x53e822,'repairCommand':REPAIR_COMMAND};}catch(_0x5cd26d){return{'state':_0xb84f89(0x15d),'packageVersion':_0x205d14[_0xb84f89(0x122)],'installedPath':_0x259a49[_0xb84f89(0x142)],'reason':_0x5cd26d instanceof Error?_0x5cd26d[_0xb84f89(0x15e)]:String(_0x5cd26d),'repairCommand':REPAIR_COMMAND};}}function failure(_0x2f7ca1,_0x3f52ef,_0x52bad7,_0x432378){const _0x1a45fd=a310_0xe945;return{'ok':![],'code':_0x2f7ca1,'packageVersion':_0x3f52ef[_0x1a45fd(0x122)],'skillVersion':_0x3f52ef[_0x1a45fd(0x13d)],'installedPath':_0x432378,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x52bad7 instanceof Error?_0x52bad7[_0x1a45fd(0x15e)]:String(_0x52bad7)};}export function installBuiltinSkill(_0x1477a7={}){const _0xf9d8f=a310_0xe945,_0x4a98d7=_0x1477a7[_0xf9d8f(0x151)]??DEFAULT_PACKAGE_ROOT,_0x1b4150=_0x1477a7[_0xf9d8f(0x12a)]??homedir();let _0x14d9b6;try{_0x14d9b6=readSource(_0x4a98d7);}catch(_0x256aa0){return failure(_0xf9d8f(0x13c),{'packageVersion':'unknown','skillVersion':_0xf9d8f(0x153)},_0x256aa0);}const _0x1678eb=inspectBuiltinSkill({'packageRoot':_0x4a98d7,'home':_0x1b4150}),_0x252d9a=runNpxSkillsAddGlobal(_0x4a98d7,_0x14d9b6[_0xf9d8f(0x12b)],{'stdio':_0x1477a7['stdio']??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0x1b4150}});if(_0x252d9a['skipped'])return{'ok':!![],'packageVersion':_0x14d9b6[_0xf9d8f(0x122)],'skillVersion':_0x14d9b6[_0xf9d8f(0x13d)],'installedPath':_0x1678eb[_0xf9d8f(0x14f)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x252d9a['ok'])return failure('INSTALL_FAILED',_0x14d9b6,_0x252d9a[_0xf9d8f(0x132)]??_0xf9d8f(0x141)+_0x252d9a[_0xf9d8f(0x15c)]);const _0x5a5050=inspectBuiltinSkill({'packageRoot':_0x4a98d7,'home':_0x1b4150});if(_0x5a5050[_0xf9d8f(0x138)]!==_0xf9d8f(0x124))return failure(_0xf9d8f(0x13f),_0x14d9b6,_0x5a5050['reason']??_0xf9d8f(0x126)+_0x5a5050[_0xf9d8f(0x138)],_0x5a5050[_0xf9d8f(0x14f)]);return{'ok':!![],'packageVersion':_0x14d9b6['packageVersion'],'skillVersion':_0x14d9b6[_0xf9d8f(0x13d)],'installedPath':_0x5a5050[_0xf9d8f(0x14f)],'changed':_0x1678eb[_0xf9d8f(0x138)]!=='current','repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
function a322_0x4291(_0x4e92dc,_0x31caa3){_0x4e92dc=_0x4e92dc-0x1cc;const _0x109275=a322_0x1092();let _0x42914e=_0x109275[_0x4e92dc];return _0x42914e;}const a322_0x47fcc6=a322_0x4291;function a322_0x1092(){const _0xcbe489=['files','startsWith','Installed\x20Skill\x20state\x20is\x20','schemaVersion','trim','582888nWfAIG','1808007QXttPX','includes','SOURCE_INVALID','absent','message','sha256','home','version_mismatch','rabetbase','packageVersion','missing','skills@latest\x20exited\x20','installedPath','packageRoot','rabetbase.manifest.json','isDirectory','digest','1606284KnBVGK','Unsupported\x20Skill\x20entry:\x20','content_mismatch','42qCObMk','hex','parse','skills','current','121664kbRWYi','root','5EuhGqt','join','state','655570vHMIUg','stdio','match','596238yIZOeQ','present','skillVersion','isFile','reason','manifest','unverifiable','sort','pipe','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','status','unknown','SKILL.md','rabetbase\x20cli-skill\x20install','utf8','split','name','version','Symbolic\x20link\x20is\x20not\x20allowed:\x20','skipped','length','138128VfUaLP','VERIFY_FAILED','flatMap','path'];a322_0x1092=function(){return _0xcbe489;};return a322_0x1092();}(function(_0x184bb0,_0x501993){const _0x5c245b=a322_0x4291,_0x543da5=_0x184bb0();while(!![]){try{const _0x4b6a66=-parseInt(_0x5c245b(0x1d9))/0x1+parseInt(_0x5c245b(0x1fa))/0x2+parseInt(_0x5c245b(0x1fb))/0x3+-parseInt(_0x5c245b(0x1f1))/0x4+parseInt(_0x5c245b(0x1d6))/0x5*(-parseInt(_0x5c245b(0x1dc))/0x6)+parseInt(_0x5c245b(0x1cf))/0x7*(parseInt(_0x5c245b(0x1d4))/0x8)+parseInt(_0x5c245b(0x1cc))/0x9;if(_0x4b6a66===_0x501993)break;else _0x543da5['push'](_0x543da5['shift']());}catch(_0x43931f){_0x543da5['push'](_0x543da5['shift']());}}}(a322_0x1092,0x5b65a));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a322_0x47fcc6(0x1e9),SKILL_NAME=a322_0x47fcc6(0x203);function frontmatterValue(_0x5b816f,_0x30c1c8){const _0x975b8e=a322_0x47fcc6;return _0x5b816f[_0x975b8e(0x1db)](new RegExp('^'+_0x30c1c8+':\x5cs*(.+)$','m'))?.[0x1]?.[_0x975b8e(0x1f9)]()??'';}function listFiles(_0x22da39,_0x5d0746=_0x22da39){const _0x1433e2=a322_0x47fcc6;return readdirSync(_0x5d0746,{'withFileTypes':!![]})[_0x1433e2(0x1f3)](_0x1d6704=>{const _0x1e5fb3=_0x1433e2,_0x23ce2e=join(_0x5d0746,_0x1d6704[_0x1e5fb3(0x1ec)]),_0x60a5f3=lstatSync(_0x23ce2e);if(_0x60a5f3['isSymbolicLink']())throw new Error(_0x1e5fb3(0x1ee)+_0x23ce2e);if(_0x60a5f3[_0x1e5fb3(0x20a)]())return listFiles(_0x22da39,_0x23ce2e);if(!_0x60a5f3[_0x1e5fb3(0x1df)]())throw new Error(_0x1e5fb3(0x1cd)+_0x23ce2e);return[relative(_0x22da39,_0x23ce2e)[_0x1e5fb3(0x1eb)](sep)[_0x1e5fb3(0x1d7)]('/')];})[_0x1433e2(0x1e3)]((_0x1d30bb,_0x4c898d)=>_0x1d30bb<_0x4c898d?-0x1:_0x1d30bb>_0x4c898d?0x1:0x0);}function digestFiles(_0x2afe2e,_0x43e7c0){const _0x59f5ef=a322_0x47fcc6,_0xf6c0d4=createHash(_0x59f5ef(0x200));for(const _0x12f977 of _0x43e7c0){if(_0x12f977[_0x59f5ef(0x1f6)]('/')||_0x12f977[_0x59f5ef(0x1eb)]('/')[_0x59f5ef(0x1fc)]('..')||_0x12f977[_0x59f5ef(0x1fc)]('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x12f977);_0xf6c0d4['update'](_0x12f977),_0xf6c0d4['update']('\x00'),_0xf6c0d4['update'](readFileSync(join(_0x2afe2e,..._0x12f977[_0x59f5ef(0x1eb)]('/')))),_0xf6c0d4['update']('\x00');}return _0xf6c0d4[_0x59f5ef(0x20b)](_0x59f5ef(0x1d0));}function sameFiles(_0x47c0e5,_0x551653){const _0x1f9165=a322_0x47fcc6;return _0x47c0e5[_0x1f9165(0x1f0)]===_0x551653[_0x1f9165(0x1f0)]&&_0x47c0e5['every']((_0x43a8e4,_0x43625c)=>_0x43a8e4===_0x551653[_0x43625c]);}function readSource(_0x5a8f7c){const _0x34aa91=a322_0x47fcc6,_0x320ba1=JSON[_0x34aa91(0x1d1)](readFileSync(join(_0x5a8f7c,'package.json'),_0x34aa91(0x1ea))),_0x5614c0=JSON[_0x34aa91(0x1d1)](readFileSync(join(_0x5a8f7c,_0x34aa91(0x1d2),_0x34aa91(0x209)),_0x34aa91(0x1ea))),_0x6c7fc5=join(_0x5a8f7c,_0x34aa91(0x1d2),SKILL_NAME),_0x12ce73=frontmatterValue(readFileSync(join(_0x6c7fc5,_0x34aa91(0x1e8)),'utf8'),_0x34aa91(0x1ed)),_0x405ce0=listFiles(_0x6c7fc5);if(_0x5614c0[_0x34aa91(0x1f8)]!==0x1||_0x5614c0[_0x34aa91(0x1ec)]!==SKILL_NAME||!_0x320ba1['version']||_0x5614c0['packageVersion']!==_0x320ba1[_0x34aa91(0x1ed)]||_0x5614c0[_0x34aa91(0x1de)]!==_0x320ba1[_0x34aa91(0x1ed)]||_0x12ce73!==_0x320ba1['version']||!sameFiles(_0x405ce0,_0x5614c0[_0x34aa91(0x1f5)])||digestFiles(_0x6c7fc5,_0x405ce0)!==_0x5614c0[_0x34aa91(0x20b)])throw new Error(_0x34aa91(0x1e5));return{'packageVersion':_0x320ba1[_0x34aa91(0x1ed)],'skillVersion':_0x12ce73,'root':_0x6c7fc5,'manifest':_0x5614c0};}function installedSkillPath(_0x2f295f){const _0x1f68c2=a322_0x47fcc6,_0x468d72=resolveInstalledSkill(SKILL_NAME,{'home':_0x2f295f});if(_0x468d72[_0x1f68c2(0x1d8)]===_0x1f68c2(0x1dd))return{'state':_0x1f68c2(0x1dd),'path':dirname(_0x468d72[_0x1f68c2(0x1f4)])};if(_0x468d72[_0x1f68c2(0x1d8)]===_0x1f68c2(0x1fe))return{'state':_0x1f68c2(0x205)};return{'state':_0x1f68c2(0x1e2),'reason':_0x468d72[_0x1f68c2(0x1e0)]};}export function inspectInstalledBuiltinSkillVersion(_0x2516da,_0x49f9ff={}){const _0x22029d=a322_0x47fcc6,_0x25317a=installedSkillPath(_0x49f9ff['home']??homedir());if(_0x25317a['state']===_0x22029d(0x205))return{'state':_0x22029d(0x205),'expectedVersion':_0x2516da,'repairCommand':REPAIR_COMMAND};if(_0x25317a['state']===_0x22029d(0x1e2))return{'state':_0x22029d(0x1e2),'expectedVersion':_0x2516da,'reason':_0x25317a[_0x22029d(0x1e0)],'repairCommand':REPAIR_COMMAND};try{const _0x2d4679=frontmatterValue(readFileSync(join(_0x25317a['path'],_0x22029d(0x1e8)),_0x22029d(0x1ea)),_0x22029d(0x1ed));return{'state':_0x2d4679===_0x2516da?_0x22029d(0x1d3):_0x22029d(0x202),'expectedVersion':_0x2516da,'skillVersion':_0x2d4679,'installedPath':_0x25317a[_0x22029d(0x1f4)],'repairCommand':REPAIR_COMMAND};}catch(_0x12ee09){return{'state':_0x22029d(0x1e2),'expectedVersion':_0x2516da,'installedPath':_0x25317a[_0x22029d(0x1f4)],'reason':_0x12ee09 instanceof Error?_0x12ee09['message']:String(_0x12ee09),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x3a063e={}){const _0x4db8cb=a322_0x47fcc6,_0x570ba5=_0x3a063e[_0x4db8cb(0x208)]??DEFAULT_PACKAGE_ROOT;let _0x4e4751;try{_0x4e4751=readSource(_0x570ba5);}catch(_0x19535e){return{'state':_0x4db8cb(0x1e2),'packageVersion':_0x4db8cb(0x1e7),'reason':_0x19535e instanceof Error?_0x19535e['message']:String(_0x19535e),'repairCommand':REPAIR_COMMAND};}const _0x20d5df=installedSkillPath(_0x3a063e['home']??homedir());if(_0x20d5df[_0x4db8cb(0x1d8)]==='missing')return{'state':_0x4db8cb(0x205),'packageVersion':_0x4e4751[_0x4db8cb(0x204)],'repairCommand':REPAIR_COMMAND};if(_0x20d5df[_0x4db8cb(0x1d8)]==='unverifiable')return{'state':_0x4db8cb(0x1e2),'packageVersion':_0x4e4751[_0x4db8cb(0x204)],'reason':_0x20d5df[_0x4db8cb(0x1e0)],'repairCommand':REPAIR_COMMAND};try{const _0x2ed055=frontmatterValue(readFileSync(join(_0x20d5df[_0x4db8cb(0x1f4)],_0x4db8cb(0x1e8)),_0x4db8cb(0x1ea)),_0x4db8cb(0x1ed));if(_0x2ed055!==_0x4e4751[_0x4db8cb(0x1de)])return{'state':_0x4db8cb(0x202),'packageVersion':_0x4e4751[_0x4db8cb(0x204)],'skillVersion':_0x2ed055,'installedPath':_0x20d5df['path'],'repairCommand':REPAIR_COMMAND};const _0x5b57f9=listFiles(_0x20d5df['path']),_0x344d3d=digestFiles(_0x20d5df[_0x4db8cb(0x1f4)],_0x5b57f9);return{'state':sameFiles(_0x5b57f9,_0x4e4751[_0x4db8cb(0x1e1)][_0x4db8cb(0x1f5)])&&_0x344d3d===_0x4e4751[_0x4db8cb(0x1e1)][_0x4db8cb(0x20b)]?_0x4db8cb(0x1d3):_0x4db8cb(0x1ce),'packageVersion':_0x4e4751[_0x4db8cb(0x204)],'skillVersion':_0x2ed055,'installedPath':_0x20d5df['path'],'digest':_0x344d3d,'repairCommand':REPAIR_COMMAND};}catch(_0x509e15){return{'state':'unverifiable','packageVersion':_0x4e4751[_0x4db8cb(0x204)],'installedPath':_0x20d5df['path'],'reason':_0x509e15 instanceof Error?_0x509e15[_0x4db8cb(0x1ff)]:String(_0x509e15),'repairCommand':REPAIR_COMMAND};}}function failure(_0x1b8099,_0x2a306e,_0x57446e,_0x26da99){const _0x327b9d=a322_0x47fcc6;return{'ok':![],'code':_0x1b8099,'packageVersion':_0x2a306e[_0x327b9d(0x204)],'skillVersion':_0x2a306e[_0x327b9d(0x1de)],'installedPath':_0x26da99,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x57446e instanceof Error?_0x57446e[_0x327b9d(0x1ff)]:String(_0x57446e)};}export function installBuiltinSkill(_0x2075d5={}){const _0x7faf1a=a322_0x47fcc6,_0x5a3812=_0x2075d5[_0x7faf1a(0x208)]??DEFAULT_PACKAGE_ROOT,_0x578e3e=_0x2075d5[_0x7faf1a(0x201)]??homedir();let _0x4c711a;try{_0x4c711a=readSource(_0x5a3812);}catch(_0xd08790){return failure(_0x7faf1a(0x1fd),{'packageVersion':'unknown','skillVersion':'unknown'},_0xd08790);}const _0x37b89a=inspectBuiltinSkill({'packageRoot':_0x5a3812,'home':_0x578e3e}),_0x3fb047=runNpxSkillsAddGlobal(_0x5a3812,_0x4c711a[_0x7faf1a(0x1d5)],{'stdio':_0x2075d5[_0x7faf1a(0x1da)]??_0x7faf1a(0x1e4),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x578e3e}});if(_0x3fb047[_0x7faf1a(0x1ef)])return{'ok':!![],'packageVersion':_0x4c711a[_0x7faf1a(0x204)],'skillVersion':_0x4c711a['skillVersion'],'installedPath':_0x37b89a[_0x7faf1a(0x207)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3fb047['ok'])return failure('INSTALL_FAILED',_0x4c711a,_0x3fb047['error']??_0x7faf1a(0x206)+_0x3fb047[_0x7faf1a(0x1e6)]);const _0x3f8923=inspectBuiltinSkill({'packageRoot':_0x5a3812,'home':_0x578e3e});if(_0x3f8923[_0x7faf1a(0x1d8)]!==_0x7faf1a(0x1d3))return failure(_0x7faf1a(0x1f2),_0x4c711a,_0x3f8923[_0x7faf1a(0x1e0)]??_0x7faf1a(0x1f7)+_0x3f8923[_0x7faf1a(0x1d8)],_0x3f8923[_0x7faf1a(0x207)]);return{'ok':!![],'packageVersion':_0x4c711a[_0x7faf1a(0x204)],'skillVersion':_0x4c711a[_0x7faf1a(0x1de)],'installedPath':_0x3f8923[_0x7faf1a(0x207)],'changed':_0x37b89a[_0x7faf1a(0x1d8)]!=='current','repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e899c,_0x4951f3){const _0x59f7ed=a323_0x46d8,_0x4a7875=_0x5e899c();while(!![]){try{const _0x411b55=parseInt(_0x59f7ed(0x1a1))/0x1*(parseInt(_0x59f7ed(0x1be))/0x2)+-parseInt(_0x59f7ed(0x1ab))/0x3+parseInt(_0x59f7ed(0x1ae))/0x4*(parseInt(_0x59f7ed(0x19f))/0x5)+parseInt(_0x59f7ed(0x1aa))/0x6*(-parseInt(_0x59f7ed(0x19e))/0x7)+parseInt(_0x59f7ed(0x1a4))/0x8+parseInt(_0x59f7ed(0x1af))/0x9+parseInt(_0x59f7ed(0x1bc))/0xa*(-parseInt(_0x59f7ed(0x1a9))/0xb);if(_0x411b55===_0x4951f3)break;else _0x4a7875['push'](_0x4a7875['shift']());}catch(_0x5dd004){_0x4a7875['push'](_0x4a7875['shift']());}}}(a323_0x2237,0xae19d));function a323_0x2237(){const _0x1ba11d=['entries','startsWith','706010KaXiVg','from','2bVxGag','length','1687ELzdYs','2113600ZGdOrZ','toLowerCase','1139603nxMtja','push','Public\x20Open\x20Skill\x20source:\x20','10907072ktbeTQ','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','setLogPath','replace','253HmZwCl','2154uNXDPE','2230509tBsScW','includes','log','4EIMsHi','2171295lVaZsX','exit','error','\x0aAvailable\x20commands:','dangerously-bff-save','-$1','Error:\x20Unsupported\x20command:\x20','Unsupported\x20command:\x20','argv','skill','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20'];a323_0x2237=function(){return _0x1ba11d;};return a323_0x2237();}import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';function a323_0x46d8(_0x31b04c,_0x4d0dbc){_0x31b04c=_0x31b04c-0x19e;const _0x2237f5=a323_0x2237();let _0x46d8fb=_0x2237f5[_0x31b04c];return _0x46d8fb;}export function camelCaseFlagsToKebab(_0x21beeb){const _0x13a31d=a323_0x46d8,_0x1ec2a2=[];for(const [_0x121eb9,_0x480589]of Object[_0x13a31d(0x1ba)](_0x21beeb)){if(_0x480589===!![]){const _0x23f69b=_0x121eb9[_0x13a31d(0x1a8)](/([A-Z])/g,_0x13a31d(0x1b4))[_0x13a31d(0x1a0)]();_0x1ec2a2[_0x13a31d(0x1a2)](_0x23f69b);}}return _0x1ec2a2;}export function parseDynamicFlags(){const _0x1fd652=a323_0x46d8,_0xfe8dd0=[];for(let _0xcd818a=0x3;_0xcd818a<process[_0x1fd652(0x1b7)][_0x1fd652(0x1bf)];_0xcd818a++){const _0x1f600a=process['argv'][_0xcd818a];if(_0x1f600a&&_0x1f600a[_0x1fd652(0x1bb)]('--')){const _0x3d7226=_0x1f600a['slice'](0x2);_0x3d7226&&!_0x3d7226[_0x1fd652(0x1ac)]('=')&&_0xfe8dd0[_0x1fd652(0x1a2)](_0x3d7226);}}return _0xfe8dd0;}export function getAllProvidedFlags(_0x35ff8e){const _0x90983e=camelCaseFlagsToKebab(_0x35ff8e),_0x7afda2=parseDynamicFlags(),_0x11f1a2=new Set([..._0x90983e,..._0x7afda2]);return Array['from'](_0x11f1a2);}export function normalizeLegacyBffSaveFlags(_0x5cfc9c){const _0x298717=a323_0x46d8,_0x39e9f5=new Set(_0x5cfc9c);return _0x39e9f5['has'](_0x298717(0x1b3))&&_0x39e9f5['add']('enable-bff-save'),Array[_0x298717(0x1bd)](_0x39e9f5);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x16a684,_0x11f98b,_0xb83f10){const _0x319ecf=a323_0x46d8;logger[_0x319ecf(0x1a7)](process['cwd']());if(_0xb83f10?.['help']||_0x16a684==='--help'){showHelp();return;}console[_0x319ecf(0x1b1)](_0x319ecf(0x1b5)+(_0x16a684||'(empty)')),console[_0x319ecf(0x1ad)](_0x319ecf(0x1b2)),console[_0x319ecf(0x1ad)]('\x20\x20'+CLI_BIN_NAME+'\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill'),console[_0x319ecf(0x1ad)](''),console[_0x319ecf(0x1ad)](_0x319ecf(0x1a3)+SKILLS_INSTALL_COMMAND_LINE),logger['error'](_0x319ecf(0x1b8),_0x319ecf(0x1b6)+_0x16a684),process[_0x319ecf(0x1b0)](0x1);}function showHelp(){const _0x7a8184=a323_0x46d8;console[_0x7a8184(0x1ad)](_0x7a8184(0x1a6)+CLI_BIN_NAME+_0x7a8184(0x1b9)+SKILLS_INSTALL_COMMAND_LINE+_0x7a8184(0x1a5));}
|
|
@@ -18,10 +18,6 @@ export declare const NPX_SKILLS_SUBCOMMAND_ADD: "add";
|
|
|
18
18
|
export declare const NPX_SKILLS_FLAG_SKILL: "--skill";
|
|
19
19
|
/** 当前官方 rabetbase skill 源标识(GitHub 式 repo/slug) */
|
|
20
20
|
export declare const RABETBASE_SKILL_SOURCE = "lovrabet/rabetbase";
|
|
21
|
-
/** 历史旧 skill 源,仅用于升级迁移时移除旧安装 */
|
|
22
|
-
export declare const LEGACY_RABETBASE_SKILL_SOURCE = "lovrabet/lovrabet-skill";
|
|
23
|
-
/** 旧安装迁移时使用的历史 skill 名称。默认安装不再依赖 `--skill`。 */
|
|
24
|
-
export declare const DEFAULT_RABETBASE_SKILL_NAME = "Lovrabet";
|
|
25
21
|
/** 全局安装后的 Skill 名(即全局 Skill 目录名),与安装源写法解耦 */
|
|
26
22
|
export declare const RABETBASE_GLOBAL_SKILL_NAME = "rabetbase";
|
|
27
23
|
/** CodeUp Git 真源,与官方 shorthand 安装同一个全局 Skill */
|
|
@@ -87,12 +83,6 @@ export declare function shouldSkipNpxSkillsAdd(): boolean;
|
|
|
87
83
|
* @param options.skill - 可选 `--skill` 名称;仅显式筛选多 skill 包时使用
|
|
88
84
|
*/
|
|
89
85
|
export declare function runNpxSkillsAdd(projectRoot: string, options?: RunNpxSkillsAddOptions): RunNpxSkillsAddResult;
|
|
90
|
-
/**
|
|
91
|
-
* 执行 `npx -y skills remove lovrabet/lovrabet-skill --skill Lovrabet`
|
|
92
|
-
*
|
|
93
|
-
* 与 {@link runNpxSkillsAdd} 相同:若设置 `RABETBASE_SKIP_NPX_SKILLS=1` 则跳过(供升级流程自动化测试)。
|
|
94
|
-
*/
|
|
95
|
-
export declare function runNpxSkillsRemove(projectRoot: string, options?: RunNpxSkillsAddOptions, source?: string): RunNpxSkillsAddResult;
|
|
96
86
|
/**
|
|
97
87
|
* 执行与 `npx skills add <source> -g -y` 等价的全局安装调用。
|
|
98
88
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a324_0x3363a8=a324_0x9657;(function(_0x45c9aa,_0x1a1d6d){const _0x430466=a324_0x9657,_0x465998=_0x45c9aa();while(!![]){try{const _0x29d329=-parseInt(_0x430466(0x1d4))/0x1+-parseInt(_0x430466(0x1c4))/0x2*(parseInt(_0x430466(0x1c2))/0x3)+parseInt(_0x430466(0x1cb))/0x4*(parseInt(_0x430466(0x1ef))/0x5)+parseInt(_0x430466(0x1cd))/0x6*(parseInt(_0x430466(0x1dd))/0x7)+parseInt(_0x430466(0x1de))/0x8*(-parseInt(_0x430466(0x1df))/0x9)+-parseInt(_0x430466(0x1cc))/0xa+-parseInt(_0x430466(0x1d9))/0xb*(-parseInt(_0x430466(0x1f0))/0xc);if(_0x29d329===_0x1a1d6d)break;else _0x465998['push'](_0x465998['shift']());}catch(_0x182c18){_0x465998['push'](_0x465998['shift']());}}}(a324_0x1ce9,0xf27f5));import{execaSync}from'execa';function a324_0x9657(_0x1c9858,_0x3bcd79){_0x1c9858=_0x1c9858-0x1bf;const _0x1ce903=a324_0x1ce9();let _0x96579d=_0x1ce903[_0x1c9858];return _0x96579d;}import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI='skills@latest';export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a324_0x3363a8(0x1d1);export const RABETBASE_GLOBAL_SKILL_NAME='rabetbase';export const RABETBASE_SKILL_GIT_SOURCE=a324_0x3363a8(0x1c5);export function resolveGlobalSkillName(_0x38f302){const _0x224f35=a324_0x3363a8;switch(_0x38f302[_0x224f35(0x1ce)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x111be7){const _0x5e05bf=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x111be7&&_0x5e05bf['push'](NPX_SKILLS_FLAG_SKILL,_0x111be7),_0x5e05bf;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a324_0x3363a8(0x1cf),...buildNpxSkillsAddArgv()][a324_0x3363a8(0x1d0)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a324_0x3363a8(0x1cf),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a324_0x3363a8(0x1d0)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x2b3da2,_0x5da0ac,_0x1931b7){return{'ok':![],'status':_0x5da0ac,'code':_0x2b3da2,'error':'['+_0x2b3da2+']\x20'+_0x1931b7};}function execaOptions(_0x3466bf,_0x342474){const _0x9762c2=a324_0x3363a8,_0x5277ea={...process.env};return delete _0x5277ea[_0x9762c2(0x1bf)],delete _0x5277ea[_0x9762c2(0x1d8)],{'cwd':_0x3466bf,'stdio':_0x342474,'env':_0x5277ea,'extendEnv':![],'shell':![],'reject':![],..._0x342474===_0x9762c2(0x1eb)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x3eca56,_0x4616ea,_0xc359f2,_0x573ae2){const _0x4a762e=a324_0x3363a8,_0x52704d=[_0x3eca56[_0x4a762e(0x1ec)]?String(_0x3eca56[_0x4a762e(0x1ec)]):'',_0x3eca56[_0x4a762e(0x1d2)]?String(_0x3eca56[_0x4a762e(0x1d2)]):'']['filter'](Boolean)[_0x4a762e(0x1d0)]('\x0a')[_0x4a762e(0x1ce)](),_0x39d51d=_0x3eca56['exitCode']??null;_0x573ae2!==_0x4a762e(0x1eb)&&_0x52704d&&console['log'](_0x52704d);if(_0x3eca56[_0x4a762e(0x1ea)]){const _0x3624b2=_0x3eca56[_0x4a762e(0x1ea)]===_0x4a762e(0x1c6)?_0x4a762e(0x1d7):_0x3eca56[_0x4a762e(0x1ea)]==='EPERM'||_0x3eca56[_0x4a762e(0x1ea)]===_0x4a762e(0x1c3)?'PERMISSION_DENIED':'SPAWN_FAILED';return failure(_0x3624b2,_0x39d51d,_0x3eca56[_0x4a762e(0x1c9)]??_0x3eca56[_0x4a762e(0x1c1)]??_0x3eca56[_0x4a762e(0x1ea)]);}if(_0x3eca56[_0x4a762e(0x1ee)])return failure('CHILD_TERMINATED',_0x39d51d,_0x4a762e(0x1ed)+_0x3eca56[_0x4a762e(0x1ee)]);if(_0x3eca56['failed']&&_0x39d51d===null)return failure(_0x4a762e(0x1e7),_0x39d51d,_0x3eca56[_0x4a762e(0x1c9)]??_0x3eca56['message']??'npx\x20failed\x20to\x20start');if(_0x39d51d!==0x0)return failure(_0x4a762e(0x1e1),_0x39d51d,_0x52704d||_0x3eca56[_0x4a762e(0x1c9)]||_0x4a762e(0x1d5)+(_0x39d51d??_0x4a762e(0x1e3)));const _0x123e7d=_0x4616ea?resolveInstalledSkill(_0x4616ea,_0xc359f2):undefined,_0x661fa6=_0x52704d[_0x4a762e(0x1e2)](/Failed to install\s+(\d+)/i);if(_0x661fa6&&Number(_0x661fa6[0x1])>0x0){const _0x5f384d=_0x4a762e(0x1e6)+_0x661fa6[0x1]+'\x20failed\x20target(s)'+(_0x52704d?':\x0a'+_0x52704d:'');if(_0x123e7d?.[_0x4a762e(0x1e9)]===_0x4a762e(0x1c0))return console[_0x4a762e(0x1c7)]('!\x20'+_0x5f384d),{'ok':!![],'status':0x0};return failure(_0x4a762e(0x1e4),0x0,_0x5f384d);}if(_0x123e7d){if(_0x123e7d[_0x4a762e(0x1e9)]===_0x4a762e(0x1d3))return failure(_0x4a762e(0x1e5),0x0,_0x4a762e(0x1f1)+_0x4616ea+_0x4a762e(0x1db)+_0x123e7d['checked'][_0x4a762e(0x1d0)](',\x20')+')');_0x123e7d['state']===_0x4a762e(0x1d6)&&console[_0x4a762e(0x1c7)](_0x4a762e(0x1da)+_0x4616ea+_0x4a762e(0x1dc)+_0x123e7d['reason']);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x5a24d4,_0x304a24){const _0x8f7bbd=a324_0x3363a8;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4a9c22=_0x304a24?.['stdio']??_0x8f7bbd(0x1e0),_0x28575a=buildNpxSkillsAddArgv(_0x304a24?.['skill']),_0x3eea54=[_0x8f7bbd(0x1cf),..._0x28575a][_0x8f7bbd(0x1d0)]('\x20');console[_0x8f7bbd(0x1ca)]('*\x20'+_0x3eea54);const _0xb1e55e=execaSync(_0x8f7bbd(0x1cf),_0x28575a,execaOptions(_0x5a24d4,_0x4a9c22));return normalizeExecaResult(_0xb1e55e,undefined,undefined,_0x4a9c22);}export function runNpxSkillsAddGlobal(_0x1063af,_0x4ff3b3,_0x2668c2){const _0x32d5ea=a324_0x3363a8;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5bc349=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x4ff3b3,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x2cdf51=[_0x32d5ea(0x1cf),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x4ff3b3,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x32d5ea(0x1d0)]('\x20');console['log']('*\x20'+_0x2cdf51);const _0x26404e=execaSync(_0x32d5ea(0x1cf),_0x5bc349,execaOptions(_0x1063af,_0x32d5ea(0x1eb)));return normalizeExecaResult(_0x26404e,_0x2668c2?.['expectedSkillName']??resolveGlobalSkillName(_0x4ff3b3),_0x2668c2?.[_0x32d5ea(0x1c8)],_0x2668c2?.[_0x32d5ea(0x1e8)]);}function a324_0x1ce9(){const _0x2d339a=['pipe','stdout','npx\x20terminated\x20by\x20signal\x20','signal','275WngJar','22584bqZTYY','Skill\x20\x22','npm_config_global','present','message','516kCPAGG','EACCES','16618DnGixZ','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','ENOENT','warn','presence','shortMessage','log','68344oxDikY','10498480kuOtxM','12naITlf','trim','npx','join','lovrabet/rabetbase','stderr','absent','608223CyVzUR','exit\x20','unverifiable','NPX_NOT_FOUND','NPM_CONFIG_GLOBAL','17193iWbXlp','!\x20Could\x20not\x20verify\x20\x22','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','\x22\x20install\x20state:\x20','1814099idrERA','16YGZqjL','1436049HNDjrE','inherit','CHILD_EXIT_NONZERO','match','unknown','INSTALL_PARTIAL','SKILL_NOT_INSTALLED','Installer\x20reported\x20','SPAWN_FAILED','stdio','state','code'];a324_0x1ce9=function(){return _0x2d339a;};return a324_0x1ce9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a325_0x1d92e1=a325_0x5259;(function(_0x586b74,_0x950e01){const _0x4ec1c8=a325_0x5259,_0x847d42=_0x586b74();while(!![]){try{const _0x5d3f97=parseInt(_0x4ec1c8(0x11e))/0x1+parseInt(_0x4ec1c8(0x11b))/0x2+parseInt(_0x4ec1c8(0x114))/0x3+parseInt(_0x4ec1c8(0x108))/0x4*(parseInt(_0x4ec1c8(0x11a))/0x5)+parseInt(_0x4ec1c8(0x125))/0x6+parseInt(_0x4ec1c8(0x109))/0x7+parseInt(_0x4ec1c8(0x10b))/0x8*(-parseInt(_0x4ec1c8(0x122))/0x9);if(_0x5d3f97===_0x950e01)break;else _0x847d42['push'](_0x847d42['shift']());}catch(_0x4b938a){_0x847d42['push'](_0x847d42['shift']());}}}(a325_0x4e1e,0x4052f));import{existsSync,readFileSync}from'node:fs';function a325_0x4e1e(){const _0x2382a4=['5064pwXpJJ','home','find','\x20records\x20\x22','map','reason','number','lockFile','version','737802xcQYkw','parse','unusable','.agents','object','not-recorded','400wuDEIY','532852mwjwvO','.skill-lock.json','globalSkillsDirs','100675pDbXTw','\x20uses\x20unsupported\x20version\x20','absent','present','16821kmylVv','utf8','\x20has\x20no\x20skills\x20map','1009854vIKMBb','recorded','skills','.claude','9596GGaZne','3312988GQZZgT','kind'];a325_0x4e1e=function(){return _0x2382a4;};return a325_0x4e1e();}import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a325_0x1d92e1(0x117),a325_0x1d92e1(0x11c));function a325_0x5259(_0x2d46ab,_0x4c09bf){_0x2d46ab=_0x2d46ab-0x107;const _0x4e1e57=a325_0x4e1e();let _0x525973=_0x4e1e57[_0x2d46ab];return _0x525973;}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a325_0x1d92e1(0x127)),join(a325_0x1d92e1(0x107),a325_0x1d92e1(0x127))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x5e4685,_0x2f0b92){const _0x41fafe=a325_0x1d92e1;if(!existsSync(_0x5e4685))return{'kind':_0x41fafe(0x119)};let _0x27dcd9;try{_0x27dcd9=JSON[_0x41fafe(0x115)](readFileSync(_0x5e4685,_0x41fafe(0x123)));}catch(_0x2e2916){return{'kind':_0x41fafe(0x116),'reason':_0x5e4685+'\x20is\x20unreadable:\x20'+_0x2e2916['message']};}const _0x14c91c=_0x27dcd9;if(typeof _0x14c91c?.[_0x41fafe(0x113)]!==_0x41fafe(0x111)||!SUPPORTED_LOCK_VERSIONS['includes'](_0x14c91c[_0x41fafe(0x113)]))return{'kind':_0x41fafe(0x116),'reason':_0x5e4685+_0x41fafe(0x11f)+String(_0x14c91c?.[_0x41fafe(0x113)])};if(!_0x14c91c[_0x41fafe(0x127)]||typeof _0x14c91c[_0x41fafe(0x127)]!==_0x41fafe(0x118))return{'kind':_0x41fafe(0x116),'reason':_0x5e4685+_0x41fafe(0x124)};return _0x14c91c[_0x41fafe(0x127)][_0x2f0b92]?{'kind':_0x41fafe(0x126)}:{'kind':_0x41fafe(0x119)};}export function resolveInstalledSkill(_0x50fdf6,_0x1f13bd){const _0x1148fd=a325_0x1d92e1,_0x3e237b=_0x1f13bd?.[_0x1148fd(0x10c)]??homedir(),_0x803fe9=_0x1f13bd?.[_0x1148fd(0x11d)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x1148fd(0x10f)](_0x53e810=>join(_0x3e237b,_0x53e810)),_0x49748f=_0x1f13bd?.[_0x1148fd(0x112)]??join(_0x3e237b,SKILL_LOCK_RELATIVE_PATH),_0x78aaee=_0x803fe9[_0x1148fd(0x10f)](_0x20250b=>join(_0x20250b,_0x50fdf6,'SKILL.md')),_0x151ec0=_0x78aaee[_0x1148fd(0x10d)](_0x17907a=>existsSync(_0x17907a));if(_0x151ec0)return{'state':_0x1148fd(0x121),'path':_0x151ec0};const _0x91c30d=readLockLookup(_0x49748f,_0x50fdf6);if(_0x91c30d[_0x1148fd(0x10a)]==='unusable')return{'state':'unverifiable','reason':_0x91c30d[_0x1148fd(0x110)]};if(_0x91c30d[_0x1148fd(0x10a)]===_0x1148fd(0x126))return{'state':'unverifiable','reason':_0x49748f+_0x1148fd(0x10e)+_0x50fdf6+'\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'+('('+_0x78aaee['join'](',\x20')+')')};return{'state':_0x1148fd(0x120),'checked':_0x78aaee};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d2a85,_0x4fe9cd){const _0x300243=a326_0x5099,_0x2e889f=_0x4d2a85();while(!![]){try{const _0x9bc7d5=parseInt(_0x300243(0xbc))/0x1+-parseInt(_0x300243(0xc4))/0x2+-parseInt(_0x300243(0xb9))/0x3+parseInt(_0x300243(0xbe))/0x4+-parseInt(_0x300243(0xc3))/0x5+-parseInt(_0x300243(0xc0))/0x6+-parseInt(_0x300243(0xc6))/0x7*(-parseInt(_0x300243(0xbd))/0x8);if(_0x9bc7d5===_0x4fe9cd)break;else _0x2e889f['push'](_0x2e889f['shift']());}catch(_0x3b819a){_0x2e889f['push'](_0x2e889f['shift']());}}}(a326_0x3d1c,0x7860e));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x3bd177){const _0x28030a=a326_0x5099;return SENSITIVE_PATTERNS[_0x28030a(0xbf)](_0x2c5bb7=>_0x2c5bb7[_0x28030a(0xb6)](_0x3bd177));}function sanitizeFlags(_0x10f911){const _0x383db2=a326_0x5099,_0x1c5642={};for(const [_0x4914dc,_0x21f3bb]of Object[_0x383db2(0xb7)](_0x10f911)){isSensitiveKey(_0x4914dc)?_0x1c5642[_0x4914dc]=_0x21f3bb!=null&&_0x21f3bb!==''?_0x383db2(0xb8):_0x21f3bb:_0x1c5642[_0x4914dc]=_0x21f3bb;}return _0x1c5642;}function a326_0x3d1c(){const _0x21c303=['some','2133612lgVWsX','durationMs','stringify','3213190Tzzhhc','624276lVPpYY','command','1728629PyKuLw','service','error','test','entries','[REDACTED]','135030mJNNUY','rabetbase.command','flags','645895ApunMP','8wbrQxh','3822464gzMAGp'];a326_0x3d1c=function(){return _0x21c303;};return a326_0x3d1c();}function a326_0x5099(_0xe5488b,_0x780c5a){_0xe5488b=_0xe5488b-0xb4;const _0x3d1cfb=a326_0x3d1c();let _0x5099e0=_0x3d1cfb[_0xe5488b];return _0x5099e0;}export async function reportCommandTrace(_0x3af710){const _0x541bf5=a326_0x5099;try{const _0x3a5f8d=sanitizeFlags(_0x3af710[_0x541bf5(0xbb)]);await sendCliTraceLog({'spanName':_0x541bf5(0xba),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x3af710[_0x541bf5(0xb4)],'command.name':_0x3af710[_0x541bf5(0xc5)],'command.flags':JSON[_0x541bf5(0xc2)](_0x3a5f8d),..._0x3af710[_0x541bf5(0xc1)]!=null?{'command.duration_ms':_0x3af710[_0x541bf5(0xc1)]}:{},..._0x3af710['error']?{'command.error':_0x3af710[_0x541bf5(0xb5)]instanceof Error?_0x3af710['error']['message']:String(_0x3af710[_0x541bf5(0xb5)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5074b1,_0x508b53){var _0x31c655=a327_0x3b9f,_0x3011e6=_0x5074b1();while(!![]){try{var _0x25e1ca=-parseInt(_0x31c655(0x92))/0x1+parseInt(_0x31c655(0x90))/0x2*(-parseInt(_0x31c655(0x8d))/0x3)+parseInt(_0x31c655(0x8b))/0x4+parseInt(_0x31c655(0x8a))/0x5+-parseInt(_0x31c655(0x89))/0x6+parseInt(_0x31c655(0x8e))/0x7+parseInt(_0x31c655(0x91))/0x8;if(_0x25e1ca===_0x508b53)break;else _0x3011e6['push'](_0x3011e6['shift']());}catch(_0x5cea92){_0x3011e6['push'](_0x3011e6['shift']());}}}(a327_0x46bc,0xd063b));function a327_0x46bc(){var _0x3739d4=['cli.help','6417rvYMPt','3521021JfIGJc','error','794GrcfLp','12673264FJdUsy','1407381SXGRFC','Failed\x20to\x20report\x20CLI\x20help\x20trace:','service','5130192jYNKyL','3639085yAhNgL','4600724blDoDf'];a327_0x46bc=function(){return _0x3739d4;};return a327_0x46bc();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a327_0x3b9f(_0x1fe945,_0x210527){_0x1fe945=_0x1fe945-0x87;var _0x46bcbc=a327_0x46bc();var _0x3b9f59=_0x46bcbc[_0x1fe945];return _0x3b9f59;}export async function reportCliHelpTrace(_0x5798df,_0x19cb70){var _0x390bca=a327_0x3b9f;try{await sendCliTraceLog({'spanName':_0x390bca(0x8c),'logData':{'rabetbase.help.kind':_0x5798df,..._0x19cb70?.[_0x390bca(0x88)]&&{'rabetbase.help.service':_0x19cb70[_0x390bca(0x88)]}}});}catch(_0x47758b){console[_0x390bca(0x8f)](_0x390bca(0x87),_0x47758b);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23c836,_0xf7a594){const _0x598715=a328_0xf45e,_0x4f6d83=_0x23c836();while(!![]){try{const _0x99fe7a=parseInt(_0x598715(0x1b3))/0x1+-parseInt(_0x598715(0x1bb))/0x2+parseInt(_0x598715(0x1b0))/0x3+parseInt(_0x598715(0x1b1))/0x4+-parseInt(_0x598715(0x1bc))/0x5*(parseInt(_0x598715(0x1b6))/0x6)+parseInt(_0x598715(0x1b7))/0x7*(-parseInt(_0x598715(0x1b9))/0x8)+parseInt(_0x598715(0x1b5))/0x9;if(_0x99fe7a===_0xf7a594)break;else _0x4f6d83['push'](_0x4f6d83['shift']());}catch(_0x12bf02){_0x4f6d83['push'](_0x4f6d83['shift']());}}}(a328_0x4692,0x50250));function a328_0x4692(){const _0x10f086=['246189orEiMg','1960324FXbbnj','tenant_code','155964JEtVrc','daily','5751936FxAKRp','286158SdiIuR','1536094cShCFM','nickname','8EVkZtb','username','494364rqsjju','60uuUFpB','user'];a328_0x4692=function(){return _0x10f086;};return a328_0x4692();}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';function a328_0xf45e(_0x7b4707,_0xc14be1){_0x7b4707=_0x7b4707-0x1b0;const _0x469253=a328_0x4692();let _0xf45e71=_0x469253[_0x7b4707];return _0xf45e71;}import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x531f11=a328_0xf45e,_0x49d455=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x474fdf=_0x49d455?.[_0x531f11(0x1bd)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x531f11(0x1b4):'production')}),setUserContext({'id':_0x474fdf?.['id'],'username':_0x474fdf?.[_0x531f11(0x1ba)],'nickname':_0x474fdf?.[_0x531f11(0x1b8)],'email':_0x474fdf?.['email'],'tenantCode':_0x474fdf?.['tenant']?.[_0x531f11(0x1b2)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x49d455;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47756a,_0x2f7fc2){const _0x5aa8ff=a329_0x14d6,_0x28faf1=_0x47756a();while(!![]){try{const _0x2c61ec=-parseInt(_0x5aa8ff(0xed))/0x1+-parseInt(_0x5aa8ff(0xf8))/0x2*(parseInt(_0x5aa8ff(0xf9))/0x3)+-parseInt(_0x5aa8ff(0xfa))/0x4*(-parseInt(_0x5aa8ff(0xf6))/0x5)+parseInt(_0x5aa8ff(0xf1))/0x6+-parseInt(_0x5aa8ff(0xf0))/0x7+parseInt(_0x5aa8ff(0xf7))/0x8+-parseInt(_0x5aa8ff(0xef))/0x9*(-parseInt(_0x5aa8ff(0xf3))/0xa);if(_0x2c61ec===_0x2f7fc2)break;else _0x28faf1['push'](_0x28faf1['shift']());}catch(_0x53bd75){_0x28faf1['push'](_0x28faf1['shift']());}}}(a329_0x4d1b,0xce5c1));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}function a329_0x14d6(_0x2d7ebd,_0x5ecf9e){_0x2d7ebd=_0x2d7ebd-0xed;const _0x4d1b10=a329_0x4d1b();let _0x14d61b=_0x4d1b10[_0x2d7ebd];return _0x14d61b;}export function registerOtelShutdownOnExit(){const _0x285741=a329_0x14d6;process['once']('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x2079fb=()=>{const _0x50dc4d=a329_0x14d6;void flushOtelNodeIfUsed()[_0x50dc4d(0xf5)](()=>process[_0x50dc4d(0xf4)](0x0));};process[_0x285741(0xfb)](_0x285741(0xf2),_0x2079fb),process[_0x285741(0xfb)](_0x285741(0xee),_0x2079fb);}export async function exitWithOtelShutdown(_0xd4cb39){const _0x2ff7d0=a329_0x14d6;await flushOtelNodeIfUsed(),process[_0x2ff7d0(0xf4)](_0xd4cb39);}function a329_0x4d1b(){const _0x4d2129=['728124xQeMRf','SIGTERM','324135VrLQUU','6955893PkmeBH','4354716KLjSRJ','SIGINT','510uGFhpk','exit','then','868055cIjWiV','8603832gguFWg','6XfssyW','1591791jByeoF','12tgpgHG','once'];a329_0x4d1b=function(){return _0x4d2129;};return a329_0x4d1b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a330_0x23c3(_0x18ab5b,_0x27eb91){_0x18ab5b=_0x18ab5b-0x1e0;const _0x4efd96=a330_0x4efd();let _0x23c337=_0x4efd96[_0x18ab5b];return _0x23c337;}const a330_0x7c57fe=a330_0x23c3;(function(_0x3b2550,_0x4c362d){const _0x3978f5=a330_0x23c3,_0x4fc99b=_0x3b2550();while(!![]){try{const _0x33994d=-parseInt(_0x3978f5(0x1e7))/0x1*(parseInt(_0x3978f5(0x1e6))/0x2)+parseInt(_0x3978f5(0x1ec))/0x3*(parseInt(_0x3978f5(0x1e0))/0x4)+-parseInt(_0x3978f5(0x1e3))/0x5+-parseInt(_0x3978f5(0x1e8))/0x6*(-parseInt(_0x3978f5(0x1ea))/0x7)+-parseInt(_0x3978f5(0x1e9))/0x8*(parseInt(_0x3978f5(0x1ed))/0x9)+parseInt(_0x3978f5(0x1e4))/0xa*(-parseInt(_0x3978f5(0x1e2))/0xb)+parseInt(_0x3978f5(0x1f1))/0xc*(parseInt(_0x3978f5(0x1ee))/0xd);if(_0x33994d===_0x4c362d)break;else _0x4fc99b['push'](_0x4fc99b['shift']());}catch(_0xc70715){_0x4fc99b['push'](_0x4fc99b['shift']());}}}(a330_0x4efd,0xc0a5f));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a330_0x4efd(){const _0x485b08=['5732150HfpDZI','1030DdnVmr','version','12IXNfCI','151661QrJkrK','198MufDdV','200ApZkcv','126203hCZOIq','traceparent','2220147ekRPyW','494055bvPugY','81133upxVsl','traceName','rabetbase-cli','8568CJHOju','4bOtbea','manual','168014IOihAv'];a330_0x4efd=function(){return _0x485b08;};return a330_0x4efd();}const DEFAULT_TRACE_NAME=a330_0x7c57fe(0x1f0);export async function sendCliTraceLog(_0x5473a2){const _0x2fae8e=a330_0x7c57fe;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x5473a2[_0x2fae8e(0x1ef)]??DEFAULT_TRACE_NAME,'version':_0x5473a2[_0x2fae8e(0x1e5)]??getCliVersion(),'spanName':_0x5473a2['spanName'],'eventType':_0x2fae8e(0x1e1),'logData':_0x5473a2['logData'],..._0x5473a2['traceparent']&&{'traceparent':_0x5473a2[_0x2fae8e(0x1eb)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x420480,_0x30ad60){const _0x9ee09e=a331_0x28a3,_0xca17e7=_0x420480();while(!![]){try{const _0xdc488d=parseInt(_0x9ee09e(0x79))/0x1+-parseInt(_0x9ee09e(0x81))/0x2+parseInt(_0x9ee09e(0x7e))/0x3+-parseInt(_0x9ee09e(0x7a))/0x4*(parseInt(_0x9ee09e(0x82))/0x5)+-parseInt(_0x9ee09e(0x84))/0x6*(parseInt(_0x9ee09e(0x7d))/0x7)+-parseInt(_0x9ee09e(0x7c))/0x8*(parseInt(_0x9ee09e(0x80))/0x9)+-parseInt(_0x9ee09e(0x74))/0xa*(-parseInt(_0x9ee09e(0x7f))/0xb);if(_0xdc488d===_0x30ad60)break;else _0xca17e7['push'](_0xca17e7['shift']());}catch(_0x2d567e){_0xca17e7['push'](_0xca17e7['shift']());}}}(a331_0x4024,0x2e43e));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a331_0x4024(){const _0x79d47c=['redactionCount','894ddvTyC','truncated','2290JMHaYG','originalBytes','title','description','sanitize','181745yabtSG','4568nfMfTr','redactionKinds','16XkybRi','15771nbkBFY','762396fgAREx','24244QGtwoa','424701bembpK','9364ZFivox','1385xYwUGQ'];a331_0x4024=function(){return _0x79d47c;};return a331_0x4024();}export const PLATFORM_ISSUE_TRACE_NAME='platform-issue-log-collect';function a331_0x28a3(_0x43bce7,_0x37de89){_0x43bce7=_0x43bce7-0x74;const _0x402405=a331_0x4024();let _0x28a3d5=_0x402405[_0x43bce7];return _0x28a3d5;}export const PLATFORM_ISSUE_SPAN_NAME='issue.log.collect';export async function sendPlatformIssueCollectLog(_0x1c8a58){const _0x1885c8=a331_0x28a3;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x1c8a58[_0x1885c8(0x76)],'issue.description':_0x1c8a58[_0x1885c8(0x77)],..._0x1c8a58[_0x1885c8(0x78)]?{'issue.description_original_bytes':_0x1c8a58['sanitize'][_0x1885c8(0x75)],'issue.description_truncated':_0x1c8a58[_0x1885c8(0x78)][_0x1885c8(0x85)],'issue.description_redactions':_0x1c8a58[_0x1885c8(0x78)][_0x1885c8(0x83)],'issue.description_redaction_kinds':_0x1c8a58[_0x1885c8(0x78)][_0x1885c8(0x7b)]['join'](',')}:{}}});}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface FetchModelListResult {
|
|
|
36
36
|
* api.ts / client.ts 的 CLI 写入动作。
|
|
37
37
|
* `preserved` 表示文件已存在且本次未覆盖,Agent 必须按 data.models 合并。
|
|
38
38
|
*/
|
|
39
|
-
export type ApiPullFileAction = "created" | "overwritten" | "preserved" | "refreshed";
|
|
39
|
+
export type ApiPullFileAction = "created" | "overwritten" | "preserved" | "refreshed" | "missing";
|
|
40
40
|
export interface ApiPullFileStatus {
|
|
41
41
|
path: string;
|
|
42
42
|
action: ApiPullFileAction;
|
|
@@ -54,6 +54,12 @@ export interface GenerateApiFileResult {
|
|
|
54
54
|
apiFilePath: string;
|
|
55
55
|
clientFilePath: string;
|
|
56
56
|
sdkConfigPath: string;
|
|
57
|
+
/** Profile-aware model facts. Present for the stable api.ts/client.ts entrypoint. */
|
|
58
|
+
modelRegistryPath?: string;
|
|
59
|
+
/** Stable profile selection helper used by api.ts. */
|
|
60
|
+
modelRuntimePath?: string;
|
|
61
|
+
/** Profile updated in modelRegistryPath. */
|
|
62
|
+
modelProfile?: string;
|
|
57
63
|
/** 公开协议:默认应用为 `"default"`,具名应用为 profile 名或 appCode,不含 TS 引号 */
|
|
58
64
|
configName: string;
|
|
59
65
|
isDefaultConfig: boolean;
|
|
@@ -64,9 +70,13 @@ export interface GenerateApiFileResult {
|
|
|
64
70
|
api: ApiPullFileStatus;
|
|
65
71
|
client: ApiPullFileStatus;
|
|
66
72
|
sdkConfig: ApiPullFileStatus;
|
|
73
|
+
modelRegistry?: ApiPullFileStatus;
|
|
74
|
+
modelRuntime?: ApiPullFileStatus;
|
|
67
75
|
};
|
|
68
76
|
/** 任一 TypeScript 文件被保留时为 true,Agent 必须按 models 合并,不能当成脚手架已写完 */
|
|
69
77
|
needsAgentMerge: boolean;
|
|
78
|
+
/** Profile-aware facts are current, but project upgrade is required for stable source entrypoints. */
|
|
79
|
+
needsProjectUpgrade?: boolean;
|
|
70
80
|
}
|
|
71
81
|
/**
|
|
72
82
|
* 获取文档的选项
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a333_0x4f8155=a333_0x2550;(function(_0x40d6f8,_0x5cf296){const _0x1b36e0=a333_0x2550,_0x13475b=_0x40d6f8();while(!![]){try{const _0x2ab135=-parseInt(_0x1b36e0(0x13b))/0x1*(parseInt(_0x1b36e0(0x141))/0x2)+parseInt(_0x1b36e0(0x14a))/0x3*(-parseInt(_0x1b36e0(0x13c))/0x4)+-parseInt(_0x1b36e0(0x13f))/0x5+parseInt(_0x1b36e0(0x15f))/0x6+parseInt(_0x1b36e0(0x160))/0x7*(parseInt(_0x1b36e0(0x162))/0x8)+parseInt(_0x1b36e0(0x154))/0x9+-parseInt(_0x1b36e0(0x149))/0xa*(-parseInt(_0x1b36e0(0x14d))/0xb);if(_0x2ab135===_0x5cf296)break;else _0x13475b['push'](_0x13475b['shift']());}catch(_0x3b181e){_0x13475b['push'](_0x13475b['shift']());}}}(a333_0x42da,0xaeecf));export const CORE_IDE_CONFIGS={'cursor':{'name':a333_0x4f8155(0x15c),'description':a333_0x4f8155(0x15d),'folders':['.cursorrules',a333_0x4f8155(0x13a)],'files':[{'type':'file','path':a333_0x4f8155(0x133)}]},'windsurf':{'name':'Windsurf','description':a333_0x4f8155(0x139),'folders':[a333_0x4f8155(0x156)],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x167)}]},'claude':{'name':a333_0x4f8155(0x15e),'description':a333_0x4f8155(0x15e),'folders':[a333_0x4f8155(0x138)],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x157)}]},'cline':{'name':a333_0x4f8155(0x148),'description':a333_0x4f8155(0x161),'folders':[a333_0x4f8155(0x14c)],'files':[{'type':'file','path':a333_0x4f8155(0x164)}]},'codex':{'name':'Codex','description':'Codex\x20IDE','folders':[a333_0x4f8155(0x143)],'files':[{'type':a333_0x4f8155(0x145),'path':'.codex/skills/lovrabet/SKILL.md'}]},'opencode':{'name':'OpenCode','description':a333_0x4f8155(0x152),'folders':[a333_0x4f8155(0x140)],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x155)}]},'qoder':{'name':a333_0x4f8155(0x153),'description':a333_0x4f8155(0x168),'folders':[a333_0x4f8155(0x15b)],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x14b)},{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x146)}]},'codebuddy':{'name':'CodeBuddy','description':a333_0x4f8155(0x158),'folders':['.codebuddy'],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x13e)}]},'trae':{'name':'Trae','description':'Trae\x20IDE','folders':[a333_0x4f8155(0x14e)],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x135)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a333_0x4f8155(0x134),'description':a333_0x4f8155(0x137),'folders':[a333_0x4f8155(0x132)],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x166)}]},'antigravity':{'name':'Antigravity','description':a333_0x4f8155(0x144),'folders':['.agent'],'files':[{'type':a333_0x4f8155(0x145),'path':a333_0x4f8155(0x166)}]}};function a333_0x42da(){const _0x3f0edf=['.qoder/rules/rabetbase.md','.cline','152834TFiibC','.trae','opencode','agent','qoder','OpenCode\x20IDE','Qoder','2704815eENDgb','.opencode/skills/lovrabet/SKILL.md','.windsurf','.claude/skills/lovrabet/SKILL.md','CodeBuddy\x20IDE','trae','codex','.qoder','Cursor','Cursor\x20IDE','Claude\x20Code','8061534OXVWFx','675619sJskHD','Cline\x20IDE','48Wndsgq','antigravity','.cline/skills/lovrabet/SKILL.md','cursor','.agent/skills/lovrabet/SKILL.md','.windsurf/workflows/rabetbase.md','Qoder\x20IDE','.agent','.cursor/skills/rabetbase.md','Other\x20(generic\x20template)','.trae/skills/lovrabet/SKILL.md','windsurf','Generic\x20template\x20fallback','.claude','Windsurf\x20IDE','.cursor','133214WhaQbm','2125976oYKydB','codebuddy','.codebuddy/skills/lovrabet/SKILL.md','4311235efUuyc','.opencode','20liTdud','claude','.codex','Antigravity\x20IDE','file','.qoder/skills/lovrabet/SKILL.md','cline','Cline','1260nWLZzP','6RGERZA'];a333_0x42da=function(){return _0x3f0edf;};return a333_0x42da();}export const CORE_IDE_LIST=[a333_0x4f8155(0x142),a333_0x4f8155(0x147),a333_0x4f8155(0x13d),'codex',a333_0x4f8155(0x165),a333_0x4f8155(0x14f),a333_0x4f8155(0x151),a333_0x4f8155(0x159),a333_0x4f8155(0x136)];export const IDE_LIST=[a333_0x4f8155(0x163),a333_0x4f8155(0x142),a333_0x4f8155(0x147),'codebuddy',a333_0x4f8155(0x15a),a333_0x4f8155(0x165),a333_0x4f8155(0x14f),a333_0x4f8155(0x151),a333_0x4f8155(0x159),a333_0x4f8155(0x136),a333_0x4f8155(0x150)];function a333_0x2550(_0x3ec194,_0x22dbbe){_0x3ec194=_0x3ec194-0x132;const _0x42dae3=a333_0x42da();let _0x2550e2=_0x42dae3[_0x3ec194];return _0x2550e2;}export const ALL_CORE_IDES=['cursor',a333_0x4f8155(0x136),a333_0x4f8155(0x142),'cline',a333_0x4f8155(0x15a),'opencode',a333_0x4f8155(0x151),a333_0x4f8155(0x13d),a333_0x4f8155(0x159)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a334_0x31d6(){const _0x2d6354=['35915ZHOvIy','12CSZtfI','19407840TKXEdy','8063224sCxDXN','2033731UbbOVb','2rcQCqP','1093378aRrVUR','4896771ocDFpW','11697723DQoUKw','440AzgQvC'];a334_0x31d6=function(){return _0x2d6354;};return a334_0x31d6();}function a334_0x5acc(_0x1a403b,_0x4c141b){_0x1a403b=_0x1a403b-0x72;const _0x31d659=a334_0x31d6();let _0x5acc18=_0x31d659[_0x1a403b];return _0x5acc18;}(function(_0xb1fb0d,_0x494fc1){const _0x27e8a6=a334_0x5acc,_0x54612b=_0xb1fb0d();while(!![]){try{const _0x43a361=-parseInt(_0x27e8a6(0x74))/0x1+-parseInt(_0x27e8a6(0x73))/0x2*(parseInt(_0x27e8a6(0x75))/0x3)+-parseInt(_0x27e8a6(0x77))/0x4*(-parseInt(_0x27e8a6(0x78))/0x5)+parseInt(_0x27e8a6(0x79))/0x6*(parseInt(_0x27e8a6(0x72))/0x7)+-parseInt(_0x27e8a6(0x7b))/0x8+parseInt(_0x27e8a6(0x76))/0x9+parseInt(_0x27e8a6(0x7a))/0xa;if(_0x43a361===_0x494fc1)break;else _0x54612b['push'](_0x54612b['shift']());}catch(_0x14b0bb){_0x54612b['push'](_0x54612b['shift']());}}}(a334_0x31d6,0xd666d));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x162c8f,_0x3d398d){const _0x46e39c=a335_0x25da,_0x8436ed=_0x162c8f();while(!![]){try{const _0x3c547a=parseInt(_0x46e39c(0x1d9))/0x1+parseInt(_0x46e39c(0x1d5))/0x2*(-parseInt(_0x46e39c(0x1e4))/0x3)+parseInt(_0x46e39c(0x1d8))/0x4*(-parseInt(_0x46e39c(0x1e3))/0x5)+parseInt(_0x46e39c(0x1e2))/0x6+-parseInt(_0x46e39c(0x1d4))/0x7*(parseInt(_0x46e39c(0x1db))/0x8)+parseInt(_0x46e39c(0x1dd))/0x9*(parseInt(_0x46e39c(0x1d2))/0xa)+parseInt(_0x46e39c(0x1e5))/0xb*(parseInt(_0x46e39c(0x1d6))/0xc);if(_0x3c547a===_0x3d398d)break;else _0x8436ed['push'](_0x8436ed['shift']());}catch(_0xbe383b){_0x8436ed['push'](_0x8436ed['shift']());}}}(a335_0x24af,0xad0e4));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0xab0e7e=a335_0x25da,_0x27c813=getTemplateBaseUrl(),_0x7b0a62=[_0x27c813+_0xab0e7e(0x1d7),_0x27c813+_0xab0e7e(0x1e1)];for(const _0x1c9549 of _0x7b0a62){try{const _0x3a86cd=await fetch(_0x1c9549,{'headers':{'Accept':_0xab0e7e(0x1df)}});if(!_0x3a86cd['ok'])continue;const _0x39b71f=await _0x3a86cd[_0xab0e7e(0x1dc)]();if(!_0x39b71f[_0xab0e7e(0x1de)]?.[_0xab0e7e(0x1e0)]||!_0x39b71f[_0xab0e7e(0x1da)]?.[_0xab0e7e(0x1d3)]?.[_0xab0e7e(0x1e0)])continue;return _0x39b71f;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;function a335_0x24af(){const _0x562d08=['307070pGSPIi','1641TbkuEa','1111aqlnpH','1730qqPDcX','node','60529IjStco','3754xsgPUm','36876GJDRQm','/config.json','24CQURdL','519643exSKCV','sdk','528BHkvmi','json','29871iADlPr','cli','application/json','stableVersion','/config/index.json','7623228UxXwQu'];a335_0x24af=function(){return _0x562d08;};return a335_0x24af();}function a335_0x25da(_0x5e5319,_0x344127){_0x5e5319=_0x5e5319-0x1d2;const _0x24af32=a335_0x24af();let _0x25dad5=_0x24af32[_0x5e5319];return _0x25dad5;}let hasCachedConfig=![];export async function getCdnConfig(){const _0x2da580=Date['now']();if(hasCachedConfig){const _0xda1239=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2da580-cacheTime<_0xda1239)return cachedConfig;}const _0x29b398=await fetchCdnConfig();return cachedConfig=_0x29b398,cacheTime=_0x2da580,hasCachedConfig=!![],_0x29b398;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|