@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-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/README.md +10 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +2 -2
- 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/detail.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.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.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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/page-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.d.ts +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/context.d.ts +3 -0
- package/lib/commands/issue/context.js +1 -0
- 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/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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/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/feishu-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.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- 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-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- 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/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- 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.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/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-issue-report.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/lib/commands/issue/shared.d.ts +0 -32
- package/lib/commands/issue/shared.js +0 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
- package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x595ca0=a44_0x3f87;(function(_0x2b7c7e,_0x2630f3){const _0xa67110=a44_0x3f87,_0xd66a2e=_0x2b7c7e();while(!![]){try{const _0x560ca2=parseInt(_0xa67110(0xde))/0x1*(parseInt(_0xa67110(0xd6))/0x2)+parseInt(_0xa67110(0xf2))/0x3+parseInt(_0xa67110(0xc4))/0x4+-parseInt(_0xa67110(0xa0))/0x5*(parseInt(_0xa67110(0xbc))/0x6)+-parseInt(_0xa67110(0x8e))/0x7*(parseInt(_0xa67110(0xc2))/0x8)+-parseInt(_0xa67110(0xd5))/0x9*(parseInt(_0xa67110(0xa1))/0xa)+parseInt(_0xa67110(0x9d))/0xb*(parseInt(_0xa67110(0xa4))/0xc);if(_0x560ca2===_0x2630f3)break;else _0xd66a2e['push'](_0xd66a2e['shift']());}catch(_0x1654f3){_0xd66a2e['push'](_0xd66a2e['shift']());}}}(a44_0x251c,0x5db8a));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0x595ca0(0xec),'command':'push','description':a44_0x595ca0(0x98),'risk':'write','structuredErrors':!![],'flags':[{'name':a44_0x595ca0(0xdc),'type':a44_0x595ca0(0xcf),'description':a44_0x595ca0(0xf8),'enum':['COMMON',a44_0x595ca0(0x95),'HOOK']},{'name':a44_0x595ca0(0xe5),'type':'string','description':a44_0x595ca0(0xe9)},{'name':'force','type':a44_0x595ca0(0xd4),'description':a44_0x595ca0(0xb2)}],async 'dryRun'(_0x258d70){const _0x384254=a44_0x595ca0,_0x2af153=loadBffProjectConfig(_0x258d70[_0x384254(0xf9)]),_0x8eedf1=await readBffLockFile(_0x2af153[_0x384254(0xf1)]),{appLock:_0x1604eb}=ensureLockScope(_0x8eedf1??createEmptyBffLock(),_0x258d70['appCode'],_0x2af153[_0x384254(0xea)],_0x384254(0x99)),_0x1c54b0=await getTargetFunctions(_0x2af153,_0x258d70),_0x5c3a1e=_0x1c54b0[_0x384254(0x91)](_0xd79dd8=>_0xd79dd8[_0x384254(0xdc)]===_0x384254(0xa7))?await scanLocalBffFunctions(_0x2af153,_0x384254(0xa7)):_0x1c54b0,_0x28b017=await buildHookMaps(_0x258d70[_0x384254(0xf9)],_0x258d70['apiDir'],_0x5c3a1e,_0x1604eb,_0x258d70[_0x384254(0xf7)]||_0x258d70[_0x384254(0xb8)]?.['currentApp']||_0x258d70[_0x384254(0xb8)]?.['defaultApp']),_0x3cb4d2=_0x258d70[_0x384254(0xeb)](_0x384254(0x9e)),_0x17da38=[];for(const _0x31e0a6 of _0x1c54b0){const _0x57862b=await computeFileHash(_0x31e0a6[_0x384254(0xdb)]),_0x3863c8=_0x1604eb['functions'][_0x31e0a6[_0x384254(0xae)]],_0x4b1b0d=!!_0x3863c8&&_0x3863c8[_0x384254(0xe8)]===_0x57862b,_0x456795=_0x28b017[_0x384254(0xd8)]['get'](_0x31e0a6['lockKey']),_0x327ad9=!!_0x3863c8?.[_0x384254(0x92)]&&_0x3863c8[_0x384254(0xd3)]==null&&(_0x3cb4d2||!_0x4b1b0d),_0x1bd08f=_0x327ad9?missingRemoteVersionConflict(_0x31e0a6,_0x3863c8):undefined,_0x4c6ff1=_0x28b017[_0x384254(0x9a)]['has'](_0x31e0a6[_0x384254(0xae)])?'failed':!_0x3cb4d2&&_0x4b1b0d?_0x384254(0xa6):_0x1bd08f?_0x384254(0xbd):_0x384254(0xbe);_0x17da38[_0x384254(0x99)]({'lockKey':_0x31e0a6[_0x384254(0xae)],'filePath':_0x31e0a6['filePath'],'remoteId':_0x3863c8?.[_0x384254(0x92)]??null,'mode':_0x3863c8?.['remoteId']?'update':'create','status':_0x4c6ff1,..._0x28b017[_0x384254(0x9a)]['has'](_0x31e0a6[_0x384254(0xae)])?{'error':_0x28b017['failures'][_0x384254(0x90)](_0x31e0a6[_0x384254(0xae)])}:{},..._0x1bd08f?{'conflict':_0x1bd08f}:{},..._0x28b017['existingHooks'][_0x384254(0xcd)](_0x31e0a6[_0x384254(0xae)])?{'datasetCode':_0x3863c8?.[_0x384254(0xb7)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x31e0a6[_0x384254(0xae)])]}:{},..._0x456795?{'alias':_0x456795[_0x384254(0xb0)]??null,'datasetCode':_0x456795[_0x384254(0xb7)],'operationType':_0x31e0a6['operationType'],'functionNode':_0x31e0a6['functionNode'],'warnings':_0x456795['warnings']}:{}});}return{'method':_0x384254(0xe2),'url':'/api/management/library/scripts/save','body':{'appCode':_0x258d70[_0x384254(0xf9)],'force':_0x3cb4d2,'files':_0x17da38,'cacheClearAtRuntime':_0x17da38['some'](_0x4b71d3=>_0x4b71d3[_0x384254(0x96)]===_0x384254(0xbe)),'cacheClearAtRuntimeTimes':_0x17da38[_0x384254(0x91)](_0x69279a=>_0x69279a[_0x384254(0x96)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x17da38[_0x384254(0xd9)]+_0x384254(0xd7)};},async 'execute'(_0x43c715){const _0x11b8e6=a44_0x595ca0,_0x419cdc=loadBffProjectConfig(_0x43c715[_0x11b8e6(0xf9)]),_0x5d506a=await readBffLockFile(_0x419cdc[_0x11b8e6(0xf1)]),{lockData:_0x376286,appLock:_0x43513f}=ensureLockScope(_0x5d506a??createEmptyBffLock(),_0x43c715[_0x11b8e6(0xf9)],_0x419cdc[_0x11b8e6(0xea)],_0x11b8e6(0x99)),_0x46b3c0=await getTargetFunctions(_0x419cdc,_0x43c715);if(_0x46b3c0[_0x11b8e6(0xd9)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x46ef7f=_0x43c715[_0x11b8e6(0xeb)]('force'),_0x255447=JSON[_0x11b8e6(0xf4)](JSON[_0x11b8e6(0xc9)](_0x376286)),_0x949cfc=_0x255447[_0x11b8e6(0xe1)][_0x43c715[_0x11b8e6(0xf9)]];if(!_0x949cfc)throw new Error(_0x11b8e6(0xf5)+_0x43c715[_0x11b8e6(0xf9)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x3f3909=_0x46b3c0['some'](_0x2e6e86=>_0x2e6e86[_0x11b8e6(0xdc)]===_0x11b8e6(0xa7))?await scanLocalBffFunctions(_0x419cdc,_0x11b8e6(0xa7)):_0x46b3c0,_0x372b79=await buildHookMaps(_0x43c715[_0x11b8e6(0xf9)],_0x43c715[_0x11b8e6(0xef)],_0x3f3909,_0x949cfc,_0x43c715['selectedAppName']||_0x43c715[_0x11b8e6(0xb8)]?.[_0x11b8e6(0xaf)]||_0x43c715[_0x11b8e6(0xb8)]?.[_0x11b8e6(0xd1)]),_0x299c4d=[],_0x5337d7=[],_0x20026f=[],_0x3fc02a=[];for(const _0x25c92e of _0x46b3c0){const _0x2899ae=_0x372b79[_0x11b8e6(0x9a)][_0x11b8e6(0x90)](_0x25c92e['lockKey']);if(_0x2899ae){_0x3fc02a[_0x11b8e6(0x99)]({'lockKey':_0x25c92e[_0x11b8e6(0xae)],'error':_0x2899ae});continue;}const _0x48a7e3=await computeFileHash(_0x25c92e[_0x11b8e6(0xdb)]),_0x6c67d1=_0x949cfc['functions'][_0x25c92e[_0x11b8e6(0xae)]];if(!_0x46ef7f&&_0x6c67d1&&_0x6c67d1['hash']===_0x48a7e3){_0x5337d7[_0x11b8e6(0x99)]({'lockKey':_0x25c92e['lockKey'],'reason':'unchanged'});continue;}if(_0x6c67d1?.['remoteId']&&_0x6c67d1['version']==null){_0x20026f[_0x11b8e6(0x99)](missingRemoteVersionConflict(_0x25c92e,_0x6c67d1));continue;}try{await uploadSingleFunction(_0x43c715[_0x11b8e6(0xf9)],_0x25c92e,_0x949cfc,_0x372b79);const _0xa20b05=_0x949cfc[_0x11b8e6(0xaa)][_0x25c92e['lockKey']];_0x299c4d[_0x11b8e6(0x99)]({'lockKey':_0x25c92e[_0x11b8e6(0xae)],'remoteId':_0xa20b05?.[_0x11b8e6(0x92)]??0x0});}catch(_0x1e3379){const _0x56cefe=remoteVersionChangedConflict(_0x25c92e,_0x6c67d1,_0x1e3379);if(_0x56cefe){_0x20026f['push'](_0x56cefe);continue;}_0x3fc02a[_0x11b8e6(0x99)]({'lockKey':_0x25c92e[_0x11b8e6(0xae)],'error':_0x1e3379 instanceof Error?_0x1e3379[_0x11b8e6(0xc7)]:String(_0x1e3379)});}}_0x949cfc[_0x11b8e6(0xee)]=new Date()[_0x11b8e6(0xa2)](),await writeBffLockFile(_0x419cdc[_0x11b8e6(0xf1)],_0x255447),await waitForUploadedLockEntries(_0x419cdc['lockFilePath'],_0x43c715['appCode'],_0x299c4d[_0x11b8e6(0xce)](_0x4d6c0d=>_0x4d6c0d['lockKey']));let _0xb934b8={'attempted':![],'cleared':![]};if(_0x299c4d[_0x11b8e6(0xd9)]>0x0)try{let _0x8d1dd3='';for(let _0x37b3fb=0x0;_0x37b3fb<CACHE_CLEAR_ATTEMPTS;_0x37b3fb+=0x1){_0x8d1dd3=await clearBffScriptCache(),_0x37b3fb<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0xb934b8={'attempted':!![],'cleared':!![],'message':_0x8d1dd3||_0x11b8e6(0xc0)};}catch(_0x476cc1){_0xb934b8={'attempted':!![],'cleared':![],'error':_0x476cc1 instanceof Error?_0x476cc1[_0x11b8e6(0xc7)]:String(_0x476cc1)};}const _0x51430a=_0x3fc02a[_0x11b8e6(0xd9)]===0x0&&(_0xb934b8[_0x11b8e6(0xbb)]?_0xb934b8[_0x11b8e6(0xbf)]:!![]),_0x1f66d7=_0x51430a,_0x2f04b7=_0xb934b8[_0x11b8e6(0xbb)]?_0xb934b8[_0x11b8e6(0xbf)]?_0x11b8e6(0x93):_0x11b8e6(0xf6):_0x11b8e6(0xed);return{'ok':_0x1f66d7,'data':{'uploaded':_0x299c4d,'skipped':_0x5337d7,'conflicts':_0x20026f,'failed':_0x3fc02a,'cacheClear':_0xb934b8,'warnings':[...[..._0x372b79[_0x11b8e6(0xd8)][_0x11b8e6(0xd2)]()][_0x11b8e6(0xb5)](_0x22a601=>_0x22a601[_0x11b8e6(0xe6)]),...[..._0x372b79[_0x11b8e6(0xad)]][_0x11b8e6(0xce)](existingHookWarning)]},'message':formatPushMessage(_0x299c4d[_0x11b8e6(0xd9)],_0x5337d7[_0x11b8e6(0xd9)],_0x20026f['length'],_0x3fc02a[_0x11b8e6(0xd9)],_0x2f04b7)};}};function missingRemoteVersionConflict(_0x4da6fe,_0x17edc5){const _0x1ef79d=a44_0x595ca0;return remoteVersionConflict(_0x4da6fe,_0x17edc5,_0x1ef79d(0xb9),_0x1ef79d(0x9c));}function remoteVersionChangedConflict(_0x4d55ba,_0x4f2650,_0x4a3714){const _0x191aed=a44_0x595ca0;if(!_0x4f2650?.[_0x191aed(0x92)]||_0x4f2650[_0x191aed(0xd3)]==null||!isRemoteVersionConflict(_0x4a3714))return undefined;return remoteVersionConflict(_0x4d55ba,_0x4f2650,'BFF_REMOTE_VERSION_CHANGED','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x199b31,_0x9ce929,_0x39425a,_0x3e6be2){const _0xddcb2b=a44_0x595ca0;return{'code':_0x39425a,'lockKey':_0x199b31[_0xddcb2b(0xae)],'filePath':_0x199b31[_0xddcb2b(0xdb)],'remoteId':_0x9ce929[_0xddcb2b(0x92)],..._0x9ce929[_0xddcb2b(0xd3)]!=null?{'expectedVersion':_0x9ce929['version']}:{},'message':_0x3e6be2,'nextAction':{'action':_0xddcb2b(0xa3),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x9ce929[_0xddcb2b(0x92)]+_0xddcb2b(0xc6),'requiresReview':!![],'message':_0xddcb2b(0xe0)}};}function isRemoteVersionConflict(_0x448489){const _0x4d4496=a44_0x595ca0,_0x4935da=_0x448489 instanceof Error?_0x448489[_0x4d4496(0xc7)]:String(_0x448489),_0x5b796c=getPlatformErrorCode(_0x448489)??'';return[_0x4935da,_0x5b796c][_0x4d4496(0x91)](_0x3e551f=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i['test'](_0x3e551f));}function formatPushMessage(_0x514ba9,_0x1d80a8,_0x16e7f4,_0x2e47e,_0x2394df){const _0x4ab151=a44_0x595ca0,_0x4ac4e7=[_0x4ab151(0x9b)+_0x514ba9+_0x4ab151(0xe3),_0x1d80a8+'\x20skipped'];_0x16e7f4>0x0&&_0x4ac4e7['push'](_0x16e7f4+_0x4ab151(0xc8)+(_0x16e7f4===0x1?'':'s')+'\x20'+(_0x16e7f4===0x1?_0x4ab151(0xb4):_0x4ab151(0xab))+_0x4ab151(0xca));if(_0x2e47e>0x0)_0x4ac4e7[_0x4ab151(0x99)](_0x2e47e+_0x4ab151(0xdd));return _0x4ac4e7[_0x4ab151(0x99)](_0x2394df),_0x4ac4e7[_0x4ab151(0x9f)](',\x20');}async function getTargetFunctions(_0x15eb5a,_0x3d9980){const _0x4df4a0=a44_0x595ca0,_0x215e9b=_0x3d9980[_0x4df4a0(0xe7)](_0x4df4a0(0xdc)),_0x29178c=_0x3d9980[_0x4df4a0(0xe7)](_0x4df4a0(0xe5)),_0x441477=normalizeBffType(_0x215e9b)??undefined;if(_0x29178c&&!_0x441477)throw CliErrors[_0x4df4a0(0xa9)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x1829df=await scanLocalBffFunctions(_0x15eb5a,_0x441477);if(_0x29178c){const _0x422ae2=_0x1829df['filter'](_0x487f94=>_0x487f94[_0x4df4a0(0xe5)]===_0x29178c);if(_0x422ae2[_0x4df4a0(0xd9)]===0x0)throw CliErrors[_0x4df4a0(0xa9)](_0x4df4a0(0xcc)+_0x441477+'/'+_0x29178c);return _0x422ae2;}return _0x1829df;}function existingHookWarning(_0x354d12){const _0x1d8a47=a44_0x595ca0;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x354d12,'message':_0x1d8a47(0xf0)};}function a44_0x3f87(_0x1e15d3,_0x2a4389){_0x1e15d3=_0x1e15d3-0x8e;const _0x251c76=a44_0x251c();let _0x3f87e8=_0x251c76[_0x1e15d3];return _0x3f87e8;}function a44_0x251c(){const _0x8f4f3=['size','name','warnings','str','hash','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','scriptsRoot','bool','bff','runtime\x20cache\x20not\x20needed','lastSync','apiDir','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','lockFilePath','1074573LyNhSr','operationType','parse','Lock\x20scope\x20for\x20app\x20\x22','runtime\x20cache\x20clear\x20failed','selectedAppName','Push\x20only\x20this\x20script\x20type','appCode','8981bMSZEo','functionName','get','some','remoteId','runtime\x20cache\x20cleared','Incomplete\x20HOOK\x20path:\x20','ENDPOINT','status','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','push','failures','Push\x20complete:\x20','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','48851uyTjgE','force','join','535GoOVSZ','7415540LAVBHY','toISOString','review_remote_and_merge','516foMBAF','beforeScriptId','unchanged','HOOK','profileName','validation','functions','require','scriptType','existingHooks','lockKey','currentApp','alias','filter','Force\x20push\x20ignoring\x20hash\x20protection','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','requires','flatMap','functionNode','datasetCode','mergedCli','BFF_REMOTE_VERSION_MISSING',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','attempted','5790CPVzBg','conflict','would_push','cleared','Runtime\x20script\x20cache\x20cleared.','startsWith','3784FVeATj','description','2942924QyELGN','after','\x20--format\x20compress','message','\x20conflict','stringify','\x20resolution','delete','Local\x20function\x20not\x20found:\x20','has','map','string','dataset','defaultApp','values','version','boolean','9rDlDae','24474lHtqbE','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','resolutions','length','set','filePath','type','\x20failed','45LDNrYj','utf8','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','apps','POST','\x20uploaded'];a44_0x251c=function(){return _0x8f4f3;};return a44_0x251c();}async function buildHookMaps(_0x55ae70,_0x9b9cf5,_0x9841ba,_0x4ea79e,_0x3bd971){const _0x3f79ce=a44_0x595ca0,_0x5d8b95=_0x9841ba[_0x3f79ce(0x91)](_0x3c0466=>_0x3c0466[_0x3f79ce(0xdc)]===_0x3f79ce(0xa7));if(!_0x5d8b95)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0xbaa6d3=resolveApiModelSource(_0x9b9cf5,_0x55ae70,_0x3bd971),_0x19a8bd=loadAliasMap(_0x9b9cf5,undefined,_0xbaa6d3['filePath'],_0xbaa6d3[_0x3f79ce(0xa8)]);assertUnambiguousHookAliases(_0x19a8bd);const _0x6baba0=[..._0x19a8bd[_0x3f79ce(0xce)](_0x3f0cad=>[_0x3f0cad[_0x3f79ce(0xb0)],_0x3f0cad['datasetCode']]),...trackedHookDirectoryMappings(_0x4ea79e)[_0x3f79ce(0xce)](_0xe22140=>[_0xe22140['alias'],_0xe22140['datasetCode']])],_0x528ac0=await listDatasets(_0x55ae70);assertUnambiguousHookDirectoryMappings(_0x6baba0['map'](([_0xa49469,_0x3eee71])=>({'alias':_0xa49469,'datasetCode':_0x3eee71})));const _0x5e6362=buildHookDirectoryIndexes(_0x528ac0,_0x6baba0),_0x3fd92b=new Map(),_0x3cdc20=preflightPushHookDirectories(_0x9841ba,_0x4ea79e,_0x5e6362,_0x3fd92b),_0x43902b=new Set(),_0x5df31d=_0x9841ba[_0x3f79ce(0xb1)](_0x176137=>_0x3fd92b['get'](_0x176137['lockKey'])?.[_0x3f79ce(0xc1)]('HOOK_DATASET_NOT_FOUND:')&&_0x4ea79e[_0x3f79ce(0xaa)][_0x176137['lockKey']]?.[_0x3f79ce(0x92)]&&_0x4ea79e['functions'][_0x176137[_0x3f79ce(0xae)]]?.[_0x3f79ce(0xb7)]);if(_0x5df31d['length']>0x0){let _0x41758e;try{_0x41758e=await getBffScriptStatistics(_0x55ae70);}catch(_0xbb7386){for(const _0x21e319 of _0x5df31d)_0x3fd92b[_0x3f79ce(0xda)](_0x21e319['lockKey'],'Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20'+(_0xbb7386 instanceof Error?_0xbb7386[_0x3f79ce(0xc7)]:String(_0xbb7386)));return{'resolutions':_0x3cdc20,'failures':_0x3fd92b,'existingHooks':_0x43902b};}for(const _0x362b2e of _0x5df31d){const _0xae60ee=_0x4ea79e[_0x3f79ce(0xaa)][_0x362b2e[_0x3f79ce(0xae)]];try{const _0x493c78=new Set(_0x9841ba[_0x3f79ce(0xb1)](_0x4f6d6c=>_0x4f6d6c[_0x3f79ce(0xdc)]===_0x3f79ce(0xa7)&&_0x4ea79e[_0x3f79ce(0xaa)][_0x4f6d6c[_0x3f79ce(0xae)]]?.[_0x3f79ce(0xb7)]===_0xae60ee[_0x3f79ce(0xb7)])[_0x3f79ce(0xce)](_0x2ed925=>_0x2ed925[_0x3f79ce(0xb0)]));if(_0x493c78[_0x3f79ce(0xe4)]>0x1)throw CliErrors[_0x3f79ce(0xa9)](_0x3f79ce(0xb3));const _0xaa058e=_0x41758e[_0x3f79ce(0xb5)](_0x1c4f26=>[{'datasetCode':_0x1c4f26[_0x3f79ce(0xb7)],'operationType':snakeToCamel(_0x1c4f26[_0x3f79ce(0xf3)]),'functionNode':'before','id':_0x1c4f26[_0x3f79ce(0xa5)]},{'datasetCode':_0x1c4f26[_0x3f79ce(0xb7)],'operationType':snakeToCamel(_0x1c4f26[_0x3f79ce(0xf3)]),'functionNode':_0x3f79ce(0xc5),'id':_0x1c4f26['afterScriptId']}])[_0x3f79ce(0xb1)](_0x16f914=>_0x16f914['id']===_0xae60ee[_0x3f79ce(0x92)]),_0x28fa79=await getBffScriptInfo(_0xae60ee[_0x3f79ce(0x92)]);if(_0x28fa79['id']!==_0xae60ee[_0x3f79ce(0x92)]||_0x28fa79[_0x3f79ce(0xf9)]!==_0x55ae70||_0x28fa79[_0x3f79ce(0xac)]!==_0x3f79ce(0xa7)||_0x28fa79[_0x3f79ce(0x8f)]!==_0x362b2e[_0x3f79ce(0xe5)]||_0xae60ee[_0x3f79ce(0xd3)]==null||_0x28fa79[_0x3f79ce(0xd3)]!==_0xae60ee[_0x3f79ce(0xd3)]||_0xaa058e[_0x3f79ce(0xd9)]!==0x1||_0xaa058e[0x0][_0x3f79ce(0xb7)]!==_0xae60ee[_0x3f79ce(0xb7)]||_0xaa058e[0x0]['operationType']!==_0x362b2e[_0x3f79ce(0xf3)]||_0xaa058e[0x0][_0x3f79ce(0xb6)]!==_0x362b2e['functionNode']||_0xae60ee['operationType']!==_0x362b2e[_0x3f79ce(0xf3)]||_0xae60ee[_0x3f79ce(0xb6)]!==_0x362b2e[_0x3f79ce(0xb6)])throw CliErrors[_0x3f79ce(0xa9)](_0x3f79ce(0x97));_0x43902b['add'](_0x362b2e[_0x3f79ce(0xae)]),_0x3fd92b[_0x3f79ce(0xcb)](_0x362b2e[_0x3f79ce(0xae)]);}catch(_0x2e01c4){_0x3fd92b['set'](_0x362b2e['lockKey'],_0x2e01c4 instanceof Error?_0x2e01c4[_0x3f79ce(0xc7)]:String(_0x2e01c4));}}}return{'resolutions':_0x3cdc20,'failures':_0x3fd92b,'existingHooks':_0x43902b};}async function uploadSingleFunction(_0x2b2a48,_0x482646,_0x3e6e2a,_0x1fd89c){const _0x184b64=a44_0x595ca0,_0x4a45bd=await readFile(_0x482646[_0x184b64(0xdb)],_0x184b64(0xdf)),_0x1d5487=await computeFileHash(_0x482646[_0x184b64(0xdb)]),_0x1e43c2=_0x3e6e2a[_0x184b64(0xaa)][_0x482646[_0x184b64(0xae)]];if(_0x1e43c2?.[_0x184b64(0x92)]&&_0x1e43c2[_0x184b64(0xd3)]==null)throw CliErrors[_0x184b64(0xa9)](_0x482646[_0x184b64(0xae)]+_0x184b64(0xba));let _0x1d2270=extractScriptDescription(_0x4a45bd);if(!_0x1d2270&&_0x1e43c2?.[_0x184b64(0x92)]){const _0x34feae=await getBffScriptInfo(_0x1e43c2['remoteId']);_0x1d2270=_0x34feae[_0x184b64(0xc3)]||undefined;}const _0x1f9342={'appCode':_0x2b2a48,'functionName':_0x482646[_0x184b64(0xe5)],'scriptType':_0x482646[_0x184b64(0xdc)],'scriptContent':_0x4a45bd};if(_0x1e43c2?.[_0x184b64(0x92)])_0x1f9342['id']=_0x1e43c2['remoteId'];if(_0x1e43c2?.['version']!=null)_0x1f9342['version']=_0x1e43c2[_0x184b64(0xd3)];if(_0x1d2270)_0x1f9342[_0x184b64(0xc3)]=_0x1d2270;if(_0x482646[_0x184b64(0xdc)]==='HOOK'){const _0x42c47f=_0x1fd89c['resolutions'][_0x184b64(0x90)](_0x482646['lockKey']);if(!_0x42c47f&&!_0x1fd89c[_0x184b64(0xad)][_0x184b64(0xcd)](_0x482646[_0x184b64(0xae)])||!_0x482646[_0x184b64(0xf3)]||!_0x482646[_0x184b64(0xb6)])throw CliErrors[_0x184b64(0xa9)](_0x184b64(0x94)+_0x482646[_0x184b64(0xae)]);_0x42c47f&&(_0x1f9342['datasetId']=_0x42c47f[_0x184b64(0xd0)]['id'],_0x1f9342[_0x184b64(0xf3)]=_0x482646[_0x184b64(0xf3)]),_0x1f9342[_0x184b64(0xb6)]=_0x482646[_0x184b64(0xb6)];}const _0x402fec=await saveBffScript(_0x1f9342),_0x5c87ed=_0x402fec['id'],_0x3d9277=_0x402fec['script']??await getBffScriptInfo(_0x5c87ed),_0x3378f2={'hash':_0x1d5487,'remoteId':_0x5c87ed,'version':_0x3d9277['version']};if(_0x482646[_0x184b64(0xdc)]===_0x184b64(0xa7)){const _0x24483f=_0x1fd89c[_0x184b64(0xd8)][_0x184b64(0x90)](_0x482646[_0x184b64(0xae)]);if(!_0x24483f){_0x3e6e2a[_0x184b64(0xaa)][_0x482646[_0x184b64(0xae)]]={..._0x1e43c2,..._0x3378f2};return;}_0x3378f2['alias']=_0x24483f[_0x184b64(0xb0)]??_0x1e43c2?.[_0x184b64(0xb0)],_0x3378f2['datasetCode']=_0x24483f[_0x184b64(0xb7)],_0x3378f2[_0x184b64(0xf3)]=_0x482646[_0x184b64(0xf3)],_0x3378f2[_0x184b64(0xb6)]=_0x482646[_0x184b64(0xb6)];}_0x3e6e2a[_0x184b64(0xaa)][_0x482646[_0x184b64(0xae)]]=_0x3378f2;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3e2c3d,_0x476fca,_0x3f756c){const _0x49b326=a44_0x595ca0;if(_0x3f756c['length']===0x0)return;for(let _0x2d45fe=0x0;_0x2d45fe<LOCK_SETTLE_RETRY_COUNT;_0x2d45fe+=0x1){const _0x41b4bd=await readBffLockFile(_0x3e2c3d),_0x90f3f1=_0x41b4bd?.[_0x49b326(0xe1)]?.[_0x476fca]?.[_0x49b326(0xaa)]??{},_0x257a98=_0x3f756c['every'](_0x56cdee=>!!_0x90f3f1[_0x56cdee]?.[_0x49b326(0x92)]);if(_0x257a98)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x3f756c[_0x49b326(0x9f)](',\x20')+'.');}
|
|
1
|
+
const a44_0x4e164d=a44_0x5be3;function a44_0x28e8(){const _0x50457e=['profileName','currentApp','/api/management/library/scripts/save','update','get','message','flatMap','2366uPBQaT','values','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','14648WefiGq','\x20uploaded','Runtime\x20script\x20cache\x20cleared.','10397583AWVyXO','190332KeCUuY','review_remote_and_merge','existingHooks','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','477645gnCtmz','datasetId','HOOK','utf8','mergedCli','apiDir','afterScriptId','map','runtime\x20cache\x20clear\x20failed','operationType','functionNode','No\x20local\x20Backend\x20Function\x20scripts\x20found.','requires','2315538DrPizj','Would\x20inspect\x20','name','filePath','cleared','would_push','selectedAppName','remoteId','dataset','2121620iichBX','HOOK_DATASET_NOT_FOUND:','appCode','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','set','BFF_REMOTE_VERSION_MISSING','scriptType','Push\x20complete:\x20','join','\x20skipped','\x20resolution','1908012TmFPWq','runtime\x20cache\x20not\x20needed','EXISTING_HOOK_BINDING_PRESERVED','failures','validation','length','\x20--format\x20compress','2wfqCgf','parse','version','runtime\x20cache\x20cleared','functionName','bool','Lock\x20scope\x20for\x20app\x20\x22','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20bff\x20detail\x20--id\x20','write','type','resolutions','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','conflict','lastSync','push','lockFilePath','datasetCode','COMMON','functions','before','has','force','warnings','defaultApp','lockKey','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','status','some','boolean','filter','Force\x20push\x20ignoring\x20hash\x20protection','size','unchanged','POST','str','scriptsRoot','BFF_REMOTE_VERSION_CHANGED','hash','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','attempted','string','stringify','description','test','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','alias','Push\x20only\x20this\x20script\x20type'];a44_0x28e8=function(){return _0x50457e;};return a44_0x28e8();}(function(_0x35aec1,_0x28c956){const _0x3e6155=a44_0x5be3,_0x117b89=_0x35aec1();while(!![]){try{const _0x1b2631=parseInt(_0x3e6155(0x19c))/0x1+parseInt(_0x3e6155(0x157))/0x2*(-parseInt(_0x3e6155(0x1a9))/0x3)+-parseInt(_0x3e6155(0x198))/0x4+-parseInt(_0x3e6155(0x145))/0x5+-parseInt(_0x3e6155(0x150))/0x6+-parseInt(_0x3e6155(0x191))/0x7*(-parseInt(_0x3e6155(0x194))/0x8)+parseInt(_0x3e6155(0x197))/0x9;if(_0x1b2631===_0x28c956)break;else _0x117b89['push'](_0x117b89['shift']());}catch(_0x2d891b){_0x117b89['push'](_0x117b89['shift']());}}}(a44_0x28e8,0xa8787));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a44_0x4e164d(0x168),'description':a44_0x4e164d(0x173),'risk':a44_0x4e164d(0x160),'structuredErrors':!![],'flags':[{'name':'type','type':'string','description':a44_0x4e164d(0x189),'enum':[a44_0x4e164d(0x16b),'ENDPOINT','HOOK']},{'name':'name','type':a44_0x4e164d(0x183),'description':a44_0x4e164d(0x165)},{'name':'force','type':a44_0x4e164d(0x177),'description':a44_0x4e164d(0x179)}],async 'dryRun'(_0xc8d8f3){const _0x812735=a44_0x4e164d,_0x4847e8=loadBffProjectConfig(_0xc8d8f3['appCode']),_0x2accfa=await readBffLockFile(_0x4847e8[_0x812735(0x169)]),{appLock:_0x409638}=ensureLockScope(_0x2accfa??createEmptyBffLock(),_0xc8d8f3['appCode'],_0x4847e8[_0x812735(0x17e)],_0x812735(0x168)),_0x231fc5=await getTargetFunctions(_0x4847e8,_0xc8d8f3),_0x136f6e=_0x231fc5[_0x812735(0x176)](_0xbe1b42=>_0xbe1b42[_0x812735(0x161)]===_0x812735(0x19e))?await scanLocalBffFunctions(_0x4847e8,'HOOK'):_0x231fc5,_0x255834=await buildHookMaps(_0xc8d8f3[_0x812735(0x147)],_0xc8d8f3[_0x812735(0x1a1)],_0x136f6e,_0x409638,_0xc8d8f3[_0x812735(0x142)]||_0xc8d8f3[_0x812735(0x1a0)]?.[_0x812735(0x18b)]||_0xc8d8f3[_0x812735(0x1a0)]?.[_0x812735(0x171)]),_0x330537=_0xc8d8f3[_0x812735(0x15c)](_0x812735(0x16f)),_0x3aadd8=[];for(const _0x426611 of _0x231fc5){const _0x5ddaeb=await computeFileHash(_0x426611[_0x812735(0x1ac)]),_0x351706=_0x409638['functions'][_0x426611['lockKey']],_0x13bbeb=!!_0x351706&&_0x351706[_0x812735(0x180)]===_0x5ddaeb,_0xb78f3=_0x255834['resolutions'][_0x812735(0x18e)](_0x426611[_0x812735(0x172)]),_0xc7b1f0=!!_0x351706?.[_0x812735(0x143)]&&_0x351706['version']==null&&(_0x330537||!_0x13bbeb),_0xac734=_0xc7b1f0?missingRemoteVersionConflict(_0x426611,_0x351706):undefined,_0x586c61=_0x255834[_0x812735(0x153)]['has'](_0x426611[_0x812735(0x172)])?'failed':!_0x330537&&_0x13bbeb?'unchanged':_0xac734?_0x812735(0x166):_0x812735(0x141);_0x3aadd8[_0x812735(0x168)]({'lockKey':_0x426611['lockKey'],'filePath':_0x426611[_0x812735(0x1ac)],'remoteId':_0x351706?.[_0x812735(0x143)]??null,'mode':_0x351706?.[_0x812735(0x143)]?_0x812735(0x18d):'create','status':_0x586c61,..._0x255834[_0x812735(0x153)]['has'](_0x426611['lockKey'])?{'error':_0x255834['failures']['get'](_0x426611[_0x812735(0x172)])}:{},..._0xac734?{'conflict':_0xac734}:{},..._0x255834[_0x812735(0x19a)][_0x812735(0x16e)](_0x426611[_0x812735(0x172)])?{'datasetCode':_0x351706?.[_0x812735(0x16a)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x426611[_0x812735(0x172)])]}:{},..._0xb78f3?{'alias':_0xb78f3[_0x812735(0x188)]??null,'datasetCode':_0xb78f3[_0x812735(0x16a)],'operationType':_0x426611['operationType'],'functionNode':_0x426611['functionNode'],'warnings':_0xb78f3[_0x812735(0x170)]}:{}});}return{'method':_0x812735(0x17c),'url':_0x812735(0x18c),'body':{'appCode':_0xc8d8f3[_0x812735(0x147)],'force':_0x330537,'files':_0x3aadd8,'cacheClearAtRuntime':_0x3aadd8[_0x812735(0x176)](_0x4c9beb=>_0x4c9beb[_0x812735(0x175)]===_0x812735(0x141)),'cacheClearAtRuntimeTimes':_0x3aadd8['some'](_0x2addfe=>_0x2addfe[_0x812735(0x175)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x812735(0x1aa)+_0x3aadd8['length']+_0x812735(0x181)};},async 'execute'(_0x7f9b70){const _0x127ad6=a44_0x4e164d,_0xf99d48=loadBffProjectConfig(_0x7f9b70[_0x127ad6(0x147)]),_0x3d33c9=await readBffLockFile(_0xf99d48['lockFilePath']),{lockData:_0x41278b,appLock:_0x3f513a}=ensureLockScope(_0x3d33c9??createEmptyBffLock(),_0x7f9b70[_0x127ad6(0x147)],_0xf99d48['scriptsRoot'],_0x127ad6(0x168)),_0x405f0b=await getTargetFunctions(_0xf99d48,_0x7f9b70);if(_0x405f0b[_0x127ad6(0x155)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x127ad6(0x1a7)};const _0x3384a9=_0x7f9b70[_0x127ad6(0x15c)](_0x127ad6(0x16f)),_0x176feb=JSON[_0x127ad6(0x158)](JSON[_0x127ad6(0x184)](_0x41278b)),_0x4ed7fe=_0x176feb['apps'][_0x7f9b70[_0x127ad6(0x147)]];if(!_0x4ed7fe)throw new Error(_0x127ad6(0x15d)+_0x7f9b70[_0x127ad6(0x147)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x48282c=_0x405f0b['some'](_0x44cbf2=>_0x44cbf2[_0x127ad6(0x161)]===_0x127ad6(0x19e))?await scanLocalBffFunctions(_0xf99d48,_0x127ad6(0x19e)):_0x405f0b,_0x14de56=await buildHookMaps(_0x7f9b70['appCode'],_0x7f9b70[_0x127ad6(0x1a1)],_0x48282c,_0x4ed7fe,_0x7f9b70[_0x127ad6(0x142)]||_0x7f9b70[_0x127ad6(0x1a0)]?.[_0x127ad6(0x18b)]||_0x7f9b70[_0x127ad6(0x1a0)]?.[_0x127ad6(0x171)]),_0x563e77=[],_0x24432a=[],_0x5f3be7=[],_0x34f70f=[];for(const _0x2e6b00 of _0x405f0b){const _0x564452=_0x14de56[_0x127ad6(0x153)]['get'](_0x2e6b00[_0x127ad6(0x172)]);if(_0x564452){_0x34f70f[_0x127ad6(0x168)]({'lockKey':_0x2e6b00['lockKey'],'error':_0x564452});continue;}const _0x2abe95=await computeFileHash(_0x2e6b00[_0x127ad6(0x1ac)]),_0x282523=_0x4ed7fe['functions'][_0x2e6b00[_0x127ad6(0x172)]];if(!_0x3384a9&&_0x282523&&_0x282523['hash']===_0x2abe95){_0x24432a[_0x127ad6(0x168)]({'lockKey':_0x2e6b00['lockKey'],'reason':_0x127ad6(0x17b)});continue;}if(_0x282523?.['remoteId']&&_0x282523[_0x127ad6(0x159)]==null){_0x5f3be7[_0x127ad6(0x168)](missingRemoteVersionConflict(_0x2e6b00,_0x282523));continue;}try{await uploadSingleFunction(_0x7f9b70[_0x127ad6(0x147)],_0x2e6b00,_0x4ed7fe,_0x14de56);const _0x24dbe5=_0x4ed7fe['functions'][_0x2e6b00[_0x127ad6(0x172)]];_0x563e77[_0x127ad6(0x168)]({'lockKey':_0x2e6b00[_0x127ad6(0x172)],'remoteId':_0x24dbe5?.[_0x127ad6(0x143)]??0x0});}catch(_0x15c1a2){const _0x326550=remoteVersionChangedConflict(_0x2e6b00,_0x282523,_0x15c1a2);if(_0x326550){_0x5f3be7[_0x127ad6(0x168)](_0x326550);continue;}_0x34f70f[_0x127ad6(0x168)]({'lockKey':_0x2e6b00[_0x127ad6(0x172)],'error':_0x15c1a2 instanceof Error?_0x15c1a2['message']:String(_0x15c1a2)});}}_0x4ed7fe[_0x127ad6(0x167)]=new Date()['toISOString'](),await writeBffLockFile(_0xf99d48['lockFilePath'],_0x176feb),await waitForUploadedLockEntries(_0xf99d48['lockFilePath'],_0x7f9b70[_0x127ad6(0x147)],_0x563e77[_0x127ad6(0x1a3)](_0x44e195=>_0x44e195[_0x127ad6(0x172)]));let _0x48177a={'attempted':![],'cleared':![]};if(_0x563e77[_0x127ad6(0x155)]>0x0)try{let _0x184e4b='';for(let _0x56b2a5=0x0;_0x56b2a5<CACHE_CLEAR_ATTEMPTS;_0x56b2a5+=0x1){_0x184e4b=await clearBffScriptCache(),_0x56b2a5<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x48177a={'attempted':!![],'cleared':!![],'message':_0x184e4b||_0x127ad6(0x196)};}catch(_0x2ccb3f){_0x48177a={'attempted':!![],'cleared':![],'error':_0x2ccb3f instanceof Error?_0x2ccb3f['message']:String(_0x2ccb3f)};}const _0x56cdf4=_0x34f70f[_0x127ad6(0x155)]===0x0&&(_0x48177a['attempted']?_0x48177a[_0x127ad6(0x1ad)]:!![]),_0x4b0e21=_0x56cdf4,_0xa32004=_0x48177a[_0x127ad6(0x182)]?_0x48177a[_0x127ad6(0x1ad)]?_0x127ad6(0x15a):_0x127ad6(0x1a4):_0x127ad6(0x151);return{'ok':_0x4b0e21,'data':{'uploaded':_0x563e77,'skipped':_0x24432a,'conflicts':_0x5f3be7,'failed':_0x34f70f,'cacheClear':_0x48177a,'warnings':[...[..._0x14de56['resolutions'][_0x127ad6(0x192)]()][_0x127ad6(0x190)](_0x4b908a=>_0x4b908a[_0x127ad6(0x170)]),...[..._0x14de56[_0x127ad6(0x19a)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x563e77[_0x127ad6(0x155)],_0x24432a[_0x127ad6(0x155)],_0x5f3be7[_0x127ad6(0x155)],_0x34f70f[_0x127ad6(0x155)],_0xa32004)};}};function missingRemoteVersionConflict(_0x1dd2a4,_0x2df220){const _0x5bd475=a44_0x4e164d;return remoteVersionConflict(_0x1dd2a4,_0x2df220,_0x5bd475(0x14a),_0x5bd475(0x187));}function remoteVersionChangedConflict(_0x457df9,_0x5eaf7d,_0x49dd64){const _0x326287=a44_0x4e164d;if(!_0x5eaf7d?.['remoteId']||_0x5eaf7d[_0x326287(0x159)]==null||!isRemoteVersionConflict(_0x49dd64))return undefined;return remoteVersionConflict(_0x457df9,_0x5eaf7d,_0x326287(0x17f),_0x326287(0x19b));}function remoteVersionConflict(_0x4d59ef,_0x593a77,_0x60d46e,_0x168c97){const _0x2c7389=a44_0x4e164d;return{'code':_0x60d46e,'lockKey':_0x4d59ef[_0x2c7389(0x172)],'filePath':_0x4d59ef[_0x2c7389(0x1ac)],'remoteId':_0x593a77[_0x2c7389(0x143)],..._0x593a77['version']!=null?{'expectedVersion':_0x593a77[_0x2c7389(0x159)]}:{},'message':_0x168c97,'nextAction':{'action':_0x2c7389(0x199),'command':CLI_BIN_NAME+_0x2c7389(0x15f)+_0x593a77[_0x2c7389(0x143)]+_0x2c7389(0x156),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function a44_0x5be3(_0x1909bf,_0x424565){_0x1909bf=_0x1909bf-0x141;const _0x28e80c=a44_0x28e8();let _0x5be31b=_0x28e80c[_0x1909bf];return _0x5be31b;}function isRemoteVersionConflict(_0x3ee02c){const _0x140747=a44_0x4e164d,_0x514447=_0x3ee02c instanceof Error?_0x3ee02c[_0x140747(0x18f)]:String(_0x3ee02c),_0x3384ce=getPlatformErrorCode(_0x3ee02c)??'';return[_0x514447,_0x3384ce][_0x140747(0x176)](_0x5616c6=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x140747(0x186)](_0x5616c6));}function formatPushMessage(_0x3ef5f9,_0x400314,_0x202647,_0x58a653,_0x478736){const _0x104928=a44_0x4e164d,_0x2c92e8=[_0x104928(0x14c)+_0x3ef5f9+_0x104928(0x195),_0x400314+_0x104928(0x14e)];_0x202647>0x0&&_0x2c92e8[_0x104928(0x168)](_0x202647+'\x20conflict'+(_0x202647===0x1?'':'s')+'\x20'+(_0x202647===0x1?_0x104928(0x1a8):'require')+_0x104928(0x14f));if(_0x58a653>0x0)_0x2c92e8[_0x104928(0x168)](_0x58a653+'\x20failed');return _0x2c92e8[_0x104928(0x168)](_0x478736),_0x2c92e8['join'](',\x20');}async function getTargetFunctions(_0x45b58f,_0x47ee68){const _0x37dcc6=a44_0x4e164d,_0x27df61=_0x47ee68['str'](_0x37dcc6(0x161)),_0x55af9c=_0x47ee68[_0x37dcc6(0x17d)](_0x37dcc6(0x1ab)),_0x406d6c=normalizeBffType(_0x27df61)??undefined;if(_0x55af9c&&!_0x406d6c)throw CliErrors[_0x37dcc6(0x154)](_0x37dcc6(0x163));const _0x29000c=await scanLocalBffFunctions(_0x45b58f,_0x406d6c);if(_0x55af9c){const _0x545838=_0x29000c[_0x37dcc6(0x178)](_0x144698=>_0x144698[_0x37dcc6(0x1ab)]===_0x55af9c);if(_0x545838[_0x37dcc6(0x155)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x406d6c+'/'+_0x55af9c);return _0x545838;}return _0x29000c;}function existingHookWarning(_0x178cb7){const _0x8eb1f7=a44_0x4e164d;return{'code':_0x8eb1f7(0x152),'lockKey':_0x178cb7,'message':_0x8eb1f7(0x15e)};}async function buildHookMaps(_0x568c9e,_0x4fcd01,_0x5d3d80,_0x1b08f6,_0x3b4b94){const _0x39c5f0=a44_0x4e164d,_0x99c4cd=_0x5d3d80['some'](_0x5d8f4a=>_0x5d8f4a[_0x39c5f0(0x161)]==='HOOK');if(!_0x99c4cd)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x29807e=resolveApiModelSource(_0x4fcd01,_0x568c9e,_0x3b4b94),_0x11e353=loadAliasMap(_0x4fcd01,undefined,_0x29807e['filePath'],_0x29807e[_0x39c5f0(0x18a)]);assertUnambiguousHookAliases(_0x11e353);const _0xb407c9=[..._0x11e353[_0x39c5f0(0x1a3)](_0x5e28ad=>[_0x5e28ad['alias'],_0x5e28ad[_0x39c5f0(0x16a)]]),...trackedHookDirectoryMappings(_0x1b08f6)['map'](_0x1569c=>[_0x1569c[_0x39c5f0(0x188)],_0x1569c['datasetCode']])],_0x492623=await listDatasets(_0x568c9e);assertUnambiguousHookDirectoryMappings(_0xb407c9[_0x39c5f0(0x1a3)](([_0x3e3027,_0x553415])=>({'alias':_0x3e3027,'datasetCode':_0x553415})));const _0x145e2b=buildHookDirectoryIndexes(_0x492623,_0xb407c9),_0x5f3f97=new Map(),_0x1e199b=preflightPushHookDirectories(_0x5d3d80,_0x1b08f6,_0x145e2b,_0x5f3f97),_0x28915f=new Set(),_0x4a79eb=_0x5d3d80[_0x39c5f0(0x178)](_0x155f18=>_0x5f3f97[_0x39c5f0(0x18e)](_0x155f18[_0x39c5f0(0x172)])?.['startsWith'](_0x39c5f0(0x146))&&_0x1b08f6[_0x39c5f0(0x16c)][_0x155f18[_0x39c5f0(0x172)]]?.[_0x39c5f0(0x143)]&&_0x1b08f6['functions'][_0x155f18['lockKey']]?.[_0x39c5f0(0x16a)]);if(_0x4a79eb[_0x39c5f0(0x155)]>0x0){let _0x378e6d;try{_0x378e6d=await getBffScriptStatistics(_0x568c9e);}catch(_0x2cee9f){for(const _0x468b97 of _0x4a79eb)_0x5f3f97[_0x39c5f0(0x149)](_0x468b97[_0x39c5f0(0x172)],_0x39c5f0(0x148)+(_0x2cee9f instanceof Error?_0x2cee9f[_0x39c5f0(0x18f)]:String(_0x2cee9f)));return{'resolutions':_0x1e199b,'failures':_0x5f3f97,'existingHooks':_0x28915f};}for(const _0x1d1728 of _0x4a79eb){const _0x193d92=_0x1b08f6['functions'][_0x1d1728[_0x39c5f0(0x172)]];try{const _0x5e47f6=new Set(_0x5d3d80[_0x39c5f0(0x178)](_0x1fc933=>_0x1fc933[_0x39c5f0(0x161)]===_0x39c5f0(0x19e)&&_0x1b08f6[_0x39c5f0(0x16c)][_0x1fc933['lockKey']]?.[_0x39c5f0(0x16a)]===_0x193d92['datasetCode'])[_0x39c5f0(0x1a3)](_0x772841=>_0x772841['alias']));if(_0x5e47f6[_0x39c5f0(0x17a)]>0x1)throw CliErrors['validation'](_0x39c5f0(0x174));const _0x11c369=_0x378e6d[_0x39c5f0(0x190)](_0x418b46=>[{'datasetCode':_0x418b46[_0x39c5f0(0x16a)],'operationType':snakeToCamel(_0x418b46[_0x39c5f0(0x1a5)]),'functionNode':_0x39c5f0(0x16d),'id':_0x418b46['beforeScriptId']},{'datasetCode':_0x418b46['datasetCode'],'operationType':snakeToCamel(_0x418b46[_0x39c5f0(0x1a5)]),'functionNode':'after','id':_0x418b46[_0x39c5f0(0x1a2)]}])[_0x39c5f0(0x178)](_0x3cf613=>_0x3cf613['id']===_0x193d92[_0x39c5f0(0x143)]),_0x42d23c=await getBffScriptInfo(_0x193d92[_0x39c5f0(0x143)]);if(_0x42d23c['id']!==_0x193d92[_0x39c5f0(0x143)]||_0x42d23c[_0x39c5f0(0x147)]!==_0x568c9e||_0x42d23c[_0x39c5f0(0x14b)]!=='HOOK'||_0x42d23c[_0x39c5f0(0x15b)]!==_0x1d1728[_0x39c5f0(0x1ab)]||_0x193d92[_0x39c5f0(0x159)]==null||_0x42d23c['version']!==_0x193d92[_0x39c5f0(0x159)]||_0x11c369[_0x39c5f0(0x155)]!==0x1||_0x11c369[0x0]['datasetCode']!==_0x193d92['datasetCode']||_0x11c369[0x0][_0x39c5f0(0x1a5)]!==_0x1d1728[_0x39c5f0(0x1a5)]||_0x11c369[0x0][_0x39c5f0(0x1a6)]!==_0x1d1728[_0x39c5f0(0x1a6)]||_0x193d92[_0x39c5f0(0x1a5)]!==_0x1d1728[_0x39c5f0(0x1a5)]||_0x193d92['functionNode']!==_0x1d1728[_0x39c5f0(0x1a6)])throw CliErrors[_0x39c5f0(0x154)](_0x39c5f0(0x164));_0x28915f['add'](_0x1d1728[_0x39c5f0(0x172)]),_0x5f3f97['delete'](_0x1d1728['lockKey']);}catch(_0x36e23c){_0x5f3f97['set'](_0x1d1728[_0x39c5f0(0x172)],_0x36e23c instanceof Error?_0x36e23c['message']:String(_0x36e23c));}}}return{'resolutions':_0x1e199b,'failures':_0x5f3f97,'existingHooks':_0x28915f};}async function uploadSingleFunction(_0x4ed6e6,_0x57d033,_0x4a6f61,_0x4f1c6b){const _0x562357=a44_0x4e164d,_0x69c51f=await readFile(_0x57d033[_0x562357(0x1ac)],_0x562357(0x19f)),_0x287f3b=await computeFileHash(_0x57d033[_0x562357(0x1ac)]),_0x4c37f2=_0x4a6f61[_0x562357(0x16c)][_0x57d033[_0x562357(0x172)]];if(_0x4c37f2?.['remoteId']&&_0x4c37f2[_0x562357(0x159)]==null)throw CliErrors[_0x562357(0x154)](_0x57d033[_0x562357(0x172)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x52e400=extractScriptDescription(_0x69c51f);if(!_0x52e400&&_0x4c37f2?.[_0x562357(0x143)]){const _0x561020=await getBffScriptInfo(_0x4c37f2[_0x562357(0x143)]);_0x52e400=_0x561020['description']||undefined;}const _0x504bb4={'appCode':_0x4ed6e6,'functionName':_0x57d033[_0x562357(0x1ab)],'scriptType':_0x57d033[_0x562357(0x161)],'scriptContent':_0x69c51f};if(_0x4c37f2?.[_0x562357(0x143)])_0x504bb4['id']=_0x4c37f2[_0x562357(0x143)];if(_0x4c37f2?.['version']!=null)_0x504bb4[_0x562357(0x159)]=_0x4c37f2[_0x562357(0x159)];if(_0x52e400)_0x504bb4[_0x562357(0x185)]=_0x52e400;if(_0x57d033['type']===_0x562357(0x19e)){const _0x33dbb0=_0x4f1c6b[_0x562357(0x162)]['get'](_0x57d033[_0x562357(0x172)]);if(!_0x33dbb0&&!_0x4f1c6b[_0x562357(0x19a)]['has'](_0x57d033[_0x562357(0x172)])||!_0x57d033[_0x562357(0x1a5)]||!_0x57d033[_0x562357(0x1a6)])throw CliErrors[_0x562357(0x154)]('Incomplete\x20HOOK\x20path:\x20'+_0x57d033[_0x562357(0x172)]);_0x33dbb0&&(_0x504bb4[_0x562357(0x19d)]=_0x33dbb0[_0x562357(0x144)]['id'],_0x504bb4['operationType']=_0x57d033[_0x562357(0x1a5)]),_0x504bb4[_0x562357(0x1a6)]=_0x57d033[_0x562357(0x1a6)];}const _0x17ef45=await saveBffScript(_0x504bb4),_0x45f58f=_0x17ef45['id'],_0x17a269=_0x17ef45['script']??await getBffScriptInfo(_0x45f58f),_0x14fd89={'hash':_0x287f3b,'remoteId':_0x45f58f,'version':_0x17a269['version']};if(_0x57d033[_0x562357(0x161)]===_0x562357(0x19e)){const _0x2d8562=_0x4f1c6b[_0x562357(0x162)][_0x562357(0x18e)](_0x57d033['lockKey']);if(!_0x2d8562){_0x4a6f61['functions'][_0x57d033[_0x562357(0x172)]]={..._0x4c37f2,..._0x14fd89};return;}_0x14fd89['alias']=_0x2d8562[_0x562357(0x188)]??_0x4c37f2?.['alias'],_0x14fd89[_0x562357(0x16a)]=_0x2d8562[_0x562357(0x16a)],_0x14fd89[_0x562357(0x1a5)]=_0x57d033[_0x562357(0x1a5)],_0x14fd89['functionNode']=_0x57d033[_0x562357(0x1a6)];}_0x4a6f61[_0x562357(0x16c)][_0x57d033[_0x562357(0x172)]]=_0x14fd89;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xf1acd,_0x42d44a,_0x13f4d7){const _0x1915b7=a44_0x4e164d;if(_0x13f4d7['length']===0x0)return;for(let _0xac45a6=0x0;_0xac45a6<LOCK_SETTLE_RETRY_COUNT;_0xac45a6+=0x1){const _0x2f6592=await readBffLockFile(_0xf1acd),_0x45fbe=_0x2f6592?.['apps']?.[_0x42d44a]?.[_0x1915b7(0x16c)]??{},_0x5e885c=_0x13f4d7['every'](_0x4bff89=>!!_0x45fbe[_0x4bff89]?.[_0x1915b7(0x143)]);if(_0x5e885c)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1915b7(0x193)+_0x13f4d7[_0x1915b7(0x14d)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x2eb63a=a45_0x5bd7;(function(_0x523a6d,_0x1863af){const _0x5902c0=a45_0x5bd7,_0x580614=_0x523a6d();while(!![]){try{const _0x1c9dfd=-parseInt(_0x5902c0(0x10a))/0x1*(parseInt(_0x5902c0(0x115))/0x2)+parseInt(_0x5902c0(0x102))/0x3*(-parseInt(_0x5902c0(0x11e))/0x4)+parseInt(_0x5902c0(0x10b))/0x5*(-parseInt(_0x5902c0(0x103))/0x6)+-parseInt(_0x5902c0(0x10f))/0x7+parseInt(_0x5902c0(0x104))/0x8*(-parseInt(_0x5902c0(0x123))/0x9)+-parseInt(_0x5902c0(0x106))/0xa+parseInt(_0x5902c0(0x114))/0xb*(parseInt(_0x5902c0(0x11d))/0xc);if(_0x1c9dfd===_0x1863af)break;else _0x580614['push'](_0x580614['shift']());}catch(_0x3f157f){_0x580614['push'](_0x580614['shift']());}}}(a45_0xb8af,0xb1fdf));function a45_0xb8af(){const _0x14d999=['2320532rqohEc','appCode','map','alias','status','110133qOVJtx','push','mergedCli','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','filePath','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','3JwHmZD','50010uZnqCc','640ijCvkL','selectedAppName','6022760pxpmCu','read','remote','boolean','630157QoPSYX','105fonuWU','bff','lockKey','lockFilePath','8980097cfraPU','\x20modified,\x20','length','has','all','11IpYqtB','2UnDMvh','functions','apiDir','\x20added,\x20','bool','hash','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','defaultApp','59741844ivRJln'];a45_0xb8af=function(){return _0x14d999;};return a45_0xb8af();}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a45_0x5bd7(_0x3f9a44,_0x5be886){_0x3f9a44=_0x3f9a44-0x102;const _0xb8af86=a45_0xb8af();let _0x5bd716=_0xb8af86[_0x3f9a44];return _0x5bd716;}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a45_0x2eb63a(0x10c),'command':a45_0x2eb63a(0x122),'description':a45_0x2eb63a(0x11b),'risk':a45_0x2eb63a(0x107),'flags':[{'name':a45_0x2eb63a(0x108),'type':a45_0x2eb63a(0x109),'description':a45_0x2eb63a(0x128)}],async 'execute'(_0x5d178b){const _0x163eff=a45_0x2eb63a,_0x17c1dd=loadBffProjectConfig(_0x5d178b[_0x163eff(0x11f)]),_0x1a5285=await readBffLockFile(_0x17c1dd[_0x163eff(0x10e)]),{appLock:_0x14dfde}=ensureLockScope(_0x1a5285??createEmptyBffLock(),_0x5d178b[_0x163eff(0x11f)],_0x17c1dd['scriptsRoot'],_0x163eff(0x122)),_0x33e0e0=await scanLocalBffFunctions(_0x17c1dd),_0x5278ab=[],_0x18962a=[],_0x57cbaa=[];for(const _0x5b207c of _0x33e0e0){const _0x22677d=await computeFileHash(_0x5b207c[_0x163eff(0x127)]),_0x36ed44=_0x14dfde[_0x163eff(0x116)][_0x5b207c[_0x163eff(0x10d)]];if(!_0x36ed44)_0x5278ab[_0x163eff(0x124)](_0x5b207c[_0x163eff(0x10d)]);else _0x36ed44[_0x163eff(0x11a)]!==_0x22677d?_0x18962a[_0x163eff(0x124)](_0x5b207c['lockKey']):_0x57cbaa[_0x163eff(0x124)](_0x5b207c[_0x163eff(0x10d)]);}const _0x104d7c=[];if(_0x5d178b[_0x163eff(0x119)](_0x163eff(0x108))){const _0x4dcd75=resolveApiModelSource(_0x5d178b[_0x163eff(0x117)],_0x5d178b['appCode'],_0x5d178b[_0x163eff(0x105)]||_0x5d178b['mergedCli']?.['currentApp']||_0x5d178b[_0x163eff(0x125)]?.[_0x163eff(0x11c)]),_0x5d76b0=loadAliasMap(_0x5d178b[_0x163eff(0x117)],undefined,_0x4dcd75[_0x163eff(0x127)],_0x4dcd75['profileName']),_0x3e730e=new Map(_0x5d76b0[_0x163eff(0x120)](_0x4cb65b=>[_0x4cb65b['datasetCode'],_0x4cb65b[_0x163eff(0x121)]])),[_0x3674fc,_0x1c7865]=await Promise[_0x163eff(0x113)]([listBffScripts(_0x5d178b['appCode']),getBffScriptStatistics(_0x5d178b[_0x163eff(0x11f)])]),_0x2004f5=createHookLocationMap(_0x1c7865),_0x2c6345=new Set(_0x33e0e0[_0x163eff(0x120)](_0x285dad=>_0x285dad['lockKey']));for(const _0xed4adb of _0x3674fc){const _0x2836d5=resolveRemoteScriptTarget(_0x17c1dd,_0xed4adb,_0x2004f5,_0x14dfde['functions'],_0x3e730e);_0x2836d5&&!_0x2c6345[_0x163eff(0x112)](_0x2836d5[_0x163eff(0x10d)])&&_0x104d7c[_0x163eff(0x124)](_0x2836d5[_0x163eff(0x10d)]);}}const _0x510b9c=_0x5278ab[_0x163eff(0x111)]===0x0&&_0x18962a[_0x163eff(0x111)]===0x0&&_0x104d7c[_0x163eff(0x111)]===0x0;return{'ok':!![],'data':{'added':_0x5278ab,'modified':_0x18962a,'unchanged':_0x57cbaa,'remoteOnly':_0x104d7c},'message':_0x510b9c?_0x163eff(0x126):_0x5278ab['length']+_0x163eff(0x118)+_0x18962a['length']+_0x163eff(0x110)+_0x57cbaa['length']+'\x20unchanged'+(_0x104d7c[_0x163eff(0x111)]>0x0?',\x20'+_0x104d7c[_0x163eff(0x111)]+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x459634=a46_0x135e;function a46_0x135e(_0x416ffa,_0x365f27){_0x416ffa=_0x416ffa-0x15b;const _0x109a36=a46_0x109a();let _0x135e87=_0x109a36[_0x416ffa];return _0x135e87;}(function(_0x156f2a,_0x3b1080){const _0x2206f0=a46_0x135e,_0x4927c6=_0x156f2a();while(!![]){try{const _0x52aa37=-parseInt(_0x2206f0(0x164))/0x1*(-parseInt(_0x2206f0(0x174))/0x2)+-parseInt(_0x2206f0(0x175))/0x3+-parseInt(_0x2206f0(0x173))/0x4*(-parseInt(_0x2206f0(0x176))/0x5)+-parseInt(_0x2206f0(0x15b))/0x6*(parseInt(_0x2206f0(0x16a))/0x7)+parseInt(_0x2206f0(0x171))/0x8*(-parseInt(_0x2206f0(0x170))/0x9)+-parseInt(_0x2206f0(0x177))/0xa+parseInt(_0x2206f0(0x15e))/0xb;if(_0x52aa37===_0x3b1080)break;else _0x4927c6['push'](_0x4927c6['shift']());}catch(_0x3b4b74){_0x4927c6['push'](_0x4927c6['shift']());}}}(a46_0x109a,0x7a2c9));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a46_0x109a(){const _0x411de7=['4845760doILIg','setLogPath','skillVersion','19482kDuatU','nonInteractive','pipe','11700744gRRBJv','install','log','code','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','apiError','2235yFvADR','Built-in\x20Skill\x20install\x20failed\x20[','\x20at\x20','error','changed','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','1267eljXFP','unknown','\x20via\x20skills@latest','cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','installedPath','9VpmIvK','3177808KHnLjP','cwd','4DoFZSX','818OGARRw','2682942lODkYf','4432145gKkZMn'];a46_0x109a=function(){return _0x411de7;};return a46_0x109a();}export const cliSkillDefinitions=[{'service':'cli-skill','command':a46_0x459634(0x15f),'description':a46_0x459634(0x162),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2e6151){const _0x5bd8fc=a46_0x459634;logger[_0x5bd8fc(0x178)](process[_0x5bd8fc(0x172)]()),logger['info'](_0x5bd8fc(0x16d),_0x5bd8fc(0x16e));const _0x4b0d4b=installBuiltinSkill({'stdio':_0x2e6151[_0x5bd8fc(0x15c)]?_0x5bd8fc(0x15d):'inherit'});if(!_0x4b0d4b['ok'])throw CliErrors[_0x5bd8fc(0x163)](_0x5bd8fc(0x165)+_0x4b0d4b[_0x5bd8fc(0x161)]+']:\x20'+(_0x4b0d4b[_0x5bd8fc(0x167)]||_0x5bd8fc(0x16b)),_0x5bd8fc(0x169)+_0x4b0d4b['repairCommand']);return console[_0x5bd8fc(0x160)](_0x4b0d4b[_0x5bd8fc(0x168)]?'CLI\x20Built-in\x20Skill\x20'+_0x4b0d4b[_0x5bd8fc(0x179)]+'\x20installed'+(_0x4b0d4b[_0x5bd8fc(0x16f)]?_0x5bd8fc(0x166)+_0x4b0d4b[_0x5bd8fc(0x16f)]:_0x5bd8fc(0x16c)):'CLI\x20Built-in\x20Skill\x20'+_0x4b0d4b[_0x5bd8fc(0x179)]+'\x20is\x20already\x20current'+(_0x4b0d4b['installedPath']?_0x5bd8fc(0x166)+_0x4b0d4b[_0x5bd8fc(0x16f)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x196e9a=a47_0x4bdb;(function(_0x3d9283,_0x3c566b){const _0x663578=a47_0x4bdb,_0x545bf6=_0x3d9283();while(!![]){try{const _0x245421=parseInt(_0x663578(0x159))/0x1*(parseInt(_0x663578(0x160))/0x2)+parseInt(_0x663578(0x156))/0x3+parseInt(_0x663578(0x153))/0x4*(-parseInt(_0x663578(0x137))/0x5)+parseInt(_0x663578(0x136))/0x6*(-parseInt(_0x663578(0x16a))/0x7)+parseInt(_0x663578(0x13d))/0x8+parseInt(_0x663578(0x148))/0x9*(parseInt(_0x663578(0x15e))/0xa)+parseInt(_0x663578(0x118))/0xb*(-parseInt(_0x663578(0x140))/0xc);if(_0x245421===_0x3c566b)break;else _0x545bf6['push'](_0x545bf6['shift']());}catch(_0xb80c99){_0x545bf6['push'](_0x545bf6['shift']());}}}(a47_0x2f99,0x3b734));import a47_0x3edd9d from'chalk';import a47_0x1b4479 from'ora';import a47_0x53c8ff from'semver';import{execa}from'execa';function a47_0x2f99(){const _0x4d7967=['Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','119413fQrcpO','fromEntries','message','\x20install\x20-g\x20','map','4763mBnjbe','info','CLI\x20updated\x20to\x20v','Update\x20failed','Install\x20a\x20specific\x20CLI\x20version','timeout','Version\x20comparison\x20failed',']:\x20','\x20→\x20','apiError','install','json','string',',\x20state\x20','Checking\x20for\x20updates...','\x20is\x20up\x20to\x20date.','state','bool','toLowerCase','code','Run:\x20','expected\x20','start','skillVersion','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20is\x20newer\x20than\x20npm\x20latest\x20v','read','update','Updated\x20to\x20v','source','150IsaMvu','2044390ZXDEGQ',',\x20found\x20','str','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','object','log','395976DrdsVt','Invalid\x20version:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','3864MEMBJI','fail',',\x20then\x20verify\x20with:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','bun','beta','length','\x20\x20CLI\x20Built-in\x20Skill\x20','1683SwRBhX','npm','Requested\x20version:\x20','includes','unknown','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Current\x20version:\x20','yellow','red','filter','@latest','4JPdymW','Update\x20available:\x20','gray','1171338cSvdDG','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','latest','3UCUNYn','succeed','error','current','green','19770yBdwpq','valid','272430ImAOVX','validation','entries','trim','repairCommand','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','boolean','Already\x20up\x20to\x20date\x20(v','version'];a47_0x2f99=function(){return _0x4d7967;};return a47_0x2f99();}import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4d5ec6=a47_0x4bdb;return GIT_COMMIT!==_0x4d5ec6(0x14c)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1062df=a47_0x4bdb,_0x3d9c93=process['execPath'][_0x1062df(0x12a)]();if(_0x3d9c93[_0x1062df(0x14b)]('bun'))return _0x1062df(0x144);return _0x1062df(0x149);}const updateFlags=[{'name':a47_0x196e9a(0x145),'type':a47_0x196e9a(0x166),'description':a47_0x196e9a(0x157),'default':![]},{'name':a47_0x196e9a(0x168),'type':a47_0x196e9a(0x124),'description':a47_0x196e9a(0x11c)}];function getRequestedVersion(_0xbdc810){const _0x13255d=a47_0x196e9a;return _0xbdc810[_0x13255d(0x139)]('version')[_0x13255d(0x163)]();}async function validateUpdateFlags(_0x185631){const _0x232553=a47_0x196e9a,_0x365698=_0x185631[_0x232553(0x129)](_0x232553(0x145)),_0x56df89=getRequestedVersion(_0x185631);if(_0x365698&&_0x56df89)throw CliErrors[_0x232553(0x161)](_0x232553(0x130),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x56df89&&!a47_0x53c8ff[_0x232553(0x15f)](_0x56df89))throw CliErrors[_0x232553(0x161)](_0x232553(0x13e)+_0x56df89,_0x232553(0x13a));}async function fetchNpmDistTags(){const _0x40ba35=a47_0x196e9a;try{const _0x591450=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x40ba35(0x11d)](0x2710)});if(!_0x591450['ok'])return null;const _0x1aa012=await _0x591450[_0x40ba35(0x123)]();if(!_0x1aa012||typeof _0x1aa012!==_0x40ba35(0x13b))return null;return Object[_0x40ba35(0x16b)](Object[_0x40ba35(0x162)](_0x1aa012)[_0x40ba35(0x151)](([,_0x315a09])=>typeof _0x315a09==='string'&&_0x315a09[_0x40ba35(0x163)]()[_0x40ba35(0x146)]>0x0)[_0x40ba35(0x117)](([_0x57ed41,_0x2008e2])=>[_0x57ed41,String(_0x2008e2)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x556947){const _0x2c0b93=await fetchNpmDistTags();return _0x2c0b93?.[_0x556947]??null;}async function fetchLatestVersion(){const _0x1a64cb=a47_0x196e9a;return fetchNpmDistTagVersion(_0x1a64cb(0x158));}async function resolveTargetVersion(_0x41739c){const _0x4f3795=a47_0x196e9a,_0x585abd=getRequestedVersion(_0x41739c);if(_0x585abd)return{'version':_0x585abd,'source':_0x4f3795(0x168)};if(_0x41739c[_0x4f3795(0x129)](_0x4f3795(0x145))){const _0x539e88=await fetchNpmDistTagVersion('beta');if(!_0x539e88)return null;return{'version':_0x539e88,'source':_0x4f3795(0x145)};}const _0x7b7329=await fetchLatestVersion();if(!_0x7b7329)return null;return{'version':_0x7b7329,'source':'latest'};}function shouldInstallTarget(_0x1afd16,_0x434b99){const _0x51cc02=a47_0x196e9a;if(_0x434b99[_0x51cc02(0x135)]===_0x51cc02(0x168)||_0x434b99[_0x51cc02(0x135)]==='beta')return!a47_0x53c8ff['eq'](_0x1afd16,_0x434b99[_0x51cc02(0x168)]);return a47_0x53c8ff['lt'](_0x1afd16,_0x434b99[_0x51cc02(0x168)]);}function getInstallPlanLabel(_0x18b4d9,_0x32beb1){const _0x269889=a47_0x196e9a;switch(_0x32beb1[_0x269889(0x135)]){case'beta':return'Beta\x20version:\x20'+a47_0x3edd9d['yellow'](_0x18b4d9)+_0x269889(0x120)+a47_0x3edd9d[_0x269889(0x15d)](_0x32beb1['version']);case _0x269889(0x168):return _0x269889(0x14a)+a47_0x3edd9d[_0x269889(0x14f)](_0x18b4d9)+_0x269889(0x120)+a47_0x3edd9d[_0x269889(0x15d)](_0x32beb1[_0x269889(0x168)]);case _0x269889(0x158):default:return _0x269889(0x154)+a47_0x3edd9d[_0x269889(0x14f)](_0x18b4d9)+'\x20→\x20'+a47_0x3edd9d[_0x269889(0x15d)](_0x32beb1[_0x269889(0x168)]);}}function repairCurrentBuiltinSkill(){const _0x12f7ef=a47_0x196e9a;console['log'](a47_0x3edd9d['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x35f1d9=installBuiltinSkill();if(_0x35f1d9['ok']){console['log'](a47_0x3edd9d['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x35f1d9[_0x12f7ef(0x12f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x12f7ef(0x121)](_0x12f7ef(0x14d)+_0x35f1d9[_0x12f7ef(0x12b)]+_0x12f7ef(0x11f)+(_0x35f1d9[_0x12f7ef(0x15b)]||_0x12f7ef(0x14c)),_0x12f7ef(0x12c)+_0x35f1d9[_0x12f7ef(0x164)]+_0x12f7ef(0x142)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x4f4206){const _0x1ea508=a47_0x196e9a,_0x4befbb=inspectInstalledBuiltinSkillVersion(_0x4f4206);if(_0x4befbb['state']===_0x1ea508(0x15c)){console[_0x1ea508(0x13c)](a47_0x3edd9d[_0x1ea508(0x155)](_0x1ea508(0x147)+_0x4f4206+_0x1ea508(0x127)));return;}const _0x4260fe=_0x4befbb[_0x1ea508(0x12f)]?_0x1ea508(0x12d)+_0x4f4206+_0x1ea508(0x138)+_0x4befbb['skillVersion']:'expected\x20'+_0x4f4206+_0x1ea508(0x125)+_0x4befbb[_0x1ea508(0x128)];throw CliErrors[_0x1ea508(0x121)](_0x1ea508(0x11a)+_0x4f4206+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x4260fe,_0x1ea508(0x12c)+_0x4befbb[_0x1ea508(0x164)]+_0x1ea508(0x142)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x35d9cd){const _0x41c30d=a47_0x196e9a;await validateUpdateFlags(_0x35d9cd);const _0x3d77d1=getCurrentVersion();console['log'](_0x41c30d(0x14e)+_0x3d77d1);const _0x474f3c=a47_0x1b4479(_0x41c30d(0x126))['start'](),_0x2a04a8=await resolveTargetVersion(_0x35d9cd);if(!_0x2a04a8){const _0x50da45=_0x35d9cd[_0x41c30d(0x129)](_0x41c30d(0x145))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x41c30d(0x165);return _0x474f3c['fail'](_0x50da45),console[_0x41c30d(0x13c)](a47_0x3edd9d['gray'](_0x41c30d(0x13f)+NPM_PACKAGE_NAME+_0x41c30d(0x152))),{'ok':![],'message':_0x50da45};}const _0x51a51c=a47_0x53c8ff[_0x41c30d(0x15f)](VERSION),_0xc5787a=a47_0x53c8ff[_0x41c30d(0x15f)](_0x2a04a8[_0x41c30d(0x168)]);if(!_0x51a51c||!_0xc5787a)return _0x474f3c[_0x41c30d(0x141)](_0x41c30d(0x11e)),{'ok':![],'message':_0x41c30d(0x11e)};if(!shouldInstallTarget(_0x51a51c,_0x2a04a8)){const _0x310238=_0x2a04a8['source']===_0x41c30d(0x168)?'Already\x20on\x20requested\x20version\x20(v'+_0x2a04a8[_0x41c30d(0x168)]+')':a47_0x53c8ff['gt'](_0x51a51c,_0xc5787a)?'Current\x20version\x20v'+_0x3d77d1+_0x41c30d(0x131)+_0x2a04a8[_0x41c30d(0x168)]:_0x41c30d(0x167)+_0x2a04a8[_0x41c30d(0x168)]+')';return _0x474f3c[_0x41c30d(0x15a)](_0x310238),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x474f3c[_0x41c30d(0x119)](getInstallPlanLabel(_0x3d77d1,_0x2a04a8));const _0x4988ad=detectPackageManager(),_0xcd194e=_0x4988ad===_0x41c30d(0x149)?resolveNpmBin(_0x41c30d(0x149)):_0x4988ad,_0x3093e9=a47_0x1b4479('Updating\x20via\x20'+_0x4988ad+'...')[_0x41c30d(0x12e)]();try{await execa(_0xcd194e,[_0x41c30d(0x122),'-g',NPM_PACKAGE_NAME+'@'+_0x2a04a8['version']],{'stdio':'pipe'}),_0x3093e9[_0x41c30d(0x15a)](_0x41c30d(0x134)+_0x2a04a8[_0x41c30d(0x168)]),console[_0x41c30d(0x13c)](a47_0x3edd9d[_0x41c30d(0x155)](_0x41c30d(0x143)));}catch(_0x48fb28){return _0x3093e9[_0x41c30d(0x141)](_0x41c30d(0x11b)),console[_0x41c30d(0x15b)](a47_0x3edd9d[_0x41c30d(0x150)]('\x20\x20'+_0x48fb28['message'])),console[_0x41c30d(0x13c)](a47_0x3edd9d[_0x41c30d(0x155)]('\x20\x20Try\x20manually:\x20'+_0x4988ad+_0x41c30d(0x116)+NPM_PACKAGE_NAME+'@'+_0x2a04a8['version'])),{'ok':![],'message':_0x48fb28[_0x41c30d(0x16c)]};}return verifyUpdatedBuiltinSkill(_0x2a04a8[_0x41c30d(0x168)]),{'ok':!![]};}function a47_0x4bdb(_0x14a49c,_0x8e7f92){_0x14a49c=_0x14a49c-0x116;const _0x2f99e7=a47_0x2f99();let _0x4bdb1b=_0x2f99e7[_0x14a49c];return _0x4bdb1b;}export const updateDefinition={'service':a47_0x196e9a(0x133),'command':'run','description':a47_0x196e9a(0x169),'risk':a47_0x196e9a(0x132),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x48a90e=a47_0x25e4;(function(_0x4ad3de,_0x579391){const _0x4d3258=a47_0x25e4,_0x1f99f1=_0x4ad3de();while(!![]){try{const _0x5779ea=-parseInt(_0x4d3258(0x1e1))/0x1*(-parseInt(_0x4d3258(0x1d4))/0x2)+parseInt(_0x4d3258(0x215))/0x3*(parseInt(_0x4d3258(0x1ef))/0x4)+-parseInt(_0x4d3258(0x1f0))/0x5*(-parseInt(_0x4d3258(0x218))/0x6)+parseInt(_0x4d3258(0x1e9))/0x7*(parseInt(_0x4d3258(0x1fc))/0x8)+parseInt(_0x4d3258(0x1d7))/0x9*(parseInt(_0x4d3258(0x209))/0xa)+-parseInt(_0x4d3258(0x220))/0xb+-parseInt(_0x4d3258(0x20e))/0xc;if(_0x5779ea===_0x579391)break;else _0x1f99f1['push'](_0x1f99f1['shift']());}catch(_0xec4ccb){_0x1f99f1['push'](_0x1f99f1['shift']());}}}(a47_0x5de0,0xdbabd));function a47_0x25e4(_0x4dd803,_0x467a59){_0x4dd803=_0x4dd803-0x1d3;const _0x5de0c4=a47_0x5de0();let _0x25e4e5=_0x5de0c4[_0x4dd803];return _0x25e4e5;}import a47_0x38aa99 from'chalk';import a47_0x46579e from'ora';import a47_0x2161a9 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x559de9=a47_0x25e4;return GIT_COMMIT!==_0x559de9(0x221)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x139d6c=a47_0x25e4,_0x496b63=process[_0x139d6c(0x1f7)][_0x139d6c(0x1ff)]();if(_0x496b63[_0x139d6c(0x1df)](_0x139d6c(0x1e4)))return'bun';return'npm';}const updateFlags=[{'name':a47_0x48a90e(0x213),'type':a47_0x48a90e(0x1ea),'description':a47_0x48a90e(0x225),'default':![]},{'name':'version','type':a47_0x48a90e(0x1fb),'description':a47_0x48a90e(0x204)}];function getRequestedVersion(_0x3cfec1){const _0x14f678=a47_0x48a90e;return _0x3cfec1['str'](_0x14f678(0x1d9))[_0x14f678(0x1f5)]();}async function validateUpdateFlags(_0x5a8960){const _0x17cf4b=a47_0x48a90e,_0x4c6089=_0x5a8960[_0x17cf4b(0x1eb)](_0x17cf4b(0x213)),_0x3d2c30=getRequestedVersion(_0x5a8960);if(_0x4c6089&&_0x3d2c30)throw CliErrors[_0x17cf4b(0x1fa)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x17cf4b(0x1d6));if(_0x3d2c30&&!a47_0x2161a9[_0x17cf4b(0x210)](_0x3d2c30))throw CliErrors[_0x17cf4b(0x1fa)](_0x17cf4b(0x1f3)+_0x3d2c30,_0x17cf4b(0x1f6));}async function fetchNpmDistTags(){const _0x12fcd5=a47_0x48a90e;try{const _0x27e4b2=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x12fcd5(0x1dc)](0x2710)});if(!_0x27e4b2['ok'])return null;const _0x8e7c95=await _0x27e4b2['json']();if(!_0x8e7c95||typeof _0x8e7c95!=='object')return null;return Object[_0x12fcd5(0x1d5)](Object[_0x12fcd5(0x1d3)](_0x8e7c95)['filter'](([,_0x7aec58])=>typeof _0x7aec58===_0x12fcd5(0x1fb)&&_0x7aec58[_0x12fcd5(0x1f5)]()['length']>0x0)[_0x12fcd5(0x222)](([_0x274281,_0x3e7f2b])=>[_0x274281,String(_0x3e7f2b)[_0x12fcd5(0x1f5)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5169a8){const _0x45dcec=await fetchNpmDistTags();return _0x45dcec?.[_0x5169a8]??null;}async function fetchLatestVersion(){const _0x2a48b0=a47_0x48a90e;return fetchNpmDistTagVersion(_0x2a48b0(0x219));}async function resolveTargetVersion(_0x1a9198){const _0x1dd8e9=a47_0x48a90e,_0xad70f4=getRequestedVersion(_0x1a9198);if(_0xad70f4)return{'version':_0xad70f4,'source':_0x1dd8e9(0x1d9)};if(_0x1a9198['bool']('beta')){const _0x5378bb=await fetchNpmDistTagVersion('beta');if(!_0x5378bb)return null;return{'version':_0x5378bb,'source':_0x1dd8e9(0x213)};}const _0x287bd0=await fetchLatestVersion();if(!_0x287bd0)return null;return{'version':_0x287bd0,'source':_0x1dd8e9(0x219)};}function a47_0x5de0(){const _0x2bb521=['fromEntries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','316656jFmAfe','code','version','\x20→\x20','error','timeout','@latest','\x20install\x20-g\x20','includes','Checking\x20CLI\x20Built-in\x20Skill...','1723421QNFvgN','npm','Current\x20version:\x20','bun','\x20doctor','current','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','start','8213107TXNDdi','boolean','bool','fail','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','install','9368AfzILW','5VRbaIw',']:\x20',',\x20then\x20verify\x20with:\x20','Invalid\x20version:\x20','log','trim','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','execPath','\x20is\x20up\x20to\x20date.','repairCommand','validation','string','8MpXQKE','Updating\x20via\x20','red','toLowerCase','read','run','Checking\x20for\x20updates...',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','Install\x20a\x20specific\x20CLI\x20version','Update\x20available:\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20\x20Try\x20manually:\x20','Update\x20failed','100CoyhDA','Requested\x20version:\x20','message','info','state','36632916zyXsVo','skillVersion','valid','gray','green','beta','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','1122HtETLv',',\x20state\x20','Beta\x20version:\x20','163806cxNusT','latest','\x20\x20CLI\x20Built-in\x20Skill\x20','Already\x20on\x20requested\x20version\x20(v','Version\x20comparison\x20failed','Current\x20version\x20v','yellow','source','2191805VGiQuk','unknown','map','Updated\x20to\x20v','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','expected\x20','succeed','apiError','entries','2lDobSv'];a47_0x5de0=function(){return _0x2bb521;};return a47_0x5de0();}function shouldInstallTarget(_0x3d6fdf,_0x5906dd){const _0xc512de=a47_0x48a90e;if(_0x5906dd[_0xc512de(0x21f)]==='version'||_0x5906dd[_0xc512de(0x21f)]===_0xc512de(0x213))return!a47_0x2161a9['eq'](_0x3d6fdf,_0x5906dd[_0xc512de(0x1d9)]);return a47_0x2161a9['lt'](_0x3d6fdf,_0x5906dd[_0xc512de(0x1d9)]);}function getInstallPlanLabel(_0x1f059a,_0x1b1b7b){const _0x3bcf69=a47_0x48a90e;switch(_0x1b1b7b['source']){case _0x3bcf69(0x213):return _0x3bcf69(0x217)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99[_0x3bcf69(0x212)](_0x1b1b7b[_0x3bcf69(0x1d9)]);case _0x3bcf69(0x1d9):return _0x3bcf69(0x20a)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99[_0x3bcf69(0x212)](_0x1b1b7b[_0x3bcf69(0x1d9)]);case _0x3bcf69(0x219):default:return _0x3bcf69(0x205)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99['green'](_0x1b1b7b['version']);}}function repairCurrentBuiltinSkill(){const _0x4073f4=a47_0x48a90e;console['log'](a47_0x38aa99[_0x4073f4(0x211)](_0x4073f4(0x1e0)));const _0x37bf46=installBuiltinSkill();if(_0x37bf46['ok']){console[_0x4073f4(0x1f4)](a47_0x38aa99['gray'](_0x4073f4(0x21a)+_0x37bf46[_0x4073f4(0x20f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x4073f4(0x228)](_0x4073f4(0x206)+_0x37bf46[_0x4073f4(0x1d8)]+_0x4073f4(0x1f1)+(_0x37bf46['error']||_0x4073f4(0x221)),'Run:\x20'+_0x37bf46[_0x4073f4(0x1f9)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x4073f4(0x1e5));}function verifyUpdatedBuiltinSkill(_0x4723c0){const _0x436189=a47_0x48a90e,_0x1bddb8=inspectInstalledBuiltinSkillVersion(_0x4723c0);if(_0x1bddb8[_0x436189(0x20d)]===_0x436189(0x1e6)){console[_0x436189(0x1f4)](a47_0x38aa99[_0x436189(0x211)](_0x436189(0x21a)+_0x4723c0+_0x436189(0x1f8)));return;}const _0x2f6093=_0x1bddb8[_0x436189(0x20f)]?_0x436189(0x226)+_0x4723c0+',\x20found\x20'+_0x1bddb8[_0x436189(0x20f)]:_0x436189(0x226)+_0x4723c0+_0x436189(0x216)+_0x1bddb8['state'];throw CliErrors[_0x436189(0x228)]('CLI\x20updated\x20to\x20v'+_0x4723c0+_0x436189(0x203)+_0x2f6093,'Run:\x20'+_0x1bddb8[_0x436189(0x1f9)]+_0x436189(0x1f2)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x15dbfb){const _0x40a63b=a47_0x48a90e;await validateUpdateFlags(_0x15dbfb);const _0x4e099c=getCurrentVersion();console[_0x40a63b(0x1f4)](_0x40a63b(0x1e3)+_0x4e099c);const _0x37b317=a47_0x46579e(_0x40a63b(0x202))[_0x40a63b(0x1e8)](),_0x2858ba=await resolveTargetVersion(_0x15dbfb);if(!_0x2858ba){const _0xbd3d40=_0x15dbfb[_0x40a63b(0x1eb)](_0x40a63b(0x213))?_0x40a63b(0x1ed):_0x40a63b(0x1e7);return _0x37b317[_0x40a63b(0x1ec)](_0xbd3d40),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)](_0x40a63b(0x214)+NPM_PACKAGE_NAME+_0x40a63b(0x1dd))),{'ok':![],'message':_0xbd3d40};}const _0x3f05ca=a47_0x2161a9['valid'](VERSION),_0x399b59=a47_0x2161a9[_0x40a63b(0x210)](_0x2858ba[_0x40a63b(0x1d9)]);if(!_0x3f05ca||!_0x399b59)return _0x37b317[_0x40a63b(0x1ec)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x40a63b(0x21c)};if(!shouldInstallTarget(_0x3f05ca,_0x2858ba)){const _0x509a8c=_0x2858ba[_0x40a63b(0x21f)]===_0x40a63b(0x1d9)?_0x40a63b(0x21b)+_0x2858ba[_0x40a63b(0x1d9)]+')':a47_0x2161a9['gt'](_0x3f05ca,_0x399b59)?_0x40a63b(0x21d)+_0x4e099c+_0x40a63b(0x224)+_0x2858ba[_0x40a63b(0x1d9)]:'Already\x20up\x20to\x20date\x20(v'+_0x2858ba[_0x40a63b(0x1d9)]+')';return _0x37b317[_0x40a63b(0x227)](_0x509a8c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x37b317[_0x40a63b(0x20c)](getInstallPlanLabel(_0x4e099c,_0x2858ba));const _0x27a975=detectPackageManager(),_0x13a721=_0x27a975===_0x40a63b(0x1e2)?resolveNpmBin('npm'):_0x27a975,_0x40e02e=a47_0x46579e(_0x40a63b(0x1fd)+_0x27a975+'...')['start']();try{await execa(_0x13a721,[_0x40a63b(0x1ee),'-g',NPM_PACKAGE_NAME+'@'+_0x2858ba[_0x40a63b(0x1d9)]],{'stdio':'pipe'}),_0x40e02e[_0x40a63b(0x227)](_0x40a63b(0x223)+_0x2858ba[_0x40a63b(0x1d9)]),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x15663c){return _0x40e02e[_0x40a63b(0x1ec)](_0x40a63b(0x208)),console[_0x40a63b(0x1db)](a47_0x38aa99[_0x40a63b(0x1fe)]('\x20\x20'+_0x15663c[_0x40a63b(0x20b)])),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)](_0x40a63b(0x207)+_0x27a975+_0x40a63b(0x1de)+NPM_PACKAGE_NAME+'@'+_0x2858ba[_0x40a63b(0x1d9)])),{'ok':![],'message':_0x15663c[_0x40a63b(0x20b)]};}return verifyUpdatedBuiltinSkill(_0x2858ba[_0x40a63b(0x1d9)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a47_0x48a90e(0x201),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a47_0x48a90e(0x200),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1acba6,_0x1b9efd){const _0x436959=a48_0x3f4d,_0x2b47b5=_0x1acba6();while(!![]){try{const _0x2c89ea=parseInt(_0x436959(0x7a))/0x1*(parseInt(_0x436959(0x77))/0x2)+parseInt(_0x436959(0x73))/0x3+-parseInt(_0x436959(0x79))/0x4*(parseInt(_0x436959(0x72))/0x5)+-parseInt(_0x436959(0x75))/0x6+-parseInt(_0x436959(0x74))/0x7+-parseInt(_0x436959(0x78))/0x8*(parseInt(_0x436959(0x71))/0x9)+parseInt(_0x436959(0x76))/0xa;if(_0x2c89ea===_0x1b9efd)break;else _0x2b47b5['push'](_0x2b47b5['shift']());}catch(_0x1f3f73){_0x2b47b5['push'](_0x2b47b5['shift']());}}}(a48_0x182b,0x3da53));function a48_0x182b(){const _0x2e91f8=['2336694mIsczD','5152630JgubcA','104932mdwyNV','768TRseEx','10992ymEYQw','2aQTSbZ','6894iDUVRU','95UOadAF','757890oCWBWG','735903DOsFCn'];a48_0x182b=function(){return _0x2e91f8;};return a48_0x182b();}function a48_0x3f4d(_0x4e2ebf,_0x1be6f7){_0x4e2ebf=_0x4e2ebf-0x71;const _0x182b01=a48_0x182b();let _0x3f4d7b=_0x182b01[_0x4e2ebf];return _0x3f4d7b;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x21cfc1=a49_0x5d4b;function a49_0x2ed3(){const _0x199699=['tableName','24UokZHM','boolean','sdk','code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','16083iEOJeR','bool','operation','171556azKHQN','1106488YKzwoV','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','1383990mBoeJw','55dTnfNs','6FidERr','120851RGBsFk','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','read','appCode','105068vJvwtm','1307952kIvUdL','string','66wviGHY','str'];a49_0x2ed3=function(){return _0x199699;};return a49_0x2ed3();}function a49_0x5d4b(_0x8675c,_0x44ed50){_0x8675c=_0x8675c-0x1b8;const _0x2ed337=a49_0x2ed3();let _0x5d4b35=_0x2ed337[_0x8675c];return _0x5d4b35;}(function(_0x5470fe,_0x3347a6){const _0x303e8f=a49_0x5d4b,_0x4f9720=_0x5470fe();while(!![]){try{const _0x2cf360=parseInt(_0x303e8f(0x1ca))/0x1*(parseInt(_0x303e8f(0x1c9))/0x2)+-parseInt(_0x303e8f(0x1d0))/0x3+parseInt(_0x303e8f(0x1cf))/0x4*(-parseInt(_0x303e8f(0x1c8))/0x5)+parseInt(_0x303e8f(0x1bc))/0x6*(-parseInt(_0x303e8f(0x1c4))/0x7)+-parseInt(_0x303e8f(0x1c5))/0x8+parseInt(_0x303e8f(0x1c1))/0x9+parseInt(_0x303e8f(0x1c7))/0xa*(parseInt(_0x303e8f(0x1b9))/0xb);if(_0x2cf360===_0x3347a6)break;else _0x4f9720['push'](_0x4f9720['shift']());}catch(_0x3719e1){_0x4f9720['push'](_0x4f9720['shift']());}}}(a49_0x2ed3,0x38ffe));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a49_0x21cfc1(0x1be),'description':a49_0x21cfc1(0x1cc),'risk':a49_0x21cfc1(0x1cd),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a49_0x21cfc1(0x1b8),'description':a49_0x21cfc1(0x1c0)},{'name':'operation','type':a49_0x21cfc1(0x1b8),'required':!![],'description':a49_0x21cfc1(0x1c6)},{'name':'skip-imports','type':a49_0x21cfc1(0x1bd),'description':a49_0x21cfc1(0x1cb)}],async 'execute'(_0x5e362c){const _0x3dc73c=a49_0x21cfc1,{dataset:_0x414836,operation:_0xa2f63c}=await getOperationDetail(_0x5e362c[_0x3dc73c(0x1ce)],_0x5e362c['str'](_0x3dc73c(0x1bf)),_0x5e362c[_0x3dc73c(0x1ba)](_0x3dc73c(0x1c3))),_0x39408b=generateSdkCode(_0x414836,_0xa2f63c,{'includeImports':!_0x5e362c[_0x3dc73c(0x1c2)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x414836['name'],'code':_0x414836['code'],'tableName':_0x414836[_0x3dc73c(0x1bb)]},'operation':_0x5e362c[_0x3dc73c(0x1ba)](_0x3dc73c(0x1c3)),'code':_0x39408b}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x527134=a50_0x3894;function a50_0x3894(_0x28523c,_0x2bda33){_0x28523c=_0x28523c-0x156;const _0x5e2a92=a50_0x5e2a();let _0x38949c=_0x5e2a92[_0x28523c];return _0x38949c;}(function(_0x5d6cd2,_0x21ff5f){const _0x4a2954=a50_0x3894,_0x403434=_0x5d6cd2();while(!![]){try{const _0x15adbf=-parseInt(_0x4a2954(0x161))/0x1*(-parseInt(_0x4a2954(0x15b))/0x2)+-parseInt(_0x4a2954(0x16c))/0x3+-parseInt(_0x4a2954(0x166))/0x4+-parseInt(_0x4a2954(0x16d))/0x5*(-parseInt(_0x4a2954(0x16b))/0x6)+-parseInt(_0x4a2954(0x160))/0x7+-parseInt(_0x4a2954(0x157))/0x8*(-parseInt(_0x4a2954(0x15f))/0x9)+-parseInt(_0x4a2954(0x16a))/0xa*(parseInt(_0x4a2954(0x168))/0xb);if(_0x15adbf===_0x21ff5f)break;else _0x403434['push'](_0x403434['shift']());}catch(_0x1dc241){_0x403434['push'](_0x403434['shift']());}}}(a50_0x5e2a,0x5490f));function a50_0x5e2a(){const _0x132f75=['8SdpJgm','boolean','str','read','1528sGOmMw','sqlName','no-imports','target','865719DOLHRr','4717909Emgcon','773xTYnBm','string','bff','sqlcode','sqlCode','423384birdpJ','appCode','66vaEWew','sdk','380630MOtSSD','18eBrhHc','60918VGOrsk','1146895xNlDZZ','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query'];a50_0x5e2a=function(){return _0x132f75;};return a50_0x5e2a();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':'sql','description':a50_0x527134(0x156),'risk':a50_0x527134(0x15a),'flags':[SQLCODE_FLAG,{'name':a50_0x527134(0x15e),'type':a50_0x527134(0x162),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a50_0x527134(0x169),'enum':['sdk',a50_0x527134(0x163)]},{'name':'no-imports','type':a50_0x527134(0x158),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2225d2){const _0x2ea715=a50_0x527134,_0x2182b4=await getSqlQueryInfo(_0x2225d2[_0x2ea715(0x167)],_0x2225d2['str'](_0x2ea715(0x164))),_0x2efeb4=_0x2225d2[_0x2ea715(0x159)](_0x2ea715(0x15e))||_0x2ea715(0x169),_0x180f3f=generateSqlCodeTemplate(_0x2182b4,{'target':_0x2efeb4,'includeImports':!_0x2225d2['bool'](_0x2ea715(0x15d))});return{'ok':!![],'data':{'sqlCode':_0x2182b4[_0x2ea715(0x165)],'sqlName':_0x2182b4[_0x2ea715(0x15c)],'target':_0x2efeb4,'code':_0x180f3f}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45067c,_0x3da7d2){const _0x43d7db=a51_0x59f0,_0x5d92c7=_0x45067c();while(!![]){try{const _0x4f994b=parseInt(_0x43d7db(0xc8))/0x1+parseInt(_0x43d7db(0xe3))/0x2+parseInt(_0x43d7db(0xc3))/0x3+-parseInt(_0x43d7db(0xc5))/0x4*(parseInt(_0x43d7db(0xd1))/0x5)+parseInt(_0x43d7db(0xc2))/0x6*(-parseInt(_0x43d7db(0xd0))/0x7)+-parseInt(_0x43d7db(0xd4))/0x8+parseInt(_0x43d7db(0xe8))/0x9*(parseInt(_0x43d7db(0xe0))/0xa);if(_0x4f994b===_0x3da7d2)break;else _0x5d92c7['push'](_0x5d92c7['shift']());}catch(_0x4169e4){_0x5d92c7['push'](_0x5d92c7['shift']());}}}(a51_0x1404,0x71123));function a51_0x1404(){const _0x40fd2a=['\x20app\x20\x22','string','189jcVDju','object','\x20Default\x20app\x20is\x20\x22','Missing\x20app\x20name.','\x20config.','Added','\x20Default\x20app\x20changed\x20to\x20\x22','Removed\x20app\x20\x22','project','Updated','12HZsrOv','733854ePHoKw','appcode','20PSaGEP','\x22\x20(appcode:\x20','\x20Note:\x20app\x20\x22','495253EowioD','boolean','keys','length','Usage:\x20','projectConfig','App\x20\x22','str','786128JAemNg','258325ShOLjt','defaultApp','global','3667760qQsezu','\x20<name>\x20[--global]','both','\x22\x20still\x20defined\x20in\x20','args','\x20<name>\x20--appcode\x20<code>','validation','\x22\x20is\x20selected\x20automatically.','App\x20code','Use\x20global\x20config\x20scope','\x22\x20not\x20found.','\x20Remaining\x20app\x20\x22','99960qwiJHa','trim','apps','909510XjBsFY','bool','globalConfig'];a51_0x1404=function(){return _0x40fd2a;};return a51_0x1404();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x5442d4=a51_0x59f0;return[{'name':'appcode','type':'string','description':_0x5442d4(0xdc),'required':!![]},{'name':_0x5442d4(0xd3),'type':_0x5442d4(0xc9),'description':_0x5442d4(0xdd),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4156e0=a51_0x59f0;return[{'name':_0x4156e0(0xd3),'type':_0x4156e0(0xc9),'description':_0x4156e0(0xdd),'default':![]}];}export async function validateAppName(_0x6ce175,_0x525a5a){const _0x567b54=a51_0x59f0,_0x16ae99=_0x6ce175[_0x567b54(0xd8)][0x0]?.[_0x567b54(0xe1)]();if(!_0x16ae99)throw CliErrors[_0x567b54(0xda)](_0x567b54(0xeb),_0x567b54(0xcc)+CLI_BIN_NAME+'\x20'+_0x525a5a+'\x20<name>');}export async function runAppAdd(_0x1f344c,_0x41ac9d){const _0x1c2da7=a51_0x59f0,_0x3dbccc=_0x1f344c[_0x1c2da7(0xd8)][0x0]?.[_0x1c2da7(0xe1)]();if(!_0x3dbccc)throw CliErrors[_0x1c2da7(0xda)]('Missing\x20app\x20name.',_0x1c2da7(0xcc)+CLI_BIN_NAME+'\x20'+_0x41ac9d+_0x1c2da7(0xd9));const _0xce6597=_0x1f344c[_0x1c2da7(0xcf)](_0x1c2da7(0xc4));if(!_0xce6597)throw CliErrors['flagMissing'](_0x1c2da7(0xc4),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x41ac9d+_0x1c2da7(0xd9));const _0x36eb05={'global':_0x1f344c[_0x1c2da7(0xe4)](_0x1c2da7(0xd3))},_0x2f017c=readConfig(_0x36eb05);if(!_0x2f017c['apps'])_0x2f017c[_0x1c2da7(0xe2)]={};const _0x3fa49f={'appcode':_0xce6597,...collectAppProfileOverrides(_0x220ea5=>_0x1f344c[_0x1c2da7(0xcf)](_0x220ea5))},_0x286ce2=_0x2f017c[_0x1c2da7(0xe2)],_0x203dd4=Object['keys'](_0x286ce2),_0x57e70d=typeof _0x2f017c['defaultApp']===_0x1c2da7(0xe7)&&_0x286ce2[_0x2f017c[_0x1c2da7(0xd2)]]?_0x2f017c[_0x1c2da7(0xd2)]:_0x203dd4[_0x1c2da7(0xcb)]===0x1?_0x203dd4[0x0]:undefined,_0x1227ca=!!_0x286ce2[_0x3dbccc];_0x286ce2[_0x3dbccc]=_0x3fa49f;const _0x1afa1b=normalizeStoredDefaultApp(_0x2f017c,_0x57e70d);writeConfig(_0x2f017c,_0x36eb05);const _0x559e52=!_0x1227ca&&_0x1afa1b?_0x1c2da7(0xea)+_0x1afa1b+'\x22.':'',_0x1ebc00=(_0x1227ca?_0x1c2da7(0xc1):_0x1c2da7(0xbd))+_0x1c2da7(0xe6)+_0x3dbccc+_0x1c2da7(0xc6)+_0xce6597+')'+scopeLabel(_0x36eb05)+'.'+_0x559e52;return{'ok':!![],'message':_0x1ebc00};}function a51_0x59f0(_0xd0e6ee,_0x2d5762){_0xd0e6ee=_0xd0e6ee-0xbd;const _0x140460=a51_0x1404();let _0x59f01a=_0x140460[_0xd0e6ee];return _0x59f01a;}export async function runAppRemove(_0x119aae,_0x1636c4){const _0x5337e4=a51_0x59f0,_0x5c24fd=_0x119aae[_0x5337e4(0xd8)][0x0]?.[_0x5337e4(0xe1)]();if(!_0x5c24fd)throw CliErrors[_0x5337e4(0xda)]('Missing\x20app\x20name.',_0x5337e4(0xcc)+CLI_BIN_NAME+'\x20'+_0x1636c4+_0x5337e4(0xd5));const _0x27a975=_0x119aae[_0x5337e4(0xe4)](_0x5337e4(0xd3)),{config:_0xe628a0,layers:_0x230bbc}=readRawConfigWithLayers(),_0x3bf448=_0xe628a0[_0x5337e4(0xe2)]??{};if(!_0x3bf448[_0x5c24fd])throw CliErrors[_0x5337e4(0xda)](_0x5337e4(0xce)+_0x5c24fd+_0x5337e4(0xde));const _0x41c952=_0x230bbc[_0x5337e4(0xe5)][_0x5337e4(0xe2)]&&typeof _0x230bbc[_0x5337e4(0xe5)]['apps']==='object'?_0x230bbc[_0x5337e4(0xe5)][_0x5337e4(0xe2)]:{},_0x244226=_0x230bbc[_0x5337e4(0xcd)][_0x5337e4(0xe2)]&&typeof _0x230bbc[_0x5337e4(0xcd)][_0x5337e4(0xe2)]===_0x5337e4(0xe9)?_0x230bbc[_0x5337e4(0xcd)]['apps']:{},_0x50c67c=appDefinedIn(_0x5c24fd,_0x41c952,_0x244226),_0x5a5d97=resolveAppScopeForWrite(_0x5c24fd,_0x27a975,_0x230bbc),_0x3ce21b={'global':_0x5a5d97===_0x5337e4(0xd3)},_0x21cc5a=readConfig(_0x3ce21b),_0x39947a=_0x21cc5a[_0x5337e4(0xe2)];if(!_0x39947a||!_0x39947a[_0x5c24fd])throw CliErrors[_0x5337e4(0xda)]('App\x20\x22'+_0x5c24fd+'\x22\x20not\x20found.');delete _0x39947a[_0x5c24fd];let _0x4e27a8='';const _0x2ec1b2=typeof _0x21cc5a[_0x5337e4(0xd2)]===_0x5337e4(0xe7)?_0x21cc5a[_0x5337e4(0xd2)]:undefined,_0x18a197=Object[_0x5337e4(0xca)](_0x39947a),_0x19d529=_0x2ec1b2===_0x5c24fd?_0x18a197[0x0]:_0x2ec1b2,_0x4daad4=normalizeStoredDefaultApp(_0x21cc5a,_0x19d529);if(_0x2ec1b2===_0x5c24fd&&_0x18a197[_0x5337e4(0xcb)]===0x1)_0x4e27a8=_0x5337e4(0xdf)+_0x18a197[0x0]+_0x5337e4(0xdb);else _0x2ec1b2===_0x5c24fd&&_0x4daad4&&(_0x4e27a8=_0x5337e4(0xbe)+_0x4daad4+'\x22.');Object[_0x5337e4(0xca)](_0x39947a)[_0x5337e4(0xcb)]===0x0&&(delete _0x21cc5a[_0x5337e4(0xe2)],delete _0x21cc5a['defaultApp']);writeConfig(_0x21cc5a,_0x3ce21b);const _0x1d0ace=_0x50c67c===_0x5337e4(0xd6)?_0x5337e4(0xc7)+_0x5c24fd+_0x5337e4(0xd7)+(_0x5a5d97===_0x5337e4(0xc0)?_0x5337e4(0xd3):_0x5337e4(0xc0))+_0x5337e4(0xec):'';return{'ok':!![],'message':_0x5337e4(0xbf)+_0x5c24fd+'\x22'+scopeLabel(_0x3ce21b)+'.'+_0x4e27a8+_0x1d0ace};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5af8ef,_0x355925){const _0x2f6f2f=a52_0x3237,_0x1a3b1a=_0x5af8ef();while(!![]){try{const _0x3026af=-parseInt(_0x2f6f2f(0x188))/0x1*(parseInt(_0x2f6f2f(0x17c))/0x2)+-parseInt(_0x2f6f2f(0x19e))/0x3+parseInt(_0x2f6f2f(0x18a))/0x4+parseInt(_0x2f6f2f(0x17d))/0x5*(-parseInt(_0x2f6f2f(0x180))/0x6)+-parseInt(_0x2f6f2f(0x186))/0x7+parseInt(_0x2f6f2f(0x182))/0x8*(-parseInt(_0x2f6f2f(0x199))/0x9)+parseInt(_0x2f6f2f(0x183))/0xa*(parseInt(_0x2f6f2f(0x18c))/0xb);if(_0x3026af===_0x355925)break;else _0x1a3b1a['push'](_0x1a3b1a['shift']());}catch(_0x2a25a1){_0x1a3b1a['push'](_0x1a3b1a['shift']());}}}(a52_0x39aa,0x71a6c));function a52_0x39aa(){const _0x501e3c=['✎\x20Enter\x20manually','59088xQZeuM','13978390qbRNho','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','skip','5177459nDSVpo','includes','1KgbAUk','yellow','1728532CuBIxa','No\x20available\x20apps\x20found.','22YyGoiW','cyan','gray','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','find','map','\x20\x20(','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','Found\x20','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','appName','custom','Fetching\x20available\x20apps...','423WfmcNi','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','trim','\x0aNo\x20available\x20apps\x20found.','appCode','669615ZOYYln','length','message','1726898BGVvZV','5oheFPh','✎\x20Enter\x20appcode\x20manually','Select\x20the\x20app\x20to\x20bind:','3533172rEmSSD'];a52_0x39aa=function(){return _0x501e3c;};return a52_0x39aa();}import{input,checkbox,select}from'@inquirer/prompts';import a52_0x1d5427 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a52_0x3237(_0x3de833,_0x206e20){_0x3de833=_0x3de833-0x17c;const _0x39aa91=a52_0x39aa();let _0x323745=_0x39aa91[_0x3de833];return _0x323745;}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x2ae737=a52_0x3237,_0x29777a=await input({'message':'App\x20Code:','validate':_0x112f56=>{const _0x1a69f5=a52_0x3237,_0x5683d2=validateAppcode(_0x112f56[_0x1a69f5(0x19b)]());return _0x5683d2['valid']||_0x5683d2[_0x1a69f5(0x1a0)]||'Invalid\x20App\x20Code';}});return _0x29777a[_0x2ae737(0x19b)]();}export async function promptAppSelection(_0x3aed6c){const _0x434f2f=a52_0x3237,_0x32f47f=[{'name':a52_0x1d5427['yellow'](_0x434f2f(0x17e)),'value':-0x1},..._0x3aed6c[_0x434f2f(0x191)]((_0x1667c9,_0x11d0a0)=>({'name':_0x1667c9[_0x434f2f(0x196)]+'\x20\x20'+a52_0x1d5427['gray']('('+_0x1667c9['appCode']+')'),'value':_0x11d0a0}))],_0x2115fc=await checkbox({'message':_0x434f2f(0x194)+a52_0x1d5427[_0x434f2f(0x18d)](_0x3aed6c[_0x434f2f(0x19f)])+_0x434f2f(0x195),'choices':_0x32f47f,'loop':![]});if(_0x2115fc[_0x434f2f(0x187)](-0x1))return _0x434f2f(0x197);if(_0x2115fc['length']===0x0)return'custom';return _0x2115fc[_0x434f2f(0x191)](_0x48938c=>_0x3aed6c[_0x48938c]);}export async function promptSingleAppSelection(_0xdffbdc){const _0x17783c=a52_0x3237,_0x2c6d97=[{'name':a52_0x1d5427[_0x17783c(0x18e)](_0x17783c(0x19a)),'value':_0x17783c(0x185)},{'name':a52_0x1d5427[_0x17783c(0x189)]('✎\x20Enter\x20appcode\x20manually'),'value':_0x17783c(0x197)},..._0xdffbdc[_0x17783c(0x191)](_0x36396b=>({'name':_0x36396b[_0x17783c(0x196)]+'\x20\x20'+a52_0x1d5427['gray']('('+_0x36396b[_0x17783c(0x19d)]+')'),'value':_0x36396b['appCode']}))],_0x5eae4d=await select({'message':_0x17783c(0x17f),'choices':_0x2c6d97});if(_0x5eae4d==='skip')return _0x17783c(0x185);if(_0x5eae4d===_0x17783c(0x197))return _0x17783c(0x197);return _0xdffbdc[_0x17783c(0x190)](_0x25f4d4=>_0x25f4d4['appCode']===_0x5eae4d);}export async function selectSingleAppcode(_0x1882d2){const _0x365695=a52_0x3237;if(!_0x1882d2)return writeCliSideChannelLine(a52_0x1d5427[_0x365695(0x18e)](_0x365695(0x18f))),_fallbackOrSkip();writeCliSideChannelLine(_0x365695(0x198));let _0x51f67a;try{_0x51f67a=await withActiveCookie(_0x1882d2,()=>listRemoteApps());}catch(_0x5e59f3){writeCliSideChannelLine(a52_0x1d5427[_0x365695(0x189)](_0x365695(0x184)));if(_0x5e59f3 instanceof Error)writeCliSideChannelLine(a52_0x1d5427[_0x365695(0x18e)](_0x365695(0x192)+_0x5e59f3[_0x365695(0x1a0)]+')'));return _fallbackOrSkip();}if(_0x51f67a[_0x365695(0x19f)]===0x0)return writeCliSideChannelLine(a52_0x1d5427['yellow'](_0x365695(0x18b))),_fallbackOrSkip();const _0x434962=await promptSingleAppSelection(_0x51f67a);if(_0x434962===_0x365695(0x185))return'';if(_0x434962===_0x365695(0x197))return promptCustomAppcode();return _0x434962[_0x365695(0x19d)];}export async function selectMultipleApps(_0x467287){const _0x4108d6=a52_0x3237;writeCliSideChannelLine(_0x4108d6(0x198));let _0x5186f6;try{_0x5186f6=await withActiveCookie(_0x467287,()=>listRemoteApps());}catch(_0x5bf62c){writeCliSideChannelLine(_0x4108d6(0x193));if(_0x5bf62c instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x5bf62c[_0x4108d6(0x1a0)]+')');return'custom';}if(_0x5186f6['length']===0x0)return writeCliSideChannelLine(_0x4108d6(0x19c)),_0x4108d6(0x197);return promptAppSelection(_0x5186f6);}async function _fallbackOrSkip(){const _0xe9a539=a52_0x3237,_0x3c99b0=await select({'message':'App\x20Code:','choices':[{'name':a52_0x1d5427[_0xe9a539(0x18e)]('(Skip;\x20configure\x20later)'),'value':_0xe9a539(0x185)},{'name':a52_0x1d5427[_0xe9a539(0x189)](_0xe9a539(0x181)),'value':'manual'}]});if(_0x3c99b0===_0xe9a539(0x185))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x322428=a53_0x1039;(function(_0x5d4efb,_0xa1c2dc){const _0x2526d3=a53_0x1039,_0x354b7c=_0x5d4efb();while(!![]){try{const _0x4fbed0=-parseInt(_0x2526d3(0x7d))/0x1+parseInt(_0x2526d3(0x81))/0x2*(-parseInt(_0x2526d3(0x79))/0x3)+parseInt(_0x2526d3(0x92))/0x4+parseInt(_0x2526d3(0x77))/0x5*(-parseInt(_0x2526d3(0x8c))/0x6)+-parseInt(_0x2526d3(0x7e))/0x7*(-parseInt(_0x2526d3(0x87))/0x8)+parseInt(_0x2526d3(0x6f))/0x9+-parseInt(_0x2526d3(0x7c))/0xa*(parseInt(_0x2526d3(0x8f))/0xb);if(_0x4fbed0===_0xa1c2dc)break;else _0x354b7c['push'](_0x354b7c['shift']());}catch(_0x1564a1){_0x354b7c['push'](_0x354b7c['shift']());}}}(a53_0xc067,0x6825f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x322428(0x71),a53_0x322428(0x80)]),NON_TERMINAL_STATUSES=new Set([a53_0x322428(0x86),a53_0x322428(0x85)]);export function normalizeAsyncTask(_0x35ebef){const _0x18bae7=a53_0x322428,_0x6961c4=typeof _0x35ebef?.[_0x18bae7(0x7b)]==='string'?_0x35ebef[_0x18bae7(0x7b)][_0x18bae7(0x72)]():'';if(!_0x6961c4)throw CliErrors[_0x18bae7(0x88)](_0x18bae7(0x82));const _0x2cdcb8=typeof _0x35ebef[_0x18bae7(0x8e)]==='string'?_0x35ebef['status'][_0x18bae7(0x72)]()[_0x18bae7(0x76)]():'';if(!_0x2cdcb8)throw CliErrors['apiError'](_0x18bae7(0x78)+_0x6961c4+_0x18bae7(0x70));return{'taskId':_0x6961c4,'status':_0x2cdcb8,'errorMessage':typeof _0x35ebef[_0x18bae7(0x89)]===_0x18bae7(0x83)&&_0x35ebef[_0x18bae7(0x89)][_0x18bae7(0x72)]()?_0x35ebef[_0x18bae7(0x89)][_0x18bae7(0x72)]():null,'isTerminal':TERMINAL_STATUSES[_0x18bae7(0x90)](_0x2cdcb8),'knownStatus':TERMINAL_STATUSES[_0x18bae7(0x90)](_0x2cdcb8)||NON_TERMINAL_STATUSES[_0x18bae7(0x90)](_0x2cdcb8)};}function a53_0x1039(_0x15ac4e,_0x15ed14){_0x15ac4e=_0x15ac4e-0x6f;const _0xc067b9=a53_0xc067();let _0x1039dd=_0xc067b9[_0x15ac4e];return _0x1039dd;}function a53_0xc067(){const _0x47a268=['\x20returned\x20unknown\x20status\x20','5562DQDYym','\x20failed.','status','11kfsuoC','has','\x20--format\x20compress','2955996DuKPhb','7244325Sbbwtv','\x20response\x20did\x20not\x20contain\x20a\x20status.','SUCCESS','trim','Task\x20','\x20--appcode\x20','replace','toUpperCase','1985jIVLqj','Async\x20task\x20','224151RfuPwG','\x20failed:\x20','taskId','10994350YyGTRg','79051FgcREb','289303fPjlRI','\x20is\x20processing.','FAILED','4Rvldrv','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','string','\x20is\x20pending.','PROCESSING','PENDING','112lURFlJ','apiError','errorMessage','\x27\x5c\x27\x27'];a53_0xc067=function(){return _0x47a268;};return a53_0xc067();}export function buildAsyncTaskStatusCommand(_0x282be5,_0x5bf650){const _0x46dd3d=a53_0x322428;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x282be5)+_0x46dd3d(0x74)+quoteShellArg(_0x5bf650)+_0x46dd3d(0x91);}export function asyncTaskMessage(_0x5264d4){const _0x10031c=a53_0x322428;switch(_0x5264d4[_0x10031c(0x8e)]){case'PENDING':return _0x10031c(0x73)+_0x5264d4['taskId']+_0x10031c(0x84);case _0x10031c(0x85):return'Task\x20'+_0x5264d4[_0x10031c(0x7b)]+_0x10031c(0x7f);case _0x10031c(0x71):return _0x10031c(0x73)+_0x5264d4['taskId']+'\x20completed\x20successfully.';case _0x10031c(0x80):return _0x5264d4[_0x10031c(0x89)]?_0x10031c(0x73)+_0x5264d4[_0x10031c(0x7b)]+_0x10031c(0x7a)+_0x5264d4[_0x10031c(0x89)]:'Task\x20'+_0x5264d4[_0x10031c(0x7b)]+_0x10031c(0x8d);default:return _0x10031c(0x73)+_0x5264d4[_0x10031c(0x7b)]+_0x10031c(0x8b)+_0x5264d4[_0x10031c(0x8e)]+'.';}}function quoteShellArg(_0xa2db23){const _0x4fb529=a53_0x322428;return'\x27'+_0xa2db23[_0x4fb529(0x75)](/'/g,_0x4fb529(0x8a))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4c0a8c,_0xfdb3d6){var _0xc20886=a54_0x33c8,_0x26fe9c=_0x4c0a8c();while(!![]){try{var _0x2a9c46=parseInt(_0xc20886(0x19a))/0x1+parseInt(_0xc20886(0x19b))/0x2+-parseInt(_0xc20886(0x19c))/0x3*(-parseInt(_0xc20886(0x193))/0x4)+-parseInt(_0xc20886(0x199))/0x5*(-parseInt(_0xc20886(0x191))/0x6)+parseInt(_0xc20886(0x190))/0x7+-parseInt(_0xc20886(0x192))/0x8+-parseInt(_0xc20886(0x194))/0x9;if(_0x2a9c46===_0xfdb3d6)break;else _0x26fe9c['push'](_0x26fe9c['shift']());}catch(_0x30473b){_0x26fe9c['push'](_0x26fe9c['shift']());}}}(a54_0x4777,0x56298));function a54_0x4777(){var _0x511458=['185872OnUpPS','11738646ouzMGH','description','method','url','defineProperties','20kOoufq','305793VOEHLg','391716ZFroLQ','39JabTwy','2637691BZkYoL','885966DuVGdA','3327824gVtkDQ'];a54_0x4777=function(){return _0x511458;};return a54_0x4777();}function a54_0x33c8(_0x1a4eb3,_0x5d8e95){_0x1a4eb3=_0x1a4eb3-0x190;var _0x477768=a54_0x4777();var _0x33c87b=_0x477768[_0x1a4eb3];return _0x33c87b;}export function asDryRunResult(_0xabc824,_0xbfd858){var _0x298b44=a54_0x33c8;return Object[_0x298b44(0x198)](_0xabc824,{'method':{'value':_0xbfd858[_0x298b44(0x196)],'enumerable':![]},'url':{'value':_0xbfd858[_0x298b44(0x197)],'enumerable':![]},..._0xbfd858[_0x298b44(0x195)]?{'description':{'value':_0xbfd858[_0x298b44(0x195)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x1ee533=a55_0x12f4;(function(_0x125340,_0x16c98a){const _0x29c568=a55_0x12f4,_0x58d632=_0x125340();while(!![]){try{const _0x5a461d=parseInt(_0x29c568(0x87))/0x1*(-parseInt(_0x29c568(0x9d))/0x2)+parseInt(_0x29c568(0x90))/0x3*(-parseInt(_0x29c568(0x86))/0x4)+-parseInt(_0x29c568(0x8b))/0x5*(parseInt(_0x29c568(0x9b))/0x6)+-parseInt(_0x29c568(0xa7))/0x7*(parseInt(_0x29c568(0x8c))/0x8)+-parseInt(_0x29c568(0x8f))/0x9*(-parseInt(_0x29c568(0xa6))/0xa)+-parseInt(_0x29c568(0x8a))/0xb*(-parseInt(_0x29c568(0x9c))/0xc)+parseInt(_0x29c568(0x9f))/0xd;if(_0x5a461d===_0x16c98a)break;else _0x58d632['push'](_0x58d632['shift']());}catch(_0x591a8a){_0x58d632['push'](_0x58d632['shift']());}}}(a55_0x41eb,0xa507f));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x1ee533(0x98),'type':a55_0x1ee533(0x99),'required':!![],'description':'Source\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':'from-column','type':'string','required':!![],'description':a55_0x1ee533(0xa0)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x1ee533(0x93),'type':a55_0x1ee533(0x99),'required':!![],'description':'Target\x20DB_TABLE\x20dataset\x20code'};function a55_0x12f4(_0x5e8df8,_0x197281){_0x5e8df8=_0x5e8df8-0x85;const _0x41eb47=a55_0x41eb();let _0x12f4e9=_0x41eb47[_0x5e8df8];return _0x12f4e9;}export const CROSS_RELATION_TO_COLUMN_FLAG={'name':'to-column','type':a55_0x1ee533(0x99),'required':!![],'description':'Target\x20field\x20name'};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x1ee533(0xa2),'type':'number','description':a55_0x1ee533(0x88)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x1ee533(0xa1),'type':'string','description':a55_0x1ee533(0x89)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x1ee533(0xa5),'type':a55_0x1ee533(0x99),'enum':['ONE_TO_ONE','ONE_TO_MANY',a55_0x1ee533(0xa3),a55_0x1ee533(0xa8)],'description':a55_0x1ee533(0xaa)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x1ee533(0x9e),'type':a55_0x1ee533(0x94),'default':![],'description':a55_0x1ee533(0x9a)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x1ee533(0x8e)};export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':a55_0x1ee533(0x95),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x1ee533(0x8d),'description':a55_0x1ee533(0x95)};export const SQLCODE_FLAG={'name':a55_0x1ee533(0xa4),'type':a55_0x1ee533(0x99),'required':!![],'description':a55_0x1ee533(0x92),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x1ee533(0x91)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x1ee533(0x85),'type':a55_0x1ee533(0x99),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};function a55_0x41eb(){const _0x412664=['1280588InMoiu','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','99fNVsMA','545815PIhfid','8saOWED','datasetcode','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','1296333nUsIrj','46788MbZvGn','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','to-datasetcode','boolean','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','dbtype','skip-connection-test','from-datasetcode','string','Write\x20to\x20the\x20global\x20configuration','6VMlIlq','508608gQICHS','2ZoWQcU','global','39402610YXMbWn','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','to-label-column','from-dblink-id','MANY_TO_ONE','sqlcode','cardinality','10VxmSAm','4321583GNAQvz','MANY_TO_MANY','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','appcode','224UYwANl'];a55_0x41eb=function(){return _0x412664;};return a55_0x41eb();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a55_0x1ee533(0xa9)};export const DB_TYPE_FLAG={'name':a55_0x1ee533(0x96),'type':a55_0x1ee533(0x99),'required':!![],'description':'Database\x20product\x20type','enum':['MYSQL','POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x1ee533(0x97),'type':a55_0x1ee533(0x94),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29186c,_0x366444){const _0x37c437=a56_0x2af0,_0x806122=_0x29186c();while(!![]){try{const _0x4103ff=parseInt(_0x37c437(0x1c8))/0x1+-parseInt(_0x37c437(0x1d3))/0x2+parseInt(_0x37c437(0x1d5))/0x3*(-parseInt(_0x37c437(0x1cd))/0x4)+parseInt(_0x37c437(0x1d2))/0x5+-parseInt(_0x37c437(0x1c7))/0x6+-parseInt(_0x37c437(0x1d4))/0x7+parseInt(_0x37c437(0x1ce))/0x8;if(_0x4103ff===_0x366444)break;else _0x806122['push'](_0x806122['shift']());}catch(_0x582075){_0x806122['push'](_0x806122['shift']());}}}(a56_0x7309,0xe92f5));function a56_0x7309(){const _0x459850=['1248790rBJyhW','\x20MB','size','validation','File\x20is\x20not\x20a\x20regular\x20file:\x20','136wKjfSt','13398736tNhGoE','ceil','File\x20not\x20found:\x20','isFile','8546070ZymKNk','1880572PCJxwG','3673572gXkdsM','157554zFZPks','trim','\x20path\x20is\x20required.','toFixed','2562162zttfnc'];a56_0x7309=function(){return _0x459850;};return a56_0x7309();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a56_0x2af0(_0x6523c5,_0x3c30bb){_0x6523c5=_0x6523c5-0x1c5;const _0x73092a=a56_0x7309();let _0x2af0d5=_0x73092a[_0x6523c5];return _0x2af0d5;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x868a55){const _0x20ebcf=a56_0x2af0;if(_0x868a55>=BYTES_PER_MB){const _0x468d32=Math[_0x20ebcf(0x1cf)](_0x868a55/BYTES_PER_MB*0x64)/0x64;return _0x468d32[_0x20ebcf(0x1c6)](0x2)+_0x20ebcf(0x1c9);}return _0x868a55+'\x20B';}export function requireDevelopmentUploadFile(_0x265365,_0x28c052){const _0x456a31=a56_0x2af0,_0x4361c2=_0x265365[_0x456a31(0x1d6)]();if(!_0x4361c2)throw CliErrors[_0x456a31(0x1cb)](_0x28c052+_0x456a31(0x1c5));if(!existsSync(_0x4361c2))throw CliErrors[_0x456a31(0x1cb)](_0x456a31(0x1d0)+_0x4361c2);const _0x1e65e7=statSync(_0x4361c2);if(!_0x1e65e7[_0x456a31(0x1d1)]())throw CliErrors[_0x456a31(0x1cb)](_0x456a31(0x1cc)+_0x4361c2);if(_0x1e65e7[_0x456a31(0x1ca)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x456a31(0x1cb)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x4361c2+'\x20('+formatBytes(_0x1e65e7[_0x456a31(0x1ca)])+')');return{'path':_0x4361c2,'size':_0x1e65e7[_0x456a31(0x1ca)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a57_0x490d(_0x1c2a23,_0x4bde20){_0x1c2a23=_0x1c2a23-0xe7;const _0x3d6e21=a57_0x3d6e();let _0x490d2b=_0x3d6e21[_0x1c2a23];return _0x490d2b;}(function(_0x3818f3,_0x1cd1a5){const _0x28c6b5=a57_0x490d,_0x385d5c=_0x3818f3();while(!![]){try{const _0x21b2ab=parseInt(_0x28c6b5(0xf2))/0x1+-parseInt(_0x28c6b5(0xf4))/0x2+parseInt(_0x28c6b5(0xf1))/0x3+-parseInt(_0x28c6b5(0xe7))/0x4+parseInt(_0x28c6b5(0xe9))/0x5+-parseInt(_0x28c6b5(0xe8))/0x6*(-parseInt(_0x28c6b5(0xee))/0x7)+-parseInt(_0x28c6b5(0xec))/0x8*(-parseInt(_0x28c6b5(0xea))/0x9);if(_0x21b2ab===_0x1cd1a5)break;else _0x385d5c['push'](_0x385d5c['shift']());}catch(_0x264252){_0x385d5c['push'](_0x385d5c['shift']());}}}(a57_0x3d6e,0xd4167));export function validateAppcode(_0x375548){const _0x5df09e=a57_0x490d,_0x21a0a9=_0x375548[_0x5df09e(0xf3)]();if(!_0x21a0a9)return{'valid':![],'message':_0x5df09e(0xf5)};if(_0x21a0a9[_0x5df09e(0xf0)]>0x64)return{'valid':![],'message':_0x5df09e(0xed)};if(!/^[A-Za-z0-9_-]+$/[_0x5df09e(0xef)](_0x21a0a9))return{'valid':![],'message':_0x5df09e(0xeb)};return{'valid':!![]};}function a57_0x3d6e(){const _0x510796=['3097065gSHkfq','1195980KSrwit','trim','921140cscUKZ','App\x20Code\x20cannot\x20be\x20empty','5674532zxKbzP','8796GXfJfe','582850mdpLiD','154377nGsmTB','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','56YhSzVB','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1351zhSrXA','test','length'];a57_0x3d6e=function(){return _0x510796;};return a57_0x3d6e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x1e76ea=a58_0x17fa;(function(_0x5005f1,_0x1117bb){const _0x1a5972=a58_0x17fa,_0x5dc3ff=_0x5005f1();while(!![]){try{const _0x426a1a=parseInt(_0x1a5972(0xda))/0x1*(parseInt(_0x1a5972(0xdb))/0x2)+-parseInt(_0x1a5972(0xc7))/0x3*(parseInt(_0x1a5972(0xdc))/0x4)+-parseInt(_0x1a5972(0xc4))/0x5*(-parseInt(_0x1a5972(0xc9))/0x6)+-parseInt(_0x1a5972(0xc6))/0x7*(-parseInt(_0x1a5972(0xd7))/0x8)+parseInt(_0x1a5972(0xbd))/0x9+parseInt(_0x1a5972(0xbf))/0xa+parseInt(_0x1a5972(0xc3))/0xb*(-parseInt(_0x1a5972(0xd8))/0xc);if(_0x426a1a===_0x1117bb)break;else _0x5dc3ff['push'](_0x5dc3ff['shift']());}catch(_0x5bb668){_0x5dc3ff['push'](_0x5dc3ff['shift']());}}}(a58_0x5b21,0xa7bf9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a58_0x1e76ea(0xba),a58_0x1e76ea(0xc8)]);function a58_0x5b21(){const _0x25ec92=['global','prototype','key','validation','args','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','\x20config\x20delete\x20<key>\x20[--global]','Top-level\x20key\x20\x22','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','trim','Missing\x20key\x20argument.','8TnYyul','732984xkASZQ','hasOwnProperty','1163CSthAQ','2tbxyYv','8ehiqEG','config','defaultApp','riskLevel','has','9169182QiKAej','Global','11587440ONmHLK','write','bool','call','319zBrBbU','3211905GUQnMM','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','5211745wTbabR','1660719GONgjC','routing','6PhStQd','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Project'];a58_0x5b21=function(){return _0x25ec92;};return a58_0x5b21();}function a58_0x17fa(_0x1e88fb,_0x54011a){_0x1e88fb=_0x1e88fb-0xb9;const _0x5b2159=a58_0x5b21();let _0x17fafd=_0x5b2159[_0x1e88fb];return _0x17fafd;}async function execute(_0x47a8de){const _0x108478=a58_0x1e76ea,_0x24c85f=_0x47a8de[_0x108478(0xd0)][0x0]?.[_0x108478(0xd5)]();if(!_0x24c85f)throw CliErrors[_0x108478(0xcf)](_0x108478(0xd6),'Usage:\x20'+CLI_BIN_NAME+_0x108478(0xd2));if(_0x24c85f===_0x108478(0xbb))throw CliErrors[_0x108478(0xcf)](_0x108478(0xd4));if(!isTopLevelConfigKey(_0x24c85f)&&!EXTRA_DELETABLE_KEYS[_0x108478(0xbc)](_0x24c85f)&&!LEGACY_DELETABLE_KEYS[_0x108478(0xbc)](_0x24c85f))throw CliErrors[_0x108478(0xcf)](_0x108478(0xd3)+_0x24c85f+'\x22\x20is\x20not\x20deletable.',_0x108478(0xc5));const _0x166409=resolveWriteScope({'global':_0x47a8de[_0x108478(0xc1)](_0x108478(0xcc))}),_0x1b6eeb=readScopedConfig(_0x166409),_0x3f78b8=Object[_0x108478(0xcd)][_0x108478(0xd9)][_0x108478(0xc2)](_0x1b6eeb,_0x24c85f);_0x3f78b8&&(delete _0x1b6eeb[_0x24c85f],writeScopedConfig(_0x1b6eeb,_0x166409));const _0xf2863c=_0x166409===_0x108478(0xcc)?_0x108478(0xbe):_0x108478(0xcb);return{'ok':!![],'message':_0x3f78b8?'✓\x20'+_0xf2863c+'\x20'+_0x24c85f+'\x20deleted':'✓\x20'+_0xf2863c+'\x20'+_0x24c85f+'\x20already\x20absent','data':{'key':_0x24c85f,'scope':_0x166409,'changed':_0x3f78b8}};}export const configDeleteDefinition={'service':a58_0x1e76ea(0xb9),'command':'delete','description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':a58_0x1e76ea(0xc0),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x1e76ea(0xce),'description':a58_0x1e76ea(0xca),'required':!![]}],'flags':[{'name':a58_0x1e76ea(0xcc),'type':'boolean','description':a58_0x1e76ea(0xd1),'default':![]}],'execute':execute};
|