@lovrabet/rabetbase-cli 2.5.12-beta.1 → 2.5.12
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.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.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-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
|
-
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
|
+
const a44_0x512383=a44_0x2869;(function(_0xb59d2c,_0x2a0140){const _0x4be259=a44_0x2869,_0x6c9633=_0xb59d2c();while(!![]){try{const _0x406d08=-parseInt(_0x4be259(0x1ee))/0x1*(-parseInt(_0x4be259(0x20d))/0x2)+-parseInt(_0x4be259(0x1e2))/0x3*(-parseInt(_0x4be259(0x228))/0x4)+parseInt(_0x4be259(0x1c5))/0x5*(-parseInt(_0x4be259(0x1e5))/0x6)+parseInt(_0x4be259(0x1fe))/0x7+-parseInt(_0x4be259(0x209))/0x8+-parseInt(_0x4be259(0x205))/0x9*(-parseInt(_0x4be259(0x1fd))/0xa)+-parseInt(_0x4be259(0x222))/0xb;if(_0x406d08===_0x2a0140)break;else _0x6c9633['push'](_0x6c9633['shift']());}catch(_0x34fe90){_0x6c9633['push'](_0x6c9633['shift']());}}}(a44_0x4f9f,0xc738d));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';function a44_0x4f9f(){const _0x26b87f=['size','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','defaultApp','3813359gjZdMH','profileName','selectedAppName','lockFilePath','before','filePath','40yvdnpf','mergedCli','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','currentApp','set','string','force','review_remote_and_merge','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','get','hash','some','\x20conflict','create','40yQmbGw','stringify','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.','appCode','dataset','filter','remoteId','Lock\x20scope\x20for\x20app\x20\x22','runtime\x20cache\x20clear\x20failed','cleared','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','every','Force\x20push\x20ignoring\x20hash\x20protection','beforeScriptId','write','operationType','parse','functionNode','lastSync','validation','script','datasetCode','map','ENDPOINT','scriptsRoot','functionName','version','existingHooks','430725INlUAF','HOOK_DATASET_NOT_FOUND:','description','1061124jGGvAP','after','delete','Push\x20only\x20this\x20script\x20type','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','\x20skipped','afterScriptId','failed','\x20bff\x20detail\x20--id\x20','718043sWCHGt','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','failures','conflict','toISOString','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','Local\x20function\x20not\x20found:\x20','str','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','type','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','unchanged','functions','1049470BqTbxd','10337061aUJvFs','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','name','flatMap','join','Would\x20inspect\x20','message','45hBSjkE','boolean','warnings','has','12621896DHhJdN','status','HOOK','Incomplete\x20HOOK\x20path:\x20','2EgIkdt','test','requires','scriptType','add','bff','values','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','push','lockKey','length','BFF_REMOTE_VERSION_MISSING','startsWith','bool','alias','would_push','resolutions','runtime\x20cache\x20not\x20needed'];a44_0x4f9f=function(){return _0x26b87f;};return a44_0x4f9f();}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';function a44_0x2869(_0x1804f8,_0x31dbfc){_0x1804f8=_0x1804f8-0x1c1;const _0x4f9f01=a44_0x4f9f();let _0x2869c5=_0x4f9f01[_0x1804f8];return _0x2869c5;}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_0x512383(0x212),'command':a44_0x512383(0x215),'description':a44_0x512383(0x1f4),'risk':a44_0x512383(0x1d4),'structuredErrors':!![],'flags':[{'name':a44_0x512383(0x1f8),'type':a44_0x512383(0x22d),'description':a44_0x512383(0x1e8),'enum':['COMMON',a44_0x512383(0x1dd),a44_0x512383(0x20b)]},{'name':a44_0x512383(0x200),'type':a44_0x512383(0x22d),'description':a44_0x512383(0x22a)},{'name':'force','type':a44_0x512383(0x206),'description':a44_0x512383(0x1d2)}],async 'dryRun'(_0x2669d8){const _0x56e7b7=a44_0x512383,_0x34ff1b=loadBffProjectConfig(_0x2669d8[_0x56e7b7(0x1c8)]),_0xef7f86=await readBffLockFile(_0x34ff1b['lockFilePath']),{appLock:_0x46c02f}=ensureLockScope(_0xef7f86??createEmptyBffLock(),_0x2669d8['appCode'],_0x34ff1b[_0x56e7b7(0x1de)],_0x56e7b7(0x215)),_0x4fb660=await getTargetFunctions(_0x34ff1b,_0x2669d8),_0x28cb6d=_0x4fb660[_0x56e7b7(0x1c2)](_0x1f7edc=>_0x1f7edc[_0x56e7b7(0x1f8)]===_0x56e7b7(0x20b))?await scanLocalBffFunctions(_0x34ff1b,_0x56e7b7(0x20b)):_0x4fb660,_0x4eef7b=await buildHookMaps(_0x2669d8[_0x56e7b7(0x1c8)],_0x2669d8['apiDir'],_0x28cb6d,_0x46c02f,_0x2669d8[_0x56e7b7(0x224)]||_0x2669d8[_0x56e7b7(0x229)]?.[_0x56e7b7(0x22b)]||_0x2669d8['mergedCli']?.['defaultApp']),_0x35babe=_0x2669d8['bool'](_0x56e7b7(0x22e)),_0x526565=[];for(const _0x562223 of _0x4fb660){const _0x28e3ab=await computeFileHash(_0x562223[_0x56e7b7(0x227)]),_0x27cb58=_0x46c02f['functions'][_0x562223[_0x56e7b7(0x216)]],_0xa802d=!!_0x27cb58&&_0x27cb58[_0x56e7b7(0x1c1)]===_0x28e3ab,_0x40962d=_0x4eef7b[_0x56e7b7(0x21d)][_0x56e7b7(0x231)](_0x562223['lockKey']),_0x37c6dd=!!_0x27cb58?.[_0x56e7b7(0x1cb)]&&_0x27cb58['version']==null&&(_0x35babe||!_0xa802d),_0x5dc7ea=_0x37c6dd?missingRemoteVersionConflict(_0x562223,_0x27cb58):undefined,_0x4bdd54=_0x4eef7b['failures'][_0x56e7b7(0x208)](_0x562223[_0x56e7b7(0x216)])?_0x56e7b7(0x1ec):!_0x35babe&&_0xa802d?_0x56e7b7(0x1fb):_0x5dc7ea?_0x56e7b7(0x1f1):_0x56e7b7(0x21c);_0x526565['push']({'lockKey':_0x562223[_0x56e7b7(0x216)],'filePath':_0x562223['filePath'],'remoteId':_0x27cb58?.['remoteId']??null,'mode':_0x27cb58?.[_0x56e7b7(0x1cb)]?'update':_0x56e7b7(0x1c4),'status':_0x4bdd54,..._0x4eef7b[_0x56e7b7(0x1f0)]['has'](_0x562223[_0x56e7b7(0x216)])?{'error':_0x4eef7b[_0x56e7b7(0x1f0)][_0x56e7b7(0x231)](_0x562223[_0x56e7b7(0x216)])}:{},..._0x5dc7ea?{'conflict':_0x5dc7ea}:{},..._0x4eef7b[_0x56e7b7(0x1e1)][_0x56e7b7(0x208)](_0x562223[_0x56e7b7(0x216)])?{'datasetCode':_0x27cb58?.[_0x56e7b7(0x1db)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x562223[_0x56e7b7(0x216)])]}:{},..._0x40962d?{'alias':_0x40962d['alias']??null,'datasetCode':_0x40962d[_0x56e7b7(0x1db)],'operationType':_0x562223[_0x56e7b7(0x1d5)],'functionNode':_0x562223[_0x56e7b7(0x1d7)],'warnings':_0x40962d[_0x56e7b7(0x207)]}:{}});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x2669d8[_0x56e7b7(0x1c8)],'force':_0x35babe,'files':_0x526565,'cacheClearAtRuntime':_0x526565[_0x56e7b7(0x1c2)](_0x1e2255=>_0x1e2255[_0x56e7b7(0x20a)]===_0x56e7b7(0x21c)),'cacheClearAtRuntimeTimes':_0x526565['some'](_0x30339f=>_0x30339f['status']===_0x56e7b7(0x21c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x56e7b7(0x203)+_0x526565[_0x56e7b7(0x217)]+_0x56e7b7(0x230)};},async 'execute'(_0x3ad306){const _0x777269=a44_0x512383,_0x343127=loadBffProjectConfig(_0x3ad306[_0x777269(0x1c8)]),_0x3e0baa=await readBffLockFile(_0x343127['lockFilePath']),{lockData:_0x3dd3f2,appLock:_0x1e291c}=ensureLockScope(_0x3e0baa??createEmptyBffLock(),_0x3ad306[_0x777269(0x1c8)],_0x343127[_0x777269(0x1de)],_0x777269(0x215)),_0x400e0f=await getTargetFunctions(_0x343127,_0x3ad306);if(_0x400e0f[_0x777269(0x217)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x777269(0x1cf)};const _0x13e7a1=_0x3ad306[_0x777269(0x21a)](_0x777269(0x22e)),_0x17471e=JSON[_0x777269(0x1d6)](JSON[_0x777269(0x1c6)](_0x3dd3f2)),_0x4d8600=_0x17471e['apps'][_0x3ad306[_0x777269(0x1c8)]];if(!_0x4d8600)throw new Error(_0x777269(0x1cc)+_0x3ad306[_0x777269(0x1c8)]+_0x777269(0x1f9));const _0x35ee73=_0x400e0f[_0x777269(0x1c2)](_0x4f9366=>_0x4f9366[_0x777269(0x1f8)]===_0x777269(0x20b))?await scanLocalBffFunctions(_0x343127,_0x777269(0x20b)):_0x400e0f,_0x3b30c1=await buildHookMaps(_0x3ad306[_0x777269(0x1c8)],_0x3ad306['apiDir'],_0x35ee73,_0x4d8600,_0x3ad306[_0x777269(0x224)]||_0x3ad306[_0x777269(0x229)]?.[_0x777269(0x22b)]||_0x3ad306[_0x777269(0x229)]?.[_0x777269(0x221)]),_0x17a64a=[],_0x4f4d77=[],_0x1be606=[],_0x594fb9=[];for(const _0x30e0a1 of _0x400e0f){const _0x1f4cdb=_0x3b30c1[_0x777269(0x1f0)][_0x777269(0x231)](_0x30e0a1[_0x777269(0x216)]);if(_0x1f4cdb){_0x594fb9[_0x777269(0x215)]({'lockKey':_0x30e0a1[_0x777269(0x216)],'error':_0x1f4cdb});continue;}const _0x24e98f=await computeFileHash(_0x30e0a1['filePath']),_0x4c2c73=_0x4d8600[_0x777269(0x1fc)][_0x30e0a1[_0x777269(0x216)]];if(!_0x13e7a1&&_0x4c2c73&&_0x4c2c73[_0x777269(0x1c1)]===_0x24e98f){_0x4f4d77['push']({'lockKey':_0x30e0a1[_0x777269(0x216)],'reason':'unchanged'});continue;}if(_0x4c2c73?.[_0x777269(0x1cb)]&&_0x4c2c73[_0x777269(0x1e0)]==null){_0x1be606['push'](missingRemoteVersionConflict(_0x30e0a1,_0x4c2c73));continue;}try{await uploadSingleFunction(_0x3ad306[_0x777269(0x1c8)],_0x30e0a1,_0x4d8600,_0x3b30c1);const _0x2f85ec=_0x4d8600[_0x777269(0x1fc)][_0x30e0a1[_0x777269(0x216)]];_0x17a64a[_0x777269(0x215)]({'lockKey':_0x30e0a1['lockKey'],'remoteId':_0x2f85ec?.[_0x777269(0x1cb)]??0x0});}catch(_0x3bc43e){const _0x22f6d3=remoteVersionChangedConflict(_0x30e0a1,_0x4c2c73,_0x3bc43e);if(_0x22f6d3){_0x1be606[_0x777269(0x215)](_0x22f6d3);continue;}_0x594fb9[_0x777269(0x215)]({'lockKey':_0x30e0a1[_0x777269(0x216)],'error':_0x3bc43e instanceof Error?_0x3bc43e[_0x777269(0x204)]:String(_0x3bc43e)});}}_0x4d8600[_0x777269(0x1d8)]=new Date()[_0x777269(0x1f2)](),await writeBffLockFile(_0x343127[_0x777269(0x225)],_0x17471e),await waitForUploadedLockEntries(_0x343127[_0x777269(0x225)],_0x3ad306[_0x777269(0x1c8)],_0x17a64a['map'](_0x2abbc8=>_0x2abbc8[_0x777269(0x216)]));let _0x259f11={'attempted':![],'cleared':![]};if(_0x17a64a[_0x777269(0x217)]>0x0)try{let _0xd979d6='';for(let _0x28970a=0x0;_0x28970a<CACHE_CLEAR_ATTEMPTS;_0x28970a+=0x1){_0xd979d6=await clearBffScriptCache(),_0x28970a<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x259f11={'attempted':!![],'cleared':!![],'message':_0xd979d6||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x518a26){_0x259f11={'attempted':!![],'cleared':![],'error':_0x518a26 instanceof Error?_0x518a26['message']:String(_0x518a26)};}const _0x43dc62=_0x594fb9[_0x777269(0x217)]===0x0&&(_0x259f11['attempted']?_0x259f11[_0x777269(0x1ce)]:!![]),_0xc4be53=_0x43dc62,_0x373930=_0x259f11['attempted']?_0x259f11[_0x777269(0x1ce)]?'runtime\x20cache\x20cleared':_0x777269(0x1cd):_0x777269(0x21e);return{'ok':_0xc4be53,'data':{'uploaded':_0x17a64a,'skipped':_0x4f4d77,'conflicts':_0x1be606,'failed':_0x594fb9,'cacheClear':_0x259f11,'warnings':[...[..._0x3b30c1[_0x777269(0x21d)][_0x777269(0x213)]()][_0x777269(0x201)](_0x4d4a19=>_0x4d4a19[_0x777269(0x207)]),...[..._0x3b30c1[_0x777269(0x1e1)]][_0x777269(0x1dc)](existingHookWarning)]},'message':formatPushMessage(_0x17a64a[_0x777269(0x217)],_0x4f4d77[_0x777269(0x217)],_0x1be606[_0x777269(0x217)],_0x594fb9['length'],_0x373930)};}};function missingRemoteVersionConflict(_0x597e1a,_0x1b9dba){const _0x241cc0=a44_0x512383;return remoteVersionConflict(_0x597e1a,_0x1b9dba,_0x241cc0(0x218),_0x241cc0(0x214));}function remoteVersionChangedConflict(_0x3011ae,_0x36e9dc,_0x1dc11f){const _0xdf8044=a44_0x512383;if(!_0x36e9dc?.[_0xdf8044(0x1cb)]||_0x36e9dc[_0xdf8044(0x1e0)]==null||!isRemoteVersionConflict(_0x1dc11f))return undefined;return remoteVersionConflict(_0x3011ae,_0x36e9dc,'BFF_REMOTE_VERSION_CHANGED',_0xdf8044(0x1f7));}function remoteVersionConflict(_0x3b76e5,_0x4f6b17,_0x5339c4,_0x5771f3){const _0x3f0f52=a44_0x512383;return{'code':_0x5339c4,'lockKey':_0x3b76e5[_0x3f0f52(0x216)],'filePath':_0x3b76e5[_0x3f0f52(0x227)],'remoteId':_0x4f6b17[_0x3f0f52(0x1cb)],..._0x4f6b17[_0x3f0f52(0x1e0)]!=null?{'expectedVersion':_0x4f6b17[_0x3f0f52(0x1e0)]}:{},'message':_0x5771f3,'nextAction':{'action':_0x3f0f52(0x22f),'command':CLI_BIN_NAME+_0x3f0f52(0x1ed)+_0x4f6b17[_0x3f0f52(0x1cb)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x3f0f52(0x1c7)}};}function isRemoteVersionConflict(_0x1b77ad){const _0x177741=a44_0x512383,_0x3914aa=_0x1b77ad instanceof Error?_0x1b77ad[_0x177741(0x204)]:String(_0x1b77ad),_0x35cfbe=getPlatformErrorCode(_0x1b77ad)??'';return[_0x3914aa,_0x35cfbe][_0x177741(0x1c2)](_0x2622c3=>/(?: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[_0x177741(0x20e)](_0x2622c3));}function formatPushMessage(_0x41043c,_0x255ae0,_0x312b7e,_0x46aea0,_0x4a06dd){const _0x570092=a44_0x512383,_0x10a8b3=['Push\x20complete:\x20'+_0x41043c+'\x20uploaded',_0x255ae0+_0x570092(0x1ea)];_0x312b7e>0x0&&_0x10a8b3[_0x570092(0x215)](_0x312b7e+_0x570092(0x1c3)+(_0x312b7e===0x1?'':'s')+'\x20'+(_0x312b7e===0x1?_0x570092(0x20f):'require')+'\x20resolution');if(_0x46aea0>0x0)_0x10a8b3[_0x570092(0x215)](_0x46aea0+'\x20failed');return _0x10a8b3[_0x570092(0x215)](_0x4a06dd),_0x10a8b3['join'](',\x20');}async function getTargetFunctions(_0x20a757,_0x50a79c){const _0x42ac24=a44_0x512383,_0x54d56f=_0x50a79c[_0x42ac24(0x1f6)]('type'),_0xc45085=_0x50a79c[_0x42ac24(0x1f6)](_0x42ac24(0x200)),_0x4f3f93=normalizeBffType(_0x54d56f)??undefined;if(_0xc45085&&!_0x4f3f93)throw CliErrors[_0x42ac24(0x1d9)](_0x42ac24(0x1ff));const _0x104b0a=await scanLocalBffFunctions(_0x20a757,_0x4f3f93);if(_0xc45085){const _0x12d48a=_0x104b0a[_0x42ac24(0x1ca)](_0x3f813f=>_0x3f813f[_0x42ac24(0x200)]===_0xc45085);if(_0x12d48a[_0x42ac24(0x217)]===0x0)throw CliErrors['validation'](_0x42ac24(0x1f5)+_0x4f3f93+'/'+_0xc45085);return _0x12d48a;}return _0x104b0a;}function existingHookWarning(_0xc38e75){const _0x826abd=a44_0x512383;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0xc38e75,'message':_0x826abd(0x1d0)};}async function buildHookMaps(_0x19a7e5,_0x3c8e8e,_0x5e4f91,_0x2d2e95,_0x14015a){const _0x127868=a44_0x512383,_0x20ea88=_0x5e4f91[_0x127868(0x1c2)](_0x40998f=>_0x40998f[_0x127868(0x1f8)]===_0x127868(0x20b));if(!_0x20ea88)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x1619a0=resolveApiModelSource(_0x3c8e8e,_0x19a7e5,_0x14015a),_0x392cbd=loadAliasMap(_0x3c8e8e,undefined,_0x1619a0['filePath'],_0x1619a0[_0x127868(0x223)]);assertUnambiguousHookAliases(_0x392cbd);const _0x46e2d4=[..._0x392cbd[_0x127868(0x1dc)](_0x2f06d7=>[_0x2f06d7[_0x127868(0x21b)],_0x2f06d7[_0x127868(0x1db)]]),...trackedHookDirectoryMappings(_0x2d2e95)['map'](_0x259f7c=>[_0x259f7c[_0x127868(0x21b)],_0x259f7c[_0x127868(0x1db)]])],_0x3c2ac4=await listDatasets(_0x19a7e5);assertUnambiguousHookDirectoryMappings(_0x46e2d4[_0x127868(0x1dc)](([_0x7aa4a8,_0x3b7a6d])=>({'alias':_0x7aa4a8,'datasetCode':_0x3b7a6d})));const _0x172bdd=buildHookDirectoryIndexes(_0x3c2ac4,_0x46e2d4),_0x13e5f4=new Map(),_0x3ffeea=preflightPushHookDirectories(_0x5e4f91,_0x2d2e95,_0x172bdd,_0x13e5f4),_0x4f88b3=new Set(),_0x1d2e9b=_0x5e4f91[_0x127868(0x1ca)](_0x5f1854=>_0x13e5f4[_0x127868(0x231)](_0x5f1854[_0x127868(0x216)])?.[_0x127868(0x219)](_0x127868(0x1e3))&&_0x2d2e95[_0x127868(0x1fc)][_0x5f1854[_0x127868(0x216)]]?.[_0x127868(0x1cb)]&&_0x2d2e95['functions'][_0x5f1854['lockKey']]?.[_0x127868(0x1db)]);if(_0x1d2e9b[_0x127868(0x217)]>0x0){let _0x48b04a;try{_0x48b04a=await getBffScriptStatistics(_0x19a7e5);}catch(_0x6f7a4e){for(const _0x4e2512 of _0x1d2e9b)_0x13e5f4[_0x127868(0x22c)](_0x4e2512[_0x127868(0x216)],_0x127868(0x1e9)+(_0x6f7a4e instanceof Error?_0x6f7a4e['message']:String(_0x6f7a4e)));return{'resolutions':_0x3ffeea,'failures':_0x13e5f4,'existingHooks':_0x4f88b3};}for(const _0x233da8 of _0x1d2e9b){const _0x507d8b=_0x2d2e95[_0x127868(0x1fc)][_0x233da8[_0x127868(0x216)]];try{const _0x223025=new Set(_0x5e4f91[_0x127868(0x1ca)](_0x2bfea5=>_0x2bfea5[_0x127868(0x1f8)]==='HOOK'&&_0x2d2e95[_0x127868(0x1fc)][_0x2bfea5['lockKey']]?.['datasetCode']===_0x507d8b[_0x127868(0x1db)])[_0x127868(0x1dc)](_0x511c9d=>_0x511c9d[_0x127868(0x21b)]));if(_0x223025[_0x127868(0x21f)]>0x1)throw CliErrors['validation'](_0x127868(0x220));const _0x22660a=_0x48b04a[_0x127868(0x201)](_0x4b10b7=>[{'datasetCode':_0x4b10b7[_0x127868(0x1db)],'operationType':snakeToCamel(_0x4b10b7[_0x127868(0x1d5)]),'functionNode':_0x127868(0x226),'id':_0x4b10b7[_0x127868(0x1d3)]},{'datasetCode':_0x4b10b7[_0x127868(0x1db)],'operationType':snakeToCamel(_0x4b10b7[_0x127868(0x1d5)]),'functionNode':_0x127868(0x1e6),'id':_0x4b10b7[_0x127868(0x1eb)]}])[_0x127868(0x1ca)](_0x20ab09=>_0x20ab09['id']===_0x507d8b[_0x127868(0x1cb)]),_0x5f0aee=await getBffScriptInfo(_0x507d8b[_0x127868(0x1cb)]);if(_0x5f0aee['id']!==_0x507d8b['remoteId']||_0x5f0aee[_0x127868(0x1c8)]!==_0x19a7e5||_0x5f0aee[_0x127868(0x210)]!==_0x127868(0x20b)||_0x5f0aee[_0x127868(0x1df)]!==_0x233da8[_0x127868(0x200)]||_0x507d8b['version']==null||_0x5f0aee['version']!==_0x507d8b[_0x127868(0x1e0)]||_0x22660a[_0x127868(0x217)]!==0x1||_0x22660a[0x0]['datasetCode']!==_0x507d8b[_0x127868(0x1db)]||_0x22660a[0x0][_0x127868(0x1d5)]!==_0x233da8[_0x127868(0x1d5)]||_0x22660a[0x0]['functionNode']!==_0x233da8[_0x127868(0x1d7)]||_0x507d8b[_0x127868(0x1d5)]!==_0x233da8[_0x127868(0x1d5)]||_0x507d8b[_0x127868(0x1d7)]!==_0x233da8[_0x127868(0x1d7)])throw CliErrors[_0x127868(0x1d9)](_0x127868(0x1f3));_0x4f88b3[_0x127868(0x211)](_0x233da8[_0x127868(0x216)]),_0x13e5f4[_0x127868(0x1e7)](_0x233da8[_0x127868(0x216)]);}catch(_0x113ac5){_0x13e5f4[_0x127868(0x22c)](_0x233da8['lockKey'],_0x113ac5 instanceof Error?_0x113ac5['message']:String(_0x113ac5));}}}return{'resolutions':_0x3ffeea,'failures':_0x13e5f4,'existingHooks':_0x4f88b3};}async function uploadSingleFunction(_0x26bdd9,_0x2bb7c1,_0x2f2e14,_0x5e43e0){const _0x6f9fce=a44_0x512383,_0x3fa578=await readFile(_0x2bb7c1[_0x6f9fce(0x227)],'utf8'),_0x262c39=await computeFileHash(_0x2bb7c1[_0x6f9fce(0x227)]),_0x36d103=_0x2f2e14[_0x6f9fce(0x1fc)][_0x2bb7c1[_0x6f9fce(0x216)]];if(_0x36d103?.[_0x6f9fce(0x1cb)]&&_0x36d103['version']==null)throw CliErrors[_0x6f9fce(0x1d9)](_0x2bb7c1[_0x6f9fce(0x216)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x526348=extractScriptDescription(_0x3fa578);if(!_0x526348&&_0x36d103?.['remoteId']){const _0x527fba=await getBffScriptInfo(_0x36d103[_0x6f9fce(0x1cb)]);_0x526348=_0x527fba[_0x6f9fce(0x1e4)]||undefined;}const _0x5bc1ec={'appCode':_0x26bdd9,'functionName':_0x2bb7c1[_0x6f9fce(0x200)],'scriptType':_0x2bb7c1['type'],'scriptContent':_0x3fa578};if(_0x36d103?.[_0x6f9fce(0x1cb)])_0x5bc1ec['id']=_0x36d103['remoteId'];if(_0x36d103?.[_0x6f9fce(0x1e0)]!=null)_0x5bc1ec[_0x6f9fce(0x1e0)]=_0x36d103[_0x6f9fce(0x1e0)];if(_0x526348)_0x5bc1ec['description']=_0x526348;if(_0x2bb7c1[_0x6f9fce(0x1f8)]===_0x6f9fce(0x20b)){const _0xef2288=_0x5e43e0['resolutions']['get'](_0x2bb7c1['lockKey']);if(!_0xef2288&&!_0x5e43e0[_0x6f9fce(0x1e1)]['has'](_0x2bb7c1[_0x6f9fce(0x216)])||!_0x2bb7c1['operationType']||!_0x2bb7c1[_0x6f9fce(0x1d7)])throw CliErrors[_0x6f9fce(0x1d9)](_0x6f9fce(0x20c)+_0x2bb7c1[_0x6f9fce(0x216)]);_0xef2288&&(_0x5bc1ec['datasetId']=_0xef2288[_0x6f9fce(0x1c9)]['id'],_0x5bc1ec['operationType']=_0x2bb7c1[_0x6f9fce(0x1d5)]),_0x5bc1ec[_0x6f9fce(0x1d7)]=_0x2bb7c1[_0x6f9fce(0x1d7)];}const _0x492b13=await saveBffScript(_0x5bc1ec),_0x3dd8f0=_0x492b13['id'],_0x277ba5=_0x492b13[_0x6f9fce(0x1da)]??await getBffScriptInfo(_0x3dd8f0),_0x141d31={'hash':_0x262c39,'remoteId':_0x3dd8f0,'version':_0x277ba5[_0x6f9fce(0x1e0)]};if(_0x2bb7c1[_0x6f9fce(0x1f8)]==='HOOK'){const _0x936ffc=_0x5e43e0[_0x6f9fce(0x21d)][_0x6f9fce(0x231)](_0x2bb7c1['lockKey']);if(!_0x936ffc){_0x2f2e14['functions'][_0x2bb7c1[_0x6f9fce(0x216)]]={..._0x36d103,..._0x141d31};return;}_0x141d31[_0x6f9fce(0x21b)]=_0x936ffc[_0x6f9fce(0x21b)]??_0x36d103?.[_0x6f9fce(0x21b)],_0x141d31[_0x6f9fce(0x1db)]=_0x936ffc['datasetCode'],_0x141d31[_0x6f9fce(0x1d5)]=_0x2bb7c1[_0x6f9fce(0x1d5)],_0x141d31['functionNode']=_0x2bb7c1[_0x6f9fce(0x1d7)];}_0x2f2e14[_0x6f9fce(0x1fc)][_0x2bb7c1['lockKey']]=_0x141d31;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x23b11c,_0x575c79,_0xd29baf){const _0xe73acf=a44_0x512383;if(_0xd29baf[_0xe73acf(0x217)]===0x0)return;for(let _0x30c63d=0x0;_0x30c63d<LOCK_SETTLE_RETRY_COUNT;_0x30c63d+=0x1){const _0x3c0b18=await readBffLockFile(_0x23b11c),_0x1a0acf=_0x3c0b18?.[_0xe73acf(0x1fa)]?.[_0x575c79]?.['functions']??{},_0xbc3443=_0xd29baf[_0xe73acf(0x1d1)](_0x13ee11=>!!_0x1a0acf[_0x13ee11]?.[_0xe73acf(0x1cb)]);if(_0xbc3443)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xe73acf(0x1ef)+_0xd29baf[_0xe73acf(0x202)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a45_0x17ba4c=a45_0x5c85;(function(_0x2353c1,_0x24c64b){const _0x1e6a93=a45_0x5c85,_0x5579c4=_0x2353c1();while(!![]){try{const _0x1a298e=-parseInt(_0x1e6a93(0x14c))/0x1*(parseInt(_0x1e6a93(0x141))/0x2)+-parseInt(_0x1e6a93(0x13a))/0x3*(-parseInt(_0x1e6a93(0x132))/0x4)+-parseInt(_0x1e6a93(0x139))/0x5*(-parseInt(_0x1e6a93(0x133))/0x6)+-parseInt(_0x1e6a93(0x14a))/0x7+-parseInt(_0x1e6a93(0x140))/0x8+parseInt(_0x1e6a93(0x14f))/0x9*(parseInt(_0x1e6a93(0x153))/0xa)+parseInt(_0x1e6a93(0x13b))/0xb*(-parseInt(_0x1e6a93(0x134))/0xc);if(_0x1a298e===_0x24c64b)break;else _0x5579c4['push'](_0x5579c4['shift']());}catch(_0x26d15d){_0x5579c4['push'](_0x5579c4['shift']());}}}(a45_0x4eb7,0x6bacc));function a45_0x5c85(_0x512049,_0x220870){_0x512049=_0x512049-0x131;const _0x4eb71f=a45_0x4eb7();let _0x5c856b=_0x4eb71f[_0x512049];return _0x5c856b;}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_0x17ba4c(0x142),'command':a45_0x17ba4c(0x13c),'description':a45_0x17ba4c(0x155),'risk':'read','flags':[{'name':'remote','type':a45_0x17ba4c(0x152),'description':a45_0x17ba4c(0x157)}],async 'execute'(_0x5a6c50){const _0xbe4182=a45_0x17ba4c,_0x4a0d16=loadBffProjectConfig(_0x5a6c50[_0xbe4182(0x14d)]),_0x595bd0=await readBffLockFile(_0x4a0d16[_0xbe4182(0x136)]),{appLock:_0x38cc09}=ensureLockScope(_0x595bd0??createEmptyBffLock(),_0x5a6c50[_0xbe4182(0x14d)],_0x4a0d16[_0xbe4182(0x135)],'status'),_0x2bcceb=await scanLocalBffFunctions(_0x4a0d16),_0x5b911e=[],_0x5c42df=[],_0x1e7a22=[];for(const _0x39c288 of _0x2bcceb){const _0xee60d6=await computeFileHash(_0x39c288['filePath']),_0x49c0ca=_0x38cc09[_0xbe4182(0x14b)][_0x39c288['lockKey']];if(!_0x49c0ca)_0x5b911e['push'](_0x39c288[_0xbe4182(0x137)]);else _0x49c0ca[_0xbe4182(0x150)]!==_0xee60d6?_0x5c42df['push'](_0x39c288['lockKey']):_0x1e7a22[_0xbe4182(0x138)](_0x39c288[_0xbe4182(0x137)]);}const _0x200449=[];if(_0x5a6c50['bool'](_0xbe4182(0x143))){const _0x27bd56=resolveApiModelSource(_0x5a6c50[_0xbe4182(0x131)],_0x5a6c50[_0xbe4182(0x14d)],_0x5a6c50[_0xbe4182(0x154)]||_0x5a6c50['mergedCli']?.[_0xbe4182(0x144)]||_0x5a6c50['mergedCli']?.['defaultApp']),_0x436ba2=loadAliasMap(_0x5a6c50[_0xbe4182(0x131)],undefined,_0x27bd56[_0xbe4182(0x148)],_0x27bd56[_0xbe4182(0x147)]),_0x3ccd50=new Map(_0x436ba2[_0xbe4182(0x149)](_0x5e3550=>[_0x5e3550[_0xbe4182(0x156)],_0x5e3550['alias']])),[_0x46bab8,_0x5209d7]=await Promise[_0xbe4182(0x13d)]([listBffScripts(_0x5a6c50[_0xbe4182(0x14d)]),getBffScriptStatistics(_0x5a6c50[_0xbe4182(0x14d)])]),_0x275b38=createHookLocationMap(_0x5209d7),_0x58e20f=new Set(_0x2bcceb['map'](_0x184cec=>_0x184cec[_0xbe4182(0x137)]));for(const _0x1732b8 of _0x46bab8){const _0x3d86eb=resolveRemoteScriptTarget(_0x4a0d16,_0x1732b8,_0x275b38,_0x38cc09[_0xbe4182(0x14b)],_0x3ccd50);_0x3d86eb&&!_0x58e20f[_0xbe4182(0x151)](_0x3d86eb[_0xbe4182(0x137)])&&_0x200449[_0xbe4182(0x138)](_0x3d86eb[_0xbe4182(0x137)]);}}const _0x52eb4e=_0x5b911e['length']===0x0&&_0x5c42df[_0xbe4182(0x14e)]===0x0&&_0x200449[_0xbe4182(0x14e)]===0x0;return{'ok':!![],'data':{'added':_0x5b911e,'modified':_0x5c42df,'unchanged':_0x1e7a22,'remoteOnly':_0x200449},'message':_0x52eb4e?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x5b911e[_0xbe4182(0x14e)]+_0xbe4182(0x146)+_0x5c42df[_0xbe4182(0x14e)]+_0xbe4182(0x13e)+_0x1e7a22[_0xbe4182(0x14e)]+_0xbe4182(0x145)+(_0x200449[_0xbe4182(0x14e)]>0x0?',\x20'+_0x200449['length']+_0xbe4182(0x13f):'')};}};function a45_0x4eb7(){const _0x19343e=['\x20added,\x20','profileName','filePath','map','864528jPhBGo','functions','17807XANUJO','appCode','length','1037151SUCHhK','hash','has','boolean','40UUMAuS','selectedAppName','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','datasetCode','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','apiDir','12WpRqIx','84DrUDTn','521124uIhjWm','scriptsRoot','lockFilePath','lockKey','push','101865ObMFJi','706980BiZFDd','66saXYKR','status','all','\x20modified,\x20','\x20remote-only','4312168PPwiMo','10NGHctW','bff','remote','currentApp','\x20unchanged'];a45_0x4eb7=function(){return _0x19343e;};return a45_0x4eb7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x648f43=a46_0x3f5f;function a46_0x1f3a(){const _0x5bbe7c=['pipe','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','skillVersion','167746RUBrfV','repairCommand','1857125UefdSN','\x20at\x20','793084EmjGsz','cli-skill','154558JAyFrU','setLogPath','read','apiError','nonInteractive','install','\x20via\x20skills@latest','code','\x20installed','Built-in\x20Skill\x20install\x20failed\x20[','changed',']:\x20','269484UwtCYI','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','2681959GuncFG','871959nRNcmB','cli-skill-install','installedPath','cwd','error','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','\x20is\x20already\x20current'];a46_0x1f3a=function(){return _0x5bbe7c;};return a46_0x1f3a();}(function(_0x205f2b,_0x46f1cf){const _0x58cdaf=a46_0x3f5f,_0x37854f=_0x205f2b();while(!![]){try{const _0x1e0364=-parseInt(_0x58cdaf(0x1a3))/0x1+-parseInt(_0x58cdaf(0x1a9))/0x2+parseInt(_0x58cdaf(0x199))/0x3+parseInt(_0x58cdaf(0x1a7))/0x4+parseInt(_0x58cdaf(0x1a5))/0x5+-parseInt(_0x58cdaf(0x196))/0x6+-parseInt(_0x58cdaf(0x198))/0x7;if(_0x1e0364===_0x46f1cf)break;else _0x37854f['push'](_0x37854f['shift']());}catch(_0x59db0b){_0x37854f['push'](_0x37854f['shift']());}}}(a46_0x1f3a,0x2db89));import{CliErrors}from'../../errors.js';function a46_0x3f5f(_0x32f734,_0x1882f7){_0x32f734=_0x32f734-0x190;const _0x1f3a2f=a46_0x1f3a();let _0x3f5fc0=_0x1f3a2f[_0x32f734];return _0x3f5fc0;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0x648f43(0x1a8),'command':a46_0x648f43(0x1ae),'description':a46_0x648f43(0x19e),'risk':a46_0x648f43(0x1ab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2592b5){const _0x30de50=a46_0x648f43;logger[_0x30de50(0x1aa)](process[_0x30de50(0x19c)]()),logger['info'](_0x30de50(0x19a),_0x30de50(0x197));const _0x2ab961=installBuiltinSkill({'stdio':_0x2592b5[_0x30de50(0x1ad)]?_0x30de50(0x1a0):'inherit'});if(!_0x2ab961['ok'])throw CliErrors[_0x30de50(0x1ac)](_0x30de50(0x193)+_0x2ab961[_0x30de50(0x191)]+_0x30de50(0x195)+(_0x2ab961[_0x30de50(0x19d)]||'unknown'),_0x30de50(0x1a1)+_0x2ab961[_0x30de50(0x1a4)]);return console['log'](_0x2ab961[_0x30de50(0x194)]?'CLI\x20Built-in\x20Skill\x20'+_0x2ab961[_0x30de50(0x1a2)]+_0x30de50(0x192)+(_0x2ab961[_0x30de50(0x19b)]?_0x30de50(0x1a6)+_0x2ab961[_0x30de50(0x19b)]:_0x30de50(0x190)):'CLI\x20Built-in\x20Skill\x20'+_0x2ab961[_0x30de50(0x1a2)]+_0x30de50(0x19f)+(_0x2ab961['installedPath']?_0x30de50(0x1a6)+_0x2ab961[_0x30de50(0x19b)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a47_0x4a4ad6=a47_0x1022;(function(_0x590a4,_0x2d020d){const _0x1ac6c8=a47_0x1022,_0xa484e8=_0x590a4();while(!![]){try{const _0x6f8a3=-parseInt(_0x1ac6c8(0x19d))/0x1+-parseInt(_0x1ac6c8(0x1a8))/0x2*(parseInt(_0x1ac6c8(0x16f))/0x3)+parseInt(_0x1ac6c8(0x177))/0x4*(parseInt(_0x1ac6c8(0x1a1))/0x5)+parseInt(_0x1ac6c8(0x16a))/0x6*(parseInt(_0x1ac6c8(0x15e))/0x7)+-parseInt(_0x1ac6c8(0x1b0))/0x8*(-parseInt(_0x1ac6c8(0x196))/0x9)+-parseInt(_0x1ac6c8(0x19e))/0xa+-parseInt(_0x1ac6c8(0x192))/0xb*(parseInt(_0x1ac6c8(0x16e))/0xc);if(_0x6f8a3===_0x2d020d)break;else _0xa484e8['push'](_0xa484e8['shift']());}catch(_0x1c2e03){_0xa484e8['push'](_0xa484e8['shift']());}}}(a47_0xe046,0xafa97));import a47_0x2cd555 from'chalk';function a47_0x1022(_0x456692,_0x3939c8){_0x456692=_0x456692-0x15e;const _0xe04678=a47_0xe046();let _0x1022cf=_0xe04678[_0x456692];return _0x1022cf;}import a47_0x9ca438 from'ora';import a47_0x128e4e from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x536ccf=a47_0x1022;return GIT_COMMIT!==_0x536ccf(0x166)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x536ccf(0x1af)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x43c63a=a47_0x1022,_0x46548d=process[_0x43c63a(0x179)][_0x43c63a(0x1a5)]();if(_0x46548d[_0x43c63a(0x1a2)](_0x43c63a(0x182)))return _0x43c63a(0x182);return _0x43c63a(0x183);}const updateFlags=[{'name':a47_0x4a4ad6(0x18b),'type':a47_0x4a4ad6(0x185),'description':a47_0x4a4ad6(0x186),'default':![]},{'name':a47_0x4a4ad6(0x173),'type':a47_0x4a4ad6(0x163),'description':a47_0x4a4ad6(0x172)}];function getRequestedVersion(_0x5003e1){const _0x359ac3=a47_0x4a4ad6;return _0x5003e1[_0x359ac3(0x176)](_0x359ac3(0x173))[_0x359ac3(0x18f)]();}async function validateUpdateFlags(_0x582c40){const _0x1b92dc=a47_0x4a4ad6,_0x3e09d5=_0x582c40[_0x1b92dc(0x1a3)](_0x1b92dc(0x18b)),_0x5cc3f2=getRequestedVersion(_0x582c40);if(_0x3e09d5&&_0x5cc3f2)throw CliErrors[_0x1b92dc(0x1ad)](_0x1b92dc(0x16b),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x5cc3f2&&!a47_0x128e4e[_0x1b92dc(0x17b)](_0x5cc3f2))throw CliErrors[_0x1b92dc(0x1ad)](_0x1b92dc(0x17a)+_0x5cc3f2,_0x1b92dc(0x160));}async function fetchNpmDistTags(){const _0x5b0580=a47_0x4a4ad6;try{const _0x592f3c=await fetch(_0x5b0580(0x171)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x5b0580(0x168)](0x2710)});if(!_0x592f3c['ok'])return null;const _0x534132=await _0x592f3c['json']();if(!_0x534132||typeof _0x534132!==_0x5b0580(0x190))return null;return Object[_0x5b0580(0x1ac)](Object[_0x5b0580(0x18e)](_0x534132)[_0x5b0580(0x161)](([,_0x4e65eb])=>typeof _0x4e65eb===_0x5b0580(0x163)&&_0x4e65eb[_0x5b0580(0x18f)]()[_0x5b0580(0x187)]>0x0)['map'](([_0x13ec1f,_0x26bbe6])=>[_0x13ec1f,String(_0x26bbe6)[_0x5b0580(0x18f)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x68aff3){const _0x45ebea=await fetchNpmDistTags();return _0x45ebea?.[_0x68aff3]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x481a24){const _0x74faf2=a47_0x4a4ad6,_0x120c8f=getRequestedVersion(_0x481a24);if(_0x120c8f)return{'version':_0x120c8f,'source':_0x74faf2(0x173)};if(_0x481a24[_0x74faf2(0x1a3)](_0x74faf2(0x18b))){const _0x178712=await fetchNpmDistTagVersion(_0x74faf2(0x18b));if(!_0x178712)return null;return{'version':_0x178712,'source':_0x74faf2(0x18b)};}const _0x2a4193=await fetchLatestVersion();if(!_0x2a4193)return null;return{'version':_0x2a4193,'source':_0x74faf2(0x19c)};}function shouldInstallTarget(_0x31caff,_0xdee013){const _0xf6ae57=a47_0x4a4ad6;if(_0xdee013[_0xf6ae57(0x188)]==='version'||_0xdee013['source']===_0xf6ae57(0x18b))return!a47_0x128e4e['eq'](_0x31caff,_0xdee013[_0xf6ae57(0x173)]);return a47_0x128e4e['lt'](_0x31caff,_0xdee013['version']);}function getInstallPlanLabel(_0x9301be,_0x3709f1){const _0x4b5ee6=a47_0x4a4ad6;switch(_0x3709f1[_0x4b5ee6(0x188)]){case'beta':return'Beta\x20version:\x20'+a47_0x2cd555[_0x4b5ee6(0x164)](_0x9301be)+'\x20→\x20'+a47_0x2cd555[_0x4b5ee6(0x199)](_0x3709f1[_0x4b5ee6(0x173)]);case _0x4b5ee6(0x173):return'Requested\x20version:\x20'+a47_0x2cd555[_0x4b5ee6(0x164)](_0x9301be)+'\x20→\x20'+a47_0x2cd555['green'](_0x3709f1[_0x4b5ee6(0x173)]);case _0x4b5ee6(0x19c):default:return _0x4b5ee6(0x175)+a47_0x2cd555[_0x4b5ee6(0x164)](_0x9301be)+_0x4b5ee6(0x184)+a47_0x2cd555[_0x4b5ee6(0x199)](_0x3709f1[_0x4b5ee6(0x173)]);}}function repairCurrentBuiltinSkill(){const _0x2b30e7=a47_0x4a4ad6;console[_0x2b30e7(0x197)](a47_0x2cd555[_0x2b30e7(0x17d)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x72889a=installBuiltinSkill();if(_0x72889a['ok']){console[_0x2b30e7(0x197)](a47_0x2cd555['gray'](_0x2b30e7(0x194)+_0x72889a[_0x2b30e7(0x19f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x2b30e7(0x18d)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x72889a[_0x2b30e7(0x193)]+_0x2b30e7(0x18c)+(_0x72889a[_0x2b30e7(0x181)]||'unknown'),_0x2b30e7(0x1ab)+_0x72889a[_0x2b30e7(0x17f)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x2b30e7(0x17e));}function a47_0xe046(){const _0x438059=['5766306kjnJMi','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','expected\x20','Update\x20failed','3757692pNJMUB','1683WKPEpd','read','https://registry.npmjs.org/-/package/','Install\x20a\x20specific\x20CLI\x20version','version','update','Update\x20available:\x20','str','2478612FhoFiR','install','execPath','Invalid\x20version:\x20','valid','...','gray','\x20doctor','repairCommand','succeed','error','bun','npm','\x20→\x20','boolean','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','length','source','Current\x20version\x20v','Update\x20failed:\x20','beta',']:\x20','apiError','entries','trim','object','current','33xfzVKN','code','\x20\x20CLI\x20Built-in\x20Skill\x20','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','766278QBXgxd','log','start','green','message','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','latest','431093GEUtVc','6732250cBnAeR','skillVersion','pipe','10jClcCQ','includes','bool','Current\x20version:\x20','toLowerCase','Try\x20manually:\x20npm\x20install\x20-g\x20','CLI\x20updated\x20to\x20v','118NVHcVi','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','info','Run:\x20','fromEntries','validation','state','slice','56rCcgPZ','fail','7mEzwEf','Version\x20comparison\x20failed','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','filter','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','string','yellow','Try\x20manually:\x20','unknown','run','timeout','Updated\x20to\x20v'];a47_0xe046=function(){return _0x438059;};return a47_0xe046();}function verifyUpdatedBuiltinSkill(_0x225756){const _0x265465=a47_0x4a4ad6,_0x550fcf=inspectInstalledBuiltinSkillVersion(_0x225756);if(_0x550fcf['state']===_0x265465(0x191)){console[_0x265465(0x197)](a47_0x2cd555[_0x265465(0x17d)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x225756+'\x20is\x20up\x20to\x20date.'));return;}const _0x32be2a=_0x550fcf[_0x265465(0x19f)]?_0x265465(0x16c)+_0x225756+',\x20found\x20'+_0x550fcf[_0x265465(0x19f)]:_0x265465(0x16c)+_0x225756+',\x20state\x20'+_0x550fcf[_0x265465(0x1ae)];throw CliErrors[_0x265465(0x18d)](_0x265465(0x1a7)+_0x225756+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x32be2a,_0x265465(0x1ab)+_0x550fcf[_0x265465(0x17f)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x265465(0x17e));}async function execute(_0x48d364){const _0x5dde9c=a47_0x4a4ad6;await validateUpdateFlags(_0x48d364);const _0x2b19d1=getCurrentVersion();console[_0x5dde9c(0x197)](_0x5dde9c(0x1a4)+_0x2b19d1);const _0x4402b8=a47_0x9ca438('Checking\x20for\x20updates...')[_0x5dde9c(0x198)](),_0x3c4c62=await resolveTargetVersion(_0x48d364);if(!_0x3c4c62){const _0x22fdcd=_0x48d364[_0x5dde9c(0x1a3)](_0x5dde9c(0x18b))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x5dde9c(0x1a9);_0x4402b8[_0x5dde9c(0x1b1)](_0x22fdcd);throw CliErrors[_0x5dde9c(0x18d)](_0x22fdcd,_0x5dde9c(0x1a6)+NPM_PACKAGE_NAME+'@'+(_0x48d364[_0x5dde9c(0x1a3)](_0x5dde9c(0x18b))?_0x5dde9c(0x18b):_0x5dde9c(0x19c)));}const _0x147398=a47_0x128e4e['valid'](VERSION),_0x34aa09=a47_0x128e4e[_0x5dde9c(0x17b)](_0x3c4c62[_0x5dde9c(0x173)]);if(!_0x147398||!_0x34aa09){_0x4402b8['fail']('Version\x20comparison\x20failed');throw CliErrors[_0x5dde9c(0x18d)](_0x5dde9c(0x15f),_0x5dde9c(0x195)+CLI_BIN_NAME+'\x20update\x20--version\x20<version>');}if(!shouldInstallTarget(_0x147398,_0x3c4c62)){const _0xa2285=_0x3c4c62[_0x5dde9c(0x188)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x3c4c62[_0x5dde9c(0x173)]+')':a47_0x128e4e['gt'](_0x147398,_0x34aa09)?_0x5dde9c(0x189)+_0x2b19d1+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x3c4c62[_0x5dde9c(0x173)]:'Already\x20up\x20to\x20date\x20(v'+_0x3c4c62[_0x5dde9c(0x173)]+')';return _0x4402b8['succeed'](_0xa2285),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x4402b8[_0x5dde9c(0x1aa)](getInstallPlanLabel(_0x2b19d1,_0x3c4c62));const _0xa0edbf=detectPackageManager(),_0x4e0a18=_0xa0edbf===_0x5dde9c(0x183)?resolveNpmBin('npm'):_0xa0edbf,_0x10e6da=a47_0x9ca438('Updating\x20via\x20'+_0xa0edbf+_0x5dde9c(0x17c))[_0x5dde9c(0x198)]();try{await execa(_0x4e0a18,[_0x5dde9c(0x178),'-g',NPM_PACKAGE_NAME+'@'+_0x3c4c62[_0x5dde9c(0x173)]],{'stdio':_0x5dde9c(0x1a0)}),_0x10e6da[_0x5dde9c(0x180)](_0x5dde9c(0x169)+_0x3c4c62[_0x5dde9c(0x173)]),console['log'](a47_0x2cd555[_0x5dde9c(0x17d)](_0x5dde9c(0x19b)));}catch(_0x456595){_0x10e6da[_0x5dde9c(0x1b1)](_0x5dde9c(0x16d));throw CliErrors[_0x5dde9c(0x18d)](_0x5dde9c(0x18a)+(_0x456595 instanceof Error?_0x456595[_0x5dde9c(0x19a)]:String(_0x456595)),_0x5dde9c(0x165)+_0xa0edbf+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x3c4c62['version']);}return verifyUpdatedBuiltinSkill(_0x3c4c62[_0x5dde9c(0x173)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x4a4ad6(0x174),'command':a47_0x4a4ad6(0x167),'description':a47_0x4a4ad6(0x162),'risk':a47_0x4a4ad6(0x170),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2607c5,_0x3df4fe){const _0x5d09f0=a48_0x3cb1,_0x3e64b0=_0x2607c5();while(!![]){try{const _0x604035=parseInt(_0x5d09f0(0x153))/0x1*(-parseInt(_0x5d09f0(0x152))/0x2)+-parseInt(_0x5d09f0(0x14d))/0x3*(parseInt(_0x5d09f0(0x151))/0x4)+-parseInt(_0x5d09f0(0x14a))/0x5+-parseInt(_0x5d09f0(0x14f))/0x6*(-parseInt(_0x5d09f0(0x150))/0x7)+parseInt(_0x5d09f0(0x14e))/0x8+-parseInt(_0x5d09f0(0x14b))/0x9+parseInt(_0x5d09f0(0x149))/0xa*(-parseInt(_0x5d09f0(0x14c))/0xb);if(_0x604035===_0x3df4fe)break;else _0x3e64b0['push'](_0x3e64b0['shift']());}catch(_0x193643){_0x3e64b0['push'](_0x3e64b0['shift']());}}}(a48_0x6a2f,0x3afb9));function a48_0x6a2f(){const _0xfa9ef9=['3843224USwXsQ','30arjEgu','646807tTUrsR','628ygykOe','496118vNejln','1xYUDHE','1247930OudTDX','131210WkUKwW','2229417RFXhbQ','11vzoRuq','1032ohtaeV'];a48_0x6a2f=function(){return _0xfa9ef9;};return a48_0x6a2f();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a48_0x3cb1(_0x22e7b3,_0xe638c3){_0x22e7b3=_0x22e7b3-0x149;const _0x6a2f56=a48_0x6a2f();let _0x3cb10c=_0x6a2f56[_0x22e7b3];return _0x3cb10c;}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x587a(){const _0x14b102=['16FxQnoe','102EoclZW','name','781481LfzAJY','5395959jcaPab','read','2SrOqSS','5639080LNXoKE','operation','str','114645ZheAAV','skip-imports','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','string','tableName','code','bool','4101741DulHlR','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','alias','boolean','11GuHZSH','sdk','2943200dPYOkX','736599Wfrtfj'];a49_0x587a=function(){return _0x14b102;};return a49_0x587a();}const a49_0x30ee86=a49_0x5e70;(function(_0x137e75,_0x3f49ec){const _0x39d40a=a49_0x5e70,_0x397b15=_0x137e75();while(!![]){try{const _0x211916=-parseInt(_0x39d40a(0x108))/0x1*(parseInt(_0x39d40a(0x10b))/0x2)+parseInt(_0x39d40a(0x104))/0x3+parseInt(_0x39d40a(0x103))/0x4+-parseInt(_0x39d40a(0xf5))/0x5*(-parseInt(_0x39d40a(0x106))/0x6)+-parseInt(_0x39d40a(0xfd))/0x7+parseInt(_0x39d40a(0x105))/0x8*(parseInt(_0x39d40a(0x109))/0x9)+-parseInt(_0x39d40a(0xf2))/0xa*(parseInt(_0x39d40a(0x101))/0xb);if(_0x211916===_0x3f49ec)break;else _0x397b15['push'](_0x397b15['shift']());}catch(_0x3cfc82){_0x397b15['push'](_0x397b15['shift']());}}}(a49_0x587a,0x9bf9c));function a49_0x5e70(_0x1114b5,_0x284076){_0x1114b5=_0x1114b5-0xf2;const _0x587ae6=a49_0x587a();let _0x5e70ac=_0x587ae6[_0x1114b5];return _0x5e70ac;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a49_0x30ee86(0x102),'description':a49_0x30ee86(0xf8),'risk':a49_0x30ee86(0x10a),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x30ee86(0xff),'type':a49_0x30ee86(0xf9),'description':a49_0x30ee86(0xfe)},{'name':'operation','type':a49_0x30ee86(0xf9),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':'skip-imports','type':a49_0x30ee86(0x100),'description':a49_0x30ee86(0xf7)}],async 'execute'(_0x554194){const _0x1f2778=a49_0x30ee86,{dataset:_0x5ebc28,operation:_0x28a664}=await getOperationDetail(_0x554194['appCode'],_0x554194[_0x1f2778(0xf4)](_0x1f2778(0xfb)),_0x554194[_0x1f2778(0xf4)](_0x1f2778(0xf3))),_0x5c29b5=generateSdkCode(_0x5ebc28,_0x28a664,{'includeImports':!_0x554194[_0x1f2778(0xfc)](_0x1f2778(0xf6))});return{'ok':!![],'data':{'dataset':{'name':_0x5ebc28[_0x1f2778(0x107)],'code':_0x5ebc28[_0x1f2778(0xfb)],'tableName':_0x5ebc28[_0x1f2778(0xfa)]},'operation':_0x554194['str'](_0x1f2778(0xf3)),'code':_0x5c29b5}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a50_0x501aa8=a50_0x5793;function a50_0x46ef(){const _0x21d25c=['boolean','369pLMPnz','110qNndlK','8aOWExt','1731952HOzJvf','2160257pcPRQJ','31422vttsRH','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','1146219jxlVJV','910VcSXOx','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sdk','string','40731uGbxYc','appCode','676840InHZvS','str','codegen','24464PwouDF','no-imports','sqlName','target'];a50_0x46ef=function(){return _0x21d25c;};return a50_0x46ef();}function a50_0x5793(_0x3c437e,_0x3c0a0e){_0x3c437e=_0x3c437e-0x90;const _0x46efa1=a50_0x46ef();let _0x579370=_0x46efa1[_0x3c437e];return _0x579370;}(function(_0x518132,_0x58284d){const _0x4f3ac9=a50_0x5793,_0x459eb0=_0x518132();while(!![]){try{const _0x151f0c=-parseInt(_0x4f3ac9(0x9c))/0x1*(-parseInt(_0x4f3ac9(0x92))/0x2)+-parseInt(_0x4f3ac9(0x97))/0x3+-parseInt(_0x4f3ac9(0x93))/0x4+-parseInt(_0x4f3ac9(0x9e))/0x5+parseInt(_0x4f3ac9(0x95))/0x6*(-parseInt(_0x4f3ac9(0x98))/0x7)+-parseInt(_0x4f3ac9(0xa1))/0x8*(parseInt(_0x4f3ac9(0x90))/0x9)+-parseInt(_0x4f3ac9(0x91))/0xa*(-parseInt(_0x4f3ac9(0x94))/0xb);if(_0x151f0c===_0x58284d)break;else _0x459eb0['push'](_0x459eb0['shift']());}catch(_0x15f8d6){_0x459eb0['push'](_0x459eb0['shift']());}}}(a50_0x46ef,0x8a524));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a50_0x501aa8(0xa0),'command':'sql','description':a50_0x501aa8(0x99),'risk':'read','flags':[SQLCODE_FLAG,{'name':a50_0x501aa8(0xa4),'type':a50_0x501aa8(0x9b),'description':a50_0x501aa8(0x96),'default':a50_0x501aa8(0x9a),'enum':[a50_0x501aa8(0x9a),'bff']},{'name':a50_0x501aa8(0xa2),'type':a50_0x501aa8(0xa5),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x46f05d){const _0xe46948=a50_0x501aa8,_0x45b1ef=await getSqlQueryInfo(_0x46f05d[_0xe46948(0x9d)],_0x46f05d[_0xe46948(0x9f)]('sqlcode')),_0x3a3fdc=_0x46f05d[_0xe46948(0x9f)](_0xe46948(0xa4))||_0xe46948(0x9a),_0x16b56a=generateSqlCodeTemplate(_0x45b1ef,{'target':_0x3a3fdc,'includeImports':!_0x46f05d['bool'](_0xe46948(0xa2))});return{'ok':!![],'data':{'sqlCode':_0x45b1ef['sqlCode'],'sqlName':_0x45b1ef[_0xe46948(0xa3)],'target':_0x3a3fdc,'code':_0x16b56a}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a51_0x1869(){const _0x4eea57=['\x22\x20is\x20selected\x20automatically.','global','\x22\x20(appcode:\x20','\x20Note:\x20app\x20\x22','\x22\x20still\x20defined\x20in\x20','string','\x20<name>','84evpasB','\x20<name>\x20[--global]','appcode','\x20config.','Removed\x20app\x20\x22','772979uHJjQF','\x20Remaining\x20app\x20\x22','2822175OImwfM','length','object','both','1348803HHvUPR','\x22\x20not\x20found.','App\x20\x22','project','bool','Missing\x20app\x20name.','boolean','flagMissing','7395540DDhibU','Use\x20global\x20config\x20scope','\x20<name>\x20--appcode\x20<code>','44586DNzJXb','24PYpSiy','App\x20code','441TabtCb','Usage:\x20','220815aqLlMN','projectConfig','trim','defaultApp','Added','validation','\x20Default\x20app\x20is\x20\x22','keys','apps','globalConfig','166194vbeylx'];a51_0x1869=function(){return _0x4eea57;};return a51_0x1869();}function a51_0x1b9e(_0x4eaf79,_0x358765){_0x4eaf79=_0x4eaf79-0x18f;const _0x1869b8=a51_0x1869();let _0x1b9e67=_0x1869b8[_0x4eaf79];return _0x1b9e67;}(function(_0x25e228,_0x25b68a){const _0x41181e=a51_0x1b9e,_0x88f662=_0x25e228();while(!![]){try{const _0x2d2374=parseInt(_0x41181e(0x1a0))/0x1+-parseInt(_0x41181e(0x193))/0x2+-parseInt(_0x41181e(0x1a6))/0x3+parseInt(_0x41181e(0x19b))/0x4*(parseInt(_0x41181e(0x1b6))/0x5)+-parseInt(_0x41181e(0x1b1))/0x6*(parseInt(_0x41181e(0x1b4))/0x7)+-parseInt(_0x41181e(0x1b2))/0x8*(parseInt(_0x41181e(0x1a2))/0x9)+parseInt(_0x41181e(0x1ae))/0xa;if(_0x2d2374===_0x25b68a)break;else _0x88f662['push'](_0x88f662['shift']());}catch(_0x6bdab1){_0x88f662['push'](_0x88f662['shift']());}}}(a51_0x1869,0x79acc));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x39446d=a51_0x1b9e;return[{'name':_0x39446d(0x19d),'type':_0x39446d(0x199),'description':_0x39446d(0x1b3),'required':!![]},{'name':_0x39446d(0x195),'type':'boolean','description':_0x39446d(0x1af),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x1e1fc0=a51_0x1b9e;return[{'name':_0x1e1fc0(0x195),'type':_0x1e1fc0(0x1ac),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x579a3b,_0x3402e7){const _0xb89391=a51_0x1b9e,_0x369279=_0x579a3b['args'][0x0]?.[_0xb89391(0x1b8)]();if(!_0x369279)throw CliErrors['validation'](_0xb89391(0x1ab),_0xb89391(0x1b5)+CLI_BIN_NAME+'\x20'+_0x3402e7+_0xb89391(0x19a));}export async function runAppAdd(_0x46459b,_0x184372){const _0x25e063=a51_0x1b9e,_0x334493=_0x46459b['args'][0x0]?.[_0x25e063(0x1b8)]();if(!_0x334493)throw CliErrors['validation'](_0x25e063(0x1ab),_0x25e063(0x1b5)+CLI_BIN_NAME+'\x20'+_0x184372+_0x25e063(0x1b0));const _0xf4162e=_0x46459b['str'](_0x25e063(0x19d));if(!_0xf4162e)throw CliErrors[_0x25e063(0x1ad)]('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x184372+_0x25e063(0x1b0));const _0x4082d6={'global':_0x46459b['bool'](_0x25e063(0x195))},_0xd36b7c=readConfig(_0x4082d6);if(!_0xd36b7c[_0x25e063(0x191)])_0xd36b7c['apps']={};const _0x35d6fc={'appcode':_0xf4162e,...collectAppProfileOverrides(_0x138796=>_0x46459b['str'](_0x138796))},_0x8445c5=_0xd36b7c[_0x25e063(0x191)],_0x1978dd=Object[_0x25e063(0x190)](_0x8445c5),_0x5bf9cc=typeof _0xd36b7c[_0x25e063(0x1b9)]===_0x25e063(0x199)&&_0x8445c5[_0xd36b7c[_0x25e063(0x1b9)]]?_0xd36b7c[_0x25e063(0x1b9)]:_0x1978dd[_0x25e063(0x1a3)]===0x1?_0x1978dd[0x0]:undefined,_0x416604=!!_0x8445c5[_0x334493];_0x8445c5[_0x334493]=_0x35d6fc;const _0x4cba72=normalizeStoredDefaultApp(_0xd36b7c,_0x5bf9cc);writeConfig(_0xd36b7c,_0x4082d6);const _0xf323b6=!_0x416604&&_0x4cba72?_0x25e063(0x18f)+_0x4cba72+'\x22.':'',_0x35f8fb=(_0x416604?'Updated':_0x25e063(0x1ba))+'\x20app\x20\x22'+_0x334493+_0x25e063(0x196)+_0xf4162e+')'+scopeLabel(_0x4082d6)+'.'+_0xf323b6;return{'ok':!![],'message':_0x35f8fb};}export async function runAppRemove(_0x126d49,_0x1e507d){const _0x40b5da=a51_0x1b9e,_0x68b263=_0x126d49['args'][0x0]?.[_0x40b5da(0x1b8)]();if(!_0x68b263)throw CliErrors[_0x40b5da(0x1bb)](_0x40b5da(0x1ab),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1e507d+_0x40b5da(0x19c));const _0x50e051=_0x126d49[_0x40b5da(0x1aa)](_0x40b5da(0x195)),{config:_0x917ec3,layers:_0xd699e7}=readRawConfigWithLayers(),_0x373807=_0x917ec3[_0x40b5da(0x191)]??{};if(!_0x373807[_0x68b263])throw CliErrors[_0x40b5da(0x1bb)]('App\x20\x22'+_0x68b263+_0x40b5da(0x1a7));const _0x21fd02=_0xd699e7['globalConfig'][_0x40b5da(0x191)]&&typeof _0xd699e7[_0x40b5da(0x192)]['apps']===_0x40b5da(0x1a4)?_0xd699e7[_0x40b5da(0x192)][_0x40b5da(0x191)]:{},_0x216ed7=_0xd699e7[_0x40b5da(0x1b7)][_0x40b5da(0x191)]&&typeof _0xd699e7[_0x40b5da(0x1b7)][_0x40b5da(0x191)]===_0x40b5da(0x1a4)?_0xd699e7[_0x40b5da(0x1b7)][_0x40b5da(0x191)]:{},_0xa55045=appDefinedIn(_0x68b263,_0x21fd02,_0x216ed7),_0x5a15c3=resolveAppScopeForWrite(_0x68b263,_0x50e051,_0xd699e7),_0x4920ca={'global':_0x5a15c3==='global'},_0x57d601=readConfig(_0x4920ca),_0x5b3868=_0x57d601[_0x40b5da(0x191)];if(!_0x5b3868||!_0x5b3868[_0x68b263])throw CliErrors[_0x40b5da(0x1bb)](_0x40b5da(0x1a8)+_0x68b263+_0x40b5da(0x1a7));delete _0x5b3868[_0x68b263];let _0x33b95f='';const _0x11c933=typeof _0x57d601[_0x40b5da(0x1b9)]==='string'?_0x57d601[_0x40b5da(0x1b9)]:undefined,_0x304387=Object[_0x40b5da(0x190)](_0x5b3868),_0x4e72cb=_0x11c933===_0x68b263?_0x304387[0x0]:_0x11c933,_0x4e3df5=normalizeStoredDefaultApp(_0x57d601,_0x4e72cb);if(_0x11c933===_0x68b263&&_0x304387[_0x40b5da(0x1a3)]===0x1)_0x33b95f=_0x40b5da(0x1a1)+_0x304387[0x0]+_0x40b5da(0x194);else _0x11c933===_0x68b263&&_0x4e3df5&&(_0x33b95f='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x4e3df5+'\x22.');Object[_0x40b5da(0x190)](_0x5b3868)[_0x40b5da(0x1a3)]===0x0&&(delete _0x57d601['apps'],delete _0x57d601[_0x40b5da(0x1b9)]);writeConfig(_0x57d601,_0x4920ca);const _0x1e5d26=_0xa55045===_0x40b5da(0x1a5)?_0x40b5da(0x197)+_0x68b263+_0x40b5da(0x198)+(_0x5a15c3==='project'?'global':_0x40b5da(0x1a9))+_0x40b5da(0x19e):'';return{'ok':!![],'message':_0x40b5da(0x19f)+_0x68b263+'\x22'+scopeLabel(_0x4920ca)+'.'+_0x33b95f+_0x1e5d26};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4025ae,_0x22a4f3){const _0xb25a86=a52_0x9b21,_0x4877d4=_0x4025ae();while(!![]){try{const _0x539da3=parseInt(_0xb25a86(0x13b))/0x1*(parseInt(_0xb25a86(0x13a))/0x2)+parseInt(_0xb25a86(0x15a))/0x3*(parseInt(_0xb25a86(0x159))/0x4)+-parseInt(_0xb25a86(0x134))/0x5+-parseInt(_0xb25a86(0x137))/0x6*(parseInt(_0xb25a86(0x13e))/0x7)+-parseInt(_0xb25a86(0x13f))/0x8+parseInt(_0xb25a86(0x138))/0x9+parseInt(_0xb25a86(0x139))/0xa*(parseInt(_0xb25a86(0x146))/0xb);if(_0x539da3===_0x22a4f3)break;else _0x4877d4['push'](_0x4877d4['shift']());}catch(_0x569367){_0x4877d4['push'](_0x4877d4['shift']());}}}(a52_0x15ef,0xb4662));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x5840ff from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a52_0x9b21(_0x2036aa,_0x3ee35e){_0x2036aa=_0x2036aa-0x134;const _0x15ef59=a52_0x15ef();let _0x9b211d=_0x15ef59[_0x2036aa];return _0x9b211d;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x47c969=await input({'message':'App\x20Code:','validate':_0x2a14ad=>{const _0x4b8fdf=a52_0x9b21,_0x31256b=validateAppcode(_0x2a14ad[_0x4b8fdf(0x14e)]());return _0x31256b[_0x4b8fdf(0x13c)]||_0x31256b[_0x4b8fdf(0x153)]||_0x4b8fdf(0x142);}});return _0x47c969['trim']();}export async function promptAppSelection(_0x550f5e){const _0x3b5aee=a52_0x9b21,_0x10073f=[{'name':a52_0x5840ff[_0x3b5aee(0x156)](_0x3b5aee(0x158)),'value':-0x1},..._0x550f5e['map']((_0x5b5587,_0x593bd3)=>({'name':_0x5b5587[_0x3b5aee(0x144)]+'\x20\x20'+a52_0x5840ff[_0x3b5aee(0x135)]('('+_0x5b5587['appCode']+')'),'value':_0x593bd3}))],_0x3a3228=await checkbox({'message':_0x3b5aee(0x149)+a52_0x5840ff[_0x3b5aee(0x151)](_0x550f5e[_0x3b5aee(0x14b)])+_0x3b5aee(0x157),'choices':_0x10073f,'loop':![]});if(_0x3a3228[_0x3b5aee(0x14c)](-0x1))return _0x3b5aee(0x154);if(_0x3a3228[_0x3b5aee(0x14b)]===0x0)return _0x3b5aee(0x154);return _0x3a3228[_0x3b5aee(0x143)](_0x28ce09=>_0x550f5e[_0x28ce09]);}export async function promptSingleAppSelection(_0x339335){const _0x5a57f2=a52_0x9b21,_0x333efe=[{'name':a52_0x5840ff[_0x5a57f2(0x135)]('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x5a57f2(0x14f)},{'name':a52_0x5840ff[_0x5a57f2(0x156)]('✎\x20Enter\x20appcode\x20manually'),'value':_0x5a57f2(0x154)},..._0x339335[_0x5a57f2(0x143)](_0x4d0808=>({'name':_0x4d0808[_0x5a57f2(0x144)]+'\x20\x20'+a52_0x5840ff[_0x5a57f2(0x135)]('('+_0x4d0808[_0x5a57f2(0x148)]+')'),'value':_0x4d0808[_0x5a57f2(0x148)]}))],_0x1c6577=await select({'message':'Select\x20the\x20app\x20to\x20bind:','choices':_0x333efe});if(_0x1c6577===_0x5a57f2(0x14f))return _0x5a57f2(0x14f);if(_0x1c6577==='custom')return _0x5a57f2(0x154);return _0x339335[_0x5a57f2(0x141)](_0x15f35f=>_0x15f35f['appCode']===_0x1c6577);}export async function selectSingleAppcode(_0x46d5b8){const _0x4e18fe=a52_0x9b21;if(!_0x46d5b8)return writeCliSideChannelLine(a52_0x5840ff[_0x4e18fe(0x135)](_0x4e18fe(0x150))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x441670;try{_0x441670=await withActiveCookie(_0x46d5b8,()=>listRemoteApps());}catch(_0x2598b1){writeCliSideChannelLine(a52_0x5840ff[_0x4e18fe(0x156)](_0x4e18fe(0x147)));if(_0x2598b1 instanceof Error)writeCliSideChannelLine(a52_0x5840ff[_0x4e18fe(0x135)]('\x20\x20('+_0x2598b1[_0x4e18fe(0x153)]+')'));return _fallbackOrSkip();}if(_0x441670[_0x4e18fe(0x14b)]===0x0)return writeCliSideChannelLine(a52_0x5840ff[_0x4e18fe(0x156)](_0x4e18fe(0x14a))),_fallbackOrSkip();const _0x4c7418=await promptSingleAppSelection(_0x441670);if(_0x4c7418===_0x4e18fe(0x14f))return'';if(_0x4c7418===_0x4e18fe(0x154))return promptCustomAppcode();return _0x4c7418[_0x4e18fe(0x148)];}export async function selectMultipleApps(_0xbaa054){const _0x38fa40=a52_0x9b21;writeCliSideChannelLine(_0x38fa40(0x145));let _0x30c1eb;try{_0x30c1eb=await withActiveCookie(_0xbaa054,()=>listRemoteApps());}catch(_0x4fe288){writeCliSideChannelLine(_0x38fa40(0x13d));if(_0x4fe288 instanceof Error)writeCliSideChannelLine(_0x38fa40(0x14d)+_0x4fe288['message']+')');return _0x38fa40(0x154);}if(_0x30c1eb[_0x38fa40(0x14b)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x38fa40(0x154);return promptAppSelection(_0x30c1eb);}function a52_0x15ef(){const _0x21b731=['2491932VcKVBI','8894673eTftsE','14926390tGOnfg','3622GArjZY','20ppiAsz','valid','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','7lCbFmG','5297208AicLhY','(Skip;\x20configure\x20later)','find','Invalid\x20App\x20Code','map','appName','Fetching\x20available\x20apps...','11Joczhk','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','appCode','Found\x20','No\x20available\x20apps\x20found.','length','includes','\x20\x20(','trim','skip','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','cyan','App\x20Code:','message','custom','manual','yellow','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','✎\x20Enter\x20appcode\x20manually','118396rTZmKb','6ANoszu','3799835wGUvqg','gray','✎\x20Enter\x20manually'];a52_0x15ef=function(){return _0x21b731;};return a52_0x15ef();}async function _fallbackOrSkip(){const _0x15a656=a52_0x9b21,_0x5d3885=await select({'message':_0x15a656(0x152),'choices':[{'name':a52_0x5840ff['gray'](_0x15a656(0x140)),'value':'skip'},{'name':a52_0x5840ff['yellow'](_0x15a656(0x136)),'value':_0x15a656(0x155)}]});if(_0x5d3885===_0x15a656(0x14f))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a53_0x5b6290=a53_0x4fd3;function a53_0x38dc(){const _0x1492fd=['taskId','1781205wtAiju','trim','Task\x20','19112OkidqZ','has','FAILED','1659822YxqueT','\x20completed\x20successfully.','11TYutYX','Async\x20task\x20','toUpperCase','10GWAEpY','errorMessage','apiError','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','14rfDhTS','12808757ZmwkAk','4IZwBth','status','\x20--format\x20compress','5677236KQqgrZ','15786ONusgq','\x20--appcode\x20','\x20is\x20processing.','PENDING','146xQgrWy','1729YcqjNH','\x20failed.','853UWXztv','170dZycQP','SUCCESS','\x20is\x20pending.','string','\x20returned\x20unknown\x20status\x20','PROCESSING'];a53_0x38dc=function(){return _0x1492fd;};return a53_0x38dc();}(function(_0x4c5847,_0x1137d8){const _0x38a4d5=a53_0x4fd3,_0x1b6116=_0x4c5847();while(!![]){try{const _0x58cb64=-parseInt(_0x38a4d5(0xc1))/0x1*(-parseInt(_0x38a4d5(0xe2))/0x2)+-parseInt(_0x38a4d5(0xc9))/0x3*(-parseInt(_0x38a4d5(0xda))/0x4)+-parseInt(_0x38a4d5(0xd4))/0x5*(-parseInt(_0x38a4d5(0xcf))/0x6)+parseInt(_0x38a4d5(0xe3))/0x7*(parseInt(_0x38a4d5(0xcc))/0x8)+parseInt(_0x38a4d5(0xde))/0x9*(-parseInt(_0x38a4d5(0xc2))/0xa)+-parseInt(_0x38a4d5(0xd1))/0xb*(parseInt(_0x38a4d5(0xdd))/0xc)+-parseInt(_0x38a4d5(0xd9))/0xd*(parseInt(_0x38a4d5(0xd8))/0xe);if(_0x58cb64===_0x1137d8)break;else _0x1b6116['push'](_0x1b6116['shift']());}catch(_0xd2393c){_0x1b6116['push'](_0x1b6116['shift']());}}}(a53_0x38dc,0x4bf6f));import{CLI_BIN_NAME}from'../../constant/cli.js';function a53_0x4fd3(_0x10e46e,_0x4915f5){_0x10e46e=_0x10e46e-0xc0;const _0x38dc78=a53_0x38dc();let _0x4fd33a=_0x38dc78[_0x10e46e];return _0x4fd33a;}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x5b6290(0xc3),a53_0x5b6290(0xce)]),NON_TERMINAL_STATUSES=new Set([a53_0x5b6290(0xe1),a53_0x5b6290(0xc7)]);export function normalizeAsyncTask(_0xffdfe2){const _0x3d5108=a53_0x5b6290,_0x47d5ca=typeof _0xffdfe2?.['taskId']===_0x3d5108(0xc5)?_0xffdfe2[_0x3d5108(0xc8)][_0x3d5108(0xca)]():'';if(!_0x47d5ca)throw CliErrors[_0x3d5108(0xd6)](_0x3d5108(0xd7));const _0x221ec9=typeof _0xffdfe2['status']==='string'?_0xffdfe2['status'][_0x3d5108(0xca)]()[_0x3d5108(0xd3)]():'';if(!_0x221ec9)throw CliErrors['apiError'](_0x3d5108(0xd2)+_0x47d5ca+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x47d5ca,'status':_0x221ec9,'errorMessage':typeof _0xffdfe2['errorMessage']===_0x3d5108(0xc5)&&_0xffdfe2[_0x3d5108(0xd5)]['trim']()?_0xffdfe2[_0x3d5108(0xd5)][_0x3d5108(0xca)]():null,'isTerminal':TERMINAL_STATUSES[_0x3d5108(0xcd)](_0x221ec9),'knownStatus':TERMINAL_STATUSES['has'](_0x221ec9)||NON_TERMINAL_STATUSES[_0x3d5108(0xcd)](_0x221ec9)};}export function buildAsyncTaskStatusCommand(_0x464146,_0x3d3f9e){const _0x3e261a=a53_0x5b6290;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x464146)+_0x3e261a(0xdf)+quoteShellArg(_0x3d3f9e)+_0x3e261a(0xdc);}export function asyncTaskMessage(_0x33b24d){const _0x798d8a=a53_0x5b6290;switch(_0x33b24d[_0x798d8a(0xdb)]){case _0x798d8a(0xe1):return _0x798d8a(0xcb)+_0x33b24d[_0x798d8a(0xc8)]+_0x798d8a(0xc4);case _0x798d8a(0xc7):return'Task\x20'+_0x33b24d[_0x798d8a(0xc8)]+_0x798d8a(0xe0);case _0x798d8a(0xc3):return _0x798d8a(0xcb)+_0x33b24d[_0x798d8a(0xc8)]+_0x798d8a(0xd0);case _0x798d8a(0xce):return _0x33b24d[_0x798d8a(0xd5)]?_0x798d8a(0xcb)+_0x33b24d[_0x798d8a(0xc8)]+'\x20failed:\x20'+_0x33b24d[_0x798d8a(0xd5)]:'Task\x20'+_0x33b24d[_0x798d8a(0xc8)]+_0x798d8a(0xc0);default:return'Task\x20'+_0x33b24d[_0x798d8a(0xc8)]+_0x798d8a(0xc6)+_0x33b24d[_0x798d8a(0xdb)]+'.';}}function quoteShellArg(_0x367663){return'\x27'+_0x367663['replace'](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a54_0x320c(_0x4a9a5d,_0x801901){_0x4a9a5d=_0x4a9a5d-0x1b2;var _0x3ce863=a54_0x3ce8();var _0x320c9b=_0x3ce863[_0x4a9a5d];return _0x320c9b;}(function(_0x459b72,_0x475233){var _0x3e376a=a54_0x320c,_0x5b0c3d=_0x459b72();while(!![]){try{var _0x550dbd=parseInt(_0x3e376a(0x1b6))/0x1+parseInt(_0x3e376a(0x1b3))/0x2*(parseInt(_0x3e376a(0x1bf))/0x3)+parseInt(_0x3e376a(0x1b7))/0x4*(parseInt(_0x3e376a(0x1ba))/0x5)+-parseInt(_0x3e376a(0x1b8))/0x6*(-parseInt(_0x3e376a(0x1b4))/0x7)+parseInt(_0x3e376a(0x1bd))/0x8*(parseInt(_0x3e376a(0x1be))/0x9)+-parseInt(_0x3e376a(0x1bc))/0xa*(-parseInt(_0x3e376a(0x1b5))/0xb)+-parseInt(_0x3e376a(0x1b2))/0xc;if(_0x550dbd===_0x475233)break;else _0x5b0c3d['push'](_0x5b0c3d['shift']());}catch(_0x38aa20){_0x5b0c3d['push'](_0x5b0c3d['shift']());}}}(a54_0x3ce8,0xdcfcc));function a54_0x3ce8(){var _0x2ac077=['3667458rQaSJI','description','11665EAOKDm','url','10PLafDj','344BUmvxc','11088uPGsbn','14082zJMoUi','46853484okyzys','302xvQKbu','7MTwdCD','7100907BwzhjL','1643235owYrwr','1968BQEGTe'];a54_0x3ce8=function(){return _0x2ac077;};return a54_0x3ce8();}export function asDryRunResult(_0x246808,_0x256b12){var _0x1d0c49=a54_0x320c;return Object['defineProperties'](_0x246808,{'method':{'value':_0x256b12['method'],'enumerable':![]},'url':{'value':_0x256b12[_0x1d0c49(0x1bb)],'enumerable':![]},..._0x256b12[_0x1d0c49(0x1b9)]?{'description':{'value':_0x256b12[_0x1d0c49(0x1b9)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x24cea4=a55_0x2899;(function(_0x505a44,_0x2f806f){const _0x2dca5d=a55_0x2899,_0x2dfd8f=_0x505a44();while(!![]){try{const _0x13f429=-parseInt(_0x2dca5d(0xd1))/0x1+parseInt(_0x2dca5d(0xe2))/0x2+parseInt(_0x2dca5d(0xe1))/0x3+parseInt(_0x2dca5d(0xd2))/0x4+-parseInt(_0x2dca5d(0xc3))/0x5*(parseInt(_0x2dca5d(0xba))/0x6)+parseInt(_0x2dca5d(0xdf))/0x7+parseInt(_0x2dca5d(0xd4))/0x8;if(_0x13f429===_0x2f806f)break;else _0x2dfd8f['push'](_0x2dfd8f['shift']());}catch(_0x38f307){_0x2dfd8f['push'](_0x2dfd8f['shift']());}}}(a55_0x2414,0x93acd));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x24cea4(0xe0),'type':a55_0x24cea4(0xc6),'required':!![],'description':'Source\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x24cea4(0xc1),'type':a55_0x24cea4(0xc6),'required':!![],'description':a55_0x24cea4(0xdd)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':'to-datasetcode','type':a55_0x24cea4(0xc6),'required':!![],'description':a55_0x24cea4(0xc2)};function a55_0x2414(){const _0x42d803=['from-datasetcode','2006508YesjyQ','758134KuwZms','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','12URxBch','MANY_TO_MANY','datasetcode','to-column','MYSQL','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','from-column','Target\x20DB_TABLE\x20dataset\x20code','1319245MoDIDb','global','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','string','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','dbtype','to-label-column','sqlcode','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','Write\x20to\x20the\x20global\x20configuration','MANY_TO_ONE','POSTGRESQL','cardinality','ONE_TO_MANY','416981UblbUp','1219320GTKXqC','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','1355760QSNAUP','appcode','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','boolean','number','ONE_TO_ONE','from-dblink-id','skip-connection-test','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','Target\x20field\x20name','191471OCpAzT'];a55_0x2414=function(){return _0x42d803;};return a55_0x2414();}export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x24cea4(0xbd),'type':'string','required':!![],'description':a55_0x24cea4(0xde)};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x24cea4(0xda),'type':a55_0x24cea4(0xd8),'description':a55_0x24cea4(0xcb)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x24cea4(0xc9),'type':a55_0x24cea4(0xc6),'description':a55_0x24cea4(0xc0)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x24cea4(0xcf),'type':a55_0x24cea4(0xc6),'enum':[a55_0x24cea4(0xd9),a55_0x24cea4(0xd0),a55_0x24cea4(0xcd),a55_0x24cea4(0xbb)],'description':a55_0x24cea4(0xc7)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x24cea4(0xc4),'type':'boolean','default':![],'description':a55_0x24cea4(0xcc)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x24cea4(0xd6)};export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':a55_0x24cea4(0xb9),'pattern':DATASET_CODE_PATTERN};function a55_0x2899(_0x5389c1,_0x41f1ba){_0x5389c1=_0x5389c1-0xb9;const _0x2414bb=a55_0x2414();let _0x28996d=_0x2414bb[_0x5389c1];return _0x28996d;}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x24cea4(0xbc),'description':a55_0x24cea4(0xb9)};export const SQLCODE_FLAG={'name':a55_0x24cea4(0xca),'type':'string','required':!![],'description':a55_0x24cea4(0xc5),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x24cea4(0xbf)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x24cea4(0xd5),'type':'string','required':![],'description':a55_0x24cea4(0xd3)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x24cea4(0xd8),'required':!![],'description':a55_0x24cea4(0xdc)};export const DB_TYPE_FLAG={'name':a55_0x24cea4(0xc8),'type':'string','required':!![],'description':'Database\x20product\x20type','enum':[a55_0x24cea4(0xbe),a55_0x24cea4(0xce)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x24cea4(0xdb),'type':a55_0x24cea4(0xd7),'description':a55_0x24cea4(0xe3)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23d17f,_0x66d773){const _0x3aece6=a56_0x3d70,_0x5d2b0d=_0x23d17f();while(!![]){try{const _0x13c0de=-parseInt(_0x3aece6(0x1bd))/0x1*(parseInt(_0x3aece6(0x1ba))/0x2)+-parseInt(_0x3aece6(0x1c5))/0x3+-parseInt(_0x3aece6(0x1c3))/0x4+parseInt(_0x3aece6(0x1c9))/0x5*(-parseInt(_0x3aece6(0x1c4))/0x6)+parseInt(_0x3aece6(0x1c2))/0x7*(-parseInt(_0x3aece6(0x1bc))/0x8)+parseInt(_0x3aece6(0x1c8))/0x9*(parseInt(_0x3aece6(0x1c1))/0xa)+parseInt(_0x3aece6(0x1c6))/0xb;if(_0x13c0de===_0x66d773)break;else _0x5d2b0d['push'](_0x5d2b0d['shift']());}catch(_0x848775){_0x5d2b0d['push'](_0x5d2b0d['shift']());}}}(a56_0x1e68,0xde217));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x5bf15a){const _0x34b913=a56_0x3d70;if(_0x5bf15a>=BYTES_PER_MB){const _0xdc0768=Math[_0x34b913(0x1bb)](_0x5bf15a/BYTES_PER_MB*0x64)/0x64;return _0xdc0768[_0x34b913(0x1b8)](0x2)+'\x20MB';}return _0x5bf15a+'\x20B';}export function requireDevelopmentUploadFile(_0x8643b7,_0x70487d){const _0x44e4ca=a56_0x3d70,_0x5f65c7=_0x8643b7[_0x44e4ca(0x1c0)]();if(!_0x5f65c7)throw CliErrors[_0x44e4ca(0x1be)](_0x70487d+'\x20path\x20is\x20required.');if(!existsSync(_0x5f65c7))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x5f65c7);const _0x767999=statSync(_0x5f65c7);if(!_0x767999[_0x44e4ca(0x1bf)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5f65c7);if(_0x767999[_0x44e4ca(0x1b9)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x44e4ca(0x1be)](_0x44e4ca(0x1c7)+_0x5f65c7+'\x20('+formatBytes(_0x767999[_0x44e4ca(0x1b9)])+')');return{'path':_0x5f65c7,'size':_0x767999[_0x44e4ca(0x1b9)]};}function a56_0x3d70(_0x5491af,_0x2b7650){_0x5491af=_0x5491af-0x1b8;const _0x1e683f=a56_0x1e68();let _0x3d706e=_0x1e683f[_0x5491af];return _0x3d706e;}function a56_0x1e68(){const _0x2414a8=['9052840KjIyNx','4153135FQYpCq','288632ajTiPe','329808RCeGNu','5190291LSIcIe','43408651AYBIgQ','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','18ssUSlX','70PZSiKT','toFixed','size','1681850DXBgxT','ceil','8lukZlQ','2bAQgac','validation','isFile','trim'];a56_0x1e68=function(){return _0x2414a8;};return a56_0x1e68();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x3f1a(_0x2248f6,_0x396243){_0x2248f6=_0x2248f6-0x123;const _0x134532=a57_0x1345();let _0x3f1a85=_0x134532[_0x2248f6];return _0x3f1a85;}(function(_0x1e8d5f,_0x18497a){const _0x397b24=a57_0x3f1a,_0xb991d2=_0x1e8d5f();while(!![]){try{const _0x958d28=parseInt(_0x397b24(0x127))/0x1*(parseInt(_0x397b24(0x12c))/0x2)+parseInt(_0x397b24(0x126))/0x3*(-parseInt(_0x397b24(0x12b))/0x4)+-parseInt(_0x397b24(0x125))/0x5+-parseInt(_0x397b24(0x132))/0x6*(parseInt(_0x397b24(0x12d))/0x7)+-parseInt(_0x397b24(0x131))/0x8+parseInt(_0x397b24(0x128))/0x9*(-parseInt(_0x397b24(0x124))/0xa)+parseInt(_0x397b24(0x123))/0xb;if(_0x958d28===_0x18497a)break;else _0xb991d2['push'](_0xb991d2['shift']());}catch(_0x145c5e){_0xb991d2['push'](_0xb991d2['shift']());}}}(a57_0x1345,0x4eec9));export function validateAppcode(_0x2c17a2){const _0x53a290=a57_0x3f1a,_0x5f2bf8=_0x2c17a2[_0x53a290(0x12e)]();if(!_0x5f2bf8)return{'valid':![],'message':_0x53a290(0x12f)};if(_0x5f2bf8[_0x53a290(0x130)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x53a290(0x12a)](_0x5f2bf8))return{'valid':![],'message':_0x53a290(0x129)};return{'valid':!![]};}function a57_0x1345(){const _0x13f30e=['24vvWeHF','7tczHTL','trim','App\x20Code\x20cannot\x20be\x20empty','length','1975856mkEVLB','1998246nNmSoN','19868255oYxWhA','3710170HbkTTI','1049790RemTKj','222mZgIqi','20156NJhvzI','9YFYMIJ','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','30476baBZyF'];a57_0x1345=function(){return _0x13f30e;};return a57_0x1345();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a58_0x5d77(_0xe9f60f,_0x40cded){_0xe9f60f=_0xe9f60f-0x137;const _0x5dbe43=a58_0x5dbe();let _0x5d775f=_0x5dbe43[_0xe9f60f];return _0x5d775f;}function a58_0x5dbe(){const _0x122790=['Usage:\x20','Global','3467432AHIqWY','call','bool','324650TuUMUf','\x20deleted','237002WwjkaM','validation','\x22\x20is\x20not\x20deletable.','\x20config\x20delete\x20<key>\x20[--global]','key','config','defaultApp','routing','riskLevel','prototype','9csiPIr','has','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20already\x20absent','3tZrdjK','1774684JiCKAK','508230RYqLps','inherit','boolean','global','trim','156366ZtjZIJ','delete','write','4070730ShmkOc','args','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','2UsidGF','Delete\x20a\x20config\x20value\x20from\x20one\x20scope'];a58_0x5dbe=function(){return _0x122790;};return a58_0x5dbe();}const a58_0x490954=a58_0x5d77;(function(_0x376f6b,_0x2c75f2){const _0x2d43c6=a58_0x5d77,_0x2e5aa5=_0x376f6b();while(!![]){try{const _0x3105ce=-parseInt(_0x2d43c6(0x156))/0x1*(parseInt(_0x2d43c6(0x13b))/0x2)+parseInt(_0x2d43c6(0x149))/0x3*(parseInt(_0x2d43c6(0x14a))/0x4)+-parseInt(_0x2d43c6(0x139))/0x5+parseInt(_0x2d43c6(0x14b))/0x6+-parseInt(_0x2d43c6(0x150))/0x7+-parseInt(_0x2d43c6(0x15a))/0x8*(-parseInt(_0x2d43c6(0x145))/0x9)+-parseInt(_0x2d43c6(0x153))/0xa;if(_0x3105ce===_0x2c75f2)break;else _0x2e5aa5['push'](_0x2e5aa5['shift']());}catch(_0x531480){_0x2e5aa5['push'](_0x2e5aa5['shift']());}}}(a58_0x5dbe,0x3843e));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_0x490954(0x14c)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x490954(0x141),a58_0x490954(0x142)]);async function execute(_0x1fc3b8){const _0x59d0ef=a58_0x490954,_0x5cbcd4=_0x1fc3b8[_0x59d0ef(0x154)][0x0]?.[_0x59d0ef(0x14f)]();if(!_0x5cbcd4)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x59d0ef(0x158)+CLI_BIN_NAME+_0x59d0ef(0x13e));if(_0x5cbcd4===_0x59d0ef(0x143))throw CliErrors[_0x59d0ef(0x13c)](_0x59d0ef(0x147));if(!isTopLevelConfigKey(_0x5cbcd4)&&!EXTRA_DELETABLE_KEYS[_0x59d0ef(0x146)](_0x5cbcd4)&&!LEGACY_DELETABLE_KEYS[_0x59d0ef(0x146)](_0x5cbcd4))throw CliErrors[_0x59d0ef(0x13c)]('Top-level\x20key\x20\x22'+_0x5cbcd4+_0x59d0ef(0x13d),'Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.');const _0x1c3cb8=resolveWriteScope({'global':_0x1fc3b8[_0x59d0ef(0x138)](_0x59d0ef(0x14e))}),_0x192e23=readScopedConfig(_0x1c3cb8),_0x518d28=Object[_0x59d0ef(0x144)]['hasOwnProperty'][_0x59d0ef(0x137)](_0x192e23,_0x5cbcd4);_0x518d28&&(delete _0x192e23[_0x5cbcd4],writeScopedConfig(_0x192e23,_0x1c3cb8));const _0x4420c7=_0x1c3cb8===_0x59d0ef(0x14e)?_0x59d0ef(0x159):'Project';return{'ok':!![],'message':_0x518d28?'✓\x20'+_0x4420c7+'\x20'+_0x5cbcd4+_0x59d0ef(0x13a):'✓\x20'+_0x4420c7+'\x20'+_0x5cbcd4+_0x59d0ef(0x148),'data':{'key':_0x5cbcd4,'scope':_0x1c3cb8,'changed':_0x518d28}};}export const configDeleteDefinition={'service':a58_0x490954(0x140),'command':a58_0x490954(0x151),'description':a58_0x490954(0x157),'risk':a58_0x490954(0x152),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x490954(0x13f),'description':'Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','required':!![]}],'flags':[{'name':a58_0x490954(0x14e),'type':a58_0x490954(0x14d),'description':a58_0x490954(0x155),'default':![]}],'execute':execute};
|