@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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.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 +12 -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 +4 -1
- package/skills/rabetbase/SKILL.md +10 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- 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 +60 -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 +4 -3
- package/templates/README.md +16 -4
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a324_0x4f2a04=a324_0x8ec5;(function(_0x489122,_0x245e66){const _0x458244=a324_0x8ec5,_0x502837=_0x489122();while(!![]){try{const _0xe1d413=-parseInt(_0x458244(0xeb))/0x1+parseInt(_0x458244(0xda))/0x2*(parseInt(_0x458244(0x105))/0x3)+-parseInt(_0x458244(0xfe))/0x4+parseInt(_0x458244(0xdc))/0x5*(parseInt(_0x458244(0x107))/0x6)+-parseInt(_0x458244(0x109))/0x7*(parseInt(_0x458244(0xe9))/0x8)+-parseInt(_0x458244(0xe8))/0x9*(parseInt(_0x458244(0xde))/0xa)+parseInt(_0x458244(0xe0))/0xb*(parseInt(_0x458244(0x101))/0xc);if(_0xe1d413===_0x245e66)break;else _0x502837['push'](_0x502837['shift']());}catch(_0x25c893){_0x502837['push'](_0x502837['shift']());}}}(a324_0xb186,0x8ba6b));import{execaSync}from'execa';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';function a324_0x8ec5(_0x260235,_0x4c5f60){_0x260235=_0x260235-0xd1;const _0xb186ea=a324_0xb186();let _0x8ec59d=_0xb186ea[_0x260235];return _0x8ec59d;}function a324_0xb186(){const _0x44698=['code','76730UtsfRC','exitCode','215310zgGSrY','npx\x20terminated\x20by\x20signal\x20','90LXNRMY','warn','11eLOwmZ','filter','NPX_NOT_FOUND','expectedSkillName','add','ENOENT','match','signal','235755BBUJtx','1928FixwKB','state','1085681uCufZx','SPAWN_FAILED','failed','stderr','skill','NPM_CONFIG_GLOBAL','CHILD_TERMINATED','checked','skills@latest','shortMessage','\x22\x20install\x20state:\x20','CHILD_EXIT_NONZERO','PERMISSION_DENIED','stdout','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','inherit','unknown','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','join','1077328TAfHeF','rabetbase','push','15730668wsKGCw','stdio','trim','exit\x20','39iAxXhi','SKILL_NOT_INSTALLED','144neMJRF','EACCES','19761mEpVxU','Installer\x20reported\x20','lovrabet/rabetbase','pipe','npx','log','message','Skill\x20\x22','INSTALL_PARTIAL'];a324_0xb186=function(){return _0x44698;};return a324_0xb186();}export const NPX_SKILLS_CLI=a324_0x4f2a04(0xf3);export const NPX_SKILLS_SUBCOMMAND_ADD=a324_0x4f2a04(0xe4);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a324_0x4f2a04(0xd2);export const RABETBASE_GLOBAL_SKILL_NAME=a324_0x4f2a04(0xff);export const RABETBASE_SKILL_GIT_SOURCE=a324_0x4f2a04(0xf9);export function resolveGlobalSkillName(_0x242818){const _0x6da266=a324_0x4f2a04;switch(_0x242818[_0x6da266(0x103)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x30e9c0){const _0x5c61ac=a324_0x4f2a04,_0xc7e924=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x30e9c0&&_0xc7e924[_0x5c61ac(0x100)](NPX_SKILLS_FLAG_SKILL,_0x30e9c0),_0xc7e924;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a324_0x4f2a04(0xd4),...buildNpxSkillsAddArgv()][a324_0x4f2a04(0xfd)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a324_0x4f2a04(0xd4),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a324_0x4f2a04(0xfd)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x17eb28,_0x4a10c7,_0x42168d){return{'ok':![],'status':_0x4a10c7,'code':_0x17eb28,'error':'['+_0x17eb28+']\x20'+_0x42168d};}function execaOptions(_0x5a1fa1,_0x56339e){const _0x50ad8f=a324_0x4f2a04,_0x5b0d5f={...process.env};return delete _0x5b0d5f['npm_config_global'],delete _0x5b0d5f[_0x50ad8f(0xf0)],{'cwd':_0x5a1fa1,'stdio':_0x56339e,'env':_0x5b0d5f,'extendEnv':![],'shell':![],'reject':![],..._0x56339e==='pipe'?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x55f239,_0x45c4bc,_0x29410c,_0x42863c){const _0x3415a2=a324_0x4f2a04,_0x1b10b9=[_0x55f239[_0x3415a2(0xf8)]?String(_0x55f239[_0x3415a2(0xf8)]):'',_0x55f239[_0x3415a2(0xee)]?String(_0x55f239[_0x3415a2(0xee)]):''][_0x3415a2(0xe1)](Boolean)[_0x3415a2(0xfd)]('\x0a')['trim'](),_0x210145=_0x55f239[_0x3415a2(0xdb)]??null;_0x42863c!==_0x3415a2(0xd3)&&_0x1b10b9&&console[_0x3415a2(0xd5)](_0x1b10b9);if(_0x55f239[_0x3415a2(0xd9)]){const _0x1999ce=_0x55f239[_0x3415a2(0xd9)]===_0x3415a2(0xe5)?_0x3415a2(0xe2):_0x55f239['code']==='EPERM'||_0x55f239[_0x3415a2(0xd9)]===_0x3415a2(0x108)?_0x3415a2(0xf7):_0x3415a2(0xec);return failure(_0x1999ce,_0x210145,_0x55f239[_0x3415a2(0xf4)]??_0x55f239['message']??_0x55f239[_0x3415a2(0xd9)]);}if(_0x55f239[_0x3415a2(0xe7)])return failure(_0x3415a2(0xf1),_0x210145,_0x3415a2(0xdd)+_0x55f239[_0x3415a2(0xe7)]);if(_0x55f239[_0x3415a2(0xed)]&&_0x210145===null)return failure(_0x3415a2(0xec),_0x210145,_0x55f239['shortMessage']??_0x55f239[_0x3415a2(0xd6)]??'npx\x20failed\x20to\x20start');if(_0x210145!==0x0)return failure(_0x3415a2(0xf6),_0x210145,_0x1b10b9||_0x55f239[_0x3415a2(0xf4)]||_0x3415a2(0x104)+(_0x210145??_0x3415a2(0xfb)));const _0x8ecddb=_0x45c4bc?resolveInstalledSkill(_0x45c4bc,_0x29410c):undefined,_0x1fc88c=_0x1b10b9[_0x3415a2(0xe6)](/Failed to install\s+(\d+)/i);if(_0x1fc88c&&Number(_0x1fc88c[0x1])>0x0){const _0x155f51=_0x3415a2(0xd1)+_0x1fc88c[0x1]+'\x20failed\x20target(s)'+(_0x1b10b9?':\x0a'+_0x1b10b9:'');if(_0x8ecddb?.[_0x3415a2(0xea)]==='present')return console[_0x3415a2(0xdf)]('!\x20'+_0x155f51),{'ok':!![],'status':0x0};return failure(_0x3415a2(0xd8),0x0,_0x155f51);}if(_0x8ecddb){if(_0x8ecddb['state']==='absent')return failure(_0x3415a2(0x106),0x0,_0x3415a2(0xd7)+_0x45c4bc+_0x3415a2(0xfc)+_0x8ecddb[_0x3415a2(0xf2)][_0x3415a2(0xfd)](',\x20')+')');_0x8ecddb['state']==='unverifiable'&&console[_0x3415a2(0xdf)]('!\x20Could\x20not\x20verify\x20\x22'+_0x45c4bc+_0x3415a2(0xf5)+_0x8ecddb['reason']);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x4c614d,_0x1e0545){const _0x2b1355=a324_0x4f2a04;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1719ab=_0x1e0545?.[_0x2b1355(0x102)]??_0x2b1355(0xfa),_0x4c478e=buildNpxSkillsAddArgv(_0x1e0545?.[_0x2b1355(0xef)]),_0x984a20=[_0x2b1355(0xd4),..._0x4c478e][_0x2b1355(0xfd)]('\x20');console['log']('*\x20'+_0x984a20);const _0x4fe696=execaSync('npx',_0x4c478e,execaOptions(_0x4c614d,_0x1719ab));return normalizeExecaResult(_0x4fe696,undefined,undefined,_0x1719ab);}export function runNpxSkillsAddGlobal(_0x341ebd,_0x3dcedb,_0x391f21){const _0x5cc5bc=a324_0x4f2a04;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x387a48=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3dcedb,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x2b0019=[_0x5cc5bc(0xd4),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3dcedb,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x5cc5bc(0xfd)]('\x20');console[_0x5cc5bc(0xd5)]('*\x20'+_0x2b0019);const _0x30c0e9=execaSync(_0x5cc5bc(0xd4),_0x387a48,execaOptions(_0x341ebd,_0x5cc5bc(0xd3)));return normalizeExecaResult(_0x30c0e9,_0x391f21?.[_0x5cc5bc(0xe3)]??resolveGlobalSkillName(_0x3dcedb),_0x391f21?.['presence'],_0x391f21?.[_0x5cc5bc(0x102)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a325_0x744c(_0x4251c7,_0x3bcbd7){_0x4251c7=_0x4251c7-0xd0;const _0x2fd11f=a325_0x2fd1();let _0x744c63=_0x2fd11f[_0x4251c7];return _0x744c63;}const a325_0x28a664=a325_0x744c;(function(_0x4c8e16,_0x4b1d09){const _0x444138=a325_0x744c,_0x3b512c=_0x4c8e16();while(!![]){try{const _0x1cad46=-parseInt(_0x444138(0xdd))/0x1+-parseInt(_0x444138(0xde))/0x2*(parseInt(_0x444138(0xe9))/0x3)+parseInt(_0x444138(0xec))/0x4+-parseInt(_0x444138(0xf5))/0x5+parseInt(_0x444138(0xe6))/0x6*(-parseInt(_0x444138(0xd0))/0x7)+-parseInt(_0x444138(0xdf))/0x8*(parseInt(_0x444138(0xd2))/0x9)+-parseInt(_0x444138(0xda))/0xa*(-parseInt(_0x444138(0xe2))/0xb);if(_0x1cad46===_0x4b1d09)break;else _0x3b512c['push'](_0x3b512c['shift']());}catch(_0x779858){_0x3b512c['push'](_0x3b512c['shift']());}}}(a325_0x2fd1,0x8e51a));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a325_0x28a664(0xf2));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a325_0x28a664(0xd5),'skills'),join('.claude','skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function a325_0x2fd1(){const _0x51e431=['join','\x20is\x20unreadable:\x20','1678074VFgbXf','globalSkillsDirs','reason','9GVMzRR','\x20records\x20\x22','parse','2067628GcxwgY','present','lockFile','utf8','\x20uses\x20unsupported\x20version\x20','version','.skill-lock.json','unusable','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','2884265yGdNaN','SKILL.md','14nAXsfe','kind','9XEdrLv','home','not-recorded','.agents','skills','recorded','unverifiable','includes','30BqNbTs','number','\x20has\x20no\x20skills\x20map','62853eoxlca','227946RPQaRH','3647176vLcMkE','map','absent','7564007DGkxwr','find'];a325_0x2fd1=function(){return _0x51e431;};return a325_0x2fd1();}function readLockLookup(_0x35dba1,_0x47a54c){const _0x1f0141=a325_0x28a664;if(!existsSync(_0x35dba1))return{'kind':_0x1f0141(0xd4)};let _0x2973fe;try{_0x2973fe=JSON[_0x1f0141(0xeb)](readFileSync(_0x35dba1,_0x1f0141(0xef)));}catch(_0x1788bc){return{'kind':_0x1f0141(0xf3),'reason':_0x35dba1+_0x1f0141(0xe5)+_0x1788bc['message']};}const _0x42e1c3=_0x2973fe;if(typeof _0x42e1c3?.['version']!==_0x1f0141(0xdb)||!SUPPORTED_LOCK_VERSIONS[_0x1f0141(0xd9)](_0x42e1c3[_0x1f0141(0xf1)]))return{'kind':_0x1f0141(0xf3),'reason':_0x35dba1+_0x1f0141(0xf0)+String(_0x42e1c3?.[_0x1f0141(0xf1)])};if(!_0x42e1c3[_0x1f0141(0xd6)]||typeof _0x42e1c3[_0x1f0141(0xd6)]!=='object')return{'kind':_0x1f0141(0xf3),'reason':_0x35dba1+_0x1f0141(0xdc)};return _0x42e1c3[_0x1f0141(0xd6)][_0x47a54c]?{'kind':_0x1f0141(0xd7)}:{'kind':_0x1f0141(0xd4)};}export function resolveInstalledSkill(_0x563172,_0x5a9bfb){const _0x313b98=a325_0x28a664,_0x5d3e12=_0x5a9bfb?.[_0x313b98(0xd3)]??homedir(),_0x3f90c2=_0x5a9bfb?.[_0x313b98(0xe7)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x18186a=>join(_0x5d3e12,_0x18186a)),_0x31c907=_0x5a9bfb?.[_0x313b98(0xee)]??join(_0x5d3e12,SKILL_LOCK_RELATIVE_PATH),_0x1539e7=_0x3f90c2[_0x313b98(0xe0)](_0x4d3885=>join(_0x4d3885,_0x563172,_0x313b98(0xf6))),_0xca429b=_0x1539e7[_0x313b98(0xe3)](_0x33130a=>existsSync(_0x33130a));if(_0xca429b)return{'state':_0x313b98(0xed),'path':_0xca429b};const _0x55e0e9=readLockLookup(_0x31c907,_0x563172);if(_0x55e0e9[_0x313b98(0xd1)]==='unusable')return{'state':_0x313b98(0xd8),'reason':_0x55e0e9[_0x313b98(0xe8)]};if(_0x55e0e9[_0x313b98(0xd1)]===_0x313b98(0xd7))return{'state':_0x313b98(0xd8),'reason':_0x31c907+_0x313b98(0xea)+_0x563172+_0x313b98(0xf4)+('('+_0x1539e7[_0x313b98(0xe4)](',\x20')+')')};return{'state':_0x313b98(0xe1),'checked':_0x1539e7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x372f18,_0x91496d){const _0x76e291=a326_0x39cb,_0x292f9f=_0x372f18();while(!![]){try{const _0x51c1fa=-parseInt(_0x76e291(0x1f3))/0x1+parseInt(_0x76e291(0x1f9))/0x2*(-parseInt(_0x76e291(0x1f5))/0x3)+parseInt(_0x76e291(0x1ff))/0x4+-parseInt(_0x76e291(0x1f7))/0x5+-parseInt(_0x76e291(0x1f6))/0x6*(parseInt(_0x76e291(0x202))/0x7)+parseInt(_0x76e291(0x204))/0x8*(parseInt(_0x76e291(0x1fe))/0x9)+-parseInt(_0x76e291(0x1fd))/0xa*(-parseInt(_0x76e291(0x1f2))/0xb);if(_0x51c1fa===_0x91496d)break;else _0x292f9f['push'](_0x292f9f['shift']());}catch(_0x106168){_0x292f9f['push'](_0x292f9f['shift']());}}}(a326_0x55c4,0x53670));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';function a326_0x39cb(_0x252d17,_0x4f2cd8){_0x252d17=_0x252d17-0x1f1;const _0x55c471=a326_0x55c4();let _0x39cb26=_0x55c471[_0x252d17];return _0x39cb26;}const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x2d1441){return SENSITIVE_PATTERNS['some'](_0x1caf99=>_0x1caf99['test'](_0x2d1441));}function sanitizeFlags(_0x57ffef){const _0x44553b=a326_0x39cb,_0x4b6256={};for(const [_0x4bd8d4,_0x3d477a]of Object[_0x44553b(0x203)](_0x57ffef)){isSensitiveKey(_0x4bd8d4)?_0x4b6256[_0x4bd8d4]=_0x3d477a!=null&&_0x3d477a!==''?_0x44553b(0x1f8):_0x3d477a:_0x4b6256[_0x4bd8d4]=_0x3d477a;}return _0x4b6256;}function a326_0x55c4(){const _0x12aae2=['33boRfRt','66xEiiAl','906670lBjBEF','[REDACTED]','118246fwprrd','message','error','command','37720ifHPgI','135axAgem','688820OAoGMZ','service','stringify','164759ojWxFd','entries','44536LaXElJ','durationMs','4664vXlvQo','422828XqgYPs','rabetbase.command'];a326_0x55c4=function(){return _0x12aae2;};return a326_0x55c4();}export async function reportCommandTrace(_0x21b4ab){const _0x347dca=a326_0x39cb;try{const _0x193a6a=sanitizeFlags(_0x21b4ab['flags']);await sendCliTraceLog({'spanName':_0x347dca(0x1f4),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x21b4ab[_0x347dca(0x200)],'command.name':_0x21b4ab[_0x347dca(0x1fc)],'command.flags':JSON[_0x347dca(0x201)](_0x193a6a),..._0x21b4ab[_0x347dca(0x1f1)]!=null?{'command.duration_ms':_0x21b4ab[_0x347dca(0x1f1)]}:{},..._0x21b4ab[_0x347dca(0x1fb)]?{'command.error':_0x21b4ab[_0x347dca(0x1fb)]instanceof Error?_0x21b4ab[_0x347dca(0x1fb)][_0x347dca(0x1fa)]:String(_0x21b4ab[_0x347dca(0x1fb)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a327_0x5338(_0x763de1,_0x1505f5){_0x763de1=_0x763de1-0xe0;var _0x536c97=a327_0x536c();var _0x533863=_0x536c97[_0x763de1];return _0x533863;}function a327_0x536c(){var _0xa24cc6=['error','23466ysNTdn','8rAHHzD','196ptDfWa','94458HjFbrX','7827239FkNDRt','service','14351454oYKGGH','22781436wHkLhz','88215MSEgCV','10xoYGNN','cli.help','Failed\x20to\x20report\x20CLI\x20help\x20trace:','19740523aDObjq','1970tGNGCf','16ksutNU'];a327_0x536c=function(){return _0xa24cc6;};return a327_0x536c();}(function(_0x22e823,_0x75c2a0){var _0x55f6c1=a327_0x5338,_0xce6bff=_0x22e823();while(!![]){try{var _0x3fb734=-parseInt(_0x55f6c1(0xe9))/0x1*(-parseInt(_0x55f6c1(0xee))/0x2)+parseInt(_0x55f6c1(0xe3))/0x3*(-parseInt(_0x55f6c1(0xed))/0x4)+-parseInt(_0x55f6c1(0xe8))/0x5*(parseInt(_0x55f6c1(0xeb))/0x6)+parseInt(_0x55f6c1(0xef))/0x7*(parseInt(_0x55f6c1(0xec))/0x8)+-parseInt(_0x55f6c1(0xe1))/0x9+-parseInt(_0x55f6c1(0xe4))/0xa*(-parseInt(_0x55f6c1(0xe7))/0xb)+parseInt(_0x55f6c1(0xe2))/0xc;if(_0x3fb734===_0x75c2a0)break;else _0xce6bff['push'](_0xce6bff['shift']());}catch(_0x1cfcff){_0xce6bff['push'](_0xce6bff['shift']());}}}(a327_0x536c,0xf1d26));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x557821,_0x946c01){var _0x421b55=a327_0x5338;try{await sendCliTraceLog({'spanName':_0x421b55(0xe5),'logData':{'rabetbase.help.kind':_0x557821,..._0x946c01?.[_0x421b55(0xe0)]&&{'rabetbase.help.service':_0x946c01[_0x421b55(0xe0)]}}});}catch(_0xb7f88b){console[_0x421b55(0xea)](_0x421b55(0xe6),_0xb7f88b);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a328_0xccae(_0x5b918f,_0x106b5a){_0x5b918f=_0x5b918f-0xb8;const _0x854acc=a328_0x854a();let _0xccae6=_0x854acc[_0x5b918f];return _0xccae6;}(function(_0x272b31,_0x3246c3){const _0x29db5c=a328_0xccae,_0x1d3943=_0x272b31();while(!![]){try{const _0x3bd634=-parseInt(_0x29db5c(0xbf))/0x1*(parseInt(_0x29db5c(0xc4))/0x2)+parseInt(_0x29db5c(0xc6))/0x3+-parseInt(_0x29db5c(0xc2))/0x4*(parseInt(_0x29db5c(0xc5))/0x5)+parseInt(_0x29db5c(0xc8))/0x6+-parseInt(_0x29db5c(0xbd))/0x7*(-parseInt(_0x29db5c(0xba))/0x8)+-parseInt(_0x29db5c(0xbc))/0x9*(-parseInt(_0x29db5c(0xcb))/0xa)+-parseInt(_0x29db5c(0xc9))/0xb;if(_0x3bd634===_0x3246c3)break;else _0x1d3943['push'](_0x1d3943['shift']());}catch(_0x1260dc){_0x1d3943['push'](_0x1d3943['shift']());}}}(a328_0x854a,0x8d55c));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x5421a5=a328_0xccae,_0x5dc3e7=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0xfd2691=_0x5dc3e7?.[_0x5421a5(0xbe)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x5421a5(0xc0)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x5421a5(0xc7):_0x5421a5(0xb8))}),setUserContext({'id':_0xfd2691?.['id'],'username':_0xfd2691?.[_0x5421a5(0xb9)],'nickname':_0xfd2691?.[_0x5421a5(0xbb)],'email':_0xfd2691?.[_0x5421a5(0xc3)],'tenantCode':_0xfd2691?.[_0x5421a5(0xca)]?.[_0x5421a5(0xc1)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x5dc3e7;}function a328_0x854a(){const _0x46aa3a=['production','username','544nHPfaC','nickname','9ZqsrPO','44359QAatSt','user','57183ehxXnK','unknown','tenant_code','632WYlXks','email','14elLhzy','19315QDrjfG','3465672Zocumw','daily','4989936AnWsrl','16951902BLrujz','tenant','7128290lKAxBG'];a328_0x854a=function(){return _0x46aa3a;};return a328_0x854a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a329_0x3bb5(_0x73d454,_0x1d7b7c){_0x73d454=_0x73d454-0xb7;const _0x419340=a329_0x4193();let _0x3bb573=_0x419340[_0x73d454];return _0x3bb573;}(function(_0x58a945,_0x5f46cc){const _0x47363f=a329_0x3bb5,_0x411ace=_0x58a945();while(!![]){try{const _0x70f86e=-parseInt(_0x47363f(0xbd))/0x1*(-parseInt(_0x47363f(0xc5))/0x2)+-parseInt(_0x47363f(0xc4))/0x3+-parseInt(_0x47363f(0xc1))/0x4*(-parseInt(_0x47363f(0xc3))/0x5)+-parseInt(_0x47363f(0xbc))/0x6*(parseInt(_0x47363f(0xba))/0x7)+parseInt(_0x47363f(0xb9))/0x8*(-parseInt(_0x47363f(0xbf))/0x9)+-parseInt(_0x47363f(0xb8))/0xa+parseInt(_0x47363f(0xc2))/0xb;if(_0x70f86e===_0x5f46cc)break;else _0x411ace['push'](_0x411ace['shift']());}catch(_0x1548cc){_0x411ace['push'](_0x411ace['shift']());}}}(a329_0x4193,0x296c1));import{shutdownTraces}from'@lovrabet/otel-logger';function a329_0x4193(){const _0x354d31=['SIGINT','8055jYYvhg','exit','53644unREvW','7938711JhfLsV','15xLtWMY','848403shpdtR','32FXAAmC','beforeExit','1529080uAwWxb','1168TdjSnx','7TqcoRh','once','1975308boceTM','18958SNdkVM'];a329_0x4193=function(){return _0x354d31;};return a329_0x4193();}let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x535260=a329_0x3bb5;process[_0x535260(0xbb)](_0x535260(0xb7),()=>{void flushOtelNodeIfUsed();});const _0xe1588e=()=>{const _0x1f6a38=_0x535260;void flushOtelNodeIfUsed()['then'](()=>process[_0x1f6a38(0xc0)](0x0));};process['once'](_0x535260(0xbe),_0xe1588e),process[_0x535260(0xbb)]('SIGTERM',_0xe1588e);}export async function exitWithOtelShutdown(_0x11a03f){const _0x4bc0fd=a329_0x3bb5;await flushOtelNodeIfUsed(),process[_0x4bc0fd(0xc0)](_0x11a03f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a330_0x162966=a330_0x4bac;(function(_0x3fd11d,_0x5f5515){const _0x567519=a330_0x4bac,_0x47c616=_0x3fd11d();while(!![]){try{const _0x4173bc=parseInt(_0x567519(0x1c6))/0x1*(parseInt(_0x567519(0x1c4))/0x2)+parseInt(_0x567519(0x1cb))/0x3+-parseInt(_0x567519(0x1ca))/0x4*(-parseInt(_0x567519(0x1c2))/0x5)+parseInt(_0x567519(0x1cd))/0x6*(parseInt(_0x567519(0x1c5))/0x7)+parseInt(_0x567519(0x1c1))/0x8+parseInt(_0x567519(0x1cc))/0x9*(parseInt(_0x567519(0x1c9))/0xa)+-parseInt(_0x567519(0x1ce))/0xb;if(_0x4173bc===_0x5f5515)break;else _0x47c616['push'](_0x47c616['shift']());}catch(_0x506c8c){_0x47c616['push'](_0x47c616['shift']());}}}(a330_0x4008,0xdefa6));import{sendTraceLog}from'@lovrabet/otel-logger';function a330_0x4008(){const _0x4d3cce=['traceparent','28qKmewC','81179SjTtTd','8627rlhiyR','rabetbase-cli','version','20AbPGQj','28uKdDDM','4455939KefcGy','5121108VwjvRG','66OsvHQh','45176296VtIAnL','manual','logData','6028728gLgdqf','996415NyzavD'];a330_0x4008=function(){return _0x4d3cce;};return a330_0x4008();}import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a330_0x4bac(_0x40d77c,_0x4ae292){_0x40d77c=_0x40d77c-0x1c1;const _0x400870=a330_0x4008();let _0x4bac77=_0x400870[_0x40d77c];return _0x4bac77;}const DEFAULT_TRACE_NAME=a330_0x162966(0x1c7);export async function sendCliTraceLog(_0x87a93a){const _0x40d4d6=a330_0x162966;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x87a93a['traceName']??DEFAULT_TRACE_NAME,'version':_0x87a93a[_0x40d4d6(0x1c8)]??getCliVersion(),'spanName':_0x87a93a['spanName'],'eventType':_0x40d4d6(0x1cf),'logData':_0x87a93a[_0x40d4d6(0x1d0)],..._0x87a93a[_0x40d4d6(0x1c3)]&&{'traceparent':_0x87a93a[_0x40d4d6(0x1c3)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a331_0x3d9d(_0x1c78ec,_0x4da7d5){_0x1c78ec=_0x1c78ec-0x118;const _0x492270=a331_0x4922();let _0x3d9da2=_0x492270[_0x1c78ec];return _0x3d9da2;}const a331_0x4c4fe5=a331_0x3d9d;(function(_0x5d6b7a,_0x37e594){const _0x1f8d4a=a331_0x3d9d,_0x4a9870=_0x5d6b7a();while(!![]){try{const _0x31e089=-parseInt(_0x1f8d4a(0x123))/0x1+-parseInt(_0x1f8d4a(0x11c))/0x2+-parseInt(_0x1f8d4a(0x11e))/0x3+-parseInt(_0x1f8d4a(0x118))/0x4*(-parseInt(_0x1f8d4a(0x127))/0x5)+parseInt(_0x1f8d4a(0x122))/0x6+-parseInt(_0x1f8d4a(0x11d))/0x7*(parseInt(_0x1f8d4a(0x129))/0x8)+-parseInt(_0x1f8d4a(0x11a))/0x9*(-parseInt(_0x1f8d4a(0x125))/0xa);if(_0x31e089===_0x37e594)break;else _0x4a9870['push'](_0x4a9870['shift']());}catch(_0x525706){_0x4a9870['push'](_0x4a9870['shift']());}}}(a331_0x4922,0x4bc04));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a331_0x4c4fe5(0x124);export const PLATFORM_ISSUE_SPAN_NAME=a331_0x4c4fe5(0x11b);function a331_0x4922(){const _0x19a07c=['9aVwsFB','issue.log.collect','164216pTfyLz','21HTeUGG','1046364BXGEhE','description','title','sanitize','3337002pBsmjd','286986lDrMai','platform-issue-log-collect','4531570YEWHKP','originalBytes','306165iTxqgL','join','766216QgDLOu','20HqmZSZ','redactionCount'];a331_0x4922=function(){return _0x19a07c;};return a331_0x4922();}export async function sendPlatformIssueCollectLog(_0x329501){const _0x330983=a331_0x4c4fe5;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x329501[_0x330983(0x120)],'issue.description':_0x329501[_0x330983(0x11f)],..._0x329501['sanitize']?{'issue.description_original_bytes':_0x329501[_0x330983(0x121)][_0x330983(0x126)],'issue.description_truncated':_0x329501[_0x330983(0x121)]['truncated'],'issue.description_redactions':_0x329501[_0x330983(0x121)][_0x330983(0x119)],'issue.description_redaction_kinds':_0x329501[_0x330983(0x121)]['redactionKinds'][_0x330983(0x128)](',')}:{}}});}
|
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_0x43db81=a333_0x300e;(function(_0x6e0c7b,_0x46c2b0){const _0x1d4eca=a333_0x300e,_0x59db18=_0x6e0c7b();while(!![]){try{const _0x6ba81=-parseInt(_0x1d4eca(0x1bd))/0x1+parseInt(_0x1d4eca(0x1ca))/0x2*(-parseInt(_0x1d4eca(0x1d0))/0x3)+parseInt(_0x1d4eca(0x1ce))/0x4+-parseInt(_0x1d4eca(0x1cb))/0x5*(-parseInt(_0x1d4eca(0x1df))/0x6)+-parseInt(_0x1d4eca(0x1d8))/0x7+-parseInt(_0x1d4eca(0x1e1))/0x8*(parseInt(_0x1d4eca(0x1cc))/0x9)+-parseInt(_0x1d4eca(0x1e4))/0xa*(parseInt(_0x1d4eca(0x1db))/0xb);if(_0x6ba81===_0x46c2b0)break;else _0x59db18['push'](_0x59db18['shift']());}catch(_0x95961d){_0x59db18['push'](_0x59db18['shift']());}}}(a333_0x5548,0x4d78f));export const CORE_IDE_CONFIGS={'cursor':{'name':a333_0x43db81(0x1dc),'description':a333_0x43db81(0x1d5),'folders':[a333_0x43db81(0x1be),'.cursor'],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1c4)}]},'windsurf':{'name':a333_0x43db81(0x1cf),'description':a333_0x43db81(0x1e3),'folders':[a333_0x43db81(0x1c7)],'files':[{'type':'file','path':a333_0x43db81(0x1c3)}]},'claude':{'name':a333_0x43db81(0x1c0),'description':'Claude\x20Code','folders':[a333_0x43db81(0x1b8)],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1b5)}]},'cline':{'name':a333_0x43db81(0x1bc),'description':a333_0x43db81(0x1d1),'folders':['.cline'],'files':[{'type':'file','path':a333_0x43db81(0x1b7)}]},'codex':{'name':a333_0x43db81(0x1d7),'description':a333_0x43db81(0x1d9),'folders':['.codex'],'files':[{'type':a333_0x43db81(0x1e2),'path':'.codex/skills/lovrabet/SKILL.md'}]},'opencode':{'name':a333_0x43db81(0x1c1),'description':'OpenCode\x20IDE','folders':['.opencode'],'files':[{'type':a333_0x43db81(0x1e2),'path':'.opencode/skills/lovrabet/SKILL.md'}]},'qoder':{'name':a333_0x43db81(0x1c6),'description':'Qoder\x20IDE','folders':['.qoder'],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1e0)},{'type':'file','path':a333_0x43db81(0x1c8)}]},'codebuddy':{'name':a333_0x43db81(0x1ba),'description':'CodeBuddy\x20IDE','folders':['.codebuddy'],'files':[{'type':'file','path':a333_0x43db81(0x1c5)}]},'trae':{'name':a333_0x43db81(0x1b9),'description':'Trae\x20IDE','folders':[a333_0x43db81(0x1c2)],'files':[{'type':'file','path':'.trae/skills/lovrabet/SKILL.md'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a333_0x43db81(0x1e5),'description':'Generic\x20template\x20fallback','folders':['.agent'],'files':[{'type':'file','path':a333_0x43db81(0x1bb)}]},'antigravity':{'name':a333_0x43db81(0x1b4),'description':a333_0x43db81(0x1c9),'folders':['.agent'],'files':[{'type':a333_0x43db81(0x1e2),'path':a333_0x43db81(0x1bb)}]}};function a333_0x300e(_0x41cf3d,_0x5084b7){_0x41cf3d=_0x41cf3d-0x1b4;const _0x55489a=a333_0x5548();let _0x300e25=_0x55489a[_0x41cf3d];return _0x300e25;}export const CORE_IDE_LIST=[a333_0x43db81(0x1dd),a333_0x43db81(0x1b6),a333_0x43db81(0x1da),'codex',a333_0x43db81(0x1d6),a333_0x43db81(0x1bf),a333_0x43db81(0x1d3),a333_0x43db81(0x1d2),a333_0x43db81(0x1d4)];export const IDE_LIST=['antigravity',a333_0x43db81(0x1dd),a333_0x43db81(0x1b6),a333_0x43db81(0x1da),a333_0x43db81(0x1cd),a333_0x43db81(0x1d6),a333_0x43db81(0x1bf),a333_0x43db81(0x1d3),a333_0x43db81(0x1d2),a333_0x43db81(0x1d4),a333_0x43db81(0x1de)];function a333_0x5548(){const _0x453010=['2248656tHiDCv','Windsurf','6249ccCLyx','Cline\x20IDE','trae','qoder','windsurf','Cursor\x20IDE','cursor','Codex','1659819TsBjGZ','Codex\x20IDE','codebuddy','568733lucMPS','Cursor','claude','agent','6XnKaLQ','.qoder/rules/rabetbase.md','296jNhmNZ','file','Windsurf\x20IDE','20ijSRBy','Other\x20(generic\x20template)','Antigravity','.claude/skills/lovrabet/SKILL.md','cline','.cline/skills/lovrabet/SKILL.md','.claude','Trae','CodeBuddy','.agent/skills/lovrabet/SKILL.md','Cline','123352tioArR','.cursorrules','opencode','Claude\x20Code','OpenCode','.trae','.windsurf/workflows/rabetbase.md','.cursor/skills/rabetbase.md','.codebuddy/skills/lovrabet/SKILL.md','Qoder','.windsurf','.qoder/skills/lovrabet/SKILL.md','Antigravity\x20IDE','382oGWqtP','3146245HgGyYs','3006tLoepO','codex'];a333_0x5548=function(){return _0x453010;};return a333_0x5548();}export const ALL_CORE_IDES=['cursor','windsurf',a333_0x43db81(0x1dd),a333_0x43db81(0x1b6),a333_0x43db81(0x1cd),'opencode',a333_0x43db81(0x1d3),a333_0x43db81(0x1da),a333_0x43db81(0x1d2)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35578f,_0x6786b0){const _0x36d147=a334_0x29c3,_0x1387b1=_0x35578f();while(!![]){try{const _0xd4f556=-parseInt(_0x36d147(0x84))/0x1+-parseInt(_0x36d147(0x7c))/0x2*(-parseInt(_0x36d147(0x82))/0x3)+-parseInt(_0x36d147(0x81))/0x4+parseInt(_0x36d147(0x80))/0x5+-parseInt(_0x36d147(0x7f))/0x6*(-parseInt(_0x36d147(0x83))/0x7)+-parseInt(_0x36d147(0x7d))/0x8+parseInt(_0x36d147(0x85))/0x9*(parseInt(_0x36d147(0x7e))/0xa);if(_0xd4f556===_0x6786b0)break;else _0x1387b1['push'](_0x1387b1['shift']());}catch(_0x2834e8){_0x1387b1['push'](_0x1387b1['shift']());}}}(a334_0x2ea4,0x863ce));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a334_0x2ea4(){const _0x1310b4=['2528808PlSxJq','6UGYueC','231mwvmUF','610220oCkyAv','27KmVhxm','655418VtiyUT','4760352lrbAKD','2552690KWBxyN','24QPPbuq','4829735grYbgz'];a334_0x2ea4=function(){return _0x1310b4;};return a334_0x2ea4();}import{CliErrors}from'../errors.js';function a334_0x29c3(_0x274b3c,_0x54a229){_0x274b3c=_0x274b3c-0x7c;const _0x2ea422=a334_0x2ea4();let _0x29c3e4=_0x2ea422[_0x274b3c];return _0x29c3e4;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a335_0x16bd(){const _0x275940=['30XSTSlh','942156sJiEQm','3081fUMQki','462538GndLYH','2410680WCYIFs','15817020wZVckR','node','10413896fKrHwE','stableVersion','sdk','3092KsHtwp','/config.json','application/json','18TTXEvd','/config/index.json','791203ObipTZ'];a335_0x16bd=function(){return _0x275940;};return a335_0x16bd();}(function(_0x217d15,_0x48d6a0){const _0x498c7f=a335_0x5cdf,_0x16bb9a=_0x217d15();while(!![]){try{const _0x15252c=-parseInt(_0x498c7f(0xe0))/0x1+-parseInt(_0x498c7f(0xde))/0x2+parseInt(_0x498c7f(0xdf))/0x3*(parseInt(_0x498c7f(0xd7))/0x4)+-parseInt(_0x498c7f(0xe1))/0x5+-parseInt(_0x498c7f(0xdd))/0x6*(parseInt(_0x498c7f(0xdc))/0x7)+-parseInt(_0x498c7f(0xd4))/0x8+-parseInt(_0x498c7f(0xda))/0x9*(-parseInt(_0x498c7f(0xe2))/0xa);if(_0x15252c===_0x48d6a0)break;else _0x16bb9a['push'](_0x16bb9a['shift']());}catch(_0x4dbe61){_0x16bb9a['push'](_0x16bb9a['shift']());}}}(a335_0x16bd,0xa4b51));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x1be585=a335_0x5cdf,_0x28ff05=getTemplateBaseUrl(),_0x2eaa30=[_0x28ff05+_0x1be585(0xd8),_0x28ff05+_0x1be585(0xdb)];for(const _0x47d942 of _0x2eaa30){try{const _0x2aac63=await fetch(_0x47d942,{'headers':{'Accept':_0x1be585(0xd9)}});if(!_0x2aac63['ok'])continue;const _0x4c2f1e=await _0x2aac63['json']();if(!_0x4c2f1e['cli']?.[_0x1be585(0xd5)]||!_0x4c2f1e[_0x1be585(0xd6)]?.[_0x1be585(0xe3)]?.[_0x1be585(0xd5)])continue;return _0x4c2f1e;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;function a335_0x5cdf(_0xf35c91,_0x45f217){_0xf35c91=_0xf35c91-0xd4;const _0x16bd1c=a335_0x16bd();let _0x5cdf34=_0x16bd1c[_0xf35c91];return _0x5cdf34;}let hasCachedConfig=![];export async function getCdnConfig(){const _0x5116e9=Date['now']();if(hasCachedConfig){const _0x55be41=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x5116e9-cacheTime<_0x55be41)return cachedConfig;}const _0x107d53=await fetchCdnConfig();return cachedConfig=_0x107d53,cacheTime=_0x5116e9,hasCachedConfig=!![],_0x107d53;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a336_0x152524=a336_0x145a;function a336_0x145a(_0x28ca44,_0x1e81c1){_0x28ca44=_0x28ca44-0x146;const _0x4e7519=a336_0x4e75();let _0x145ac8=_0x4e7519[_0x28ca44];return _0x145ac8;}(function(_0x5aa900,_0xa72b57){const _0x57165d=a336_0x145a,_0x3ee8e5=_0x5aa900();while(!![]){try{const _0x9db78=-parseInt(_0x57165d(0x158))/0x1*(parseInt(_0x57165d(0x15e))/0x2)+-parseInt(_0x57165d(0x16a))/0x3*(-parseInt(_0x57165d(0x147))/0x4)+parseInt(_0x57165d(0x169))/0x5+-parseInt(_0x57165d(0x160))/0x6*(parseInt(_0x57165d(0x156))/0x7)+parseInt(_0x57165d(0x154))/0x8*(parseInt(_0x57165d(0x14e))/0x9)+parseInt(_0x57165d(0x15b))/0xa+parseInt(_0x57165d(0x14c))/0xb;if(_0x9db78===_0xa72b57)break;else _0x3ee8e5['push'](_0x3ee8e5['shift']());}catch(_0x110a97){_0x3ee8e5['push'](_0x3ee8e5['shift']());}}}(a336_0x4e75,0xc2fa5));import a336_0x720b8c from'node:fs';import a336_0x2cfac9 from'node:path';import a336_0x453d42 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a336_0x152524(0x15a);function a336_0x4e75(){const _0x132446=['\x1b[0m','devDependencies','package.json','\x20\x20\x20Stable\x20version:\x20','node_modules','208xjGMQt','↪\x20SDK\x20update\x20available','691159XaVyhi','minVersion','2167GnznFn','utf-8','1.2.0','2567970SGGXAu','log','sdk','668EhQydi','stableVersion','96smdyma','readFileSync','needsUpgrade','dependencies','npm\x20install\x20','packageName','\x1b[33m','latest','existsSync','6866875TMmJHd','3LuCnKI','coerce','\x20\x20\x20Current\x20version:\x20','@lovrabet/sdk','2971564WgOLGQ','version','join','utf8','parse','3551174aNwsFs','node','140643zExqQs'];a336_0x4e75=function(){return _0x132446;};return a336_0x4e75();}function isNonNumericVersion(_0x1f58ac){const _0x31fd5d=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x31fd5d['some'](_0x19148f=>_0x19148f['test'](_0x1f58ac));}function getInstalledVersion(_0x185c5a,_0xa68644){const _0x4b907d=a336_0x152524;try{const _0x558184=a336_0x2cfac9[_0x4b907d(0x149)](_0x185c5a,_0x4b907d(0x153),_0xa68644,_0x4b907d(0x151));if(a336_0x720b8c[_0x4b907d(0x168)](_0x558184)){const _0x34684d=JSON[_0x4b907d(0x14b)](a336_0x720b8c[_0x4b907d(0x161)](_0x558184,_0x4b907d(0x159)));return _0x34684d[_0x4b907d(0x148)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x442cc9=a336_0x152524;try{const _0x3e15c2=await getCdnConfig();return _0x3e15c2?.[_0x442cc9(0x15d)]?.[_0x442cc9(0x14d)]?.[_0x442cc9(0x15f)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x427a18=a336_0x152524;try{const _0x3e8861=await getCdnConfig();return _0x3e8861?.[_0x427a18(0x15d)]?.[_0x427a18(0x14d)]?.[_0x427a18(0x165)]||_0x427a18(0x146);}catch{return _0x427a18(0x146);}}export async function checkSdkVersion(_0x28936e){const _0x57e291=a336_0x152524,_0x447fa6=a336_0x2cfac9[_0x57e291(0x149)](_0x28936e,_0x57e291(0x151)),[_0x4e2626,_0x4a68b3]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x3f2335=_0x4e2626||FALLBACK_MIN_SDK_VERSION;if(!a336_0x720b8c['existsSync'](_0x447fa6))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};try{const _0x38973d=JSON[_0x57e291(0x14b)](a336_0x720b8c[_0x57e291(0x161)](_0x447fa6,'utf8')),_0x2c1d00=_0x38973d[_0x57e291(0x163)]||{},_0x2f75a8=_0x38973d[_0x57e291(0x150)]||{},_0x20ba97=_0x2c1d00[_0x4a68b3]||_0x2f75a8[_0x4a68b3];if(!_0x20ba97)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};let _0x8ce546=getInstalledVersion(_0x28936e,_0x4a68b3);!_0x8ce546&&(_0x8ce546=_0x20ba97);if(isNonNumericVersion(_0x20ba97))return{'installed':!![],'version':_0x8ce546,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};const _0x2d1dcc=a336_0x453d42[_0x57e291(0x16b)](_0x8ce546),_0xb8f8a2=a336_0x453d42[_0x57e291(0x16b)](_0x3f2335),_0x5bbeae=_0x2d1dcc&&_0xb8f8a2?a336_0x453d42['lt'](_0x2d1dcc,_0xb8f8a2):![];return{'installed':!![],'version':_0x8ce546,'needsUpgrade':_0x5bbeae,'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f2335,'packageName':_0x4a68b3,'stableVersion':_0x4e2626};}}export function checkSdkVersionSync(_0x2c239f){const _0x35a3f6=a336_0x152524,_0xda1264=a336_0x2cfac9[_0x35a3f6(0x149)](_0x2c239f,'package.json'),_0x2f32e1='@lovrabet/sdk';if(!a336_0x720b8c['existsSync'](_0xda1264))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};try{const _0x4997e2=JSON[_0x35a3f6(0x14b)](a336_0x720b8c[_0x35a3f6(0x161)](_0xda1264,_0x35a3f6(0x14a))),_0x2aa63=_0x4997e2[_0x35a3f6(0x163)]||{},_0x467fdf=_0x4997e2[_0x35a3f6(0x150)]||{},_0x2fdad9=_0x2aa63[_0x2f32e1]||_0x467fdf[_0x2f32e1];if(!_0x2fdad9)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};let _0x2c6e2b=getInstalledVersion(_0x2c239f,_0x2f32e1);!_0x2c6e2b&&(_0x2c6e2b=_0x2fdad9);if(isNonNumericVersion(_0x2fdad9))return{'installed':!![],'version':_0x2c6e2b,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};const _0x10d946=a336_0x453d42[_0x35a3f6(0x16b)](_0x2c6e2b),_0x2d44cb=_0x10d946?a336_0x453d42['lt'](_0x10d946,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x2c6e2b,'needsUpgrade':_0x2d44cb,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2f32e1,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x5e42c3){const _0x577773=a336_0x152524;if(!_0x5e42c3[_0x577773(0x162)])return;const _0x190901=_0x577773(0x166),_0xec53e0=_0x577773(0x14f),_0x4e1642='\x1b[1m',_0x346436=_0x5e42c3[_0x577773(0x165)]||'@lovrabet/sdk',_0x5a7efd=_0x5e42c3[_0x577773(0x15f)]||_0x5e42c3[_0x577773(0x157)],_0x48d249=_0x577773(0x164)+_0x346436+'@'+(_0x5a7efd||_0x577773(0x167));console['log'](),console[_0x577773(0x15c)](''+_0x190901+_0x4e1642+_0x577773(0x155)+_0xec53e0),console['log'](_0x190901+_0x577773(0x16c)+_0x346436+'@'+_0x5e42c3['version']+_0xec53e0),console[_0x577773(0x15c)](_0x190901+_0x577773(0x152)+_0x5a7efd+_0xec53e0),console[_0x577773(0x15c)](_0x190901+'\x20\x20\x20Upgrade\x20command:\x20'+_0x48d249+_0xec53e0),console[_0x577773(0x15c)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb3df4b,_0x4403f2){const _0x33499c=a337_0x2cc7,_0x4920c3=_0xb3df4b();while(!![]){try{const _0x3cb617=parseInt(_0x33499c(0x94))/0x1+parseInt(_0x33499c(0xa3))/0x2*(-parseInt(_0x33499c(0xa8))/0x3)+-parseInt(_0x33499c(0x96))/0x4*(-parseInt(_0x33499c(0x8f))/0x5)+-parseInt(_0x33499c(0x9b))/0x6*(-parseInt(_0x33499c(0x97))/0x7)+parseInt(_0x33499c(0x8b))/0x8+parseInt(_0x33499c(0x91))/0x9+parseInt(_0x33499c(0x93))/0xa*(-parseInt(_0x33499c(0x95))/0xb);if(_0x3cb617===_0x4403f2)break;else _0x4920c3['push'](_0x4920c3['shift']());}catch(_0x1ff458){_0x4920c3['push'](_0x4920c3['shift']());}}}(a337_0x494b,0x98a70));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a337_0x1d6470 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x584cf2){const _0xc6a021=a337_0x2cc7,_0x3a6394=_0x584cf2['stableVersion']||_0xc6a021(0x8c);return _0xc6a021(0x9c)+NPM_PACKAGE_NAME+'@'+_0x3a6394;}function a337_0x2cc7(_0x1dd184,_0x3488b2){_0x1dd184=_0x1dd184-0x86;const _0x494b25=a337_0x494b();let _0x2cc717=_0x494b25[_0x1dd184];return _0x2cc717;}function getCurrentCliVersion(){const _0x4d4d74=a337_0x2cc7;try{const _0x33ece8=fileURLToPath(import.meta.url),_0x22d78c=resolve(dirname(_0x33ece8),_0x4d4d74(0xa6)),_0x62fe9b=resolve(_0x22d78c,_0x4d4d74(0x98)),_0x1e4bea=JSON['parse'](readFileSync(_0x62fe9b,'utf-8'));return _0x1e4bea[_0x4d4d74(0x8d)]||'1.0.0';}catch{return _0x4d4d74(0x89);}}export async function checkCliVersion(){const _0x1e39f5=a337_0x2cc7,_0x4cd31e=getCurrentCliVersion(),_0x4d8562=await getCliVersionPolicy(),_0x20f7a9=_0x4d8562?.['stableVersion']||null,_0x129025=_0x4d8562?.[_0x1e39f5(0x87)]||null;let _0x31cb83=![],_0x494810=![];const _0x11a8e1=a337_0x1d6470[_0x1e39f5(0x8e)](_0x4cd31e);if(_0x11a8e1&&_0x20f7a9)try{const _0x3d733d=a337_0x1d6470[_0x1e39f5(0x8e)](_0x20f7a9);if(_0x3d733d)_0x31cb83=a337_0x1d6470['lt'](_0x11a8e1,_0x3d733d);}catch{}if(_0x11a8e1&&_0x129025)try{const _0x555ef4=a337_0x1d6470[_0x1e39f5(0x8e)](_0x129025);if(_0x555ef4)_0x494810=a337_0x1d6470['lt'](_0x11a8e1,_0x555ef4);}catch{}return _0x494810&&(_0x31cb83=!![]),{'currentVersion':_0x4cd31e,'stableVersion':_0x20f7a9,'minimumVersion':_0x129025,'needsUpgrade':_0x31cb83,'belowMinimum':_0x494810,'isPreRelease':![],'upgradeMessage':_0x4d8562?.['upgradeMessage'],'minimumVersionMessage':_0x4d8562?.[_0x1e39f5(0x8a)]};}export function printCliUpgradeWarning(_0x56624a){const _0x32adb6=a337_0x2cc7;if(!_0x56624a['needsUpgrade']&&!_0x56624a[_0x32adb6(0x86)])return;const _0x2b25b7='\x1b[31m',_0x238ed0=_0x32adb6(0xa2),_0x4cda9d=_0x32adb6(0xac),_0x59aa13='\x1b[1m',_0x4b6567=getCliUpgradeCommand(_0x56624a);console[_0x32adb6(0xa5)](),_0x56624a['belowMinimum']?(console[_0x32adb6(0xa5)](''+_0x2b25b7+_0x59aa13+_0x32adb6(0xa0)+_0x4cda9d),console[_0x32adb6(0xa5)](_0x2b25b7+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x56624a[_0x32adb6(0x9d)]+_0x4cda9d),_0x56624a[_0x32adb6(0x87)]&&console['log'](_0x2b25b7+'\x20\x20\x20Minimum\x20supported:\x20'+_0x56624a['minimumVersion']+_0x4cda9d),_0x56624a['stableVersion']&&_0x56624a['stableVersion']!==_0x56624a['minimumVersion']&&console[_0x32adb6(0xa5)](_0x2b25b7+_0x32adb6(0x88)+_0x56624a['stableVersion']+_0x4cda9d),_0x56624a[_0x32adb6(0x8a)]&&console[_0x32adb6(0xa5)](_0x2b25b7+_0x32adb6(0x99)+_0x56624a[_0x32adb6(0x8a)]+_0x4cda9d),console[_0x32adb6(0xa5)](_0x2b25b7+_0x32adb6(0x9a)+_0x4b6567+_0x4cda9d)):(console[_0x32adb6(0xa5)](''+_0x238ed0+_0x59aa13+_0x32adb6(0xa7)+_0x4cda9d),console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0xa4)+_0x56624a[_0x32adb6(0x9d)]+_0x4cda9d),console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0xab)+_0x56624a[_0x32adb6(0xa1)]+_0x4cda9d),_0x56624a[_0x32adb6(0x9f)]&&console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0x99)+_0x56624a[_0x32adb6(0x9f)]+_0x4cda9d),console[_0x32adb6(0xa5)](_0x238ed0+_0x32adb6(0x9a)+_0x4b6567+_0x4cda9d)),console[_0x32adb6(0xa5)]();}function a337_0x494b(){const _0x4f7220=['filter','Upgrade\x20command:\x20','\x20\x20\x20Stable\x20version:\x20','\x1b[0m','belowMinimum','minimumVersion','\x20\x20\x20Recommended\x20stable:\x20','1.0.0','minimumVersionMessage','8728752CHovtL','latest','version','coerce','35dXUAAi','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','9876465dqWHag','validation','610OsqKJq','959933rbgcou','622127CToOHw','435124rJqRbE','7ptunpO','package.json','\x20\x20\x20','\x20\x20\x20Upgrade\x20command:\x20','5589714YxzrVl','npm\x20install\x20-g\x20','currentVersion','join','upgradeMessage','↪\x20Critical\x20CLI\x20upgrade\x20required','stableVersion','\x1b[33m','6NdFYMo','\x20\x20\x20Current\x20CLI\x20version:\x20','log','../..','↪\x20New\x20version\x20available','766257XinHrJ'];a337_0x494b=function(){return _0x4f7220;};return a337_0x494b();}export function assertCliVersionSupported(_0x16440c){const _0x27bfd5=a337_0x2cc7;if(!_0x16440c['belowMinimum'])return;const _0x487c65=[_0x16440c['minimumVersionMessage'],'Current\x20version:\x20'+_0x16440c[_0x27bfd5(0x9d)],_0x16440c[_0x27bfd5(0x87)]?'Minimum\x20supported:\x20'+_0x16440c[_0x27bfd5(0x87)]:null,_0x27bfd5(0xaa)+getCliUpgradeCommand(_0x16440c)][_0x27bfd5(0xa9)](Boolean)[_0x27bfd5(0x9e)]('\x0a');throw CliErrors[_0x27bfd5(0x92)](_0x27bfd5(0x90),_0x487c65);}
|
|
@@ -11,10 +11,22 @@ export interface ProjectTemplateCdnDescriptor {
|
|
|
11
11
|
size: number;
|
|
12
12
|
}
|
|
13
13
|
export interface RabetbaseCdnConfig {
|
|
14
|
+
schemaVersion?: number;
|
|
14
15
|
cli?: Record<string, unknown>;
|
|
15
16
|
projectTemplate?: ProjectTemplateCdnDescriptor;
|
|
17
|
+
beta?: {
|
|
18
|
+
projectTemplate?: ProjectTemplateCdnDescriptor;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
16
21
|
[key: string]: unknown;
|
|
17
22
|
}
|
|
23
|
+
export declare function isBetaCliVersion(version: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the project template channel without changing the legacy contract:
|
|
26
|
+
* stable releases keep reading the top-level descriptor, while beta releases
|
|
27
|
+
* may override it under `beta.projectTemplate`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveProjectTemplateDescriptor(config: RabetbaseCdnConfig, cliVersion: string): ProjectTemplateCdnDescriptor | undefined;
|
|
18
30
|
export declare function fetchRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
|
|
19
31
|
export declare function fetchCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
20
32
|
export declare function getRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10f0cb,_0x41e307){const _0x7493f=a338_0x4e3e,_0x165fad=_0x10f0cb();while(!![]){try{const _0x562494=parseInt(_0x7493f(0x1a7))/0x1*(-parseInt(_0x7493f(0x1a9))/0x2)+parseInt(_0x7493f(0x1ae))/0x3+parseInt(_0x7493f(0x1b5))/0x4*(parseInt(_0x7493f(0x1a8))/0x5)+parseInt(_0x7493f(0x1b1))/0x6*(parseInt(_0x7493f(0x1bb))/0x7)+parseInt(_0x7493f(0x1bd))/0x8+-parseInt(_0x7493f(0x1b4))/0x9*(parseInt(_0x7493f(0x1b6))/0xa)+-parseInt(_0x7493f(0x1b3))/0xb;if(_0x562494===_0x41e307)break;else _0x165fad['push'](_0x165fad['shift']());}catch(_0x2626ae){_0x165fad['push'](_0x165fad['shift']());}}}(a338_0x2baa,0x32161));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';import a338_0x5027f6 from'semver';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;export function isBetaCliVersion(_0x580689){const _0x40cfb9=a338_0x4e3e,_0x195495=a338_0x5027f6[_0x40cfb9(0x1bc)](_0x580689);return _0x195495?a338_0x5027f6[_0x40cfb9(0x1b8)](_0x195495)?.[0x0]==='beta':![];}export function resolveProjectTemplateDescriptor(_0x5f04f7,_0x221624){const _0x18e59a=a338_0x4e3e;if(isBetaCliVersion(_0x221624))return _0x5f04f7[_0x18e59a(0x1a6)]?.['projectTemplate']??_0x5f04f7[_0x18e59a(0x1a5)];return _0x5f04f7[_0x18e59a(0x1a5)];}function pickString(_0x305bc1){const _0x2c8d22=a338_0x4e3e;return typeof _0x305bc1===_0x2c8d22(0x1ad)&&_0x305bc1[_0x2c8d22(0x1b2)]()[_0x2c8d22(0x1a3)]>0x0?_0x305bc1[_0x2c8d22(0x1b2)]():null;}function normalizeCliVersionPolicy(_0x4d6d65){const _0x5ce57c=a338_0x4e3e;if(!_0x4d6d65||typeof _0x4d6d65!=='object')return null;const _0x90969b=_0x4d6d65,_0x30f729=_0x90969b['cli']&&typeof _0x90969b[_0x5ce57c(0x1b7)]===_0x5ce57c(0x1aa)?_0x90969b[_0x5ce57c(0x1b7)]:_0x90969b,_0x3f1680=pickString(_0x30f729['stableVersion'])||pickString(_0x30f729['latestVersion'])||pickString(_0x30f729['recommendedVersion']),_0x49eae2=pickString(_0x30f729[_0x5ce57c(0x1b0)])||pickString(_0x30f729[_0x5ce57c(0x1ac)]);if(!_0x3f1680&&!_0x49eae2)return null;return{'stableVersion':_0x3f1680,'minimumVersion':_0x49eae2,'upgradeMessage':pickString(_0x30f729[_0x5ce57c(0x1b9)])||undefined,'minimumVersionMessage':pickString(_0x30f729[_0x5ce57c(0x1af)])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0x4d29a1=a338_0x4e3e,_0xcb6b86=new AbortController(),_0x48125a=setTimeout(()=>_0xcb6b86[_0x4d29a1(0x1ba)](),FETCH_TIMEOUT_MS);try{const _0x1d6d06=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x4d29a1(0x1a2)},'signal':_0xcb6b86[_0x4d29a1(0x1a4)]});if(!_0x1d6d06['ok'])return null;const _0x2068d7=await _0x1d6d06[_0x4d29a1(0x1ab)]();return _0x2068d7&&typeof _0x2068d7===_0x4d29a1(0x1aa)?_0x2068d7:null;}catch{return null;}finally{clearTimeout(_0x48125a);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];function a338_0x4e3e(_0x469238,_0x56149a){_0x469238=_0x469238-0x1a2;const _0x2baaeb=a338_0x2baa();let _0x4e3e0b=_0x2baaeb[_0x469238];return _0x4e3e0b;}function a338_0x2baa(){const _0x5ab609=['3142840fDmXwp','cli','prerelease','upgradeMessage','abort','6076jBsLVA','valid','2213920jEpbKU','application/json','length','signal','projectTemplate','beta','14020ywAsld','76185OVGeLr','26rfLKAM','object','json','minVersion','string','839313pFOjGf','minimumVersionMessage','minimumVersion','2172VzSyYE','trim','5043863eyotJY','9IwRiIi','76ggSWNv'];a338_0x2baa=function(){return _0x5ab609;};return a338_0x2baa();}export async function getRabetbaseCdnConfig(){const _0x2ca347=Date['now']();if(hasCachedConfig){const _0x15c981=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2ca347-cacheTime<_0x15c981)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x2ca347,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a339_0x1a332a=a339_0x286b;(function(_0x400efd,_0x3fcf5e){const _0x559d57=a339_0x286b,_0x5a6fde=_0x400efd();while(!![]){try{const _0x43e6c7=parseInt(_0x559d57(0x1d8))/0x1*(parseInt(_0x559d57(0x1d3))/0x2)+-parseInt(_0x559d57(0x1d7))/0x3*(-parseInt(_0x559d57(0x1ce))/0x4)+parseInt(_0x559d57(0x1d5))/0x5*(parseInt(_0x559d57(0x1d4))/0x6)+-parseInt(_0x559d57(0x1cd))/0x7+-parseInt(_0x559d57(0x1db))/0x8+parseInt(_0x559d57(0x1d0))/0x9*(-parseInt(_0x559d57(0x1d6))/0xa)+-parseInt(_0x559d57(0x1da))/0xb*(-parseInt(_0x559d57(0x1cf))/0xc);if(_0x43e6c7===_0x3fcf5e)break;else _0x5a6fde['push'](_0x5a6fde['shift']());}catch(_0xf358c5){_0x5a6fde['push'](_0x5a6fde['shift']());}}}(a339_0xb1b1,0xe5961));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a339_0x50c915,getMultiAppConfigs as a339_0x549cdb,getTemplateBaseUrl as a339_0xbb1234}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a339_0x286b(_0x7b0f8a,_0x31e260){_0x7b0f8a=_0x7b0f8a-0x1cd;const _0xb1b14a=a339_0xb1b1();let _0x286b68=_0xb1b14a[_0x7b0f8a];return _0x286b68;}export{isInProject}from'../context.js';export function readConfig(_0x44849b){const _0x491232=a339_0x286b,_0xb15184=readRawConfig(_0x44849b);return _0xb15184[_0x491232(0x1d1)]&&typeof _0xb15184[_0x491232(0x1d1)]===_0x491232(0x1d9)&&initEnv(_0xb15184[_0x491232(0x1d1)]),_0xb15184;}export function getConfigAppCode(){return a339_0x50c915();}export function getMultiAppConfigs(_0xe29288=a339_0x1a332a(0x1d2)){return a339_0x549cdb(_0xe29288);}function a339_0xb1b1(){const _0xdee32d=['440712AfpkUQ','8575317TuBZLM','env','project','2OdOuEM','24wFkrxT','1229270EHjgTG','10vyTslI','590931SIEoml','906553ksbInf','string','143eTtTMH','6032296Psqgqd','7693077puqhet','28DGToZW'];a339_0xb1b1=function(){return _0xdee32d;};return a339_0xb1b1();}export function getTemplateBaseUrl(){return a339_0xbb1234();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x308ea7,_0x188662){const _0x4c3716=a340_0x3872,_0x3bd3df=_0x308ea7();while(!![]){try{const _0x3613f1=-parseInt(_0x4c3716(0x128))/0x1+parseInt(_0x4c3716(0x12a))/0x2*(parseInt(_0x4c3716(0x131))/0x3)+-parseInt(_0x4c3716(0x134))/0x4+parseInt(_0x4c3716(0x130))/0x5+parseInt(_0x4c3716(0x133))/0x6*(-parseInt(_0x4c3716(0x12c))/0x7)+parseInt(_0x4c3716(0x12e))/0x8*(-parseInt(_0x4c3716(0x132))/0x9)+-parseInt(_0x4c3716(0x135))/0xa*(-parseInt(_0x4c3716(0x12f))/0xb);if(_0x3613f1===_0x188662)break;else _0x3bd3df['push'](_0x3bd3df['shift']());}catch(_0xba22e1){_0x3bd3df['push'](_0x3bd3df['shift']());}}}(a340_0x244c,0x68c00));function toFiniteNumber(_0x48565e){const _0x3303bb=a340_0x3872;if(typeof _0x48565e===_0x3303bb(0x12d)&&Number[_0x3303bb(0x129)](_0x48565e))return _0x48565e;if(typeof _0x48565e==='string'){const _0x72bfd4=_0x48565e[_0x3303bb(0x127)]();if(!_0x72bfd4)return undefined;const _0x1aa4cc=Number(_0x72bfd4);if(Number[_0x3303bb(0x129)](_0x1aa4cc))return _0x1aa4cc;}return undefined;}function a340_0x3872(_0x8fe285,_0x5a8800){_0x8fe285=_0x8fe285-0x127;const _0x244c9d=a340_0x244c();let _0x387219=_0x244c9d[_0x8fe285];return _0x387219;}function a340_0x244c(){const _0x551ef3=['33lHQljd','3782095DTkVde','6eETsdw','195309jxKEPw','252ncqSTO','813792BFUHdV','2091510MEEFHI','trim','94400XxxBwi','isFinite','320154XOoMIH','object','90517OxYUIy','number','160KvIPnM'];a340_0x244c=function(){return _0x551ef3;};return a340_0x244c();}export function normalizeEntityWithIdResponse(_0x30ae12){const _0x25031e=a340_0x3872,_0x4d2c69=toFiniteNumber(_0x30ae12);if(_0x4d2c69!==undefined)return{'id':_0x4d2c69,'entity':{'id':_0x4d2c69}};if(!_0x30ae12||typeof _0x30ae12!==_0x25031e(0x12b))return{'id':undefined,'entity':{}};const _0x53ddaa={..._0x30ae12},_0x51ed71=toFiniteNumber(_0x53ddaa['id']);return _0x51ed71!==undefined&&(_0x53ddaa['id']=_0x51ed71),{'id':_0x51ed71,'entity':_0x53ddaa};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e7721,_0x376f5c){const _0x564ac1=a341_0x5c35,_0x13f619=_0x3e7721();while(!![]){try{const _0x19ae26=-parseInt(_0x564ac1(0x86))/0x1*(parseInt(_0x564ac1(0x7e))/0x2)+parseInt(_0x564ac1(0x84))/0x3+parseInt(_0x564ac1(0x83))/0x4+parseInt(_0x564ac1(0x80))/0x5+parseInt(_0x564ac1(0x7f))/0x6*(-parseInt(_0x564ac1(0x82))/0x7)+parseInt(_0x564ac1(0x81))/0x8*(parseInt(_0x564ac1(0x7d))/0x9)+parseInt(_0x564ac1(0x7c))/0xa;if(_0x19ae26===_0x376f5c)break;else _0x13f619['push'](_0x13f619['shift']());}catch(_0x2a4a61){_0x13f619['push'](_0x13f619['shift']());}}}(a341_0x5e70,0x1f944));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x5c01d1,_0x4c60a2){const _0x5680f1=a341_0x5c35,_0x2a23d6=statSync(_0x5c01d1);if(_0x2a23d6[_0x5680f1(0x85)]()){!existsSync(_0x4c60a2)&&mkdirSync(_0x4c60a2,{'recursive':!![]});const _0x125666=readdirSync(_0x5c01d1);for(const _0x1db64f of _0x125666){await copyDir(join(_0x5c01d1,_0x1db64f),join(_0x4c60a2,_0x1db64f));}}else copyFileSync(_0x5c01d1,_0x4c60a2);}function a341_0x5c35(_0x3ae9c3,_0x1db546){_0x3ae9c3=_0x3ae9c3-0x7c;const _0x5e7036=a341_0x5e70();let _0x5c35be=_0x5e7036[_0x3ae9c3];return _0x5c35be;}export function ensureDir(_0x4520fb){!existsSync(_0x4520fb)&&mkdirSync(_0x4520fb,{'recursive':!![]});}function a341_0x5e70(){const _0x28df29=['21728geCGsS','452625ufhodk','isDirectory','105977PgRUQt','122510KHRiqV','9yipPGP','4vrisIm','47298LCNVyg','797870prahbO','1555832DqChfz','161FKllTF'];a341_0x5e70=function(){return _0x28df29;};return a341_0x5e70();}export function pathExists(_0x1e6f24){return existsSync(_0x1e6f24);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a342_0x58878f=a342_0x4563;(function(_0x405527,_0x2ca249){const _0x3239f3=a342_0x4563,_0x3113ee=_0x405527();while(!![]){try{const _0x47f89f=parseInt(_0x3239f3(0xa5))/0x1*(parseInt(_0x3239f3(0x97))/0x2)+-parseInt(_0x3239f3(0x9c))/0x3*(parseInt(_0x3239f3(0xa1))/0x4)+-parseInt(_0x3239f3(0x94))/0x5+-parseInt(_0x3239f3(0x93))/0x6*(-parseInt(_0x3239f3(0xaa))/0x7)+-parseInt(_0x3239f3(0x90))/0x8+parseInt(_0x3239f3(0x99))/0x9+-parseInt(_0x3239f3(0x95))/0xa*(-parseInt(_0x3239f3(0x8b))/0xb);if(_0x47f89f===_0x2ca249)break;else _0x3113ee['push'](_0x3113ee['shift']());}catch(_0x53f622){_0x3113ee['push'](_0x3113ee['shift']());}}}(a342_0x394f,0x9f826));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x274753=a342_0x4563,_0x5cab9e=getTemplateBaseUrl();return _0x5cab9e+_0x274753(0x9f);}const CACHE_DIR=join(homedir(),a342_0x58878f(0x91),'cache');export async function fetchGuidesFromCDN(){const _0x526618=a342_0x58878f,_0x27f03f=getGuidesCdnUrl(),_0xc27b1a=await fetch(_0x27f03f,{'headers':{'Accept':'application/json'}});if(!_0xc27b1a['ok'])throw new Error(_0x526618(0x92)+_0xc27b1a[_0x526618(0xa9)]+'\x20'+_0xc27b1a[_0x526618(0x9e)]);const _0x4537b8=await _0xc27b1a[_0x526618(0xa6)]();if(!_0x4537b8[_0x526618(0x9d)]||typeof _0x4537b8[_0x526618(0x9d)]!=='object')throw new Error(_0x526618(0x9a));return _0x4537b8;}export function writeGuidesToProject(_0x3e4105,_0x278ef4,_0x12c83d=a342_0x58878f(0xa3),_0x273a33){const _0x389cd9=a342_0x58878f,_0x500a3c=join(_0x278ef4,_0x12c83d);mkdirSync(_0x500a3c,{'recursive':!![]});for(const [_0x25ef00,_0x1db369]of Object[_0x389cd9(0xa2)](_0x3e4105[_0x389cd9(0x9d)])){let _0x1a5207=_0x1db369[_0x389cd9(0x8d)];_0x1db369[_0x389cd9(0x98)]&&(_0x1a5207=appendUpdateTime(_0x1a5207,_0x1db369[_0x389cd9(0x98)])),writeFileSync(join(_0x500a3c,_0x25ef00+'.md'),_0x1a5207,_0x389cd9(0x8f));}}export function appendUpdateTime(_0x434508,_0x288346){const _0x5f3cb5=a342_0x58878f;return _0x434508=_0x434508[_0x5f3cb5(0xa7)](/\n*>更新时间:.*$/m,''),_0x434508[_0x5f3cb5(0x8c)]()+(_0x5f3cb5(0x9b)+_0x288346);}export function getSkillTemplate(_0x4e8336){const _0x4abe20=a342_0x58878f;return _0x4e8336[_0x4abe20(0xac)]?.[_0x4abe20(0x8d)]||'';}export function appendExtendContents(_0x485e93,_0xe3cb61,_0x131f54){const _0x7e4dcc=a342_0x58878f,_0x12e4f3=[];for(const [,_0x391063]of Object[_0x7e4dcc(0xa2)](_0xe3cb61[_0x7e4dcc(0x9d)])){_0x391063[_0x7e4dcc(0xa8)]&&_0x12e4f3[_0x7e4dcc(0xab)](_0x391063[_0x7e4dcc(0xa8)][_0x7e4dcc(0x8c)]());}if(_0x12e4f3[_0x7e4dcc(0x8e)]===0x0)return _0x485e93;return _0x485e93[_0x7e4dcc(0x8c)]()+'\x0a\x0a'+_0x12e4f3[_0x7e4dcc(0x96)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x5fa697,_0x3b8bd8,_0xf8eef7){const _0x44eef7=a342_0x58878f,_0x3d9fd8=getSkillTemplate(_0x5fa697);if(!_0x3d9fd8)throw new Error('CDN\x20data\x20is\x20missing\x20skillTemplate');const _0x37e6df=dirname(_0x3b8bd8);mkdirSync(_0x37e6df,{'recursive':!![]});let _0x593343=_0x3d9fd8[_0x44eef7(0xa7)](/\{\{IDE_NAME\}\}/g,_0xf8eef7);_0x593343=appendExtendContents(_0x593343,_0x5fa697),_0x5fa697[_0x44eef7(0xac)]['lastUpdated']&&(_0x593343=appendUpdateTime(_0x593343,_0x5fa697[_0x44eef7(0xac)][_0x44eef7(0x98)])),writeFileSync(_0x3b8bd8,_0x593343,_0x44eef7(0x8f));}function a342_0x394f(){const _0x2cb0c2=['extendContent','status','666323rsHhrD','push','skillTemplate','2683241muiZJF','trimEnd','content','length','utf-8','8545672AVMOBv','.lovrabet','CDN\x20request\x20failed:\x20','78OTMQYG','1631045AHZZHr','20MzVXHH','join','350418xWCxTf','lastUpdated','532107jmnxZO','CDN\x20returned\x20invalid\x20data','\x0a\x0a>更新时间:','3SZRiXi','guides','statusText','/skills/guides.json','map','2450876KqUCIf','entries','.lovrabet/skill/guides','title','5btiOyU','json','replace'];a342_0x394f=function(){return _0x2cb0c2;};return a342_0x394f();}function a342_0x4563(_0x4bb3a8,_0x17eba5){_0x4bb3a8=_0x4bb3a8-0x8b;const _0x394f89=a342_0x394f();let _0x456398=_0x394f89[_0x4bb3a8];return _0x456398;}export async function installGuides(_0x2c46d3){const _0x358be4=a342_0x58878f,_0x43eb1d=await fetchGuidesFromCDN();return writeGuidesToProject(_0x43eb1d,_0x2c46d3),Object['keys'](_0x43eb1d[_0x358be4(0x9d)])[_0x358be4(0x8e)];}export function getGuidesSummary(_0x556aa1){const _0x5e4a2e=a342_0x58878f;return Object[_0x5e4a2e(0xa2)](_0x556aa1['guides'])[_0x5e4a2e(0xa0)](([_0x1f4171,_0x2bff81])=>({'key':_0x1f4171,'title':_0x2bff81[_0x5e4a2e(0xa4)],'path':_0x2bff81['path']}));}
|