@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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.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.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/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.d.ts +1 -0
- 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.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.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.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.d.ts +2 -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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +1 -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/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x197c1a=a44_0x40cc;(function(_0x1cbba4,_0x4a831a){const _0x1b4b46=a44_0x40cc,_0x55591f=_0x1cbba4();while(!![]){try{const _0x269dd6=parseInt(_0x1b4b46(0x22e))/0x1+-parseInt(_0x1b4b46(0x1f6))/0x2*(-parseInt(_0x1b4b46(0x1ed))/0x3)+parseInt(_0x1b4b46(0x22c))/0x4+parseInt(_0x1b4b46(0x214))/0x5+parseInt(_0x1b4b46(0x242))/0x6+parseInt(_0x1b4b46(0x202))/0x7*(parseInt(_0x1b4b46(0x240))/0x8)+-parseInt(_0x1b4b46(0x1fc))/0x9*(parseInt(_0x1b4b46(0x222))/0xa);if(_0x269dd6===_0x4a831a)break;else _0x55591f['push'](_0x55591f['shift']());}catch(_0x314950){_0x55591f['push'](_0x55591f['shift']());}}}(a44_0x4cca,0xef7b7));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';function a44_0x40cc(_0x9ec71b,_0x1de5f8){_0x9ec71b=_0x9ec71b-0x1e1;const _0x4ccae3=a44_0x4cca();let _0x40ccdc=_0x4ccae3[_0x9ec71b];return _0x40ccdc;}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';function a44_0x4cca(){const _0x156b15=['validation','scriptType','Push\x20only\x20this\x20script\x20type','datasetCode','selectedAppName','functions','datasetId','HOOK_DATASET_NOT_FOUND:','3045338JARtno','filePath','attempted','version','force','warnings','3087NmdZic','dataset','has','Push\x20complete:\x20','length','hash','27839fMnoOG','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','size','\x20skipped','cleared','flatMap','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','failed','beforeScriptId','alias','functionNode','\x20uploaded','after','utf8','profileName','\x20failed','Lock\x20scope\x20for\x20app\x20\x22','remoteId','5978595aVoDtN','update','lastSync','test',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','join','string','map','Force\x20push\x20ignoring\x20hash\x20protection','POST','mergedCli','requires','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','functionName','185530wlRqho','message','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','appCode','str','HOOK','BFF_REMOTE_VERSION_MISSING','apiDir','toISOString','existingHooks','1538584bIPGik','lockFilePath','1242909ajJGgQ','filter','operationType','delete','script','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.','bff','apps','currentApp','BFF_REMOTE_VERSION_CHANGED','add','scriptsRoot','\x20resolution','write','defaultApp','parse','EXISTING_HOOK_BINDING_PRESERVED','type','3768MErRWY','before','6752928tNPqEq','Runtime\x20script\x20cache\x20cleared.','status','name','resolutions','some','bool','ENDPOINT','\x22\x20not\x20found\x20after\x20ensureLockScope.','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','get','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','unchanged','set','COMMON','\x20bff\x20detail\x20--id\x20','failures','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','description','runtime\x20cache\x20clear\x20failed','would_push','values','push','runtime\x20cache\x20not\x20needed','boolean','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','No\x20local\x20Backend\x20Function\x20scripts\x20found.','review_remote_and_merge','require','lockKey','3ImoCBG'];a44_0x4cca=function(){return _0x156b15;};return a44_0x4cca();}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_0x197c1a(0x234),'command':a44_0x197c1a(0x1e5),'description':a44_0x197c1a(0x203),'risk':a44_0x197c1a(0x23b),'structuredErrors':!![],'flags':[{'name':a44_0x197c1a(0x23f),'type':a44_0x197c1a(0x21a),'description':a44_0x197c1a(0x1f0),'enum':[a44_0x197c1a(0x250),a44_0x197c1a(0x249),'HOOK']},{'name':a44_0x197c1a(0x245),'type':a44_0x197c1a(0x21a),'description':a44_0x197c1a(0x24d)},{'name':a44_0x197c1a(0x1fa),'type':a44_0x197c1a(0x1e7),'description':a44_0x197c1a(0x21c)}],async 'dryRun'(_0xab1951){const _0x53479c=a44_0x197c1a,_0x323362=loadBffProjectConfig(_0xab1951[_0x53479c(0x225)]),_0x3a7f74=await readBffLockFile(_0x323362['lockFilePath']),{appLock:_0x5b9466}=ensureLockScope(_0x3a7f74??createEmptyBffLock(),_0xab1951['appCode'],_0x323362[_0x53479c(0x239)],_0x53479c(0x1e5)),_0x23dd90=await getTargetFunctions(_0x323362,_0xab1951),_0xfd089b=_0x23dd90[_0x53479c(0x247)](_0x56e036=>_0x56e036[_0x53479c(0x23f)]===_0x53479c(0x227))?await scanLocalBffFunctions(_0x323362,_0x53479c(0x227)):_0x23dd90,_0x3da653=await buildHookMaps(_0xab1951[_0x53479c(0x225)],_0xab1951[_0x53479c(0x229)],_0xfd089b,_0x5b9466,_0xab1951[_0x53479c(0x1f2)]||_0xab1951[_0x53479c(0x21e)]?.['currentApp']||_0xab1951[_0x53479c(0x21e)]?.[_0x53479c(0x23c)]),_0x52d590=_0xab1951[_0x53479c(0x248)](_0x53479c(0x1fa)),_0x1066db=[];for(const _0x3db1ee of _0x23dd90){const _0x4abcbd=await computeFileHash(_0x3db1ee[_0x53479c(0x1f7)]),_0x42d91a=_0x5b9466['functions'][_0x3db1ee[_0x53479c(0x1ec)]],_0x1d6693=!!_0x42d91a&&_0x42d91a[_0x53479c(0x201)]===_0x4abcbd,_0x43f006=_0x3da653[_0x53479c(0x246)]['get'](_0x3db1ee[_0x53479c(0x1ec)]),_0x18c350=!!_0x42d91a?.[_0x53479c(0x213)]&&_0x42d91a[_0x53479c(0x1f9)]==null&&(_0x52d590||!_0x1d6693),_0x2cbfdf=_0x18c350?missingRemoteVersionConflict(_0x3db1ee,_0x42d91a):undefined,_0x2688a5=_0x3da653[_0x53479c(0x252)][_0x53479c(0x1fe)](_0x3db1ee[_0x53479c(0x1ec)])?_0x53479c(0x209):!_0x52d590&&_0x1d6693?'unchanged':_0x2cbfdf?'conflict':'would_push';_0x1066db[_0x53479c(0x1e5)]({'lockKey':_0x3db1ee['lockKey'],'filePath':_0x3db1ee[_0x53479c(0x1f7)],'remoteId':_0x42d91a?.[_0x53479c(0x213)]??null,'mode':_0x42d91a?.[_0x53479c(0x213)]?_0x53479c(0x215):'create','status':_0x2688a5,..._0x3da653[_0x53479c(0x252)][_0x53479c(0x1fe)](_0x3db1ee[_0x53479c(0x1ec)])?{'error':_0x3da653[_0x53479c(0x252)][_0x53479c(0x24c)](_0x3db1ee[_0x53479c(0x1ec)])}:{},..._0x2cbfdf?{'conflict':_0x2cbfdf}:{},..._0x3da653[_0x53479c(0x22b)]['has'](_0x3db1ee[_0x53479c(0x1ec)])?{'datasetCode':_0x42d91a?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x3db1ee['lockKey'])]}:{},..._0x43f006?{'alias':_0x43f006[_0x53479c(0x20b)]??null,'datasetCode':_0x43f006['datasetCode'],'operationType':_0x3db1ee[_0x53479c(0x230)],'functionNode':_0x3db1ee[_0x53479c(0x20c)],'warnings':_0x43f006[_0x53479c(0x1fb)]}:{}});}return{'method':_0x53479c(0x21d),'url':'/api/management/library/scripts/save','body':{'appCode':_0xab1951[_0x53479c(0x225)],'force':_0x52d590,'files':_0x1066db,'cacheClearAtRuntime':_0x1066db[_0x53479c(0x247)](_0x7cb2fe=>_0x7cb2fe[_0x53479c(0x244)]==='would_push'),'cacheClearAtRuntimeTimes':_0x1066db[_0x53479c(0x247)](_0x30e0fe=>_0x30e0fe[_0x53479c(0x244)]===_0x53479c(0x1e3))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x1066db['length']+_0x53479c(0x224)};},async 'execute'(_0x3204c6){const _0x2d4ef7=a44_0x197c1a,_0x38f16c=loadBffProjectConfig(_0x3204c6['appCode']),_0x5b9ced=await readBffLockFile(_0x38f16c[_0x2d4ef7(0x22d)]),{lockData:_0x3b9550,appLock:_0x230067}=ensureLockScope(_0x5b9ced??createEmptyBffLock(),_0x3204c6[_0x2d4ef7(0x225)],_0x38f16c['scriptsRoot'],_0x2d4ef7(0x1e5)),_0x4fbee9=await getTargetFunctions(_0x38f16c,_0x3204c6);if(_0x4fbee9[_0x2d4ef7(0x200)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x2d4ef7(0x1e9)};const _0x84a65f=_0x3204c6['bool'](_0x2d4ef7(0x1fa)),_0x25d175=JSON[_0x2d4ef7(0x23d)](JSON['stringify'](_0x3b9550)),_0x173e48=_0x25d175['apps'][_0x3204c6[_0x2d4ef7(0x225)]];if(!_0x173e48)throw new Error(_0x2d4ef7(0x212)+_0x3204c6[_0x2d4ef7(0x225)]+_0x2d4ef7(0x24a));const _0x522fd1=_0x4fbee9[_0x2d4ef7(0x247)](_0x105fd3=>_0x105fd3[_0x2d4ef7(0x23f)]===_0x2d4ef7(0x227))?await scanLocalBffFunctions(_0x38f16c,_0x2d4ef7(0x227)):_0x4fbee9,_0x3a99a3=await buildHookMaps(_0x3204c6[_0x2d4ef7(0x225)],_0x3204c6[_0x2d4ef7(0x229)],_0x522fd1,_0x173e48,_0x3204c6[_0x2d4ef7(0x1f2)]||_0x3204c6[_0x2d4ef7(0x21e)]?.[_0x2d4ef7(0x236)]||_0x3204c6[_0x2d4ef7(0x21e)]?.[_0x2d4ef7(0x23c)]),_0x4df3ef=[],_0xb4251d=[],_0x47d4e1=[],_0x395f7f=[];for(const _0x4896e8 of _0x4fbee9){const _0x17ff73=_0x3a99a3[_0x2d4ef7(0x252)][_0x2d4ef7(0x24c)](_0x4896e8['lockKey']);if(_0x17ff73){_0x395f7f[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'error':_0x17ff73});continue;}const _0x1b8819=await computeFileHash(_0x4896e8[_0x2d4ef7(0x1f7)]),_0x13a22e=_0x173e48['functions'][_0x4896e8[_0x2d4ef7(0x1ec)]];if(!_0x84a65f&&_0x13a22e&&_0x13a22e['hash']===_0x1b8819){_0xb4251d[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'reason':_0x2d4ef7(0x24e)});continue;}if(_0x13a22e?.[_0x2d4ef7(0x213)]&&_0x13a22e[_0x2d4ef7(0x1f9)]==null){_0x47d4e1[_0x2d4ef7(0x1e5)](missingRemoteVersionConflict(_0x4896e8,_0x13a22e));continue;}try{await uploadSingleFunction(_0x3204c6[_0x2d4ef7(0x225)],_0x4896e8,_0x173e48,_0x3a99a3);const _0x51013a=_0x173e48[_0x2d4ef7(0x1f3)][_0x4896e8[_0x2d4ef7(0x1ec)]];_0x4df3ef[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'remoteId':_0x51013a?.[_0x2d4ef7(0x213)]??0x0});}catch(_0x7e652f){const _0x27aa93=remoteVersionChangedConflict(_0x4896e8,_0x13a22e,_0x7e652f);if(_0x27aa93){_0x47d4e1[_0x2d4ef7(0x1e5)](_0x27aa93);continue;}_0x395f7f[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'error':_0x7e652f instanceof Error?_0x7e652f[_0x2d4ef7(0x223)]:String(_0x7e652f)});}}_0x173e48[_0x2d4ef7(0x216)]=new Date()[_0x2d4ef7(0x22a)](),await writeBffLockFile(_0x38f16c[_0x2d4ef7(0x22d)],_0x25d175),await waitForUploadedLockEntries(_0x38f16c[_0x2d4ef7(0x22d)],_0x3204c6['appCode'],_0x4df3ef[_0x2d4ef7(0x21b)](_0x1bae03=>_0x1bae03['lockKey']));let _0x34b055={'attempted':![],'cleared':![]};if(_0x4df3ef[_0x2d4ef7(0x200)]>0x0)try{let _0x1a1387='';for(let _0x21e090=0x0;_0x21e090<CACHE_CLEAR_ATTEMPTS;_0x21e090+=0x1){_0x1a1387=await clearBffScriptCache(),_0x21e090<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x34b055={'attempted':!![],'cleared':!![],'message':_0x1a1387||_0x2d4ef7(0x243)};}catch(_0x48d28d){_0x34b055={'attempted':!![],'cleared':![],'error':_0x48d28d instanceof Error?_0x48d28d[_0x2d4ef7(0x223)]:String(_0x48d28d)};}const _0x8d7a7e=_0x395f7f[_0x2d4ef7(0x200)]===0x0&&(_0x34b055[_0x2d4ef7(0x1f8)]?_0x34b055[_0x2d4ef7(0x206)]:!![]),_0x27b95c=_0x8d7a7e,_0x3dced5=_0x34b055[_0x2d4ef7(0x1f8)]?_0x34b055[_0x2d4ef7(0x206)]?'runtime\x20cache\x20cleared':_0x2d4ef7(0x1e2):_0x2d4ef7(0x1e6);return{'ok':_0x27b95c,'data':{'uploaded':_0x4df3ef,'skipped':_0xb4251d,'conflicts':_0x47d4e1,'failed':_0x395f7f,'cacheClear':_0x34b055,'warnings':[...[..._0x3a99a3[_0x2d4ef7(0x246)][_0x2d4ef7(0x1e4)]()][_0x2d4ef7(0x207)](_0x3a18fd=>_0x3a18fd[_0x2d4ef7(0x1fb)]),...[..._0x3a99a3[_0x2d4ef7(0x22b)]][_0x2d4ef7(0x21b)](existingHookWarning)]},'message':formatPushMessage(_0x4df3ef[_0x2d4ef7(0x200)],_0xb4251d[_0x2d4ef7(0x200)],_0x47d4e1[_0x2d4ef7(0x200)],_0x395f7f[_0x2d4ef7(0x200)],_0x3dced5)};}};function missingRemoteVersionConflict(_0x3c0514,_0x35a6ad){const _0x495cd7=a44_0x197c1a;return remoteVersionConflict(_0x3c0514,_0x35a6ad,_0x495cd7(0x228),_0x495cd7(0x24b));}function remoteVersionChangedConflict(_0x214c16,_0x569353,_0x368b6f){const _0x59cb69=a44_0x197c1a;if(!_0x569353?.['remoteId']||_0x569353[_0x59cb69(0x1f9)]==null||!isRemoteVersionConflict(_0x368b6f))return undefined;return remoteVersionConflict(_0x214c16,_0x569353,_0x59cb69(0x237),_0x59cb69(0x253));}function remoteVersionConflict(_0x474711,_0x1f4e59,_0x546e32,_0x483c16){const _0x436966=a44_0x197c1a;return{'code':_0x546e32,'lockKey':_0x474711[_0x436966(0x1ec)],'filePath':_0x474711[_0x436966(0x1f7)],'remoteId':_0x1f4e59[_0x436966(0x213)],..._0x1f4e59[_0x436966(0x1f9)]!=null?{'expectedVersion':_0x1f4e59[_0x436966(0x1f9)]}:{},'message':_0x483c16,'nextAction':{'action':_0x436966(0x1ea),'command':CLI_BIN_NAME+_0x436966(0x251)+_0x1f4e59[_0x436966(0x213)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x436966(0x233)}};}function isRemoteVersionConflict(_0x58ee56){const _0x5144ac=a44_0x197c1a,_0x1e907f=_0x58ee56 instanceof Error?_0x58ee56[_0x5144ac(0x223)]:String(_0x58ee56),_0x5957d2=getPlatformErrorCode(_0x58ee56)??'';return[_0x1e907f,_0x5957d2][_0x5144ac(0x247)](_0x1ede1e=>/(?: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[_0x5144ac(0x217)](_0x1ede1e));}function formatPushMessage(_0x4a3549,_0x26df7b,_0x44a82d,_0x2bb0ce,_0x4947a6){const _0x553b6d=a44_0x197c1a,_0x38e8ec=[_0x553b6d(0x1ff)+_0x4a3549+_0x553b6d(0x20d),_0x26df7b+_0x553b6d(0x205)];_0x44a82d>0x0&&_0x38e8ec[_0x553b6d(0x1e5)](_0x44a82d+'\x20conflict'+(_0x44a82d===0x1?'':'s')+'\x20'+(_0x44a82d===0x1?_0x553b6d(0x21f):_0x553b6d(0x1eb))+_0x553b6d(0x23a));if(_0x2bb0ce>0x0)_0x38e8ec['push'](_0x2bb0ce+_0x553b6d(0x211));return _0x38e8ec[_0x553b6d(0x1e5)](_0x4947a6),_0x38e8ec[_0x553b6d(0x219)](',\x20');}async function getTargetFunctions(_0x509f7c,_0x313e55){const _0xc7987f=a44_0x197c1a,_0x41897f=_0x313e55[_0xc7987f(0x226)](_0xc7987f(0x23f)),_0x3d6407=_0x313e55[_0xc7987f(0x226)](_0xc7987f(0x245)),_0x5dcc61=normalizeBffType(_0x41897f)??undefined;if(_0x3d6407&&!_0x5dcc61)throw CliErrors[_0xc7987f(0x1ee)](_0xc7987f(0x1e8));const _0x556a79=await scanLocalBffFunctions(_0x509f7c,_0x5dcc61);if(_0x3d6407){const _0x30abc9=_0x556a79[_0xc7987f(0x22f)](_0x24a621=>_0x24a621['name']===_0x3d6407);if(_0x30abc9[_0xc7987f(0x200)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x5dcc61+'/'+_0x3d6407);return _0x30abc9;}return _0x556a79;}function existingHookWarning(_0x4d91ec){const _0x274e57=a44_0x197c1a;return{'code':_0x274e57(0x23e),'lockKey':_0x4d91ec,'message':'Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.'};}async function buildHookMaps(_0x34f34f,_0x473c83,_0x57ad5e,_0x1f0e29,_0x20a3c5){const _0x4506b3=a44_0x197c1a,_0x44cba5=_0x57ad5e['some'](_0x2ed58c=>_0x2ed58c['type']===_0x4506b3(0x227));if(!_0x44cba5)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x2555e1=resolveApiModelSource(_0x473c83,_0x34f34f,_0x20a3c5),_0x2fe370=loadAliasMap(_0x473c83,undefined,_0x2555e1[_0x4506b3(0x1f7)],_0x2555e1[_0x4506b3(0x210)]);assertUnambiguousHookAliases(_0x2fe370);const _0x3b5466=[..._0x2fe370[_0x4506b3(0x21b)](_0x541009=>[_0x541009['alias'],_0x541009[_0x4506b3(0x1f1)]]),...trackedHookDirectoryMappings(_0x1f0e29)[_0x4506b3(0x21b)](_0x3914a3=>[_0x3914a3[_0x4506b3(0x20b)],_0x3914a3[_0x4506b3(0x1f1)]])],_0x1a48a2=await listDatasets(_0x34f34f);assertUnambiguousHookDirectoryMappings(_0x3b5466[_0x4506b3(0x21b)](([_0x15f647,_0xa26cbf])=>({'alias':_0x15f647,'datasetCode':_0xa26cbf})));const _0x3c248a=buildHookDirectoryIndexes(_0x1a48a2,_0x3b5466),_0x34f32d=new Map(),_0x45d1c6=preflightPushHookDirectories(_0x57ad5e,_0x1f0e29,_0x3c248a,_0x34f32d),_0x44b18b=new Set(),_0x34ac15=_0x57ad5e[_0x4506b3(0x22f)](_0x413624=>_0x34f32d[_0x4506b3(0x24c)](_0x413624['lockKey'])?.['startsWith'](_0x4506b3(0x1f5))&&_0x1f0e29[_0x4506b3(0x1f3)][_0x413624[_0x4506b3(0x1ec)]]?.[_0x4506b3(0x213)]&&_0x1f0e29['functions'][_0x413624[_0x4506b3(0x1ec)]]?.[_0x4506b3(0x1f1)]);if(_0x34ac15['length']>0x0){let _0x47fba1;try{_0x47fba1=await getBffScriptStatistics(_0x34f34f);}catch(_0x1ac0c9){for(const _0x4ea93b of _0x34ac15)_0x34f32d[_0x4506b3(0x24f)](_0x4ea93b[_0x4506b3(0x1ec)],_0x4506b3(0x208)+(_0x1ac0c9 instanceof Error?_0x1ac0c9[_0x4506b3(0x223)]:String(_0x1ac0c9)));return{'resolutions':_0x45d1c6,'failures':_0x34f32d,'existingHooks':_0x44b18b};}for(const _0x4ae36a of _0x34ac15){const _0xce08a3=_0x1f0e29['functions'][_0x4ae36a['lockKey']];try{const _0xa276c2=new Set(_0x57ad5e[_0x4506b3(0x22f)](_0x318bbd=>_0x318bbd[_0x4506b3(0x23f)]===_0x4506b3(0x227)&&_0x1f0e29[_0x4506b3(0x1f3)][_0x318bbd['lockKey']]?.[_0x4506b3(0x1f1)]===_0xce08a3[_0x4506b3(0x1f1)])[_0x4506b3(0x21b)](_0xec443b=>_0xec443b['alias']));if(_0xa276c2[_0x4506b3(0x204)]>0x1)throw CliErrors['validation']('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x122dfa=_0x47fba1[_0x4506b3(0x207)](_0x3f0073=>[{'datasetCode':_0x3f0073[_0x4506b3(0x1f1)],'operationType':snakeToCamel(_0x3f0073[_0x4506b3(0x230)]),'functionNode':_0x4506b3(0x241),'id':_0x3f0073[_0x4506b3(0x20a)]},{'datasetCode':_0x3f0073['datasetCode'],'operationType':snakeToCamel(_0x3f0073[_0x4506b3(0x230)]),'functionNode':_0x4506b3(0x20e),'id':_0x3f0073['afterScriptId']}])[_0x4506b3(0x22f)](_0x448ae6=>_0x448ae6['id']===_0xce08a3[_0x4506b3(0x213)]),_0x5435e1=await getBffScriptInfo(_0xce08a3[_0x4506b3(0x213)]);if(_0x5435e1['id']!==_0xce08a3[_0x4506b3(0x213)]||_0x5435e1[_0x4506b3(0x225)]!==_0x34f34f||_0x5435e1[_0x4506b3(0x1ef)]!==_0x4506b3(0x227)||_0x5435e1[_0x4506b3(0x221)]!==_0x4ae36a[_0x4506b3(0x245)]||_0xce08a3[_0x4506b3(0x1f9)]==null||_0x5435e1['version']!==_0xce08a3[_0x4506b3(0x1f9)]||_0x122dfa[_0x4506b3(0x200)]!==0x1||_0x122dfa[0x0]['datasetCode']!==_0xce08a3['datasetCode']||_0x122dfa[0x0][_0x4506b3(0x230)]!==_0x4ae36a[_0x4506b3(0x230)]||_0x122dfa[0x0]['functionNode']!==_0x4ae36a[_0x4506b3(0x20c)]||_0xce08a3[_0x4506b3(0x230)]!==_0x4ae36a[_0x4506b3(0x230)]||_0xce08a3['functionNode']!==_0x4ae36a['functionNode'])throw CliErrors['validation']('Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.');_0x44b18b[_0x4506b3(0x238)](_0x4ae36a[_0x4506b3(0x1ec)]),_0x34f32d[_0x4506b3(0x231)](_0x4ae36a[_0x4506b3(0x1ec)]);}catch(_0xbfdaa8){_0x34f32d['set'](_0x4ae36a[_0x4506b3(0x1ec)],_0xbfdaa8 instanceof Error?_0xbfdaa8['message']:String(_0xbfdaa8));}}}return{'resolutions':_0x45d1c6,'failures':_0x34f32d,'existingHooks':_0x44b18b};}async function uploadSingleFunction(_0x148dc9,_0x4c91ac,_0x50545e,_0x42a2ed){const _0x39e5a5=a44_0x197c1a,_0x1fb094=await readFile(_0x4c91ac[_0x39e5a5(0x1f7)],_0x39e5a5(0x20f)),_0xdf5d23=await computeFileHash(_0x4c91ac[_0x39e5a5(0x1f7)]),_0x4cfb23=_0x50545e[_0x39e5a5(0x1f3)][_0x4c91ac[_0x39e5a5(0x1ec)]];if(_0x4cfb23?.[_0x39e5a5(0x213)]&&_0x4cfb23[_0x39e5a5(0x1f9)]==null)throw CliErrors['validation'](_0x4c91ac[_0x39e5a5(0x1ec)]+_0x39e5a5(0x218));let _0x42033e=extractScriptDescription(_0x1fb094);if(!_0x42033e&&_0x4cfb23?.[_0x39e5a5(0x213)]){const _0x554e59=await getBffScriptInfo(_0x4cfb23['remoteId']);_0x42033e=_0x554e59['description']||undefined;}const _0xaabb8c={'appCode':_0x148dc9,'functionName':_0x4c91ac[_0x39e5a5(0x245)],'scriptType':_0x4c91ac['type'],'scriptContent':_0x1fb094};if(_0x4cfb23?.[_0x39e5a5(0x213)])_0xaabb8c['id']=_0x4cfb23[_0x39e5a5(0x213)];if(_0x4cfb23?.[_0x39e5a5(0x1f9)]!=null)_0xaabb8c['version']=_0x4cfb23[_0x39e5a5(0x1f9)];if(_0x42033e)_0xaabb8c[_0x39e5a5(0x1e1)]=_0x42033e;if(_0x4c91ac[_0x39e5a5(0x23f)]===_0x39e5a5(0x227)){const _0x27ee42=_0x42a2ed['resolutions'][_0x39e5a5(0x24c)](_0x4c91ac['lockKey']);if(!_0x27ee42&&!_0x42a2ed[_0x39e5a5(0x22b)][_0x39e5a5(0x1fe)](_0x4c91ac[_0x39e5a5(0x1ec)])||!_0x4c91ac['operationType']||!_0x4c91ac[_0x39e5a5(0x20c)])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x4c91ac[_0x39e5a5(0x1ec)]);_0x27ee42&&(_0xaabb8c[_0x39e5a5(0x1f4)]=_0x27ee42[_0x39e5a5(0x1fd)]['id'],_0xaabb8c[_0x39e5a5(0x230)]=_0x4c91ac[_0x39e5a5(0x230)]),_0xaabb8c[_0x39e5a5(0x20c)]=_0x4c91ac['functionNode'];}const _0x56bf4c=await saveBffScript(_0xaabb8c),_0x562b05=_0x56bf4c['id'],_0x12a30b=_0x56bf4c[_0x39e5a5(0x232)]??await getBffScriptInfo(_0x562b05),_0x29ac57={'hash':_0xdf5d23,'remoteId':_0x562b05,'version':_0x12a30b[_0x39e5a5(0x1f9)]};if(_0x4c91ac[_0x39e5a5(0x23f)]===_0x39e5a5(0x227)){const _0x26b184=_0x42a2ed[_0x39e5a5(0x246)][_0x39e5a5(0x24c)](_0x4c91ac[_0x39e5a5(0x1ec)]);if(!_0x26b184){_0x50545e['functions'][_0x4c91ac['lockKey']]={..._0x4cfb23,..._0x29ac57};return;}_0x29ac57['alias']=_0x26b184[_0x39e5a5(0x20b)]??_0x4cfb23?.[_0x39e5a5(0x20b)],_0x29ac57[_0x39e5a5(0x1f1)]=_0x26b184[_0x39e5a5(0x1f1)],_0x29ac57['operationType']=_0x4c91ac['operationType'],_0x29ac57['functionNode']=_0x4c91ac['functionNode'];}_0x50545e[_0x39e5a5(0x1f3)][_0x4c91ac[_0x39e5a5(0x1ec)]]=_0x29ac57;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1c3c3b,_0x5ee08a,_0x559753){const _0x244e22=a44_0x197c1a;if(_0x559753[_0x244e22(0x200)]===0x0)return;for(let _0x300732=0x0;_0x300732<LOCK_SETTLE_RETRY_COUNT;_0x300732+=0x1){const _0x4fa784=await readBffLockFile(_0x1c3c3b),_0x5c37bf=_0x4fa784?.[_0x244e22(0x235)]?.[_0x5ee08a]?.[_0x244e22(0x1f3)]??{},_0x3b96fe=_0x559753['every'](_0x51c778=>!!_0x5c37bf[_0x51c778]?.[_0x244e22(0x213)]);if(_0x3b96fe)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x244e22(0x220)+_0x559753[_0x244e22(0x219)](',\x20')+'.');}
|
|
1
|
+
function a44_0x50da(_0x3258a6,_0x5d9462){_0x3258a6=_0x3258a6-0x13c;const _0x4676ff=a44_0x4676();let _0x50da81=_0x4676ff[_0x3258a6];return _0x50da81;}const a44_0xf9f362=a44_0x50da;(function(_0x3f47f4,_0x19b35e){const _0xafb1c1=a44_0x50da,_0x51ef69=_0x3f47f4();while(!![]){try{const _0x2be072=parseInt(_0xafb1c1(0x144))/0x1*(parseInt(_0xafb1c1(0x171))/0x2)+parseInt(_0xafb1c1(0x190))/0x3+parseInt(_0xafb1c1(0x18c))/0x4+-parseInt(_0xafb1c1(0x158))/0x5*(parseInt(_0xafb1c1(0x15a))/0x6)+parseInt(_0xafb1c1(0x177))/0x7+-parseInt(_0xafb1c1(0x195))/0x8+-parseInt(_0xafb1c1(0x163))/0x9;if(_0x2be072===_0x19b35e)break;else _0x51ef69['push'](_0x51ef69['shift']());}catch(_0x47a3c7){_0x51ef69['push'](_0x51ef69['shift']());}}}(a44_0x4676,0x635e8));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_0xf9f362(0x143),'command':'push','description':a44_0xf9f362(0x17d),'risk':a44_0xf9f362(0x14d),'structuredErrors':!![],'flags':[{'name':a44_0xf9f362(0x19d),'type':a44_0xf9f362(0x146),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a44_0xf9f362(0x159),a44_0xf9f362(0x14a)]},{'name':'name','type':a44_0xf9f362(0x146),'description':a44_0xf9f362(0x16b)},{'name':'force','type':a44_0xf9f362(0x164),'description':a44_0xf9f362(0x142)}],async 'dryRun'(_0x74dc3b){const _0x45add1=a44_0xf9f362,_0x35f7b8=loadBffProjectConfig(_0x74dc3b[_0x45add1(0x19b)]),_0x5e9f1d=await readBffLockFile(_0x35f7b8[_0x45add1(0x19f)]),{appLock:_0x544e38}=ensureLockScope(_0x5e9f1d??createEmptyBffLock(),_0x74dc3b['appCode'],_0x35f7b8['scriptsRoot'],'push'),_0x582fbb=await getTargetFunctions(_0x35f7b8,_0x74dc3b),_0x3b7a2a=_0x582fbb['some'](_0x4eafd0=>_0x4eafd0['type']===_0x45add1(0x14a))?await scanLocalBffFunctions(_0x35f7b8,_0x45add1(0x14a)):_0x582fbb,_0x188062=await buildHookMaps(_0x74dc3b['appCode'],_0x74dc3b['apiDir'],_0x3b7a2a,_0x544e38,_0x74dc3b[_0x45add1(0x16a)]||_0x74dc3b[_0x45add1(0x189)]?.[_0x45add1(0x16d)]||_0x74dc3b[_0x45add1(0x189)]?.['defaultApp']),_0x21454d=_0x74dc3b['bool'](_0x45add1(0x154)),_0x295be6=[];for(const _0x38e8cb of _0x582fbb){const _0x156b26=await computeFileHash(_0x38e8cb['filePath']),_0x5f1ba0=_0x544e38[_0x45add1(0x198)][_0x38e8cb[_0x45add1(0x179)]],_0x26fff9=!!_0x5f1ba0&&_0x5f1ba0[_0x45add1(0x152)]===_0x156b26,_0x529b5f=_0x188062[_0x45add1(0x17c)][_0x45add1(0x191)](_0x38e8cb['lockKey']),_0xfc1f01=!!_0x5f1ba0?.['remoteId']&&_0x5f1ba0[_0x45add1(0x15d)]==null&&(_0x21454d||!_0x26fff9),_0x4b2d7f=_0xfc1f01?missingRemoteVersionConflict(_0x38e8cb,_0x5f1ba0):undefined,_0x562b65=_0x188062[_0x45add1(0x19e)][_0x45add1(0x14f)](_0x38e8cb['lockKey'])?'failed':!_0x21454d&&_0x26fff9?_0x45add1(0x141):_0x4b2d7f?'conflict':'would_push';_0x295be6[_0x45add1(0x13c)]({'lockKey':_0x38e8cb[_0x45add1(0x179)],'filePath':_0x38e8cb[_0x45add1(0x14c)],'remoteId':_0x5f1ba0?.[_0x45add1(0x160)]??null,'mode':_0x5f1ba0?.[_0x45add1(0x160)]?_0x45add1(0x18a):'create','status':_0x562b65,..._0x188062[_0x45add1(0x19e)][_0x45add1(0x14f)](_0x38e8cb[_0x45add1(0x179)])?{'error':_0x188062[_0x45add1(0x19e)]['get'](_0x38e8cb[_0x45add1(0x179)])}:{},..._0x4b2d7f?{'conflict':_0x4b2d7f}:{},..._0x188062[_0x45add1(0x181)][_0x45add1(0x14f)](_0x38e8cb['lockKey'])?{'datasetCode':_0x5f1ba0?.[_0x45add1(0x15f)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x38e8cb[_0x45add1(0x179)])]}:{},..._0x529b5f?{'alias':_0x529b5f[_0x45add1(0x176)]??null,'datasetCode':_0x529b5f['datasetCode'],'operationType':_0x38e8cb[_0x45add1(0x156)],'functionNode':_0x38e8cb[_0x45add1(0x150)],'warnings':_0x529b5f[_0x45add1(0x157)]}:{}});}return{'method':_0x45add1(0x166),'url':'/api/management/library/scripts/save','body':{'appCode':_0x74dc3b[_0x45add1(0x19b)],'force':_0x21454d,'files':_0x295be6,'cacheClearAtRuntime':_0x295be6['some'](_0xb383f1=>_0xb383f1[_0x45add1(0x17b)]==='would_push'),'cacheClearAtRuntimeTimes':_0x295be6[_0x45add1(0x180)](_0x3d32ec=>_0x3d32ec[_0x45add1(0x17b)]===_0x45add1(0x184))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x45add1(0x18e)+_0x295be6[_0x45add1(0x17e)]+_0x45add1(0x168)};},async 'execute'(_0x427637){const _0x2a64e3=a44_0xf9f362,_0x8a5179=loadBffProjectConfig(_0x427637[_0x2a64e3(0x19b)]),_0x41a260=await readBffLockFile(_0x8a5179[_0x2a64e3(0x19f)]),{lockData:_0x31d1d3,appLock:_0x4e605e}=ensureLockScope(_0x41a260??createEmptyBffLock(),_0x427637[_0x2a64e3(0x19b)],_0x8a5179[_0x2a64e3(0x15c)],_0x2a64e3(0x13c)),_0x26b098=await getTargetFunctions(_0x8a5179,_0x427637);if(_0x26b098[_0x2a64e3(0x17e)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x1f0646=_0x427637[_0x2a64e3(0x18b)](_0x2a64e3(0x154)),_0x33abea=JSON[_0x2a64e3(0x162)](JSON[_0x2a64e3(0x1a1)](_0x31d1d3)),_0x22c7b4=_0x33abea[_0x2a64e3(0x13f)][_0x427637[_0x2a64e3(0x19b)]];if(!_0x22c7b4)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x427637['appCode']+_0x2a64e3(0x147));const _0x1550bd=_0x26b098[_0x2a64e3(0x180)](_0x4ee77b=>_0x4ee77b[_0x2a64e3(0x19d)]===_0x2a64e3(0x14a))?await scanLocalBffFunctions(_0x8a5179,_0x2a64e3(0x14a)):_0x26b098,_0xc95d70=await buildHookMaps(_0x427637['appCode'],_0x427637['apiDir'],_0x1550bd,_0x22c7b4,_0x427637[_0x2a64e3(0x16a)]||_0x427637[_0x2a64e3(0x189)]?.[_0x2a64e3(0x16d)]||_0x427637[_0x2a64e3(0x189)]?.[_0x2a64e3(0x19c)]),_0x494cb1=[],_0x2ab7c4=[],_0x1e9565=[],_0x4efc29=[];for(const _0x1bcaf3 of _0x26b098){const _0x5c7f09=_0xc95d70[_0x2a64e3(0x19e)][_0x2a64e3(0x191)](_0x1bcaf3['lockKey']);if(_0x5c7f09){_0x4efc29[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'error':_0x5c7f09});continue;}const _0x497c41=await computeFileHash(_0x1bcaf3[_0x2a64e3(0x14c)]),_0x5159c4=_0x22c7b4[_0x2a64e3(0x198)][_0x1bcaf3[_0x2a64e3(0x179)]];if(!_0x1f0646&&_0x5159c4&&_0x5159c4[_0x2a64e3(0x152)]===_0x497c41){_0x2ab7c4[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'reason':'unchanged'});continue;}if(_0x5159c4?.[_0x2a64e3(0x160)]&&_0x5159c4['version']==null){_0x1e9565[_0x2a64e3(0x13c)](missingRemoteVersionConflict(_0x1bcaf3,_0x5159c4));continue;}try{await uploadSingleFunction(_0x427637['appCode'],_0x1bcaf3,_0x22c7b4,_0xc95d70);const _0x505706=_0x22c7b4[_0x2a64e3(0x198)][_0x1bcaf3[_0x2a64e3(0x179)]];_0x494cb1[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'remoteId':_0x505706?.[_0x2a64e3(0x160)]??0x0});}catch(_0x314491){const _0xfa978d=remoteVersionChangedConflict(_0x1bcaf3,_0x5159c4,_0x314491);if(_0xfa978d){_0x1e9565['push'](_0xfa978d);continue;}_0x4efc29[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'error':_0x314491 instanceof Error?_0x314491[_0x2a64e3(0x140)]:String(_0x314491)});}}_0x22c7b4['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x8a5179[_0x2a64e3(0x19f)],_0x33abea),await waitForUploadedLockEntries(_0x8a5179[_0x2a64e3(0x19f)],_0x427637[_0x2a64e3(0x19b)],_0x494cb1[_0x2a64e3(0x13e)](_0x141dea=>_0x141dea[_0x2a64e3(0x179)]));let _0x22e639={'attempted':![],'cleared':![]};if(_0x494cb1['length']>0x0)try{let _0x32cb45='';for(let _0x369cd8=0x0;_0x369cd8<CACHE_CLEAR_ATTEMPTS;_0x369cd8+=0x1){_0x32cb45=await clearBffScriptCache(),_0x369cd8<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x22e639={'attempted':!![],'cleared':!![],'message':_0x32cb45||_0x2a64e3(0x14e)};}catch(_0x47175c){_0x22e639={'attempted':!![],'cleared':![],'error':_0x47175c instanceof Error?_0x47175c['message']:String(_0x47175c)};}const _0x33ebf9=_0x4efc29[_0x2a64e3(0x17e)]===0x0&&(_0x22e639[_0x2a64e3(0x174)]?_0x22e639['cleared']:!![]),_0x435d8d=_0x33ebf9,_0x3a0bdd=_0x22e639['attempted']?_0x22e639['cleared']?_0x2a64e3(0x149):'runtime\x20cache\x20clear\x20failed':_0x2a64e3(0x175);return{'ok':_0x435d8d,'data':{'uploaded':_0x494cb1,'skipped':_0x2ab7c4,'conflicts':_0x1e9565,'failed':_0x4efc29,'cacheClear':_0x22e639,'warnings':[...[..._0xc95d70['resolutions'][_0x2a64e3(0x1a0)]()][_0x2a64e3(0x155)](_0x510cef=>_0x510cef[_0x2a64e3(0x157)]),...[..._0xc95d70[_0x2a64e3(0x181)]][_0x2a64e3(0x13e)](existingHookWarning)]},'message':formatPushMessage(_0x494cb1[_0x2a64e3(0x17e)],_0x2ab7c4[_0x2a64e3(0x17e)],_0x1e9565[_0x2a64e3(0x17e)],_0x4efc29['length'],_0x3a0bdd)};}};function missingRemoteVersionConflict(_0x20068f,_0x1e8076){const _0x285e07=a44_0xf9f362;return remoteVersionConflict(_0x20068f,_0x1e8076,'BFF_REMOTE_VERSION_MISSING',_0x285e07(0x161));}function remoteVersionChangedConflict(_0x60a048,_0x25877a,_0x5cfa9d){const _0x27ad9d=a44_0xf9f362;if(!_0x25877a?.['remoteId']||_0x25877a[_0x27ad9d(0x15d)]==null||!isRemoteVersionConflict(_0x5cfa9d))return undefined;return remoteVersionConflict(_0x60a048,_0x25877a,_0x27ad9d(0x19a),'Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x27775b,_0x1a322d,_0x1ea809,_0x5d7ac2){const _0x47b3a=a44_0xf9f362;return{'code':_0x1ea809,'lockKey':_0x27775b[_0x47b3a(0x179)],'filePath':_0x27775b[_0x47b3a(0x14c)],'remoteId':_0x1a322d[_0x47b3a(0x160)],..._0x1a322d[_0x47b3a(0x15d)]!=null?{'expectedVersion':_0x1a322d['version']}:{},'message':_0x5d7ac2,'nextAction':{'action':_0x47b3a(0x17a),'command':CLI_BIN_NAME+_0x47b3a(0x183)+_0x1a322d[_0x47b3a(0x160)]+_0x47b3a(0x16f),'requiresReview':!![],'message':_0x47b3a(0x186)}};}function isRemoteVersionConflict(_0xc6de9e){const _0x4bdae7=a44_0xf9f362,_0x22525a=_0xc6de9e instanceof Error?_0xc6de9e[_0x4bdae7(0x140)]:String(_0xc6de9e),_0x151d60=getPlatformErrorCode(_0xc6de9e)??'';return[_0x22525a,_0x151d60][_0x4bdae7(0x180)](_0x42756d=>/(?: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[_0x4bdae7(0x18f)](_0x42756d));}function formatPushMessage(_0x51a84d,_0x4153d5,_0x5e5407,_0x41600a,_0x3b1e23){const _0x466fb0=a44_0xf9f362,_0x5eae19=[_0x466fb0(0x151)+_0x51a84d+'\x20uploaded',_0x4153d5+'\x20skipped'];_0x5e5407>0x0&&_0x5eae19[_0x466fb0(0x13c)](_0x5e5407+_0x466fb0(0x16e)+(_0x5e5407===0x1?'':'s')+'\x20'+(_0x5e5407===0x1?'requires':_0x466fb0(0x165))+_0x466fb0(0x14b));if(_0x41600a>0x0)_0x5eae19[_0x466fb0(0x13c)](_0x41600a+_0x466fb0(0x15e));return _0x5eae19[_0x466fb0(0x13c)](_0x3b1e23),_0x5eae19[_0x466fb0(0x169)](',\x20');}async function getTargetFunctions(_0x4fc868,_0x3b622f){const _0x2fd444=a44_0xf9f362,_0x389ad3=_0x3b622f[_0x2fd444(0x153)]('type'),_0x1361ec=_0x3b622f[_0x2fd444(0x153)](_0x2fd444(0x199)),_0x1fdbf0=normalizeBffType(_0x389ad3)??undefined;if(_0x1361ec&&!_0x1fdbf0)throw CliErrors[_0x2fd444(0x18d)](_0x2fd444(0x185));const _0x451c16=await scanLocalBffFunctions(_0x4fc868,_0x1fdbf0);if(_0x1361ec){const _0xe87572=_0x451c16[_0x2fd444(0x16c)](_0x1761fb=>_0x1761fb['name']===_0x1361ec);if(_0xe87572[_0x2fd444(0x17e)]===0x0)throw CliErrors[_0x2fd444(0x18d)](_0x2fd444(0x192)+_0x1fdbf0+'/'+_0x1361ec);return _0xe87572;}return _0x451c16;}function existingHookWarning(_0x4a5cca){const _0x1f7674=a44_0xf9f362;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x4a5cca,'message':_0x1f7674(0x148)};}async function buildHookMaps(_0xe3d868,_0x20b320,_0x1fb316,_0x2857a0,_0x387461){const _0x5476df=a44_0xf9f362,_0x1fa5b2=_0x1fb316['some'](_0x55df06=>_0x55df06[_0x5476df(0x19d)]===_0x5476df(0x14a));if(!_0x1fa5b2)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x595b7b=resolveApiModelSource(_0x20b320,_0xe3d868,_0x387461),_0x86c2fd=loadAliasMap(_0x20b320,undefined,_0x595b7b[_0x5476df(0x14c)],_0x595b7b['profileName']);assertUnambiguousHookAliases(_0x86c2fd);const _0x4aa2ee=[..._0x86c2fd[_0x5476df(0x13e)](_0x3d3ff3=>[_0x3d3ff3['alias'],_0x3d3ff3[_0x5476df(0x15f)]]),...trackedHookDirectoryMappings(_0x2857a0)[_0x5476df(0x13e)](_0xc1e56a=>[_0xc1e56a[_0x5476df(0x176)],_0xc1e56a[_0x5476df(0x15f)]])],_0x195402=await listDatasets(_0xe3d868);assertUnambiguousHookDirectoryMappings(_0x4aa2ee[_0x5476df(0x13e)](([_0x2c91a9,_0x30dbc5])=>({'alias':_0x2c91a9,'datasetCode':_0x30dbc5})));const _0x5dc6e2=buildHookDirectoryIndexes(_0x195402,_0x4aa2ee),_0x1eeeb7=new Map(),_0x1891c2=preflightPushHookDirectories(_0x1fb316,_0x2857a0,_0x5dc6e2,_0x1eeeb7),_0x20120a=new Set(),_0x4c4a98=_0x1fb316['filter'](_0x12faa5=>_0x1eeeb7[_0x5476df(0x191)](_0x12faa5[_0x5476df(0x179)])?.[_0x5476df(0x193)](_0x5476df(0x17f))&&_0x2857a0[_0x5476df(0x198)][_0x12faa5[_0x5476df(0x179)]]?.[_0x5476df(0x160)]&&_0x2857a0[_0x5476df(0x198)][_0x12faa5['lockKey']]?.[_0x5476df(0x15f)]);if(_0x4c4a98[_0x5476df(0x17e)]>0x0){let _0x42af9c;try{_0x42af9c=await getBffScriptStatistics(_0xe3d868);}catch(_0x29da5c){for(const _0x4575e4 of _0x4c4a98)_0x1eeeb7[_0x5476df(0x188)](_0x4575e4[_0x5476df(0x179)],_0x5476df(0x197)+(_0x29da5c instanceof Error?_0x29da5c[_0x5476df(0x140)]:String(_0x29da5c)));return{'resolutions':_0x1891c2,'failures':_0x1eeeb7,'existingHooks':_0x20120a};}for(const _0x499741 of _0x4c4a98){const _0x53b5fa=_0x2857a0[_0x5476df(0x198)][_0x499741[_0x5476df(0x179)]];try{const _0x1bb329=new Set(_0x1fb316[_0x5476df(0x16c)](_0x2ee2f9=>_0x2ee2f9[_0x5476df(0x19d)]===_0x5476df(0x14a)&&_0x2857a0[_0x5476df(0x198)][_0x2ee2f9[_0x5476df(0x179)]]?.[_0x5476df(0x15f)]===_0x53b5fa['datasetCode'])[_0x5476df(0x13e)](_0x1ad60c=>_0x1ad60c[_0x5476df(0x176)]));if(_0x1bb329[_0x5476df(0x173)]>0x1)throw CliErrors['validation']('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x2d5e97=_0x42af9c['flatMap'](_0xb035cc=>[{'datasetCode':_0xb035cc['datasetCode'],'operationType':snakeToCamel(_0xb035cc[_0x5476df(0x156)]),'functionNode':_0x5476df(0x167),'id':_0xb035cc['beforeScriptId']},{'datasetCode':_0xb035cc[_0x5476df(0x15f)],'operationType':snakeToCamel(_0xb035cc[_0x5476df(0x156)]),'functionNode':'after','id':_0xb035cc[_0x5476df(0x178)]}])[_0x5476df(0x16c)](_0x58fb2a=>_0x58fb2a['id']===_0x53b5fa[_0x5476df(0x160)]),_0x3ad7bc=await getBffScriptInfo(_0x53b5fa[_0x5476df(0x160)]);if(_0x3ad7bc['id']!==_0x53b5fa[_0x5476df(0x160)]||_0x3ad7bc[_0x5476df(0x19b)]!==_0xe3d868||_0x3ad7bc[_0x5476df(0x187)]!=='HOOK'||_0x3ad7bc['functionName']!==_0x499741['name']||_0x53b5fa[_0x5476df(0x15d)]==null||_0x3ad7bc[_0x5476df(0x15d)]!==_0x53b5fa[_0x5476df(0x15d)]||_0x2d5e97[_0x5476df(0x17e)]!==0x1||_0x2d5e97[0x0]['datasetCode']!==_0x53b5fa[_0x5476df(0x15f)]||_0x2d5e97[0x0][_0x5476df(0x156)]!==_0x499741[_0x5476df(0x156)]||_0x2d5e97[0x0]['functionNode']!==_0x499741['functionNode']||_0x53b5fa[_0x5476df(0x156)]!==_0x499741[_0x5476df(0x156)]||_0x53b5fa[_0x5476df(0x150)]!==_0x499741[_0x5476df(0x150)])throw CliErrors[_0x5476df(0x18d)](_0x5476df(0x13d));_0x20120a['add'](_0x499741[_0x5476df(0x179)]),_0x1eeeb7['delete'](_0x499741[_0x5476df(0x179)]);}catch(_0x189486){_0x1eeeb7[_0x5476df(0x188)](_0x499741[_0x5476df(0x179)],_0x189486 instanceof Error?_0x189486['message']:String(_0x189486));}}}return{'resolutions':_0x1891c2,'failures':_0x1eeeb7,'existingHooks':_0x20120a};}async function uploadSingleFunction(_0x58b299,_0x22e75d,_0x12eddc,_0x35c9e8){const _0x2aad5a=a44_0xf9f362,_0x32f074=await readFile(_0x22e75d[_0x2aad5a(0x14c)],'utf8'),_0x2a39b5=await computeFileHash(_0x22e75d['filePath']),_0x3208dd=_0x12eddc[_0x2aad5a(0x198)][_0x22e75d[_0x2aad5a(0x179)]];if(_0x3208dd?.['remoteId']&&_0x3208dd[_0x2aad5a(0x15d)]==null)throw CliErrors['validation'](_0x22e75d[_0x2aad5a(0x179)]+_0x2aad5a(0x172));let _0x30a2bf=extractScriptDescription(_0x32f074);if(!_0x30a2bf&&_0x3208dd?.[_0x2aad5a(0x160)]){const _0x3c4024=await getBffScriptInfo(_0x3208dd[_0x2aad5a(0x160)]);_0x30a2bf=_0x3c4024[_0x2aad5a(0x145)]||undefined;}const _0x322325={'appCode':_0x58b299,'functionName':_0x22e75d[_0x2aad5a(0x199)],'scriptType':_0x22e75d[_0x2aad5a(0x19d)],'scriptContent':_0x32f074};if(_0x3208dd?.[_0x2aad5a(0x160)])_0x322325['id']=_0x3208dd[_0x2aad5a(0x160)];if(_0x3208dd?.[_0x2aad5a(0x15d)]!=null)_0x322325[_0x2aad5a(0x15d)]=_0x3208dd[_0x2aad5a(0x15d)];if(_0x30a2bf)_0x322325[_0x2aad5a(0x145)]=_0x30a2bf;if(_0x22e75d[_0x2aad5a(0x19d)]===_0x2aad5a(0x14a)){const _0x4d0023=_0x35c9e8[_0x2aad5a(0x17c)][_0x2aad5a(0x191)](_0x22e75d['lockKey']);if(!_0x4d0023&&!_0x35c9e8[_0x2aad5a(0x181)][_0x2aad5a(0x14f)](_0x22e75d[_0x2aad5a(0x179)])||!_0x22e75d[_0x2aad5a(0x156)]||!_0x22e75d['functionNode'])throw CliErrors[_0x2aad5a(0x18d)](_0x2aad5a(0x196)+_0x22e75d[_0x2aad5a(0x179)]);_0x4d0023&&(_0x322325[_0x2aad5a(0x182)]=_0x4d0023[_0x2aad5a(0x170)]['id'],_0x322325['operationType']=_0x22e75d['operationType']),_0x322325[_0x2aad5a(0x150)]=_0x22e75d[_0x2aad5a(0x150)];}const _0x30ca32=await saveBffScript(_0x322325),_0x3e97f9=_0x30ca32['id'],_0x96315e=_0x30ca32[_0x2aad5a(0x194)]??await getBffScriptInfo(_0x3e97f9),_0x2d4d71={'hash':_0x2a39b5,'remoteId':_0x3e97f9,'version':_0x96315e[_0x2aad5a(0x15d)]};if(_0x22e75d['type']===_0x2aad5a(0x14a)){const _0x3beb6c=_0x35c9e8[_0x2aad5a(0x17c)][_0x2aad5a(0x191)](_0x22e75d['lockKey']);if(!_0x3beb6c){_0x12eddc[_0x2aad5a(0x198)][_0x22e75d[_0x2aad5a(0x179)]]={..._0x3208dd,..._0x2d4d71};return;}_0x2d4d71[_0x2aad5a(0x176)]=_0x3beb6c[_0x2aad5a(0x176)]??_0x3208dd?.[_0x2aad5a(0x176)],_0x2d4d71[_0x2aad5a(0x15f)]=_0x3beb6c[_0x2aad5a(0x15f)],_0x2d4d71[_0x2aad5a(0x156)]=_0x22e75d['operationType'],_0x2d4d71['functionNode']=_0x22e75d[_0x2aad5a(0x150)];}_0x12eddc['functions'][_0x22e75d[_0x2aad5a(0x179)]]=_0x2d4d71;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a44_0x4676(){const _0x4cfdda=['scriptType','set','mergedCli','update','bool','64788UvMXLc','validation','Would\x20inspect\x20','test','1412205boTrnI','get','Local\x20function\x20not\x20found:\x20','startsWith','script','329472tCTMex','Incomplete\x20HOOK\x20path:\x20','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','functions','name','BFF_REMOTE_VERSION_CHANGED','appCode','defaultApp','type','failures','lockFilePath','values','stringify','push','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','map','apps','message','unchanged','Force\x20push\x20ignoring\x20hash\x20protection','bff','57HBgtoM','description','string','\x22\x20not\x20found\x20after\x20ensureLockScope.','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','runtime\x20cache\x20cleared','HOOK','\x20resolution','filePath','write','Runtime\x20script\x20cache\x20cleared.','has','functionNode','Push\x20complete:\x20','hash','str','force','flatMap','operationType','warnings','20SsRzeg','ENDPOINT','527190DKXBex','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','scriptsRoot','version','\x20failed','datasetCode','remoteId','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','parse','2758464HPIahZ','boolean','require','POST','before','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','join','selectedAppName','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','filter','currentApp','\x20conflict','\x20--format\x20compress','dataset','20302qyLniW',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','size','attempted','runtime\x20cache\x20not\x20needed','alias','284319SoyjuV','afterScriptId','lockKey','review_remote_and_merge','status','resolutions','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','length','HOOK_DATASET_NOT_FOUND:','some','existingHooks','datasetId','\x20bff\x20detail\x20--id\x20','would_push','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','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.'];a44_0x4676=function(){return _0x4cfdda;};return a44_0x4676();}async function waitForUploadedLockEntries(_0x3bea38,_0x4921bb,_0x31d219){const _0x3a2f70=a44_0xf9f362;if(_0x31d219['length']===0x0)return;for(let _0xc71096=0x0;_0xc71096<LOCK_SETTLE_RETRY_COUNT;_0xc71096+=0x1){const _0x442dca=await readBffLockFile(_0x3bea38),_0xed4823=_0x442dca?.[_0x3a2f70(0x13f)]?.[_0x4921bb]?.[_0x3a2f70(0x198)]??{},_0x339cca=_0x31d219['every'](_0x2b54a3=>!!_0xed4823[_0x2b54a3]?.[_0x3a2f70(0x160)]);if(_0x339cca)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x3a2f70(0x15b)+_0x31d219[_0x3a2f70(0x169)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a45_0x4ee2(){const _0x5d6644=['length','remote','alias','30780HluHJT','status','1935TiQkcY','1081815OOXitm','2167320EwmQuu','apiDir','10sgTUnN','profileName','selectedAppName','currentApp','lockKey','lockFilePath','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','4kDSAlX','appCode','scriptsRoot','6171MxjoAG','defaultApp','push','\x20modified,\x20','map','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','hash','bff','353205LrkfwB','mergedCli','\x20remote-only','read','1120042nGGCQC','filePath','72KHdRxC','has','81WMcyxq','all'];a45_0x4ee2=function(){return _0x5d6644;};return a45_0x4ee2();}function a45_0x1c87(_0x5da104,_0x29d4ba){_0x5da104=_0x5da104-0x1a4;const _0x4ee271=a45_0x4ee2();let _0x1c872a=_0x4ee271[_0x5da104];return _0x1c872a;}const a45_0x6afe30=a45_0x1c87;(function(_0x9b22b6,_0x51d8f5){const _0x424a49=a45_0x1c87,_0x2851aa=_0x9b22b6();while(!![]){try{const _0x1279b4=-parseInt(_0x424a49(0x1c2))/0x1*(parseInt(_0x424a49(0x1bf))/0x2)+-parseInt(_0x424a49(0x1ad))/0x3*(parseInt(_0x424a49(0x1b2))/0x4)+-parseInt(_0x424a49(0x1b4))/0x5*(parseInt(_0x424a49(0x1ab))/0x6)+parseInt(_0x424a49(0x1b5))/0x7+parseInt(_0x424a49(0x1b6))/0x8+parseInt(_0x424a49(0x1a5))/0x9+parseInt(_0x424a49(0x1b8))/0xa*(-parseInt(_0x424a49(0x1a9))/0xb);if(_0x1279b4===_0x51d8f5)break;else _0x2851aa['push'](_0x2851aa['shift']());}catch(_0x3d4057){_0x2851aa['push'](_0x2851aa['shift']());}}}(a45_0x4ee2,0x21b94));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';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_0x6afe30(0x1a4),'command':a45_0x6afe30(0x1b3),'description':a45_0x6afe30(0x1be),'risk':a45_0x6afe30(0x1a8),'flags':[{'name':'remote','type':'boolean','description':a45_0x6afe30(0x1c7)}],async 'execute'(_0x184c78){const _0x230ffa=a45_0x6afe30,_0x1fdabc=loadBffProjectConfig(_0x184c78[_0x230ffa(0x1c0)]),_0x46d2cc=await readBffLockFile(_0x1fdabc[_0x230ffa(0x1bd)]),{appLock:_0xeb9537}=ensureLockScope(_0x46d2cc??createEmptyBffLock(),_0x184c78[_0x230ffa(0x1c0)],_0x1fdabc[_0x230ffa(0x1c1)],_0x230ffa(0x1b3)),_0x55b6c6=await scanLocalBffFunctions(_0x1fdabc),_0x368923=[],_0x26db61=[],_0x4d74e8=[];for(const _0x45598a of _0x55b6c6){const _0x5f4fd5=await computeFileHash(_0x45598a[_0x230ffa(0x1aa)]),_0x1838dd=_0xeb9537['functions'][_0x45598a['lockKey']];if(!_0x1838dd)_0x368923[_0x230ffa(0x1c4)](_0x45598a[_0x230ffa(0x1bc)]);else _0x1838dd[_0x230ffa(0x1c8)]!==_0x5f4fd5?_0x26db61[_0x230ffa(0x1c4)](_0x45598a[_0x230ffa(0x1bc)]):_0x4d74e8[_0x230ffa(0x1c4)](_0x45598a[_0x230ffa(0x1bc)]);}const _0x57fa7a=[];if(_0x184c78['bool'](_0x230ffa(0x1b0))){const _0x420b46=resolveApiModelSource(_0x184c78[_0x230ffa(0x1b7)],_0x184c78[_0x230ffa(0x1c0)],_0x184c78[_0x230ffa(0x1ba)]||_0x184c78[_0x230ffa(0x1a6)]?.[_0x230ffa(0x1bb)]||_0x184c78[_0x230ffa(0x1a6)]?.[_0x230ffa(0x1c3)]),_0x230be4=loadAliasMap(_0x184c78[_0x230ffa(0x1b7)],undefined,_0x420b46[_0x230ffa(0x1aa)],_0x420b46[_0x230ffa(0x1b9)]),_0x266660=new Map(_0x230be4[_0x230ffa(0x1c6)](_0x237f53=>[_0x237f53['datasetCode'],_0x237f53[_0x230ffa(0x1b1)]])),[_0x47c469,_0x8e5308]=await Promise[_0x230ffa(0x1ae)]([listBffScripts(_0x184c78[_0x230ffa(0x1c0)]),getBffScriptStatistics(_0x184c78['appCode'])]),_0x594007=createHookLocationMap(_0x8e5308),_0xbb174c=new Set(_0x55b6c6[_0x230ffa(0x1c6)](_0x3611ee=>_0x3611ee['lockKey']));for(const _0x307f94 of _0x47c469){const _0x48081=resolveRemoteScriptTarget(_0x1fdabc,_0x307f94,_0x594007,_0xeb9537['functions'],_0x266660);_0x48081&&!_0xbb174c[_0x230ffa(0x1ac)](_0x48081[_0x230ffa(0x1bc)])&&_0x57fa7a[_0x230ffa(0x1c4)](_0x48081[_0x230ffa(0x1bc)]);}}const _0x42dcb9=_0x368923[_0x230ffa(0x1af)]===0x0&&_0x26db61[_0x230ffa(0x1af)]===0x0&&_0x57fa7a['length']===0x0;return{'ok':!![],'data':{'added':_0x368923,'modified':_0x26db61,'unchanged':_0x4d74e8,'remoteOnly':_0x57fa7a},'message':_0x42dcb9?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x368923[_0x230ffa(0x1af)]+'\x20added,\x20'+_0x26db61[_0x230ffa(0x1af)]+_0x230ffa(0x1c5)+_0x4d74e8[_0x230ffa(0x1af)]+'\x20unchanged'+(_0x57fa7a['length']>0x0?',\x20'+_0x57fa7a[_0x230ffa(0x1af)]+_0x230ffa(0x1a7):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0xc9727c=a46_0x3f47;(function(_0xf87454,_0x59a623){const _0xe5113f=a46_0x3f47,_0x361696=_0xf87454();while(!![]){try{const _0x355c7c=parseInt(_0xe5113f(0x10e))/0x1*(parseInt(_0xe5113f(0x109))/0x2)+-parseInt(_0xe5113f(0xf6))/0x3+parseInt(_0xe5113f(0xf4))/0x4*(-parseInt(_0xe5113f(0x100))/0x5)+parseInt(_0xe5113f(0xfa))/0x6+-parseInt(_0xe5113f(0x102))/0x7+-parseInt(_0xe5113f(0xfb))/0x8+parseInt(_0xe5113f(0xf1))/0x9;if(_0x355c7c===_0x59a623)break;else _0x361696['push'](_0x361696['shift']());}catch(_0x47cb5a){_0x361696['push'](_0x361696['shift']());}}}(a46_0x3100,0x381d8));function a46_0x3f47(_0x43e7ab,_0x49abfd){_0x43e7ab=_0x43e7ab-0xf0;const _0x31006a=a46_0x3100();let _0x3f4708=_0x31006a[_0x43e7ab];return _0x3f4708;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0xc9727c(0x10f),'command':a46_0xc9727c(0xfd),'description':a46_0xc9727c(0x105),'risk':a46_0xc9727c(0xf7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x210201){const _0x8bba49=a46_0xc9727c;logger['setLogPath'](process[_0x8bba49(0xf5)]()),logger[_0x8bba49(0xf9)](_0x8bba49(0xf3),_0x8bba49(0x103));const _0x424722=installBuiltinSkill({'stdio':_0x210201['nonInteractive']?_0x8bba49(0x106):_0x8bba49(0x10b)});if(!_0x424722['ok'])throw CliErrors[_0x8bba49(0x110)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x424722[_0x8bba49(0xf0)]+']:\x20'+(_0x424722[_0x8bba49(0xfc)]||_0x8bba49(0x107)),_0x8bba49(0xf2)+_0x424722[_0x8bba49(0xf8)]);return console[_0x8bba49(0xff)](_0x424722[_0x8bba49(0x10d)]?'CLI\x20Built-in\x20Skill\x20'+_0x424722[_0x8bba49(0x108)]+_0x8bba49(0x101)+(_0x424722[_0x8bba49(0x104)]?_0x8bba49(0xfe)+_0x424722[_0x8bba49(0x104)]:'\x20via\x20skills@latest'):_0x8bba49(0x10a)+_0x424722[_0x8bba49(0x108)]+_0x8bba49(0x10c)+(_0x424722[_0x8bba49(0x104)]?_0x8bba49(0xfe)+_0x424722[_0x8bba49(0x104)]:'')),{'ok':!![]};}}];function a46_0x3100(){const _0x1faf3a=['339415cfidXg','\x20installed','2410800bLIPTL','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','installedPath','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','pipe','unknown','skillVersion','26FfakbI','CLI\x20Built-in\x20Skill\x20','inherit','\x20is\x20already\x20current','changed','18119HzqKNS','cli-skill','apiError','code','4008897bRzSEP','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','cli-skill-install','16ibtKWj','cwd','7290mtUSXS','read','repairCommand','info','1863264PuvLXL','1146512uzVDXX','error','install','\x20at\x20','log'];a46_0x3100=function(){return _0x1faf3a;};return a46_0x3100();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x56bb12=a47_0x304f;(function(_0x5b4155,_0x5d8735){const _0x4e3d79=a47_0x304f,_0x546cee=_0x5b4155();while(!![]){try{const _0x3ecdda=-parseInt(_0x4e3d79(0x10f))/0x1*(parseInt(_0x4e3d79(0xf4))/0x2)+parseInt(_0x4e3d79(0xeb))/0x3+-parseInt(_0x4e3d79(0xcc))/0x4*(-parseInt(_0x4e3d79(0xf7))/0x5)+parseInt(_0x4e3d79(0xcf))/0x6+parseInt(_0x4e3d79(0xe3))/0x7+-parseInt(_0x4e3d79(0xd9))/0x8*(-parseInt(_0x4e3d79(0xc8))/0x9)+-parseInt(_0x4e3d79(0xcb))/0xa*(parseInt(_0x4e3d79(0xf6))/0xb);if(_0x3ecdda===_0x5d8735)break;else _0x546cee['push'](_0x546cee['shift']());}catch(_0x2d2072){_0x546cee['push'](_0x546cee['shift']());}}}(a47_0x95bf,0xe2826));function a47_0x304f(_0x268c42,_0x29cbfa){_0x268c42=_0x268c42-0xc8;const _0x95bf68=a47_0x95bf();let _0x304fd=_0x95bf68[_0x268c42];return _0x304fd;}import a47_0x1c0e65 from'chalk';import a47_0x1bef0f from'ora';import a47_0x3ad014 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 a47_0x95bf(){const _0x59fb77=['fromEntries','3455577ZWcPqZ','error','filter','3759170KyicDp','1928516PzxQkQ','\x20update\x20--version\x20<version>','toLowerCase','2687394vFRkXV','latest','json','message','Run:\x20','bool','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','entries','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','update','8qmbzfD','info','/dist-tags','CLI\x20updated\x20to\x20v','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','map','slice','\x20doctor',']:\x20','fail','3514630pFSyan','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','valid','bun','Requested\x20version:\x20','execPath','Version\x20comparison\x20failed','skillVersion','267777pZzMXL','boolean','object','\x20\x20CLI\x20Built-in\x20Skill\x20','unknown','str','code','...','Updated\x20to\x20v','78TvVVLw','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','11iMuDxy','15WgFCuG','Already\x20up\x20to\x20date\x20(v','Try\x20manually:\x20','Already\x20on\x20requested\x20version\x20(v','succeed','Updating\x20via\x20','Update\x20failed:\x20','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','start','source',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','green','\x20install\x20-g\x20','timeout','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','read','run',',\x20then\x20verify\x20with:\x20','beta','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','gray','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20→\x20','40151ktnnQf','Invalid\x20version:\x20','npm','yellow','install','log','apiError','state','Try\x20manually:\x20npm\x20install\x20-g\x20','Current\x20version:\x20','\x20is\x20up\x20to\x20date.','repairCommand','version','trim','validation','expected\x20','Install\x20a\x20specific\x20CLI\x20version','Current\x20version\x20v','string',',\x20state\x20'];a47_0x95bf=function(){return _0x59fb77;};return a47_0x95bf();}function getCurrentVersion(){const _0x233897=a47_0x304f;return GIT_COMMIT!==_0x233897(0xef)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x233897(0xdf)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x28143d=a47_0x304f,_0x421ea2=process[_0x28143d(0xe8)][_0x28143d(0xce)]();if(_0x421ea2['includes']('bun'))return _0x28143d(0xe6);return'npm';}const updateFlags=[{'name':'beta','type':a47_0x56bb12(0xec),'description':a47_0x56bb12(0x10d),'default':![]},{'name':a47_0x56bb12(0x11b),'type':a47_0x56bb12(0x121),'description':a47_0x56bb12(0x11f)}];function getRequestedVersion(_0x375877){const _0x4fc375=a47_0x56bb12;return _0x375877[_0x4fc375(0xf0)](_0x4fc375(0x11b))[_0x4fc375(0x11c)]();}async function validateUpdateFlags(_0x5be47b){const _0x1733e9=a47_0x56bb12,_0x3ee99f=_0x5be47b[_0x1733e9(0xd4)](_0x1733e9(0x10a)),_0x1f24b3=getRequestedVersion(_0x5be47b);if(_0x3ee99f&&_0x1f24b3)throw CliErrors[_0x1733e9(0x11d)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x1733e9(0x10b));if(_0x1f24b3&&!a47_0x3ad014[_0x1733e9(0xe5)](_0x1f24b3))throw CliErrors[_0x1733e9(0x11d)](_0x1733e9(0x110)+_0x1f24b3,_0x1733e9(0xdd));}async function fetchNpmDistTags(){const _0x1d56b2=a47_0x56bb12;try{const _0x1fa6ff=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x1d56b2(0xdb),{'signal':AbortSignal[_0x1d56b2(0x104)](0x2710)});if(!_0x1fa6ff['ok'])return null;const _0x20ce2e=await _0x1fa6ff[_0x1d56b2(0xd1)]();if(!_0x20ce2e||typeof _0x20ce2e!==_0x1d56b2(0xed))return null;return Object[_0x1d56b2(0x123)](Object[_0x1d56b2(0xd6)](_0x20ce2e)[_0x1d56b2(0xca)](([,_0x5d7e5a])=>typeof _0x5d7e5a===_0x1d56b2(0x121)&&_0x5d7e5a['trim']()['length']>0x0)[_0x1d56b2(0xde)](([_0x13f540,_0x494a1])=>[_0x13f540,String(_0x494a1)[_0x1d56b2(0x11c)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3b596e){const _0x8f38d9=await fetchNpmDistTags();return _0x8f38d9?.[_0x3b596e]??null;}async function fetchLatestVersion(){const _0x10504b=a47_0x56bb12;return fetchNpmDistTagVersion(_0x10504b(0xd0));}async function resolveTargetVersion(_0x281e93){const _0x2d9e84=a47_0x56bb12,_0x4175f2=getRequestedVersion(_0x281e93);if(_0x4175f2)return{'version':_0x4175f2,'source':_0x2d9e84(0x11b)};if(_0x281e93[_0x2d9e84(0xd4)](_0x2d9e84(0x10a))){const _0x161186=await fetchNpmDistTagVersion('beta');if(!_0x161186)return null;return{'version':_0x161186,'source':_0x2d9e84(0x10a)};}const _0xdc3256=await fetchLatestVersion();if(!_0xdc3256)return null;return{'version':_0xdc3256,'source':'latest'};}function shouldInstallTarget(_0x38b874,_0x40b371){const _0xb42d2d=a47_0x56bb12;if(_0x40b371[_0xb42d2d(0x100)]==='version'||_0x40b371[_0xb42d2d(0x100)]===_0xb42d2d(0x10a))return!a47_0x3ad014['eq'](_0x38b874,_0x40b371['version']);return a47_0x3ad014['lt'](_0x38b874,_0x40b371[_0xb42d2d(0x11b)]);}function getInstallPlanLabel(_0x373f09,_0x2638eb){const _0x376c9=a47_0x56bb12;switch(_0x2638eb[_0x376c9(0x100)]){case _0x376c9(0x10a):return'Beta\x20version:\x20'+a47_0x1c0e65['yellow'](_0x373f09)+_0x376c9(0x10e)+a47_0x1c0e65[_0x376c9(0x102)](_0x2638eb[_0x376c9(0x11b)]);case'version':return _0x376c9(0xe7)+a47_0x1c0e65[_0x376c9(0x112)](_0x373f09)+_0x376c9(0x10e)+a47_0x1c0e65[_0x376c9(0x102)](_0x2638eb['version']);case _0x376c9(0xd0):default:return'Update\x20available:\x20'+a47_0x1c0e65[_0x376c9(0x112)](_0x373f09)+_0x376c9(0x10e)+a47_0x1c0e65[_0x376c9(0x102)](_0x2638eb[_0x376c9(0x11b)]);}}function repairCurrentBuiltinSkill(){const _0x21288f=a47_0x56bb12;console[_0x21288f(0x114)](a47_0x1c0e65[_0x21288f(0x10c)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x2dcf35=installBuiltinSkill();if(_0x2dcf35['ok']){console[_0x21288f(0x114)](a47_0x1c0e65[_0x21288f(0x10c)](_0x21288f(0xee)+_0x2dcf35[_0x21288f(0xea)]+_0x21288f(0x119)));return;}throw CliErrors[_0x21288f(0x115)](_0x21288f(0xf5)+_0x2dcf35[_0x21288f(0xf1)]+_0x21288f(0xe1)+(_0x2dcf35[_0x21288f(0xc9)]||_0x21288f(0xef)),'Run:\x20'+_0x2dcf35[_0x21288f(0x11a)]+_0x21288f(0x109)+CLI_BIN_NAME+_0x21288f(0xe0));}function verifyUpdatedBuiltinSkill(_0x45160c){const _0x1c34f0=a47_0x56bb12,_0x2f71ed=inspectInstalledBuiltinSkillVersion(_0x45160c);if(_0x2f71ed[_0x1c34f0(0x116)]==='current'){console[_0x1c34f0(0x114)](a47_0x1c0e65[_0x1c34f0(0x10c)](_0x1c34f0(0xee)+_0x45160c+_0x1c34f0(0x119)));return;}const _0x5637d2=_0x2f71ed[_0x1c34f0(0xea)]?_0x1c34f0(0x11e)+_0x45160c+',\x20found\x20'+_0x2f71ed['skillVersion']:'expected\x20'+_0x45160c+_0x1c34f0(0x122)+_0x2f71ed[_0x1c34f0(0x116)];throw CliErrors[_0x1c34f0(0x115)](_0x1c34f0(0xdc)+_0x45160c+_0x1c34f0(0x101)+_0x5637d2,_0x1c34f0(0xd3)+_0x2f71ed[_0x1c34f0(0x11a)]+_0x1c34f0(0x109)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0xfd9db){const _0x407642=a47_0x56bb12;await validateUpdateFlags(_0xfd9db);const _0xfca9=getCurrentVersion();console['log'](_0x407642(0x118)+_0xfca9);const _0x3e6a05=a47_0x1bef0f('Checking\x20for\x20updates...')['start'](),_0x5e08ab=await resolveTargetVersion(_0xfd9db);if(!_0x5e08ab){const _0x5571c0=_0xfd9db[_0x407642(0xd4)](_0x407642(0x10a))?_0x407642(0x106):_0x407642(0xd5);_0x3e6a05[_0x407642(0xe2)](_0x5571c0);throw CliErrors[_0x407642(0x115)](_0x5571c0,_0x407642(0x117)+NPM_PACKAGE_NAME+'@'+(_0xfd9db[_0x407642(0xd4)](_0x407642(0x10a))?'beta':_0x407642(0xd0)));}const _0x5b3dfb=a47_0x3ad014[_0x407642(0xe5)](VERSION),_0x39b50d=a47_0x3ad014[_0x407642(0xe5)](_0x5e08ab[_0x407642(0x11b)]);if(!_0x5b3dfb||!_0x39b50d){_0x3e6a05[_0x407642(0xe2)](_0x407642(0xe9));throw CliErrors['apiError'](_0x407642(0xe9),_0x407642(0xfe)+CLI_BIN_NAME+_0x407642(0xcd));}if(!shouldInstallTarget(_0x5b3dfb,_0x5e08ab)){const _0x1ec008=_0x5e08ab[_0x407642(0x100)]===_0x407642(0x11b)?_0x407642(0xfa)+_0x5e08ab['version']+')':a47_0x3ad014['gt'](_0x5b3dfb,_0x39b50d)?_0x407642(0x120)+_0xfca9+_0x407642(0x105)+_0x5e08ab[_0x407642(0x11b)]:_0x407642(0xf8)+_0x5e08ab['version']+')';return _0x3e6a05[_0x407642(0xfb)](_0x1ec008),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3e6a05[_0x407642(0xda)](getInstallPlanLabel(_0xfca9,_0x5e08ab));const _0x3af093=detectPackageManager(),_0x492aec=_0x3af093==='npm'?resolveNpmBin(_0x407642(0x111)):_0x3af093,_0x17b24d=a47_0x1bef0f(_0x407642(0xfc)+_0x3af093+_0x407642(0xf2))[_0x407642(0xff)]();try{await execa(_0x492aec,[_0x407642(0x113),'-g',NPM_PACKAGE_NAME+'@'+_0x5e08ab[_0x407642(0x11b)]],{'stdio':'pipe'}),_0x17b24d[_0x407642(0xfb)](_0x407642(0xf3)+_0x5e08ab[_0x407642(0x11b)]),console[_0x407642(0x114)](a47_0x1c0e65[_0x407642(0x10c)](_0x407642(0xe4)));}catch(_0x21b705){_0x17b24d[_0x407642(0xe2)]('Update\x20failed');throw CliErrors[_0x407642(0x115)](_0x407642(0xfd)+(_0x21b705 instanceof Error?_0x21b705[_0x407642(0xd2)]:String(_0x21b705)),_0x407642(0xf9)+_0x3af093+_0x407642(0x103)+NPM_PACKAGE_NAME+'@'+_0x5e08ab[_0x407642(0x11b)]);}return verifyUpdatedBuiltinSkill(_0x5e08ab[_0x407642(0x11b)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x56bb12(0xd8),'command':a47_0x56bb12(0x108),'description':a47_0x56bb12(0xd7),'risk':a47_0x56bb12(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x5e5602=a47_0x5698;(function(_0x31072c,_0x4c04f1){const _0x103119=a47_0x5698,_0x89de62=_0x31072c();while(!![]){try{const _0x323a61=parseInt(_0x103119(0x172))/0x1+-parseInt(_0x103119(0x173))/0x2*(parseInt(_0x103119(0x16d))/0x3)+parseInt(_0x103119(0x151))/0x4*(-parseInt(_0x103119(0x14f))/0x5)+parseInt(_0x103119(0x175))/0x6*(-parseInt(_0x103119(0x15d))/0x7)+-parseInt(_0x103119(0x15a))/0x8*(parseInt(_0x103119(0x12e))/0x9)+-parseInt(_0x103119(0x186))/0xa*(parseInt(_0x103119(0x133))/0xb)+parseInt(_0x103119(0x145))/0xc;if(_0x323a61===_0x4c04f1)break;else _0x89de62['push'](_0x89de62['shift']());}catch(_0xf81147){_0x89de62['push'](_0x89de62['shift']());}}}(a47_0x1089,0x6c01e));import a47_0x3a78e2 from'chalk';import a47_0x5bfb24 from'ora';import a47_0x509566 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a47_0x5698(_0x34ce82,_0x5ef103){_0x34ce82=_0x34ce82-0x12e;const _0x1089ab=a47_0x1089();let _0x569899=_0x1089ab[_0x34ce82];return _0x569899;}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(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3d5958=a47_0x5698,_0x1e52d2=process[_0x3d5958(0x16a)]['toLowerCase']();if(_0x1e52d2['includes'](_0x3d5958(0x183)))return _0x3d5958(0x183);return _0x3d5958(0x154);}const updateFlags=[{'name':'beta','type':a47_0x5e5602(0x140),'description':a47_0x5e5602(0x132),'default':![]},{'name':a47_0x5e5602(0x185),'type':'string','description':a47_0x5e5602(0x144)}];function getRequestedVersion(_0x3cd15d){const _0x78531f=a47_0x5e5602;return _0x3cd15d['str']('version')[_0x78531f(0x150)]();}async function validateUpdateFlags(_0x43fb1f){const _0x40dda5=a47_0x5e5602,_0x121e29=_0x43fb1f[_0x40dda5(0x13e)](_0x40dda5(0x168)),_0x35036d=getRequestedVersion(_0x43fb1f);if(_0x121e29&&_0x35036d)throw CliErrors[_0x40dda5(0x187)](_0x40dda5(0x17c),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x35036d&&!a47_0x509566[_0x40dda5(0x177)](_0x35036d))throw CliErrors[_0x40dda5(0x187)](_0x40dda5(0x17b)+_0x35036d,_0x40dda5(0x148));}async function fetchNpmDistTags(){const _0x55c744=a47_0x5e5602;try{const _0x5dffa6=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x55c744(0x12f),{'signal':AbortSignal[_0x55c744(0x13d)](0x2710)});if(!_0x5dffa6['ok'])return null;const _0x40c9c4=await _0x5dffa6[_0x55c744(0x167)]();if(!_0x40c9c4||typeof _0x40c9c4!==_0x55c744(0x134))return null;return Object[_0x55c744(0x152)](Object[_0x55c744(0x156)](_0x40c9c4)[_0x55c744(0x166)](([,_0x4f4e4f])=>typeof _0x4f4e4f===_0x55c744(0x179)&&_0x4f4e4f['trim']()['length']>0x0)[_0x55c744(0x158)](([_0x4c2440,_0x4327f9])=>[_0x4c2440,String(_0x4327f9)[_0x55c744(0x150)]()]));}catch{return null;}}function a47_0x1089(){const _0x337ac2=['fail',',\x20then\x20verify\x20with:\x20','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','source','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','timeout','bool','Checking\x20CLI\x20Built-in\x20Skill...','boolean','\x20install\x20-g\x20','current','Updating\x20via\x20','Install\x20a\x20specific\x20CLI\x20version','29008884WIYyiu','info','update','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','apiError','Try\x20manually:\x20npm\x20install\x20-g\x20','Try\x20manually:\x20','latest','gray','Requested\x20version:\x20','82565xJjcPE','trim','4ubJNmQ','fromEntries','Checking\x20for\x20updates...','npm','start','entries','Beta\x20version:\x20','map','expected\x20','1624zrbzeD','\x20doctor','Version\x20comparison\x20failed','7bvxOKY','message',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','run','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Current\x20version:\x20',']:\x20','state','unknown','filter','json','beta','Updated\x20to\x20v','execPath','Update\x20available:\x20','Update\x20failed','15LmbFgB','error','\x20→\x20','...','yellow','548373vvQBST','202418lTACPo','succeed','3597462PJWpMy','code','valid','log','string','green','Invalid\x20version:\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20is\x20up\x20to\x20date.','repairCommand','skillVersion',',\x20state\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','\x20update\x20--version\x20<version>','bun','\x20\x20CLI\x20Built-in\x20Skill\x20','version','11140pBVGdL','validation','pipe','Run:\x20','36837kGziPs','/dist-tags','install','Update\x20failed:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','5632XFXxBM','object','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm'];a47_0x1089=function(){return _0x337ac2;};return a47_0x1089();}async function fetchNpmDistTagVersion(_0x3fcc48){const _0x555933=await fetchNpmDistTags();return _0x555933?.[_0x3fcc48]??null;}async function fetchLatestVersion(){const _0x5455ff=a47_0x5e5602;return fetchNpmDistTagVersion(_0x5455ff(0x14c));}async function resolveTargetVersion(_0x26f23e){const _0x1be0f7=a47_0x5e5602,_0xb7237f=getRequestedVersion(_0x26f23e);if(_0xb7237f)return{'version':_0xb7237f,'source':_0x1be0f7(0x185)};if(_0x26f23e[_0x1be0f7(0x13e)](_0x1be0f7(0x168))){const _0x313e64=await fetchNpmDistTagVersion('beta');if(!_0x313e64)return null;return{'version':_0x313e64,'source':'beta'};}const _0x11dd09=await fetchLatestVersion();if(!_0x11dd09)return null;return{'version':_0x11dd09,'source':_0x1be0f7(0x14c)};}function shouldInstallTarget(_0x13366f,_0x1dcd4c){const _0x460100=a47_0x5e5602;if(_0x1dcd4c['source']==='version'||_0x1dcd4c['source']===_0x460100(0x168))return!a47_0x509566['eq'](_0x13366f,_0x1dcd4c[_0x460100(0x185)]);return a47_0x509566['lt'](_0x13366f,_0x1dcd4c[_0x460100(0x185)]);}function getInstallPlanLabel(_0x4f5765,_0x5255a6){const _0x342a94=a47_0x5e5602;switch(_0x5255a6[_0x342a94(0x13b)]){case _0x342a94(0x168):return _0x342a94(0x157)+a47_0x3a78e2['yellow'](_0x4f5765)+_0x342a94(0x16f)+a47_0x3a78e2[_0x342a94(0x17a)](_0x5255a6[_0x342a94(0x185)]);case _0x342a94(0x185):return _0x342a94(0x14e)+a47_0x3a78e2[_0x342a94(0x171)](_0x4f5765)+_0x342a94(0x16f)+a47_0x3a78e2[_0x342a94(0x17a)](_0x5255a6['version']);case'latest':default:return _0x342a94(0x16b)+a47_0x3a78e2[_0x342a94(0x171)](_0x4f5765)+_0x342a94(0x16f)+a47_0x3a78e2[_0x342a94(0x17a)](_0x5255a6[_0x342a94(0x185)]);}}function repairCurrentBuiltinSkill(){const _0x4638c4=a47_0x5e5602;console['log'](a47_0x3a78e2[_0x4638c4(0x14d)](_0x4638c4(0x13f)));const _0x18dfa5=installBuiltinSkill();if(_0x18dfa5['ok']){console[_0x4638c4(0x178)](a47_0x3a78e2[_0x4638c4(0x14d)](_0x4638c4(0x184)+_0x18dfa5[_0x4638c4(0x17f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x4638c4(0x149)](_0x4638c4(0x136)+_0x18dfa5[_0x4638c4(0x176)]+_0x4638c4(0x163)+(_0x18dfa5[_0x4638c4(0x16e)]||_0x4638c4(0x165)),_0x4638c4(0x189)+_0x18dfa5[_0x4638c4(0x17e)]+_0x4638c4(0x139)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0xe84675){const _0x175d92=a47_0x5e5602,_0x2fe177=inspectInstalledBuiltinSkillVersion(_0xe84675);if(_0x2fe177[_0x175d92(0x164)]===_0x175d92(0x142)){console['log'](a47_0x3a78e2[_0x175d92(0x14d)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0xe84675+_0x175d92(0x17d)));return;}const _0x517dcb=_0x2fe177[_0x175d92(0x17f)]?_0x175d92(0x159)+_0xe84675+',\x20found\x20'+_0x2fe177[_0x175d92(0x17f)]:_0x175d92(0x159)+_0xe84675+_0x175d92(0x180)+_0x2fe177[_0x175d92(0x164)];throw CliErrors[_0x175d92(0x149)]('CLI\x20updated\x20to\x20v'+_0xe84675+_0x175d92(0x15f)+_0x517dcb,_0x175d92(0x189)+_0x2fe177[_0x175d92(0x17e)]+_0x175d92(0x139)+CLI_BIN_NAME+_0x175d92(0x15b));}async function execute(_0x3029a6){const _0x2f12c9=a47_0x5e5602;await validateUpdateFlags(_0x3029a6);const _0x528308=getCurrentVersion();console['log'](_0x2f12c9(0x162)+_0x528308);const _0x586252=a47_0x5bfb24(_0x2f12c9(0x153))[_0x2f12c9(0x155)](),_0x131e73=await resolveTargetVersion(_0x3029a6);if(!_0x131e73){const _0x94e49d=_0x3029a6[_0x2f12c9(0x13e)](_0x2f12c9(0x168))?_0x2f12c9(0x137):_0x2f12c9(0x135);_0x586252[_0x2f12c9(0x138)](_0x94e49d);throw CliErrors[_0x2f12c9(0x149)](_0x94e49d,_0x2f12c9(0x14a)+NPM_PACKAGE_NAME+'@'+(_0x3029a6[_0x2f12c9(0x13e)](_0x2f12c9(0x168))?_0x2f12c9(0x168):_0x2f12c9(0x14c)));}const _0x24cf0a=a47_0x509566[_0x2f12c9(0x177)](VERSION),_0x217f0d=a47_0x509566[_0x2f12c9(0x177)](_0x131e73[_0x2f12c9(0x185)]);if(!_0x24cf0a||!_0x217f0d){_0x586252['fail'](_0x2f12c9(0x15c));throw CliErrors[_0x2f12c9(0x149)](_0x2f12c9(0x15c),_0x2f12c9(0x13a)+CLI_BIN_NAME+_0x2f12c9(0x182));}if(!shouldInstallTarget(_0x24cf0a,_0x131e73)){const _0x42db08=_0x131e73[_0x2f12c9(0x13b)]===_0x2f12c9(0x185)?'Already\x20on\x20requested\x20version\x20(v'+_0x131e73[_0x2f12c9(0x185)]+')':a47_0x509566['gt'](_0x24cf0a,_0x217f0d)?'Current\x20version\x20v'+_0x528308+_0x2f12c9(0x181)+_0x131e73[_0x2f12c9(0x185)]:'Already\x20up\x20to\x20date\x20(v'+_0x131e73[_0x2f12c9(0x185)]+')';return _0x586252[_0x2f12c9(0x174)](_0x42db08),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x586252[_0x2f12c9(0x146)](getInstallPlanLabel(_0x528308,_0x131e73));const _0x2b7921=detectPackageManager(),_0x43cf3d=_0x2b7921===_0x2f12c9(0x154)?resolveNpmBin('npm'):_0x2b7921,_0x4b3b7d=a47_0x5bfb24(_0x2f12c9(0x143)+_0x2b7921+_0x2f12c9(0x170))['start']();try{await execa(_0x43cf3d,[_0x2f12c9(0x130),'-g',NPM_PACKAGE_NAME+'@'+_0x131e73[_0x2f12c9(0x185)]],{'stdio':_0x2f12c9(0x188)}),_0x4b3b7d[_0x2f12c9(0x174)](_0x2f12c9(0x169)+_0x131e73['version']),console['log'](a47_0x3a78e2[_0x2f12c9(0x14d)](_0x2f12c9(0x13c)));}catch(_0x2f18af){_0x4b3b7d[_0x2f12c9(0x138)](_0x2f12c9(0x16c));throw CliErrors['apiError'](_0x2f12c9(0x131)+(_0x2f18af instanceof Error?_0x2f18af[_0x2f12c9(0x15e)]:String(_0x2f18af)),_0x2f12c9(0x14b)+_0x2b7921+_0x2f12c9(0x141)+NPM_PACKAGE_NAME+'@'+_0x131e73[_0x2f12c9(0x185)]);}return verifyUpdatedBuiltinSkill(_0x131e73['version']),{'ok':!![]};}export const updateDefinition={'service':a47_0x5e5602(0x147),'command':a47_0x5e5602(0x160),'description':a47_0x5e5602(0x161),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a0c7a,_0x58d076){const _0x325549=a48_0x198a,_0x1d1be0=_0x4a0c7a();while(!![]){try{const _0x2a271f=-parseInt(_0x325549(0x1dc))/0x1*(parseInt(_0x325549(0x1d8))/0x2)+-parseInt(_0x325549(0x1dd))/0x3*(parseInt(_0x325549(0x1d7))/0x4)+-parseInt(_0x325549(0x1da))/0x5+parseInt(_0x325549(0x1d9))/0x6+parseInt(_0x325549(0x1de))/0x7*(parseInt(_0x325549(0x1df))/0x8)+-parseInt(_0x325549(0x1db))/0x9*(-parseInt(_0x325549(0x1d5))/0xa)+-parseInt(_0x325549(0x1e0))/0xb*(parseInt(_0x325549(0x1d6))/0xc);if(_0x2a271f===_0x58d076)break;else _0x1d1be0['push'](_0x1d1be0['shift']());}catch(_0x4f2317){_0x1d1be0['push'](_0x1d1be0['shift']());}}}(a48_0x101b,0x9c247));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a48_0x101b(){const _0x410cc5=['285870VkxRIz','9rjYBES','1owbQlB','3TmMwzp','1454558yLzDVE','48eCPyql','11ocLVmk','5856970zoloHG','7168836CZfCGg','2162116cTwNZI','678278akrNcH','2048058OMFeWC'];a48_0x101b=function(){return _0x410cc5;};return a48_0x101b();}function a48_0x198a(_0x5428c5,_0x3ebc2b){_0x5428c5=_0x5428c5-0x1d5;const _0x101bfd=a48_0x101b();let _0x198a70=_0x101bfd[_0x5428c5];return _0x198a70;}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x2aca(){const _0x509560=['str','read','name','1210869NaRVbO','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','35xraOQY','codegen','string','bool','89650xLhUDk','Omit\x20import\x20statements\x20from\x20generated\x20code','14LXhUlj','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','code','802482nTVnQU','1575eKbyDn','5327408mdVXCy','6595680ApzFWH','operation','19868fFBhCs','3553058mdGeZg','boolean','sdk','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation'];a49_0x2aca=function(){return _0x509560;};return a49_0x2aca();}const a49_0x3a1c99=a49_0x5d1d;(function(_0xc80aea,_0x443b99){const _0x5ec04b=a49_0x5d1d,_0x524e6e=_0xc80aea();while(!![]){try{const _0x254f02=parseInt(_0x5ec04b(0x94))/0x1+parseInt(_0x5ec04b(0x95))/0x2+-parseInt(_0x5ec04b(0x83))/0x3+-parseInt(_0x5ec04b(0x92))/0x4+parseInt(_0x5ec04b(0x85))/0x5*(parseInt(_0x5ec04b(0x8f))/0x6)+parseInt(_0x5ec04b(0x8b))/0x7*(-parseInt(_0x5ec04b(0x91))/0x8)+-parseInt(_0x5ec04b(0x90))/0x9*(-parseInt(_0x5ec04b(0x89))/0xa);if(_0x254f02===_0x443b99)break;else _0x524e6e['push'](_0x524e6e['shift']());}catch(_0x2e674b){_0x524e6e['push'](_0x524e6e['shift']());}}}(a49_0x2aca,0xdfe72));function a49_0x5d1d(_0x53d521,_0x46e3a9){_0x53d521=_0x53d521-0x82;const _0x2aca36=a49_0x2aca();let _0x5d1df7=_0x2aca36[_0x53d521];return _0x5d1df7;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a49_0x3a1c99(0x86),'command':a49_0x3a1c99(0x97),'description':a49_0x3a1c99(0x98),'risk':a49_0x3a1c99(0x9a),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a49_0x3a1c99(0x87),'description':a49_0x3a1c99(0x8d)},{'name':'operation','type':a49_0x3a1c99(0x87),'required':!![],'description':a49_0x3a1c99(0x84)},{'name':'skip-imports','type':a49_0x3a1c99(0x96),'description':a49_0x3a1c99(0x8a)}],async 'execute'(_0x39ab2f){const _0x4620d8=a49_0x3a1c99,{dataset:_0x395bf4,operation:_0x4fbfa5}=await getOperationDetail(_0x39ab2f['appCode'],_0x39ab2f[_0x4620d8(0x99)]('code'),_0x39ab2f[_0x4620d8(0x99)](_0x4620d8(0x93))),_0x5acb72=generateSdkCode(_0x395bf4,_0x4fbfa5,{'includeImports':!_0x39ab2f[_0x4620d8(0x88)](_0x4620d8(0x8c))});return{'ok':!![],'data':{'dataset':{'name':_0x395bf4[_0x4620d8(0x82)],'code':_0x395bf4[_0x4620d8(0x8e)],'tableName':_0x395bf4['tableName']},'operation':_0x39ab2f[_0x4620d8(0x99)](_0x4620d8(0x93)),'code':_0x5acb72}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x497e(_0x3008b3,_0x25808c){_0x3008b3=_0x3008b3-0xc5;const _0x81b9ac=a50_0x81b9();let _0x497e43=_0x81b9ac[_0x3008b3];return _0x497e43;}function a50_0x81b9(){const _0x5eda78=['2575104kgaXaI','131014mdcqSK','bool','read','sqlCode','sdk','2641797zScAVJ','no-imports','405240pvfsGR','233860JtgNHm','boolean','target','sqlName','Omit\x20import\x20statements\x20from\x20generated\x20code','1463RzDcUB','bff','36dwBrJM','sqlcode','appCode','200AcMhTz','2706OcJWtN','str','28VOeaWB','string','677497Wqsrjv'];a50_0x81b9=function(){return _0x5eda78;};return a50_0x81b9();}const a50_0x47baae=a50_0x497e;(function(_0x34b1c9,_0x2bd988){const _0x233c90=a50_0x497e,_0x1fdfdd=_0x34b1c9();while(!![]){try{const _0x4d6fc6=parseInt(_0x233c90(0xcd))/0x1+parseInt(_0x233c90(0xcf))/0x2*(parseInt(_0x233c90(0xc5))/0x3)+parseInt(_0x233c90(0xcb))/0x4*(-parseInt(_0x233c90(0xd7))/0x5)+parseInt(_0x233c90(0xc9))/0x6*(parseInt(_0x233c90(0xdc))/0x7)+-parseInt(_0x233c90(0xce))/0x8+parseInt(_0x233c90(0xd4))/0x9+-parseInt(_0x233c90(0xc8))/0xa*(parseInt(_0x233c90(0xd6))/0xb);if(_0x4d6fc6===_0x2bd988)break;else _0x1fdfdd['push'](_0x1fdfdd['shift']());}catch(_0x27ed2b){_0x1fdfdd['push'](_0x1fdfdd['shift']());}}}(a50_0x81b9,0x71981));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a50_0x47baae(0xd1),'flags':[SQLCODE_FLAG,{'name':'target','type':a50_0x47baae(0xcc),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a50_0x47baae(0xd3),'enum':[a50_0x47baae(0xd3),a50_0x47baae(0xdd)]},{'name':'no-imports','type':a50_0x47baae(0xd8),'description':a50_0x47baae(0xdb)}],async 'execute'(_0x551ee3){const _0x4d0af0=a50_0x47baae,_0x5b8f49=await getSqlQueryInfo(_0x551ee3[_0x4d0af0(0xc7)],_0x551ee3[_0x4d0af0(0xca)](_0x4d0af0(0xc6))),_0x1e0b4a=_0x551ee3[_0x4d0af0(0xca)](_0x4d0af0(0xd9))||'sdk',_0x17baec=generateSqlCodeTemplate(_0x5b8f49,{'target':_0x1e0b4a,'includeImports':!_0x551ee3[_0x4d0af0(0xd0)](_0x4d0af0(0xd5))});return{'ok':!![],'data':{'sqlCode':_0x5b8f49[_0x4d0af0(0xd2)],'sqlName':_0x5b8f49[_0x4d0af0(0xda)],'target':_0x1e0b4a,'code':_0x17baec}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f49db,_0x1faa65){const _0x5c7691=a51_0x19b2,_0x464e28=_0x2f49db();while(!![]){try{const _0x28766d=parseInt(_0x5c7691(0xcc))/0x1+-parseInt(_0x5c7691(0xdd))/0x2+parseInt(_0x5c7691(0xea))/0x3+-parseInt(_0x5c7691(0xeb))/0x4*(parseInt(_0x5c7691(0xf3))/0x5)+parseInt(_0x5c7691(0xe7))/0x6*(parseInt(_0x5c7691(0xf0))/0x7)+-parseInt(_0x5c7691(0xca))/0x8*(-parseInt(_0x5c7691(0xd3))/0x9)+-parseInt(_0x5c7691(0xe1))/0xa;if(_0x28766d===_0x1faa65)break;else _0x464e28['push'](_0x464e28['shift']());}catch(_0x4b58fb){_0x464e28['push'](_0x464e28['shift']());}}}(a51_0x1e21,0xc8dcb));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';function a51_0x1e21(){const _0x1c33d2=['\x20<name>\x20[--global]','\x20Remaining\x20app\x20\x22','Use\x20global\x20config\x20scope','App\x20\x22','apps','\x20Note:\x20app\x20\x22','\x22\x20not\x20found.','flagMissing','Missing\x20app\x20name.','728272nRdqWw','\x22\x20is\x20selected\x20automatically.','Updated','Usage:\x20','23631970vIUsSD','trim','\x22\x20still\x20defined\x20in\x20','\x20<name>','keys','\x20Default\x20app\x20is\x20\x22','6802254fzLvLB','length','object','4395273YLNcri','60udHpzs','Added','appcode','projectConfig','str','7uXbqIY','project','App\x20code','465585dBngmr','\x20<name>\x20--appcode\x20<code>','defaultApp','validation','bool','1726000dyAnMx','\x20Default\x20app\x20changed\x20to\x20\x22','837769xHRytn','\x20config.','string','boolean','\x20app\x20\x22','global','globalConfig','63jylqFT'];a51_0x1e21=function(){return _0x1c33d2;};return a51_0x1e21();}import{readRawConfigWithLayers}from'../../context.js';function a51_0x19b2(_0x1150d9,_0x5eaf6d){_0x1150d9=_0x1150d9-0xc7;const _0x1e21ec=a51_0x1e21();let _0x19b284=_0x1e21ec[_0x1150d9];return _0x19b284;}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1b1bc4=a51_0x19b2;return[{'name':_0x1b1bc4(0xed),'type':_0x1b1bc4(0xce),'description':_0x1b1bc4(0xf2),'required':!![]},{'name':'global','type':'boolean','description':_0x1b1bc4(0xd6),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x2fb48b=a51_0x19b2;return[{'name':_0x2fb48b(0xd1),'type':_0x2fb48b(0xcf),'description':_0x2fb48b(0xd6),'default':![]}];}export async function validateAppName(_0x9c2b85,_0x13d7d4){const _0x33e5a8=a51_0x19b2,_0x7f4c51=_0x9c2b85['args'][0x0]?.[_0x33e5a8(0xe2)]();if(!_0x7f4c51)throw CliErrors[_0x33e5a8(0xc8)](_0x33e5a8(0xdc),_0x33e5a8(0xe0)+CLI_BIN_NAME+'\x20'+_0x13d7d4+_0x33e5a8(0xe4));}export async function runAppAdd(_0x5722d5,_0x5d3e0d){const _0x446b2d=a51_0x19b2,_0x472074=_0x5722d5['args'][0x0]?.[_0x446b2d(0xe2)]();if(!_0x472074)throw CliErrors['validation'](_0x446b2d(0xdc),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5d3e0d+_0x446b2d(0xf4));const _0x20e204=_0x5722d5[_0x446b2d(0xef)]('appcode');if(!_0x20e204)throw CliErrors[_0x446b2d(0xdb)](_0x446b2d(0xed),_0x446b2d(0xe0)+CLI_BIN_NAME+'\x20'+_0x5d3e0d+_0x446b2d(0xf4));const _0x1ff4f7={'global':_0x5722d5[_0x446b2d(0xc9)](_0x446b2d(0xd1))},_0x36eebd=readConfig(_0x1ff4f7);if(!_0x36eebd['apps'])_0x36eebd['apps']={};const _0x22914d={'appcode':_0x20e204,...collectAppProfileOverrides(_0x2f5533=>_0x5722d5[_0x446b2d(0xef)](_0x2f5533))},_0x1b6d3d=_0x36eebd[_0x446b2d(0xd8)],_0x118ed7=Object[_0x446b2d(0xe5)](_0x1b6d3d),_0xaa56f4=typeof _0x36eebd[_0x446b2d(0xc7)]===_0x446b2d(0xce)&&_0x1b6d3d[_0x36eebd[_0x446b2d(0xc7)]]?_0x36eebd['defaultApp']:_0x118ed7[_0x446b2d(0xe8)]===0x1?_0x118ed7[0x0]:undefined,_0x3e126a=!!_0x1b6d3d[_0x472074];_0x1b6d3d[_0x472074]=_0x22914d;const _0xbd1c9d=normalizeStoredDefaultApp(_0x36eebd,_0xaa56f4);writeConfig(_0x36eebd,_0x1ff4f7);const _0x10ec28=!_0x3e126a&&_0xbd1c9d?_0x446b2d(0xe6)+_0xbd1c9d+'\x22.':'',_0x3b09e0=(_0x3e126a?_0x446b2d(0xdf):_0x446b2d(0xec))+_0x446b2d(0xd0)+_0x472074+'\x22\x20(appcode:\x20'+_0x20e204+')'+scopeLabel(_0x1ff4f7)+'.'+_0x10ec28;return{'ok':!![],'message':_0x3b09e0};}export async function runAppRemove(_0x2ba36f,_0x123fca){const _0x2ba617=a51_0x19b2,_0x27a2c9=_0x2ba36f['args'][0x0]?.['trim']();if(!_0x27a2c9)throw CliErrors['validation'](_0x2ba617(0xdc),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x123fca+_0x2ba617(0xd4));const _0x136a1b=_0x2ba36f['bool'](_0x2ba617(0xd1)),{config:_0x3edbb7,layers:_0x16df57}=readRawConfigWithLayers(),_0x1739c0=_0x3edbb7['apps']??{};if(!_0x1739c0[_0x27a2c9])throw CliErrors[_0x2ba617(0xc8)](_0x2ba617(0xd7)+_0x27a2c9+_0x2ba617(0xda));const _0x15b93e=_0x16df57[_0x2ba617(0xd2)][_0x2ba617(0xd8)]&&typeof _0x16df57['globalConfig'][_0x2ba617(0xd8)]===_0x2ba617(0xe9)?_0x16df57[_0x2ba617(0xd2)]['apps']:{},_0x2a649a=_0x16df57[_0x2ba617(0xee)][_0x2ba617(0xd8)]&&typeof _0x16df57['projectConfig'][_0x2ba617(0xd8)]===_0x2ba617(0xe9)?_0x16df57['projectConfig'][_0x2ba617(0xd8)]:{},_0x11325b=appDefinedIn(_0x27a2c9,_0x15b93e,_0x2a649a),_0x1d6479=resolveAppScopeForWrite(_0x27a2c9,_0x136a1b,_0x16df57),_0x45680a={'global':_0x1d6479===_0x2ba617(0xd1)},_0x4318c2=readConfig(_0x45680a),_0xf60da2=_0x4318c2[_0x2ba617(0xd8)];if(!_0xf60da2||!_0xf60da2[_0x27a2c9])throw CliErrors[_0x2ba617(0xc8)](_0x2ba617(0xd7)+_0x27a2c9+_0x2ba617(0xda));delete _0xf60da2[_0x27a2c9];let _0x4832a3='';const _0x2dcd30=typeof _0x4318c2[_0x2ba617(0xc7)]===_0x2ba617(0xce)?_0x4318c2['defaultApp']:undefined,_0x3fb48e=Object[_0x2ba617(0xe5)](_0xf60da2),_0x22579f=_0x2dcd30===_0x27a2c9?_0x3fb48e[0x0]:_0x2dcd30,_0x56002b=normalizeStoredDefaultApp(_0x4318c2,_0x22579f);if(_0x2dcd30===_0x27a2c9&&_0x3fb48e[_0x2ba617(0xe8)]===0x1)_0x4832a3=_0x2ba617(0xd5)+_0x3fb48e[0x0]+_0x2ba617(0xde);else _0x2dcd30===_0x27a2c9&&_0x56002b&&(_0x4832a3=_0x2ba617(0xcb)+_0x56002b+'\x22.');Object[_0x2ba617(0xe5)](_0xf60da2)[_0x2ba617(0xe8)]===0x0&&(delete _0x4318c2[_0x2ba617(0xd8)],delete _0x4318c2[_0x2ba617(0xc7)]);writeConfig(_0x4318c2,_0x45680a);const _0x3809f0=_0x11325b==='both'?_0x2ba617(0xd9)+_0x27a2c9+_0x2ba617(0xe3)+(_0x1d6479===_0x2ba617(0xf1)?_0x2ba617(0xd1):'project')+_0x2ba617(0xcd):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x27a2c9+'\x22'+scopeLabel(_0x45680a)+'.'+_0x4832a3+_0x3809f0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a52_0x2272(_0x3f2709,_0x386c85){_0x3f2709=_0x3f2709-0x79;const _0x593fe1=a52_0x593f();let _0x2272bc=_0x593fe1[_0x3f2709];return _0x2272bc;}(function(_0x371e26,_0x1ef4c1){const _0x2d138c=a52_0x2272,_0x35f27e=_0x371e26();while(!![]){try{const _0x421d28=-parseInt(_0x2d138c(0x91))/0x1+parseInt(_0x2d138c(0x8d))/0x2+parseInt(_0x2d138c(0x85))/0x3+parseInt(_0x2d138c(0x8c))/0x4+parseInt(_0x2d138c(0x7a))/0x5*(parseInt(_0x2d138c(0x84))/0x6)+-parseInt(_0x2d138c(0x92))/0x7+-parseInt(_0x2d138c(0x97))/0x8*(-parseInt(_0x2d138c(0x82))/0x9);if(_0x421d28===_0x1ef4c1)break;else _0x35f27e['push'](_0x35f27e['shift']());}catch(_0x397249){_0x35f27e['push'](_0x35f27e['shift']());}}}(a52_0x593f,0x2b311));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x376607 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';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 _0x170d50=a52_0x2272,_0x3ed056=await input({'message':_0x170d50(0x87),'validate':_0x3f41dc=>{const _0x4f4533=_0x170d50,_0xd202e6=validateAppcode(_0x3f41dc[_0x4f4533(0x7c)]());return _0xd202e6[_0x4f4533(0x86)]||_0xd202e6['message']||'Invalid\x20App\x20Code';}});return _0x3ed056[_0x170d50(0x7c)]();}function a52_0x593f(){const _0x5d29f3=['App\x20Code:','✎\x20Enter\x20manually','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','Found\x20','(Skip;\x20configure\x20later)','589244NbuXuE','384500kwNWcy','message','find','Select\x20the\x20app\x20to\x20bind:','322860nTGAjz','1658853QPeTOB','\x20\x20(','map','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','length','3872jirYiY','custom','yellow','skip','appName','50JVDOqH','No\x20available\x20apps\x20found.','trim','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','Fetching\x20available\x20apps...','✎\x20Enter\x20appcode\x20manually','gray','appCode','2187aXVNfk','cyan','118002vRrPmy','248727LciDfY','valid'];a52_0x593f=function(){return _0x5d29f3;};return a52_0x593f();}export async function promptAppSelection(_0x41a728){const _0x727bd7=a52_0x2272,_0x5a726b=[{'name':a52_0x376607[_0x727bd7(0x99)](_0x727bd7(0x7f)),'value':-0x1},..._0x41a728[_0x727bd7(0x94)]((_0x5351d1,_0x2242ac)=>({'name':_0x5351d1[_0x727bd7(0x79)]+'\x20\x20'+a52_0x376607['gray']('('+_0x5351d1[_0x727bd7(0x81)]+')'),'value':_0x2242ac}))],_0x43c6ef=await checkbox({'message':_0x727bd7(0x8a)+a52_0x376607[_0x727bd7(0x83)](_0x41a728[_0x727bd7(0x96)])+_0x727bd7(0x95),'choices':_0x5a726b,'loop':![]});if(_0x43c6ef['includes'](-0x1))return _0x727bd7(0x98);if(_0x43c6ef[_0x727bd7(0x96)]===0x0)return'custom';return _0x43c6ef[_0x727bd7(0x94)](_0xb6879a=>_0x41a728[_0xb6879a]);}export async function promptSingleAppSelection(_0x34b0e5){const _0x3d9abf=a52_0x2272,_0x419da5=[{'name':a52_0x376607['gray'](_0x3d9abf(0x89)),'value':_0x3d9abf(0x9a)},{'name':a52_0x376607[_0x3d9abf(0x99)](_0x3d9abf(0x7f)),'value':_0x3d9abf(0x98)},..._0x34b0e5[_0x3d9abf(0x94)](_0x37d5d3=>({'name':_0x37d5d3[_0x3d9abf(0x79)]+'\x20\x20'+a52_0x376607[_0x3d9abf(0x80)]('('+_0x37d5d3[_0x3d9abf(0x81)]+')'),'value':_0x37d5d3[_0x3d9abf(0x81)]}))],_0x416905=await select({'message':_0x3d9abf(0x90),'choices':_0x419da5});if(_0x416905===_0x3d9abf(0x9a))return _0x3d9abf(0x9a);if(_0x416905==='custom')return'custom';return _0x34b0e5[_0x3d9abf(0x8f)](_0x576d9c=>_0x576d9c[_0x3d9abf(0x81)]===_0x416905);}export async function selectSingleAppcode(_0x2bb349){const _0x3b708f=a52_0x2272;if(!_0x2bb349)return writeCliSideChannelLine(a52_0x376607['gray']('(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)')),_fallbackOrSkip();writeCliSideChannelLine(_0x3b708f(0x7e));let _0x38adb2;try{_0x38adb2=await withActiveCookie(_0x2bb349,()=>listRemoteApps());}catch(_0x2a88f6){writeCliSideChannelLine(a52_0x376607[_0x3b708f(0x99)]('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x2a88f6 instanceof Error)writeCliSideChannelLine(a52_0x376607[_0x3b708f(0x80)](_0x3b708f(0x93)+_0x2a88f6[_0x3b708f(0x8e)]+')'));return _fallbackOrSkip();}if(_0x38adb2[_0x3b708f(0x96)]===0x0)return writeCliSideChannelLine(a52_0x376607[_0x3b708f(0x99)](_0x3b708f(0x7b))),_fallbackOrSkip();const _0x4d74b8=await promptSingleAppSelection(_0x38adb2);if(_0x4d74b8==='skip')return'';if(_0x4d74b8===_0x3b708f(0x98))return promptCustomAppcode();return _0x4d74b8[_0x3b708f(0x81)];}export async function selectMultipleApps(_0x2abef0){const _0x3ddc14=a52_0x2272;writeCliSideChannelLine(_0x3ddc14(0x7e));let _0x3be5ec;try{_0x3be5ec=await withActiveCookie(_0x2abef0,()=>listRemoteApps());}catch(_0x4c20d1){writeCliSideChannelLine(_0x3ddc14(0x7d));if(_0x4c20d1 instanceof Error)writeCliSideChannelLine(_0x3ddc14(0x93)+_0x4c20d1[_0x3ddc14(0x8e)]+')');return _0x3ddc14(0x98);}if(_0x3be5ec[_0x3ddc14(0x96)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x3ddc14(0x98);return promptAppSelection(_0x3be5ec);}async function _fallbackOrSkip(){const _0x5b4635=a52_0x2272,_0x55d7b6=await select({'message':_0x5b4635(0x87),'choices':[{'name':a52_0x376607[_0x5b4635(0x80)](_0x5b4635(0x8b)),'value':_0x5b4635(0x9a)},{'name':a52_0x376607['yellow'](_0x5b4635(0x88)),'value':'manual'}]});if(_0x55d7b6===_0x5b4635(0x9a))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x369d(){const _0x31a13c=['\x20task\x20status\x20--task-id\x20','SUCCESS','407300SvidgM','\x20returned\x20unknown\x20status\x20','\x20failed.','taskId','341hFFITh','toUpperCase','83565FFnXyc','14446zZayrd','224sDqVUG','\x20completed\x20successfully.','464AkatOa','status','PROCESSING','106251tJOhZr','\x27\x5c\x27\x27','\x20response\x20did\x20not\x20contain\x20a\x20status.','PENDING','453zocgPP','\x20is\x20processing.','trim','replace','string','\x20--appcode\x20','errorMessage','Task\x20','has','Async\x20task\x20','5474214tARXKp','apiError','\x20is\x20pending.','2410716sWnJbj','47730mkwLTw'];a53_0x369d=function(){return _0x31a13c;};return a53_0x369d();}const a53_0x1ad28b=a53_0x2d9d;function a53_0x2d9d(_0x40d817,_0xe85532){_0x40d817=_0x40d817-0x18e;const _0x369d59=a53_0x369d();let _0x2d9d7f=_0x369d59[_0x40d817];return _0x2d9d7f;}(function(_0x10e848,_0x2a6e49){const _0x5826f0=a53_0x2d9d,_0x15316a=_0x10e848();while(!![]){try{const _0x23bbfb=-parseInt(_0x5826f0(0x194))/0x1+parseInt(_0x5826f0(0x18e))/0x2*(parseInt(_0x5826f0(0x198))/0x3)+-parseInt(_0x5826f0(0x18f))/0x4*(parseInt(_0x5826f0(0x1a6))/0x5)+-parseInt(_0x5826f0(0x1a2))/0x6+parseInt(_0x5826f0(0x1a5))/0x7+parseInt(_0x5826f0(0x191))/0x8*(-parseInt(_0x5826f0(0x1af))/0x9)+-parseInt(_0x5826f0(0x1a9))/0xa*(-parseInt(_0x5826f0(0x1ad))/0xb);if(_0x23bbfb===_0x2a6e49)break;else _0x15316a['push'](_0x15316a['shift']());}catch(_0x5c457d){_0x15316a['push'](_0x15316a['shift']());}}}(a53_0x369d,0x93f0d));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x1ad28b(0x1a8),'FAILED']),NON_TERMINAL_STATUSES=new Set([a53_0x1ad28b(0x197),'PROCESSING']);export function normalizeAsyncTask(_0x4f070b){const _0x2c0bea=a53_0x1ad28b,_0x1efba4=typeof _0x4f070b?.[_0x2c0bea(0x1ac)]===_0x2c0bea(0x19c)?_0x4f070b['taskId'][_0x2c0bea(0x19a)]():'';if(!_0x1efba4)throw CliErrors[_0x2c0bea(0x1a3)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x225a84=typeof _0x4f070b['status']===_0x2c0bea(0x19c)?_0x4f070b[_0x2c0bea(0x192)][_0x2c0bea(0x19a)]()[_0x2c0bea(0x1ae)]():'';if(!_0x225a84)throw CliErrors[_0x2c0bea(0x1a3)](_0x2c0bea(0x1a1)+_0x1efba4+_0x2c0bea(0x196));return{'taskId':_0x1efba4,'status':_0x225a84,'errorMessage':typeof _0x4f070b['errorMessage']===_0x2c0bea(0x19c)&&_0x4f070b[_0x2c0bea(0x19e)][_0x2c0bea(0x19a)]()?_0x4f070b[_0x2c0bea(0x19e)][_0x2c0bea(0x19a)]():null,'isTerminal':TERMINAL_STATUSES[_0x2c0bea(0x1a0)](_0x225a84),'knownStatus':TERMINAL_STATUSES[_0x2c0bea(0x1a0)](_0x225a84)||NON_TERMINAL_STATUSES[_0x2c0bea(0x1a0)](_0x225a84)};}export function buildAsyncTaskStatusCommand(_0x509dc1,_0x4101b9){const _0x58f381=a53_0x1ad28b;return CLI_BIN_NAME+_0x58f381(0x1a7)+quoteShellArg(_0x509dc1)+_0x58f381(0x19d)+quoteShellArg(_0x4101b9)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x20ac9b){const _0x2d0eed=a53_0x1ad28b;switch(_0x20ac9b[_0x2d0eed(0x192)]){case _0x2d0eed(0x197):return _0x2d0eed(0x19f)+_0x20ac9b[_0x2d0eed(0x1ac)]+_0x2d0eed(0x1a4);case _0x2d0eed(0x193):return'Task\x20'+_0x20ac9b[_0x2d0eed(0x1ac)]+_0x2d0eed(0x199);case _0x2d0eed(0x1a8):return _0x2d0eed(0x19f)+_0x20ac9b[_0x2d0eed(0x1ac)]+_0x2d0eed(0x190);case'FAILED':return _0x20ac9b['errorMessage']?_0x2d0eed(0x19f)+_0x20ac9b[_0x2d0eed(0x1ac)]+'\x20failed:\x20'+_0x20ac9b[_0x2d0eed(0x19e)]:_0x2d0eed(0x19f)+_0x20ac9b[_0x2d0eed(0x1ac)]+_0x2d0eed(0x1ab);default:return _0x2d0eed(0x19f)+_0x20ac9b[_0x2d0eed(0x1ac)]+_0x2d0eed(0x1aa)+_0x20ac9b[_0x2d0eed(0x192)]+'.';}}function quoteShellArg(_0x24fc8b){const _0x28f7fc=a53_0x1ad28b;return'\x27'+_0x24fc8b[_0x28f7fc(0x19b)](/'/g,_0x28f7fc(0x195))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a54_0x3ac7(_0x5031e0,_0x2270b5){_0x5031e0=_0x5031e0-0x129;var _0x47185e=a54_0x4718();var _0x3ac75a=_0x47185e[_0x5031e0];return _0x3ac75a;}(function(_0x4aa6b3,_0x2e9358){var _0x715887=a54_0x3ac7,_0x229e07=_0x4aa6b3();while(!![]){try{var _0xb67c84=parseInt(_0x715887(0x12e))/0x1+-parseInt(_0x715887(0x12b))/0x2*(-parseInt(_0x715887(0x129))/0x3)+-parseInt(_0x715887(0x133))/0x4*(parseInt(_0x715887(0x134))/0x5)+-parseInt(_0x715887(0x131))/0x6+-parseInt(_0x715887(0x132))/0x7+parseInt(_0x715887(0x12a))/0x8*(-parseInt(_0x715887(0x135))/0x9)+-parseInt(_0x715887(0x12d))/0xa*(-parseInt(_0x715887(0x12c))/0xb);if(_0xb67c84===_0x2e9358)break;else _0x229e07['push'](_0x229e07['shift']());}catch(_0x4a5a12){_0x229e07['push'](_0x229e07['shift']());}}}(a54_0x4718,0xdd175));function a54_0x4718(){var _0x5ae6f6=['1890900AnQwfQ','11794377gXBlyp','171992RheaDb','25IMVxYs','6606bBsyIb','3LnGWFw','1896XIsSFm','1443386snevzM','22487542jdhzGu','10Mwdrau','528583oGDniw','method','defineProperties'];a54_0x4718=function(){return _0x5ae6f6;};return a54_0x4718();}export function asDryRunResult(_0x2c680d,_0x1b5634){var _0x4697b2=a54_0x3ac7;return Object[_0x4697b2(0x130)](_0x2c680d,{'method':{'value':_0x1b5634[_0x4697b2(0x12f)],'enumerable':![]},'url':{'value':_0x1b5634['url'],'enumerable':![]},..._0x1b5634['description']?{'description':{'value':_0x1b5634['description'],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x5aa05=a55_0x4918;(function(_0x1e4480,_0x2e7372){const _0x367b6b=a55_0x4918,_0x4cac3a=_0x1e4480();while(!![]){try{const _0xf8a5d0=parseInt(_0x367b6b(0x1d0))/0x1*(parseInt(_0x367b6b(0x1cc))/0x2)+-parseInt(_0x367b6b(0x1d8))/0x3+parseInt(_0x367b6b(0x1d9))/0x4+-parseInt(_0x367b6b(0x1c2))/0x5*(parseInt(_0x367b6b(0x1b9))/0x6)+-parseInt(_0x367b6b(0x1d4))/0x7*(-parseInt(_0x367b6b(0x1cf))/0x8)+-parseInt(_0x367b6b(0x1d7))/0x9*(-parseInt(_0x367b6b(0x1c4))/0xa)+-parseInt(_0x367b6b(0x1bd))/0xb;if(_0xf8a5d0===_0x2e7372)break;else _0x4cac3a['push'](_0x4cac3a['shift']());}catch(_0x2b6777){_0x4cac3a['push'](_0x4cac3a['shift']());}}}(a55_0x1367,0x7601f));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x5aa05(0x1bc),'type':a55_0x5aa05(0x1c1),'required':!![],'description':a55_0x5aa05(0x1d5)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':'from-column','type':a55_0x5aa05(0x1c1),'required':!![],'description':a55_0x5aa05(0x1d3)};function a55_0x4918(_0x508d67,_0x481e97){_0x508d67=_0x508d67-0x1b3;const _0x1367fe=a55_0x1367();let _0x491898=_0x1367fe[_0x508d67];return _0x491898;}export const CROSS_RELATION_TO_DATASET_FLAG={'name':'to-datasetcode','type':a55_0x5aa05(0x1c1),'required':!![],'description':a55_0x5aa05(0x1d6)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x5aa05(0x1d2),'type':'string','required':!![],'description':a55_0x5aa05(0x1b5)};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x5aa05(0x1b7),'type':a55_0x5aa05(0x1dc),'description':a55_0x5aa05(0x1c5)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x5aa05(0x1c0),'type':a55_0x5aa05(0x1c1),'description':a55_0x5aa05(0x1c7)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':'cardinality','type':'string','enum':[a55_0x5aa05(0x1ca),a55_0x5aa05(0x1c8),'MANY_TO_ONE','MANY_TO_MANY'],'description':a55_0x5aa05(0x1c6)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x5aa05(0x1c9),'type':a55_0x5aa05(0x1db),'default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x5aa05(0x1b3)};export const CODE_FLAG={'name':a55_0x5aa05(0x1c3),'type':'string','required':!![],'description':a55_0x5aa05(0x1b4),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x5aa05(0x1ba),'description':a55_0x5aa05(0x1b4)};export const SQLCODE_FLAG={'name':a55_0x5aa05(0x1bf),'type':a55_0x5aa05(0x1c1),'required':!![],'description':a55_0x5aa05(0x1b8),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x5aa05(0x1d1)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x5aa05(0x1dd),'type':a55_0x5aa05(0x1c1),'required':![],'description':a55_0x5aa05(0x1b6)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x5aa05(0x1cb)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a55_0x1367(){const _0x2eaa29=['App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','from-dblink-id','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','588LPGhbE','datasetcode','dbtype','from-datasetcode','2850804MMKErs','skip-connection-test','sqlcode','to-label-column','string','18415jroVtK','code','7270zAdEfZ','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','ONE_TO_MANY','global','ONE_TO_ONE','App\x20code\x20(e.g.\x20app-xxxxx)','46JWHQBs','MYSQL','POSTGRESQL','80GbyqfR','4417DozMlI','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','to-column','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','464275EQAgfA','Source\x20DB_TABLE\x20dataset\x20code','Target\x20DB_TABLE\x20dataset\x20code','2934uJyaal','2261499ERkUhJ','3421788rgsVED','Database\x20product\x20type','boolean','number','appcode','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Target\x20field\x20name'];a55_0x1367=function(){return _0x2eaa29;};return a55_0x1367();}export const DBLINK_ID_FLAG={'name':'id','type':a55_0x5aa05(0x1dc),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a55_0x5aa05(0x1bb),'type':a55_0x5aa05(0x1c1),'required':!![],'description':a55_0x5aa05(0x1da),'enum':[a55_0x5aa05(0x1cd),a55_0x5aa05(0x1ce)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x5aa05(0x1be),'type':a55_0x5aa05(0x1db),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d3c91,_0x21cdac){const _0x32e3df=a56_0x56cf,_0x220d93=_0x3d3c91();while(!![]){try{const _0x9871bc=-parseInt(_0x32e3df(0x151))/0x1+parseInt(_0x32e3df(0x141))/0x2+parseInt(_0x32e3df(0x14c))/0x3*(-parseInt(_0x32e3df(0x145))/0x4)+-parseInt(_0x32e3df(0x146))/0x5*(parseInt(_0x32e3df(0x152))/0x6)+-parseInt(_0x32e3df(0x14f))/0x7*(-parseInt(_0x32e3df(0x149))/0x8)+-parseInt(_0x32e3df(0x142))/0x9+parseInt(_0x32e3df(0x14b))/0xa*(parseInt(_0x32e3df(0x154))/0xb);if(_0x9871bc===_0x21cdac)break;else _0x220d93['push'](_0x220d93['shift']());}catch(_0x27133f){_0x220d93['push'](_0x220d93['shift']());}}}(a56_0x2304,0x645d2));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x56cf(_0x259eb6,_0x1d1eb1){_0x259eb6=_0x259eb6-0x141;const _0x23048f=a56_0x2304();let _0x56cf07=_0x23048f[_0x259eb6];return _0x56cf07;}function a56_0x2304(){const _0x28d668=['ceil','4YJnlgG','292595KePyot','validation','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','898888yGkkae','isFile','8980ebErGA','1391493gGcBgT','File\x20not\x20found:\x20','size','35Wwfmqe','\x20MB','72438SzAZsw','84lDodJZ','toFixed','15829mbJElo','trim','852740PwHciS','4623948sWNpVz','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a56_0x2304=function(){return _0x28d668;};return a56_0x2304();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4361c6){const _0x1fadd8=a56_0x56cf;if(_0x4361c6>=BYTES_PER_MB){const _0x17cad7=Math[_0x1fadd8(0x144)](_0x4361c6/BYTES_PER_MB*0x64)/0x64;return _0x17cad7[_0x1fadd8(0x153)](0x2)+_0x1fadd8(0x150);}return _0x4361c6+'\x20B';}export function requireDevelopmentUploadFile(_0x20be78,_0x143316){const _0x337a94=a56_0x56cf,_0x3c6f4f=_0x20be78[_0x337a94(0x155)]();if(!_0x3c6f4f)throw CliErrors[_0x337a94(0x147)](_0x143316+'\x20path\x20is\x20required.');if(!existsSync(_0x3c6f4f))throw CliErrors[_0x337a94(0x147)](_0x337a94(0x14d)+_0x3c6f4f);const _0x2f9271=statSync(_0x3c6f4f);if(!_0x2f9271[_0x337a94(0x14a)]())throw CliErrors[_0x337a94(0x147)](_0x337a94(0x143)+_0x3c6f4f);if(_0x2f9271[_0x337a94(0x14e)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x337a94(0x147)](_0x337a94(0x148)+_0x3c6f4f+'\x20('+formatBytes(_0x2f9271[_0x337a94(0x14e)])+')');return{'path':_0x3c6f4f,'size':_0x2f9271[_0x337a94(0x14e)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x375db7,_0x29c06b){const _0x15df7e=a57_0x4b91,_0x3917fe=_0x375db7();while(!![]){try{const _0x2e0067=-parseInt(_0x15df7e(0x112))/0x1+parseInt(_0x15df7e(0x108))/0x2+parseInt(_0x15df7e(0x111))/0x3+-parseInt(_0x15df7e(0x10a))/0x4+parseInt(_0x15df7e(0x109))/0x5+-parseInt(_0x15df7e(0x10b))/0x6*(-parseInt(_0x15df7e(0x110))/0x7)+-parseInt(_0x15df7e(0x10d))/0x8;if(_0x2e0067===_0x29c06b)break;else _0x3917fe['push'](_0x3917fe['shift']());}catch(_0x4bf6b2){_0x3917fe['push'](_0x3917fe['shift']());}}}(a57_0x4921,0x7d18a));function a57_0x4b91(_0x1ae424,_0x25a639){_0x1ae424=_0x1ae424-0x107;const _0x492132=a57_0x4921();let _0x4b9193=_0x492132[_0x1ae424];return _0x4b9193;}function a57_0x4921(){const _0x43c81d=['1460636duGgXz','762sAhXoS','test','8533152DMvtBl','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','trim','24262EMwPsI','2565303dVQeiO','955454gSTOwd','App\x20Code\x20cannot\x20be\x20empty','1717996KpTRIk','3726850wOKPZR'];a57_0x4921=function(){return _0x43c81d;};return a57_0x4921();}export function validateAppcode(_0x77aa4a){const _0xa0fb39=a57_0x4b91,_0x5e30f1=_0x77aa4a[_0xa0fb39(0x10f)]();if(!_0x5e30f1)return{'valid':![],'message':_0xa0fb39(0x107)};if(_0x5e30f1['length']>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0xa0fb39(0x10c)](_0x5e30f1))return{'valid':![],'message':_0xa0fb39(0x10e)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x32c772=a58_0x48b5;function a58_0x5ee6(){const _0x3bc0be=['173474oVzpZc','1657827ytsEHN','call','584NTRDDX','defaultApp','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Project','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','boolean','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','13994180wEZMNv','10ZeyGYz','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','write','trim','key','has','config','validation','delete','1885374vLDnVl','global','Top-level\x20key\x20\x22','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','Usage:\x20','args','\x22\x20is\x20not\x20deletable.','9gpkhDs','97558ZRYAYH','\x20already\x20absent','inherit','8369433aFYyml','7359932pDiiCw','Missing\x20key\x20argument.'];a58_0x5ee6=function(){return _0x3bc0be;};return a58_0x5ee6();}function a58_0x48b5(_0x58d739,_0x403512){_0x58d739=_0x58d739-0x18e;const _0x5ee64e=a58_0x5ee6();let _0x48b572=_0x5ee64e[_0x58d739];return _0x48b572;}(function(_0x2d6879,_0x14b375){const _0x2a266d=a58_0x48b5,_0xe37460=_0x2d6879();while(!![]){try{const _0x669bcb=-parseInt(_0x2a266d(0x1a6))/0x1*(-parseInt(_0x2a266d(0x1a7))/0x2)+-parseInt(_0x2a266d(0x1ae))/0x3+-parseInt(_0x2a266d(0x1ab))/0x4+parseInt(_0x2a266d(0x196))/0x5*(parseInt(_0x2a266d(0x19f))/0x6)+parseInt(_0x2a266d(0x1ad))/0x7*(parseInt(_0x2a266d(0x18e))/0x8)+-parseInt(_0x2a266d(0x1aa))/0x9+parseInt(_0x2a266d(0x195))/0xa;if(_0x669bcb===_0x14b375)break;else _0xe37460['push'](_0xe37460['shift']());}catch(_0x4e4539){_0xe37460['push'](_0xe37460['shift']());}}}(a58_0x5ee6,0xe8c64));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a58_0x32c772(0x1a9)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x32c772(0x18f),'routing']);async function execute(_0x5e88b0){const _0x1efd69=a58_0x32c772,_0x14e498=_0x5e88b0[_0x1efd69(0x1a4)][0x0]?.[_0x1efd69(0x199)]();if(!_0x14e498)throw CliErrors[_0x1efd69(0x19d)](_0x1efd69(0x1ac),_0x1efd69(0x1a3)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(_0x14e498==='riskLevel')throw CliErrors['validation'](_0x1efd69(0x192));if(!isTopLevelConfigKey(_0x14e498)&&!EXTRA_DELETABLE_KEYS[_0x1efd69(0x19b)](_0x14e498)&&!LEGACY_DELETABLE_KEYS[_0x1efd69(0x19b)](_0x14e498))throw CliErrors['validation'](_0x1efd69(0x1a1)+_0x14e498+_0x1efd69(0x1a5),_0x1efd69(0x197));const _0x610fa5=resolveWriteScope({'global':_0x5e88b0['bool'](_0x1efd69(0x1a0))}),_0x5957aa=readScopedConfig(_0x610fa5),_0x58c8b4=Object['prototype']['hasOwnProperty'][_0x1efd69(0x1af)](_0x5957aa,_0x14e498);_0x58c8b4&&(delete _0x5957aa[_0x14e498],writeScopedConfig(_0x5957aa,_0x610fa5));const _0x700cef=_0x610fa5===_0x1efd69(0x1a0)?'Global':_0x1efd69(0x191);return{'ok':!![],'message':_0x58c8b4?'✓\x20'+_0x700cef+'\x20'+_0x14e498+'\x20deleted':'✓\x20'+_0x700cef+'\x20'+_0x14e498+_0x1efd69(0x1a8),'data':{'key':_0x14e498,'scope':_0x610fa5,'changed':_0x58c8b4}};}export const configDeleteDefinition={'service':a58_0x32c772(0x19c),'command':a58_0x32c772(0x19e),'description':a58_0x32c772(0x194),'risk':a58_0x32c772(0x198),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x32c772(0x19a),'description':a58_0x32c772(0x190),'required':!![]}],'flags':[{'name':'global','type':a58_0x32c772(0x193),'description':a58_0x32c772(0x1a2),'default':![]}],'execute':execute};
|