@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- 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/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.d.ts +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/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.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/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.d.ts +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.d.ts +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.d.ts +4 -0
- 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.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.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-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/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +5 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/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 +2 -2
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/sql-mybatis.md +12 -8
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +8 -6
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a43_0x43c118=a43_0x2eb4;(function(_0x372a49,_0x51da0e){const _0x12cd34=a43_0x2eb4,_0x37478c=_0x372a49();while(!![]){try{const _0x3cd443=parseInt(_0x12cd34(0x199))/0x1+-parseInt(_0x12cd34(0x13f))/0x2+-parseInt(_0x12cd34(0x16f))/0x3*(-parseInt(_0x12cd34(0x150))/0x4)+-parseInt(_0x12cd34(0x12f))/0x5+-parseInt(_0x12cd34(0x18e))/0x6*(parseInt(_0x12cd34(0x13d))/0x7)+parseInt(_0x12cd34(0x18b))/0x8*(parseInt(_0x12cd34(0x16d))/0x9)+parseInt(_0x12cd34(0x133))/0xa;if(_0x3cd443===_0x51da0e)break;else _0x37478c['push'](_0x37478c['shift']());}catch(_0x21a676){_0x37478c['push'](_0x37478c['shift']());}}}(a43_0x3d5e,0x65486));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';function a43_0x2eb4(_0x542375,_0x5df4a9){_0x542375=_0x542375-0x125;const _0x3d5e62=a43_0x3d5e();let _0x2eb422=_0x3d5e62[_0x542375];return _0x2eb422;}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':a43_0x43c118(0x185),'command':'push','description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a43_0x43c118(0x139),'structuredErrors':!![],'flags':[{'name':a43_0x43c118(0x164),'type':a43_0x43c118(0x16e),'description':a43_0x43c118(0x12a),'enum':[a43_0x43c118(0x149),'ENDPOINT',a43_0x43c118(0x177)]},{'name':'name','type':a43_0x43c118(0x16e),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a43_0x43c118(0x17d),'type':a43_0x43c118(0x165),'description':a43_0x43c118(0x15b)}],async 'dryRun'(_0x269912){const _0x3a99af=a43_0x43c118,_0x3709fd=loadBffProjectConfig(_0x269912[_0x3a99af(0x15c)]),_0x3c3393=await readBffLockFile(_0x3709fd[_0x3a99af(0x175)]),{appLock:_0x1bc278}=ensureLockScope(_0x3c3393??createEmptyBffLock(),_0x269912[_0x3a99af(0x15c)],_0x3709fd[_0x3a99af(0x162)],'push'),_0x27abfb=await getTargetFunctions(_0x3709fd,_0x269912),_0x189bb4=_0x27abfb[_0x3a99af(0x148)](_0x48f537=>_0x48f537[_0x3a99af(0x164)]===_0x3a99af(0x177))?await scanLocalBffFunctions(_0x3709fd,'HOOK'):_0x27abfb,_0x4f2f00=await buildHookMaps(_0x269912[_0x3a99af(0x15c)],_0x269912[_0x3a99af(0x173)],_0x189bb4,_0x1bc278,_0x269912[_0x3a99af(0x126)]||_0x269912[_0x3a99af(0x154)]?.[_0x3a99af(0x147)]||_0x269912[_0x3a99af(0x154)]?.[_0x3a99af(0x14e)]),_0x56237b=_0x269912[_0x3a99af(0x151)]('force'),_0x4a6027=[];for(const _0x681517 of _0x27abfb){const _0x3245ec=await computeFileHash(_0x681517[_0x3a99af(0x145)]),_0x342b4f=_0x1bc278['functions'][_0x681517[_0x3a99af(0x17c)]],_0x17d9f4=!!_0x342b4f&&_0x342b4f[_0x3a99af(0x170)]===_0x3245ec,_0x4d9508=_0x4f2f00[_0x3a99af(0x174)][_0x3a99af(0x15d)](_0x681517['lockKey']),_0x19fd25=!!_0x342b4f?.[_0x3a99af(0x131)]&&_0x342b4f[_0x3a99af(0x13e)]==null&&(_0x56237b||!_0x17d9f4),_0xd2f81b=_0x19fd25?missingRemoteVersionConflict(_0x681517,_0x342b4f):undefined,_0x2a8c76=_0x4f2f00[_0x3a99af(0x157)][_0x3a99af(0x14b)](_0x681517[_0x3a99af(0x17c)])?'failed':!_0x56237b&&_0x17d9f4?_0x3a99af(0x17e):_0xd2f81b?_0x3a99af(0x186):'would_push';_0x4a6027[_0x3a99af(0x13b)]({'lockKey':_0x681517[_0x3a99af(0x17c)],'filePath':_0x681517['filePath'],'remoteId':_0x342b4f?.['remoteId']??null,'mode':_0x342b4f?.[_0x3a99af(0x131)]?_0x3a99af(0x16c):_0x3a99af(0x17a),'status':_0x2a8c76,..._0x4f2f00['failures'][_0x3a99af(0x14b)](_0x681517[_0x3a99af(0x17c)])?{'error':_0x4f2f00['failures'][_0x3a99af(0x15d)](_0x681517[_0x3a99af(0x17c)])}:{},..._0xd2f81b?{'conflict':_0xd2f81b}:{},..._0x4f2f00['existingHooks'][_0x3a99af(0x14b)](_0x681517[_0x3a99af(0x17c)])?{'datasetCode':_0x342b4f?.[_0x3a99af(0x161)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x681517[_0x3a99af(0x17c)])]}:{},..._0x4d9508?{'alias':_0x4d9508[_0x3a99af(0x166)]??null,'datasetCode':_0x4d9508[_0x3a99af(0x161)],'operationType':_0x681517['operationType'],'functionNode':_0x681517[_0x3a99af(0x18c)],'warnings':_0x4d9508[_0x3a99af(0x184)]}:{}});}return{'method':_0x3a99af(0x16a),'url':_0x3a99af(0x171),'body':{'appCode':_0x269912[_0x3a99af(0x15c)],'force':_0x56237b,'files':_0x4a6027,'cacheClearAtRuntime':_0x4a6027[_0x3a99af(0x148)](_0x3c82ef=>_0x3c82ef[_0x3a99af(0x125)]==='would_push'),'cacheClearAtRuntimeTimes':_0x4a6027[_0x3a99af(0x148)](_0x1b1dce=>_0x1b1dce[_0x3a99af(0x125)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3a99af(0x155)+_0x4a6027[_0x3a99af(0x146)]+_0x3a99af(0x178)};},async 'execute'(_0x3b78c6){const _0x5dc1fe=a43_0x43c118,_0x30fe88=loadBffProjectConfig(_0x3b78c6['appCode']),_0x28d1c4=await readBffLockFile(_0x30fe88[_0x5dc1fe(0x175)]),{lockData:_0x4ada86,appLock:_0x5bef99}=ensureLockScope(_0x28d1c4??createEmptyBffLock(),_0x3b78c6[_0x5dc1fe(0x15c)],_0x30fe88[_0x5dc1fe(0x162)],_0x5dc1fe(0x13b)),_0x1f0779=await getTargetFunctions(_0x30fe88,_0x3b78c6);if(_0x1f0779[_0x5dc1fe(0x146)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x5dc1fe(0x15a)};const _0x34851e=_0x3b78c6[_0x5dc1fe(0x151)]('force'),_0x5547a2=JSON[_0x5dc1fe(0x169)](JSON[_0x5dc1fe(0x132)](_0x4ada86)),_0x118cec=_0x5547a2[_0x5dc1fe(0x152)][_0x3b78c6[_0x5dc1fe(0x15c)]];if(!_0x118cec)throw new Error(_0x5dc1fe(0x19a)+_0x3b78c6[_0x5dc1fe(0x15c)]+_0x5dc1fe(0x138));const _0x1e9352=_0x1f0779['some'](_0x313b40=>_0x313b40['type']==='HOOK')?await scanLocalBffFunctions(_0x30fe88,_0x5dc1fe(0x177)):_0x1f0779,_0x51a275=await buildHookMaps(_0x3b78c6['appCode'],_0x3b78c6[_0x5dc1fe(0x173)],_0x1e9352,_0x118cec,_0x3b78c6['selectedAppName']||_0x3b78c6[_0x5dc1fe(0x154)]?.[_0x5dc1fe(0x147)]||_0x3b78c6[_0x5dc1fe(0x154)]?.[_0x5dc1fe(0x14e)]),_0x370a64=[],_0xdc0981=[],_0xc3a9fa=[],_0x14841b=[];for(const _0x175da7 of _0x1f0779){const _0x1e5f7c=_0x51a275['failures']['get'](_0x175da7[_0x5dc1fe(0x17c)]);if(_0x1e5f7c){_0x14841b[_0x5dc1fe(0x13b)]({'lockKey':_0x175da7[_0x5dc1fe(0x17c)],'error':_0x1e5f7c});continue;}const _0x165284=await computeFileHash(_0x175da7[_0x5dc1fe(0x145)]),_0xa29fac=_0x118cec['functions'][_0x175da7[_0x5dc1fe(0x17c)]];if(!_0x34851e&&_0xa29fac&&_0xa29fac[_0x5dc1fe(0x170)]===_0x165284){_0xdc0981['push']({'lockKey':_0x175da7[_0x5dc1fe(0x17c)],'reason':_0x5dc1fe(0x17e)});continue;}if(_0xa29fac?.['remoteId']&&_0xa29fac[_0x5dc1fe(0x13e)]==null){_0xc3a9fa[_0x5dc1fe(0x13b)](missingRemoteVersionConflict(_0x175da7,_0xa29fac));continue;}try{await uploadSingleFunction(_0x3b78c6['appCode'],_0x175da7,_0x118cec,_0x51a275);const _0x10c2b6=_0x118cec[_0x5dc1fe(0x167)][_0x175da7[_0x5dc1fe(0x17c)]];_0x370a64[_0x5dc1fe(0x13b)]({'lockKey':_0x175da7[_0x5dc1fe(0x17c)],'remoteId':_0x10c2b6?.[_0x5dc1fe(0x131)]??0x0});}catch(_0x1e2d49){const _0x2aed77=remoteVersionChangedConflict(_0x175da7,_0xa29fac,_0x1e2d49);if(_0x2aed77){_0xc3a9fa[_0x5dc1fe(0x13b)](_0x2aed77);continue;}_0x14841b[_0x5dc1fe(0x13b)]({'lockKey':_0x175da7[_0x5dc1fe(0x17c)],'error':_0x1e2d49 instanceof Error?_0x1e2d49[_0x5dc1fe(0x12d)]:String(_0x1e2d49)});}}_0x118cec[_0x5dc1fe(0x176)]=new Date()[_0x5dc1fe(0x168)](),await writeBffLockFile(_0x30fe88[_0x5dc1fe(0x175)],_0x5547a2),await waitForUploadedLockEntries(_0x30fe88[_0x5dc1fe(0x175)],_0x3b78c6[_0x5dc1fe(0x15c)],_0x370a64['map'](_0x1654fa=>_0x1654fa[_0x5dc1fe(0x17c)]));let _0x4c46e3={'attempted':![],'cleared':![]};if(_0x370a64['length']>0x0)try{let _0x28e05d='';for(let _0xf1aaaa=0x0;_0xf1aaaa<CACHE_CLEAR_ATTEMPTS;_0xf1aaaa+=0x1){_0x28e05d=await clearBffScriptCache(),_0xf1aaaa<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4c46e3={'attempted':!![],'cleared':!![],'message':_0x28e05d||_0x5dc1fe(0x187)};}catch(_0x356e51){_0x4c46e3={'attempted':!![],'cleared':![],'error':_0x356e51 instanceof Error?_0x356e51['message']:String(_0x356e51)};}const _0x127fa7=_0x14841b[_0x5dc1fe(0x146)]===0x0&&(_0x4c46e3[_0x5dc1fe(0x198)]?_0x4c46e3[_0x5dc1fe(0x135)]:!![]),_0x4502ff=_0x127fa7,_0x1f8852=_0x4c46e3['attempted']?_0x4c46e3[_0x5dc1fe(0x135)]?_0x5dc1fe(0x15e):'runtime\x20cache\x20clear\x20failed':_0x5dc1fe(0x192);return{'ok':_0x4502ff,'data':{'uploaded':_0x370a64,'skipped':_0xdc0981,'conflicts':_0xc3a9fa,'failed':_0x14841b,'cacheClear':_0x4c46e3,'warnings':[...[..._0x51a275[_0x5dc1fe(0x174)][_0x5dc1fe(0x181)]()]['flatMap'](_0x14f170=>_0x14f170['warnings']),...[..._0x51a275[_0x5dc1fe(0x128)]][_0x5dc1fe(0x14c)](existingHookWarning)]},'message':formatPushMessage(_0x370a64[_0x5dc1fe(0x146)],_0xdc0981[_0x5dc1fe(0x146)],_0xc3a9fa[_0x5dc1fe(0x146)],_0x14841b['length'],_0x1f8852)};}};function missingRemoteVersionConflict(_0x25ed0e,_0x2fade2){const _0x5496b5=a43_0x43c118;return remoteVersionConflict(_0x25ed0e,_0x2fade2,_0x5496b5(0x197),_0x5496b5(0x188));}function remoteVersionChangedConflict(_0x299bf9,_0x13d875,_0x303b01){const _0x37a81e=a43_0x43c118;if(!_0x13d875?.[_0x37a81e(0x131)]||_0x13d875[_0x37a81e(0x13e)]==null||!isRemoteVersionConflict(_0x303b01))return undefined;return remoteVersionConflict(_0x299bf9,_0x13d875,'BFF_REMOTE_VERSION_CHANGED',_0x37a81e(0x142));}function remoteVersionConflict(_0x1f5073,_0x37a574,_0x2e63e4,_0x2559d6){const _0x1a3c19=a43_0x43c118;return{'code':_0x2e63e4,'lockKey':_0x1f5073[_0x1a3c19(0x17c)],'filePath':_0x1f5073[_0x1a3c19(0x145)],'remoteId':_0x37a574[_0x1a3c19(0x131)],..._0x37a574[_0x1a3c19(0x13e)]!=null?{'expectedVersion':_0x37a574['version']}:{},'message':_0x2559d6,'nextAction':{'action':_0x1a3c19(0x190),'command':CLI_BIN_NAME+_0x1a3c19(0x196)+_0x37a574[_0x1a3c19(0x131)]+_0x1a3c19(0x14f),'requiresReview':!![],'message':_0x1a3c19(0x18f)}};}function isRemoteVersionConflict(_0x5d2502){const _0x5ae8eb=a43_0x43c118,_0x510128=_0x5d2502 instanceof Error?_0x5d2502[_0x5ae8eb(0x12d)]:String(_0x5d2502),_0x40e088=getPlatformErrorCode(_0x5d2502)??'';return[_0x510128,_0x40e088][_0x5ae8eb(0x148)](_0x126978=>/(?: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[_0x5ae8eb(0x14a)](_0x126978));}function a43_0x3d5e(){const _0x4027f1=['HOOK','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','profileName','create','delete','lockKey','force','unchanged','filter','set','values','\x20conflict','after','warnings','bff','conflict','Runtime\x20script\x20cache\x20cleared.','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','requires','Push\x20complete:\x20','504hkpiLD','functionNode','scriptType','6hSPUTY','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.','review_remote_and_merge','operationType','runtime\x20cache\x20not\x20needed',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','EXISTING_HOOK_BINDING_PRESERVED','join','\x20bff\x20detail\x20--id\x20','BFF_REMOTE_VERSION_MISSING','attempted','543394vAzKDK','Lock\x20scope\x20for\x20app\x20\x22','status','selectedAppName','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','existingHooks','\x20uploaded','Push\x20only\x20this\x20script\x20type','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','afterScriptId','message','functionName','3502245DtILBC','every','remoteId','stringify','9616930ohZhSE','validation','cleared','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','\x20skipped','\x22\x20not\x20found\x20after\x20ensureLockScope.','write','startsWith','push','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','773584hbCygz','version','1472258FHKdXZ','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','description','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','utf8','HOOK_DATASET_NOT_FOUND:','filePath','length','currentApp','some','COMMON','test','has','map','name','defaultApp','\x20--format\x20compress','422780kpbELY','bool','apps','\x20resolution','mergedCli','Would\x20inspect\x20','size','failures','flatMap','script','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Force\x20push\x20ignoring\x20hash\x20protection','appCode','get','runtime\x20cache\x20cleared','str','Local\x20function\x20not\x20found:\x20','datasetCode','scriptsRoot','beforeScriptId','type','boolean','alias','functions','toISOString','parse','POST','dataset','update','50166XOVQMy','string','3AhHxIT','hash','/api/management/library/scripts/save','add','apiDir','resolutions','lockFilePath','lastSync'];a43_0x3d5e=function(){return _0x4027f1;};return a43_0x3d5e();}function formatPushMessage(_0x12ad29,_0x15c1ca,_0x83af63,_0x47ad46,_0x176693){const _0x1cc8cf=a43_0x43c118,_0x3313d1=[_0x1cc8cf(0x18a)+_0x12ad29+_0x1cc8cf(0x129),_0x15c1ca+_0x1cc8cf(0x137)];_0x83af63>0x0&&_0x3313d1['push'](_0x83af63+_0x1cc8cf(0x182)+(_0x83af63===0x1?'':'s')+'\x20'+(_0x83af63===0x1?_0x1cc8cf(0x189):'require')+_0x1cc8cf(0x153));if(_0x47ad46>0x0)_0x3313d1[_0x1cc8cf(0x13b)](_0x47ad46+'\x20failed');return _0x3313d1[_0x1cc8cf(0x13b)](_0x176693),_0x3313d1[_0x1cc8cf(0x195)](',\x20');}async function getTargetFunctions(_0x175773,_0x93c12f){const _0xf03b1f=a43_0x43c118,_0x1d0472=_0x93c12f['str'](_0xf03b1f(0x164)),_0x38377a=_0x93c12f[_0xf03b1f(0x15f)](_0xf03b1f(0x14d)),_0x5964a7=normalizeBffType(_0x1d0472)??undefined;if(_0x38377a&&!_0x5964a7)throw CliErrors[_0xf03b1f(0x134)](_0xf03b1f(0x136));const _0x3ce44e=await scanLocalBffFunctions(_0x175773,_0x5964a7);if(_0x38377a){const _0xe2608d=_0x3ce44e['filter'](_0x333db6=>_0x333db6[_0xf03b1f(0x14d)]===_0x38377a);if(_0xe2608d['length']===0x0)throw CliErrors['validation'](_0xf03b1f(0x160)+_0x5964a7+'/'+_0x38377a);return _0xe2608d;}return _0x3ce44e;}function existingHookWarning(_0x4e86de){const _0x15ccf1=a43_0x43c118;return{'code':_0x15ccf1(0x194),'lockKey':_0x4e86de,'message':_0x15ccf1(0x127)};}async function buildHookMaps(_0x34f074,_0x53b7b9,_0xc1d4c4,_0x186663,_0x5c4010){const _0x16f622=a43_0x43c118,_0x2c1a9e=_0xc1d4c4[_0x16f622(0x148)](_0x1a57c0=>_0x1a57c0[_0x16f622(0x164)]===_0x16f622(0x177));if(!_0x2c1a9e)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x223705=resolveApiModelSource(_0x53b7b9,_0x34f074,_0x5c4010),_0x23b154=loadAliasMap(_0x53b7b9,undefined,_0x223705['filePath'],_0x223705[_0x16f622(0x179)]);assertUnambiguousHookAliases(_0x23b154);const _0x18fef7=[..._0x23b154['map'](_0x25e8de=>[_0x25e8de[_0x16f622(0x166)],_0x25e8de[_0x16f622(0x161)]]),...trackedHookDirectoryMappings(_0x186663)['map'](_0x451352=>[_0x451352[_0x16f622(0x166)],_0x451352['datasetCode']])],_0xff7340=await listDatasets(_0x34f074);assertUnambiguousHookDirectoryMappings(_0x18fef7[_0x16f622(0x14c)](([_0xee0d0a,_0x27f34d])=>({'alias':_0xee0d0a,'datasetCode':_0x27f34d})));const _0x39a8d2=buildHookDirectoryIndexes(_0xff7340,_0x18fef7),_0x4d3e16=new Map(),_0x255aa1=preflightPushHookDirectories(_0xc1d4c4,_0x186663,_0x39a8d2,_0x4d3e16),_0x3c69f3=new Set(),_0x3b7de1=_0xc1d4c4[_0x16f622(0x17f)](_0x224ac0=>_0x4d3e16['get'](_0x224ac0[_0x16f622(0x17c)])?.[_0x16f622(0x13a)](_0x16f622(0x144))&&_0x186663['functions'][_0x224ac0['lockKey']]?.['remoteId']&&_0x186663['functions'][_0x224ac0[_0x16f622(0x17c)]]?.['datasetCode']);if(_0x3b7de1[_0x16f622(0x146)]>0x0){let _0x3e1651;try{_0x3e1651=await getBffScriptStatistics(_0x34f074);}catch(_0x578d93){for(const _0x4351e5 of _0x3b7de1)_0x4d3e16[_0x16f622(0x180)](_0x4351e5[_0x16f622(0x17c)],_0x16f622(0x140)+(_0x578d93 instanceof Error?_0x578d93['message']:String(_0x578d93)));return{'resolutions':_0x255aa1,'failures':_0x4d3e16,'existingHooks':_0x3c69f3};}for(const _0x6a8efe of _0x3b7de1){const _0x1e2780=_0x186663[_0x16f622(0x167)][_0x6a8efe['lockKey']];try{const _0x5a756c=new Set(_0xc1d4c4[_0x16f622(0x17f)](_0x3abd4f=>_0x3abd4f[_0x16f622(0x164)]===_0x16f622(0x177)&&_0x186663['functions'][_0x3abd4f['lockKey']]?.[_0x16f622(0x161)]===_0x1e2780[_0x16f622(0x161)])[_0x16f622(0x14c)](_0x6f6dbe=>_0x6f6dbe[_0x16f622(0x166)]));if(_0x5a756c[_0x16f622(0x156)]>0x1)throw CliErrors[_0x16f622(0x134)]('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x14ed8b=_0x3e1651[_0x16f622(0x158)](_0x2fabe1=>[{'datasetCode':_0x2fabe1['datasetCode'],'operationType':snakeToCamel(_0x2fabe1[_0x16f622(0x191)]),'functionNode':'before','id':_0x2fabe1[_0x16f622(0x163)]},{'datasetCode':_0x2fabe1[_0x16f622(0x161)],'operationType':snakeToCamel(_0x2fabe1[_0x16f622(0x191)]),'functionNode':_0x16f622(0x183),'id':_0x2fabe1[_0x16f622(0x12c)]}])['filter'](_0x4574f7=>_0x4574f7['id']===_0x1e2780[_0x16f622(0x131)]),_0x28cdb9=await getBffScriptInfo(_0x1e2780[_0x16f622(0x131)]);if(_0x28cdb9['id']!==_0x1e2780['remoteId']||_0x28cdb9[_0x16f622(0x15c)]!==_0x34f074||_0x28cdb9[_0x16f622(0x18d)]!==_0x16f622(0x177)||_0x28cdb9[_0x16f622(0x12e)]!==_0x6a8efe[_0x16f622(0x14d)]||_0x1e2780[_0x16f622(0x13e)]==null||_0x28cdb9[_0x16f622(0x13e)]!==_0x1e2780['version']||_0x14ed8b['length']!==0x1||_0x14ed8b[0x0]['datasetCode']!==_0x1e2780[_0x16f622(0x161)]||_0x14ed8b[0x0][_0x16f622(0x191)]!==_0x6a8efe[_0x16f622(0x191)]||_0x14ed8b[0x0]['functionNode']!==_0x6a8efe[_0x16f622(0x18c)]||_0x1e2780['operationType']!==_0x6a8efe[_0x16f622(0x191)]||_0x1e2780[_0x16f622(0x18c)]!==_0x6a8efe[_0x16f622(0x18c)])throw CliErrors[_0x16f622(0x134)](_0x16f622(0x13c));_0x3c69f3[_0x16f622(0x172)](_0x6a8efe[_0x16f622(0x17c)]),_0x4d3e16[_0x16f622(0x17b)](_0x6a8efe[_0x16f622(0x17c)]);}catch(_0x278c13){_0x4d3e16['set'](_0x6a8efe['lockKey'],_0x278c13 instanceof Error?_0x278c13[_0x16f622(0x12d)]:String(_0x278c13));}}}return{'resolutions':_0x255aa1,'failures':_0x4d3e16,'existingHooks':_0x3c69f3};}async function uploadSingleFunction(_0x1e8f63,_0x267863,_0x47fc75,_0x14d17c){const _0x160df8=a43_0x43c118,_0x4cf6ca=await readFile(_0x267863[_0x160df8(0x145)],_0x160df8(0x143)),_0x451076=await computeFileHash(_0x267863[_0x160df8(0x145)]),_0x127552=_0x47fc75[_0x160df8(0x167)][_0x267863[_0x160df8(0x17c)]];if(_0x127552?.[_0x160df8(0x131)]&&_0x127552[_0x160df8(0x13e)]==null)throw CliErrors[_0x160df8(0x134)](_0x267863['lockKey']+_0x160df8(0x193));let _0x2d2034=extractScriptDescription(_0x4cf6ca);if(!_0x2d2034&&_0x127552?.['remoteId']){const _0x105764=await getBffScriptInfo(_0x127552[_0x160df8(0x131)]);_0x2d2034=_0x105764[_0x160df8(0x141)]||undefined;}const _0x5123b8={'appCode':_0x1e8f63,'functionName':_0x267863['name'],'scriptType':_0x267863[_0x160df8(0x164)],'scriptContent':_0x4cf6ca};if(_0x127552?.[_0x160df8(0x131)])_0x5123b8['id']=_0x127552[_0x160df8(0x131)];if(_0x127552?.[_0x160df8(0x13e)]!=null)_0x5123b8[_0x160df8(0x13e)]=_0x127552[_0x160df8(0x13e)];if(_0x2d2034)_0x5123b8[_0x160df8(0x141)]=_0x2d2034;if(_0x267863[_0x160df8(0x164)]==='HOOK'){const _0x45cc38=_0x14d17c[_0x160df8(0x174)]['get'](_0x267863[_0x160df8(0x17c)]);if(!_0x45cc38&&!_0x14d17c[_0x160df8(0x128)][_0x160df8(0x14b)](_0x267863[_0x160df8(0x17c)])||!_0x267863[_0x160df8(0x191)]||!_0x267863[_0x160df8(0x18c)])throw CliErrors[_0x160df8(0x134)]('Incomplete\x20HOOK\x20path:\x20'+_0x267863[_0x160df8(0x17c)]);_0x45cc38&&(_0x5123b8['datasetId']=_0x45cc38[_0x160df8(0x16b)]['id'],_0x5123b8['operationType']=_0x267863['operationType']),_0x5123b8[_0x160df8(0x18c)]=_0x267863[_0x160df8(0x18c)];}const _0x3023a7=await saveBffScript(_0x5123b8),_0x443800=_0x3023a7['id'],_0x52b236=_0x3023a7[_0x160df8(0x159)]??await getBffScriptInfo(_0x443800),_0x2f8cc1={'hash':_0x451076,'remoteId':_0x443800,'version':_0x52b236[_0x160df8(0x13e)]};if(_0x267863[_0x160df8(0x164)]==='HOOK'){const _0x333b47=_0x14d17c[_0x160df8(0x174)]['get'](_0x267863[_0x160df8(0x17c)]);if(!_0x333b47){_0x47fc75[_0x160df8(0x167)][_0x267863['lockKey']]={..._0x127552,..._0x2f8cc1};return;}_0x2f8cc1[_0x160df8(0x166)]=_0x333b47['alias']??_0x127552?.[_0x160df8(0x166)],_0x2f8cc1[_0x160df8(0x161)]=_0x333b47[_0x160df8(0x161)],_0x2f8cc1[_0x160df8(0x191)]=_0x267863[_0x160df8(0x191)],_0x2f8cc1[_0x160df8(0x18c)]=_0x267863[_0x160df8(0x18c)];}_0x47fc75[_0x160df8(0x167)][_0x267863[_0x160df8(0x17c)]]=_0x2f8cc1;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2a59a0,_0x4bb002,_0x594986){const _0x46cb01=a43_0x43c118;if(_0x594986[_0x46cb01(0x146)]===0x0)return;for(let _0x30ee18=0x0;_0x30ee18<LOCK_SETTLE_RETRY_COUNT;_0x30ee18+=0x1){const _0x476e59=await readBffLockFile(_0x2a59a0),_0x222403=_0x476e59?.[_0x46cb01(0x152)]?.[_0x4bb002]?.[_0x46cb01(0x167)]??{},_0x7f4052=_0x594986[_0x46cb01(0x130)](_0x4ddf1b=>!!_0x222403[_0x4ddf1b]?.['remoteId']);if(_0x7f4052)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x46cb01(0x12b)+_0x594986[_0x46cb01(0x195)](',\x20')+'.');}
|
|
1
|
+
function a43_0x950a(_0x46094f,_0x5c0f0a){_0x46094f=_0x46094f-0x161;const _0x2cf83c=a43_0x2cf8();let _0x950a9d=_0x2cf83c[_0x46094f];return _0x950a9d;}const a43_0x4f2448=a43_0x950a;(function(_0x2d0c5c,_0x22dcb6){const _0x1f6b3b=a43_0x950a,_0x21f4f9=_0x2d0c5c();while(!![]){try{const _0x3bcf28=-parseInt(_0x1f6b3b(0x182))/0x1+parseInt(_0x1f6b3b(0x1a7))/0x2+parseInt(_0x1f6b3b(0x171))/0x3+-parseInt(_0x1f6b3b(0x1c5))/0x4*(-parseInt(_0x1f6b3b(0x195))/0x5)+-parseInt(_0x1f6b3b(0x19c))/0x6*(-parseInt(_0x1f6b3b(0x1a9))/0x7)+parseInt(_0x1f6b3b(0x162))/0x8+-parseInt(_0x1f6b3b(0x19f))/0x9*(parseInt(_0x1f6b3b(0x1b3))/0xa);if(_0x3bcf28===_0x22dcb6)break;else _0x21f4f9['push'](_0x21f4f9['shift']());}catch(_0x1532fc){_0x21f4f9['push'](_0x21f4f9['shift']());}}}(a43_0x2cf8,0x6e206));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':a43_0x4f2448(0x16a),'command':a43_0x4f2448(0x1bf),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':'write','structuredErrors':!![],'flags':[{'name':a43_0x4f2448(0x1c1),'type':'string','description':a43_0x4f2448(0x1bb),'enum':['COMMON','ENDPOINT','HOOK']},{'name':a43_0x4f2448(0x17c),'type':a43_0x4f2448(0x1b6),'description':a43_0x4f2448(0x17e)},{'name':'force','type':a43_0x4f2448(0x1b7),'description':a43_0x4f2448(0x164)}],async 'dryRun'(_0x2b36ad){const _0x23f155=a43_0x4f2448,_0x422fa4=loadBffProjectConfig(_0x2b36ad[_0x23f155(0x18f)]),_0x5a7d5b=await readBffLockFile(_0x422fa4['lockFilePath']),{appLock:_0x21e258}=ensureLockScope(_0x5a7d5b??createEmptyBffLock(),_0x2b36ad['appCode'],_0x422fa4[_0x23f155(0x188)],'push'),_0x542718=await getTargetFunctions(_0x422fa4,_0x2b36ad),_0x1291b2=_0x542718[_0x23f155(0x16e)](_0x45d124=>_0x45d124[_0x23f155(0x1c1)]===_0x23f155(0x1aa))?await scanLocalBffFunctions(_0x422fa4,_0x23f155(0x1aa)):_0x542718,_0x4d57cb=await buildHookMaps(_0x2b36ad[_0x23f155(0x18f)],_0x2b36ad[_0x23f155(0x194)],_0x1291b2,_0x21e258,_0x2b36ad[_0x23f155(0x18a)]||_0x2b36ad['mergedCli']?.[_0x23f155(0x19d)]||_0x2b36ad['mergedCli']?.[_0x23f155(0x176)]),_0x2aea38=_0x2b36ad[_0x23f155(0x167)](_0x23f155(0x1ca)),_0x8407be=[];for(const _0x481ba9 of _0x542718){const _0x44aab7=await computeFileHash(_0x481ba9[_0x23f155(0x1a0)]),_0x47380a=_0x21e258['functions'][_0x481ba9[_0x23f155(0x1bd)]],_0x3d0487=!!_0x47380a&&_0x47380a[_0x23f155(0x1c6)]===_0x44aab7,_0xd5393f=_0x4d57cb[_0x23f155(0x1a4)][_0x23f155(0x186)](_0x481ba9[_0x23f155(0x1bd)]),_0x3949cb=!!_0x47380a?.[_0x23f155(0x16d)]&&_0x47380a[_0x23f155(0x1ae)]==null&&(_0x2aea38||!_0x3d0487),_0x4fe5ca=_0x3949cb?missingRemoteVersionConflict(_0x481ba9,_0x47380a):undefined,_0x17c84c=_0x4d57cb[_0x23f155(0x165)]['has'](_0x481ba9[_0x23f155(0x1bd)])?_0x23f155(0x1c7):!_0x2aea38&&_0x3d0487?_0x23f155(0x172):_0x4fe5ca?_0x23f155(0x1a2):_0x23f155(0x17f);_0x8407be[_0x23f155(0x1bf)]({'lockKey':_0x481ba9[_0x23f155(0x1bd)],'filePath':_0x481ba9[_0x23f155(0x1a0)],'remoteId':_0x47380a?.[_0x23f155(0x16d)]??null,'mode':_0x47380a?.['remoteId']?_0x23f155(0x1bc):'create','status':_0x17c84c,..._0x4d57cb[_0x23f155(0x165)][_0x23f155(0x187)](_0x481ba9[_0x23f155(0x1bd)])?{'error':_0x4d57cb['failures'][_0x23f155(0x186)](_0x481ba9[_0x23f155(0x1bd)])}:{},..._0x4fe5ca?{'conflict':_0x4fe5ca}:{},..._0x4d57cb[_0x23f155(0x17a)][_0x23f155(0x187)](_0x481ba9[_0x23f155(0x1bd)])?{'datasetCode':_0x47380a?.[_0x23f155(0x1b0)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x481ba9[_0x23f155(0x1bd)])]}:{},..._0xd5393f?{'alias':_0xd5393f[_0x23f155(0x1ad)]??null,'datasetCode':_0xd5393f[_0x23f155(0x1b0)],'operationType':_0x481ba9[_0x23f155(0x18e)],'functionNode':_0x481ba9[_0x23f155(0x191)],'warnings':_0xd5393f[_0x23f155(0x1a1)]}:{}});}return{'method':_0x23f155(0x19b),'url':_0x23f155(0x1ab),'body':{'appCode':_0x2b36ad['appCode'],'force':_0x2aea38,'files':_0x8407be,'cacheClearAtRuntime':_0x8407be['some'](_0xeffaaa=>_0xeffaaa[_0x23f155(0x1b1)]===_0x23f155(0x17f)),'cacheClearAtRuntimeTimes':_0x8407be[_0x23f155(0x16e)](_0x4f2065=>_0x4f2065[_0x23f155(0x1b1)]===_0x23f155(0x17f))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x23f155(0x180)+_0x8407be['length']+_0x23f155(0x178)};},async 'execute'(_0xa2adb4){const _0x42bbe9=a43_0x4f2448,_0xb86725=loadBffProjectConfig(_0xa2adb4[_0x42bbe9(0x18f)]),_0x227b6b=await readBffLockFile(_0xb86725['lockFilePath']),{lockData:_0x19b868,appLock:_0x493890}=ensureLockScope(_0x227b6b??createEmptyBffLock(),_0xa2adb4[_0x42bbe9(0x18f)],_0xb86725[_0x42bbe9(0x188)],_0x42bbe9(0x1bf)),_0x46932f=await getTargetFunctions(_0xb86725,_0xa2adb4);if(_0x46932f['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x42bbe9(0x193)};const _0xcb4b0e=_0xa2adb4['bool'](_0x42bbe9(0x1ca)),_0x43eda9=JSON['parse'](JSON[_0x42bbe9(0x189)](_0x19b868)),_0x14b763=_0x43eda9[_0x42bbe9(0x185)][_0xa2adb4[_0x42bbe9(0x18f)]];if(!_0x14b763)throw new Error(_0x42bbe9(0x1be)+_0xa2adb4[_0x42bbe9(0x18f)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x198614=_0x46932f[_0x42bbe9(0x16e)](_0x142a28=>_0x142a28[_0x42bbe9(0x1c1)]===_0x42bbe9(0x1aa))?await scanLocalBffFunctions(_0xb86725,_0x42bbe9(0x1aa)):_0x46932f,_0x14153f=await buildHookMaps(_0xa2adb4['appCode'],_0xa2adb4[_0x42bbe9(0x194)],_0x198614,_0x14b763,_0xa2adb4['selectedAppName']||_0xa2adb4[_0x42bbe9(0x175)]?.[_0x42bbe9(0x19d)]||_0xa2adb4[_0x42bbe9(0x175)]?.[_0x42bbe9(0x176)]),_0x27d517=[],_0x304e7f=[],_0x5af3fc=[],_0x2f9b4f=[];for(const _0x3b9580 of _0x46932f){const _0x2692cb=_0x14153f[_0x42bbe9(0x165)]['get'](_0x3b9580[_0x42bbe9(0x1bd)]);if(_0x2692cb){_0x2f9b4f[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580['lockKey'],'error':_0x2692cb});continue;}const _0x3ed7ef=await computeFileHash(_0x3b9580['filePath']),_0x1a540a=_0x14b763[_0x42bbe9(0x1a5)][_0x3b9580['lockKey']];if(!_0xcb4b0e&&_0x1a540a&&_0x1a540a[_0x42bbe9(0x1c6)]===_0x3ed7ef){_0x304e7f['push']({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'reason':_0x42bbe9(0x172)});continue;}if(_0x1a540a?.['remoteId']&&_0x1a540a['version']==null){_0x5af3fc[_0x42bbe9(0x1bf)](missingRemoteVersionConflict(_0x3b9580,_0x1a540a));continue;}try{await uploadSingleFunction(_0xa2adb4[_0x42bbe9(0x18f)],_0x3b9580,_0x14b763,_0x14153f);const _0x58feb0=_0x14b763[_0x42bbe9(0x1a5)][_0x3b9580['lockKey']];_0x27d517[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'remoteId':_0x58feb0?.[_0x42bbe9(0x16d)]??0x0});}catch(_0x315484){const _0x34da75=remoteVersionChangedConflict(_0x3b9580,_0x1a540a,_0x315484);if(_0x34da75){_0x5af3fc[_0x42bbe9(0x1bf)](_0x34da75);continue;}_0x2f9b4f[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'error':_0x315484 instanceof Error?_0x315484[_0x42bbe9(0x183)]:String(_0x315484)});}}_0x14b763[_0x42bbe9(0x174)]=new Date()['toISOString'](),await writeBffLockFile(_0xb86725[_0x42bbe9(0x1a6)],_0x43eda9),await waitForUploadedLockEntries(_0xb86725[_0x42bbe9(0x1a6)],_0xa2adb4['appCode'],_0x27d517['map'](_0x59ebd5=>_0x59ebd5[_0x42bbe9(0x1bd)]));let _0x5131bd={'attempted':![],'cleared':![]};if(_0x27d517[_0x42bbe9(0x16c)]>0x0)try{let _0x28c192='';for(let _0x39969f=0x0;_0x39969f<CACHE_CLEAR_ATTEMPTS;_0x39969f+=0x1){_0x28c192=await clearBffScriptCache(),_0x39969f<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5131bd={'attempted':!![],'cleared':!![],'message':_0x28c192||_0x42bbe9(0x16f)};}catch(_0x43763a){_0x5131bd={'attempted':!![],'cleared':![],'error':_0x43763a instanceof Error?_0x43763a['message']:String(_0x43763a)};}const _0x3c74ba=_0x2f9b4f[_0x42bbe9(0x16c)]===0x0&&(_0x5131bd[_0x42bbe9(0x1b8)]?_0x5131bd['cleared']:!![]),_0x46154a=_0x3c74ba,_0x5ac130=_0x5131bd[_0x42bbe9(0x1b8)]?_0x5131bd['cleared']?'runtime\x20cache\x20cleared':_0x42bbe9(0x1a3):'runtime\x20cache\x20not\x20needed';return{'ok':_0x46154a,'data':{'uploaded':_0x27d517,'skipped':_0x304e7f,'conflicts':_0x5af3fc,'failed':_0x2f9b4f,'cacheClear':_0x5131bd,'warnings':[...[..._0x14153f[_0x42bbe9(0x1a4)]['values']()][_0x42bbe9(0x19a)](_0x52071c=>_0x52071c[_0x42bbe9(0x1a1)]),...[..._0x14153f[_0x42bbe9(0x17a)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x27d517[_0x42bbe9(0x16c)],_0x304e7f[_0x42bbe9(0x16c)],_0x5af3fc[_0x42bbe9(0x16c)],_0x2f9b4f[_0x42bbe9(0x16c)],_0x5ac130)};}};function missingRemoteVersionConflict(_0xa80c67,_0x4f50e1){const _0x3a2a8d=a43_0x4f2448;return remoteVersionConflict(_0xa80c67,_0x4f50e1,'BFF_REMOTE_VERSION_MISSING',_0x3a2a8d(0x1af));}function remoteVersionChangedConflict(_0x248eae,_0x3c73f8,_0x323108){const _0x559e3c=a43_0x4f2448;if(!_0x3c73f8?.[_0x559e3c(0x16d)]||_0x3c73f8[_0x559e3c(0x1ae)]==null||!isRemoteVersionConflict(_0x323108))return undefined;return remoteVersionConflict(_0x248eae,_0x3c73f8,_0x559e3c(0x1b4),_0x559e3c(0x166));}function a43_0x2cf8(){const _0x135702=['\x20conflict','alias','version','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','datasetCode','status','\x20uploaded','2390mCUeso','BFF_REMOTE_VERSION_CHANGED','validation','string','boolean','attempted','every','startsWith','Push\x20only\x20this\x20script\x20type','update','lockKey','Lock\x20scope\x20for\x20app\x20\x22','push','description','type','afterScriptId','str','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','196204CgCTyq','hash','failed','filter','requires','force','\x20bff\x20detail\x20--id\x20','script','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','2988248xWgcWh','join','Force\x20push\x20ignoring\x20hash\x20protection','failures','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','bool','review_remote_and_merge','map','bff','HOOK_DATASET_NOT_FOUND:','length','remoteId','some','Runtime\x20script\x20cache\x20cleared.','set','1165863GewnJX','unchanged','Incomplete\x20HOOK\x20path:\x20','lastSync','mergedCli','defaultApp','beforeScriptId','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','add','existingHooks','Local\x20function\x20not\x20found:\x20','name','after','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','would_push','Would\x20inspect\x20','Push\x20complete:\x20','276550grSkdt','message','profileName','apps','get','has','scriptsRoot','stringify','selectedAppName','delete','\x20--format\x20compress','require','operationType','appCode','\x20skipped','functionNode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','No\x20local\x20Backend\x20Function\x20scripts\x20found.','apiDir','35iUYoca','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','test','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20failed','flatMap','POST','18HnwROJ','currentApp','utf8','38853BvTtri','filePath','warnings','conflict','runtime\x20cache\x20clear\x20failed','resolutions','functions','lockFilePath','936034hsLhwa','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','433685GRHiUN','HOOK','/api/management/library/scripts/save'];a43_0x2cf8=function(){return _0x135702;};return a43_0x2cf8();}function remoteVersionConflict(_0x2733b3,_0x574545,_0x179f3f,_0x2becf4){const _0x2a1420=a43_0x4f2448;return{'code':_0x179f3f,'lockKey':_0x2733b3[_0x2a1420(0x1bd)],'filePath':_0x2733b3[_0x2a1420(0x1a0)],'remoteId':_0x574545[_0x2a1420(0x16d)],..._0x574545[_0x2a1420(0x1ae)]!=null?{'expectedVersion':_0x574545[_0x2a1420(0x1ae)]}:{},'message':_0x2becf4,'nextAction':{'action':_0x2a1420(0x168),'command':CLI_BIN_NAME+_0x2a1420(0x1cb)+_0x574545['remoteId']+_0x2a1420(0x18c),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function isRemoteVersionConflict(_0x1c617e){const _0x3b991a=a43_0x4f2448,_0x23edf8=_0x1c617e instanceof Error?_0x1c617e['message']:String(_0x1c617e),_0x91acd5=getPlatformErrorCode(_0x1c617e)??'';return[_0x23edf8,_0x91acd5][_0x3b991a(0x16e)](_0xc1b544=>/(?: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[_0x3b991a(0x197)](_0xc1b544));}function formatPushMessage(_0x15a766,_0x58d5df,_0x48333a,_0x54c0ad,_0x1e8c94){const _0x33d1c9=a43_0x4f2448,_0x252d13=[_0x33d1c9(0x181)+_0x15a766+_0x33d1c9(0x1b2),_0x58d5df+_0x33d1c9(0x190)];_0x48333a>0x0&&_0x252d13[_0x33d1c9(0x1bf)](_0x48333a+_0x33d1c9(0x1ac)+(_0x48333a===0x1?'':'s')+'\x20'+(_0x48333a===0x1?_0x33d1c9(0x1c9):_0x33d1c9(0x18d))+'\x20resolution');if(_0x54c0ad>0x0)_0x252d13['push'](_0x54c0ad+_0x33d1c9(0x199));return _0x252d13[_0x33d1c9(0x1bf)](_0x1e8c94),_0x252d13[_0x33d1c9(0x163)](',\x20');}async function getTargetFunctions(_0x5db66a,_0x39e716){const _0x139076=a43_0x4f2448,_0x3d8443=_0x39e716[_0x139076(0x1c3)](_0x139076(0x1c1)),_0x429b67=_0x39e716['str'](_0x139076(0x17c)),_0x51e4bd=normalizeBffType(_0x3d8443)??undefined;if(_0x429b67&&!_0x51e4bd)throw CliErrors[_0x139076(0x1b5)](_0x139076(0x1a8));const _0xdab12d=await scanLocalBffFunctions(_0x5db66a,_0x51e4bd);if(_0x429b67){const _0x5f3531=_0xdab12d[_0x139076(0x1c8)](_0x23baa5=>_0x23baa5['name']===_0x429b67);if(_0x5f3531[_0x139076(0x16c)]===0x0)throw CliErrors[_0x139076(0x1b5)](_0x139076(0x17b)+_0x51e4bd+'/'+_0x429b67);return _0x5f3531;}return _0xdab12d;}function existingHookWarning(_0x16c182){const _0x570359=a43_0x4f2448;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x16c182,'message':_0x570359(0x198)};}async function buildHookMaps(_0x29ab11,_0x154c86,_0x348264,_0x36db32,_0x1892b9){const _0x8073c5=a43_0x4f2448,_0x5c15ae=_0x348264[_0x8073c5(0x16e)](_0x37ddff=>_0x37ddff['type']===_0x8073c5(0x1aa));if(!_0x5c15ae)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x3d2fbb=resolveApiModelSource(_0x154c86,_0x29ab11,_0x1892b9),_0x4ffb24=loadAliasMap(_0x154c86,undefined,_0x3d2fbb['filePath'],_0x3d2fbb[_0x8073c5(0x184)]);assertUnambiguousHookAliases(_0x4ffb24);const _0x17a007=[..._0x4ffb24[_0x8073c5(0x169)](_0x4c185b=>[_0x4c185b[_0x8073c5(0x1ad)],_0x4c185b['datasetCode']]),...trackedHookDirectoryMappings(_0x36db32)['map'](_0x2fac4f=>[_0x2fac4f[_0x8073c5(0x1ad)],_0x2fac4f['datasetCode']])],_0x490e16=await listDatasets(_0x29ab11);assertUnambiguousHookDirectoryMappings(_0x17a007['map'](([_0x35fe97,_0x24bbde])=>({'alias':_0x35fe97,'datasetCode':_0x24bbde})));const _0x513554=buildHookDirectoryIndexes(_0x490e16,_0x17a007),_0x1b6033=new Map(),_0xfad8ad=preflightPushHookDirectories(_0x348264,_0x36db32,_0x513554,_0x1b6033),_0x14bd67=new Set(),_0x27592d=_0x348264[_0x8073c5(0x1c8)](_0x179448=>_0x1b6033[_0x8073c5(0x186)](_0x179448[_0x8073c5(0x1bd)])?.[_0x8073c5(0x1ba)](_0x8073c5(0x16b))&&_0x36db32['functions'][_0x179448[_0x8073c5(0x1bd)]]?.[_0x8073c5(0x16d)]&&_0x36db32[_0x8073c5(0x1a5)][_0x179448[_0x8073c5(0x1bd)]]?.[_0x8073c5(0x1b0)]);if(_0x27592d['length']>0x0){let _0x312fae;try{_0x312fae=await getBffScriptStatistics(_0x29ab11);}catch(_0x2cbc15){for(const _0x208459 of _0x27592d)_0x1b6033[_0x8073c5(0x170)](_0x208459[_0x8073c5(0x1bd)],_0x8073c5(0x1c4)+(_0x2cbc15 instanceof Error?_0x2cbc15['message']:String(_0x2cbc15)));return{'resolutions':_0xfad8ad,'failures':_0x1b6033,'existingHooks':_0x14bd67};}for(const _0x2b8a83 of _0x27592d){const _0x3ff00e=_0x36db32['functions'][_0x2b8a83[_0x8073c5(0x1bd)]];try{const _0x39ab95=new Set(_0x348264[_0x8073c5(0x1c8)](_0x4c2c9d=>_0x4c2c9d[_0x8073c5(0x1c1)]===_0x8073c5(0x1aa)&&_0x36db32[_0x8073c5(0x1a5)][_0x4c2c9d[_0x8073c5(0x1bd)]]?.['datasetCode']===_0x3ff00e['datasetCode'])[_0x8073c5(0x169)](_0x3cd37a=>_0x3cd37a[_0x8073c5(0x1ad)]));if(_0x39ab95['size']>0x1)throw CliErrors['validation'](_0x8073c5(0x161));const _0x2604fb=_0x312fae['flatMap'](_0x19d8ac=>[{'datasetCode':_0x19d8ac['datasetCode'],'operationType':snakeToCamel(_0x19d8ac['operationType']),'functionNode':'before','id':_0x19d8ac[_0x8073c5(0x177)]},{'datasetCode':_0x19d8ac[_0x8073c5(0x1b0)],'operationType':snakeToCamel(_0x19d8ac[_0x8073c5(0x18e)]),'functionNode':_0x8073c5(0x17d),'id':_0x19d8ac[_0x8073c5(0x1c2)]}])[_0x8073c5(0x1c8)](_0x5d6bd5=>_0x5d6bd5['id']===_0x3ff00e[_0x8073c5(0x16d)]),_0x55de8f=await getBffScriptInfo(_0x3ff00e[_0x8073c5(0x16d)]);if(_0x55de8f['id']!==_0x3ff00e[_0x8073c5(0x16d)]||_0x55de8f[_0x8073c5(0x18f)]!==_0x29ab11||_0x55de8f['scriptType']!==_0x8073c5(0x1aa)||_0x55de8f['functionName']!==_0x2b8a83[_0x8073c5(0x17c)]||_0x3ff00e[_0x8073c5(0x1ae)]==null||_0x55de8f[_0x8073c5(0x1ae)]!==_0x3ff00e[_0x8073c5(0x1ae)]||_0x2604fb[_0x8073c5(0x16c)]!==0x1||_0x2604fb[0x0][_0x8073c5(0x1b0)]!==_0x3ff00e[_0x8073c5(0x1b0)]||_0x2604fb[0x0][_0x8073c5(0x18e)]!==_0x2b8a83[_0x8073c5(0x18e)]||_0x2604fb[0x0]['functionNode']!==_0x2b8a83[_0x8073c5(0x191)]||_0x3ff00e[_0x8073c5(0x18e)]!==_0x2b8a83[_0x8073c5(0x18e)]||_0x3ff00e[_0x8073c5(0x191)]!==_0x2b8a83[_0x8073c5(0x191)])throw CliErrors[_0x8073c5(0x1b5)](_0x8073c5(0x196));_0x14bd67[_0x8073c5(0x179)](_0x2b8a83[_0x8073c5(0x1bd)]),_0x1b6033[_0x8073c5(0x18b)](_0x2b8a83[_0x8073c5(0x1bd)]);}catch(_0x28a51e){_0x1b6033[_0x8073c5(0x170)](_0x2b8a83['lockKey'],_0x28a51e instanceof Error?_0x28a51e['message']:String(_0x28a51e));}}}return{'resolutions':_0xfad8ad,'failures':_0x1b6033,'existingHooks':_0x14bd67};}async function uploadSingleFunction(_0x48a79e,_0x29b908,_0x4c7caa,_0x194b00){const _0x334703=a43_0x4f2448,_0x224da8=await readFile(_0x29b908[_0x334703(0x1a0)],_0x334703(0x19e)),_0x1172ca=await computeFileHash(_0x29b908[_0x334703(0x1a0)]),_0x2b316e=_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]];if(_0x2b316e?.['remoteId']&&_0x2b316e[_0x334703(0x1ae)]==null)throw CliErrors[_0x334703(0x1b5)](_0x29b908['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x26ffb2=extractScriptDescription(_0x224da8);if(!_0x26ffb2&&_0x2b316e?.['remoteId']){const _0x4112e1=await getBffScriptInfo(_0x2b316e['remoteId']);_0x26ffb2=_0x4112e1[_0x334703(0x1c0)]||undefined;}const _0x1af32c={'appCode':_0x48a79e,'functionName':_0x29b908[_0x334703(0x17c)],'scriptType':_0x29b908[_0x334703(0x1c1)],'scriptContent':_0x224da8};if(_0x2b316e?.[_0x334703(0x16d)])_0x1af32c['id']=_0x2b316e['remoteId'];if(_0x2b316e?.[_0x334703(0x1ae)]!=null)_0x1af32c['version']=_0x2b316e['version'];if(_0x26ffb2)_0x1af32c['description']=_0x26ffb2;if(_0x29b908[_0x334703(0x1c1)]===_0x334703(0x1aa)){const _0x42b9d8=_0x194b00[_0x334703(0x1a4)]['get'](_0x29b908['lockKey']);if(!_0x42b9d8&&!_0x194b00[_0x334703(0x17a)]['has'](_0x29b908[_0x334703(0x1bd)])||!_0x29b908[_0x334703(0x18e)]||!_0x29b908[_0x334703(0x191)])throw CliErrors[_0x334703(0x1b5)](_0x334703(0x173)+_0x29b908[_0x334703(0x1bd)]);_0x42b9d8&&(_0x1af32c['datasetId']=_0x42b9d8['dataset']['id'],_0x1af32c[_0x334703(0x18e)]=_0x29b908[_0x334703(0x18e)]),_0x1af32c[_0x334703(0x191)]=_0x29b908[_0x334703(0x191)];}const _0x6aa4b9=await saveBffScript(_0x1af32c),_0xf3c576=_0x6aa4b9['id'],_0x4f656d=_0x6aa4b9[_0x334703(0x1cc)]??await getBffScriptInfo(_0xf3c576),_0x5a788c={'hash':_0x1172ca,'remoteId':_0xf3c576,'version':_0x4f656d['version']};if(_0x29b908[_0x334703(0x1c1)]===_0x334703(0x1aa)){const _0x4f54a2=_0x194b00[_0x334703(0x1a4)]['get'](_0x29b908[_0x334703(0x1bd)]);if(!_0x4f54a2){_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]]={..._0x2b316e,..._0x5a788c};return;}_0x5a788c[_0x334703(0x1ad)]=_0x4f54a2[_0x334703(0x1ad)]??_0x2b316e?.[_0x334703(0x1ad)],_0x5a788c[_0x334703(0x1b0)]=_0x4f54a2[_0x334703(0x1b0)],_0x5a788c['operationType']=_0x29b908[_0x334703(0x18e)],_0x5a788c[_0x334703(0x191)]=_0x29b908[_0x334703(0x191)];}_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]]=_0x5a788c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5bcc3b,_0xcc6c3d,_0x237ef8){const _0x51389f=a43_0x4f2448;if(_0x237ef8[_0x51389f(0x16c)]===0x0)return;for(let _0x44c83d=0x0;_0x44c83d<LOCK_SETTLE_RETRY_COUNT;_0x44c83d+=0x1){const _0x25a808=await readBffLockFile(_0x5bcc3b),_0x21c886=_0x25a808?.[_0x51389f(0x185)]?.[_0xcc6c3d]?.['functions']??{},_0x4af4ac=_0x237ef8[_0x51389f(0x1b9)](_0x49c00d=>!!_0x21c886[_0x49c00d]?.[_0x51389f(0x16d)]);if(_0x4af4ac)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x51389f(0x192)+_0x237ef8['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a44_0x1762c7=a44_0x42ad;(function(_0x4ef5ac,_0x4371f6){const _0x429108=a44_0x42ad,_0x38382b=_0x4ef5ac();while(!![]){try{const _0x413100=parseInt(_0x429108(0x1a3))/0x1+parseInt(_0x429108(0x19c))/0x2*(-parseInt(_0x429108(0x18b))/0x3)+parseInt(_0x429108(0x188))/0x4*(parseInt(_0x429108(0x19a))/0x5)+parseInt(_0x429108(0x190))/0x6*(parseInt(_0x429108(0x194))/0x7)+-parseInt(_0x429108(0x181))/0x8+parseInt(_0x429108(0x180))/0x9+-parseInt(_0x429108(0x18d))/0xa;if(_0x413100===_0x4371f6)break;else _0x38382b['push'](_0x38382b['shift']());}catch(_0x5e9705){_0x38382b['push'](_0x38382b['shift']());}}}(a44_0x2a0b,0xe7469));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a44_0x2a0b(){const _0x4a9e4c=['9BXpXYf','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','1804250JQjJOF','push','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','792DPYZuj','remote','scriptsRoot','bool','9982eTFvko','alias','filePath','apiDir','length','mergedCli','5lYEEZK','read','389406iUJxTQ','bff','boolean','functions','all','status','appCode','1822823aZhHzZ','\x20modified,\x20','map','3686004OMszgH','11627832YhjVSU','\x20unchanged','selectedAppName','lockKey','defaultApp','\x20added,\x20','lockFilePath','2978828CRzpJX','datasetCode','profileName'];a44_0x2a0b=function(){return _0x4a9e4c;};return a44_0x2a0b();}function a44_0x42ad(_0x1416fd,_0x93b01c){_0x1416fd=_0x1416fd-0x17e;const _0x2a0bb4=a44_0x2a0b();let _0x42ad1b=_0x2a0bb4[_0x1416fd];return _0x42ad1b;}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':a44_0x1762c7(0x19d),'command':a44_0x1762c7(0x1a1),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a44_0x1762c7(0x19b),'flags':[{'name':a44_0x1762c7(0x191),'type':a44_0x1762c7(0x19e),'description':a44_0x1762c7(0x18c)}],async 'execute'(_0xb20bb4){const _0x584593=a44_0x1762c7,_0x5045b8=loadBffProjectConfig(_0xb20bb4[_0x584593(0x1a2)]),_0x3261bf=await readBffLockFile(_0x5045b8[_0x584593(0x187)]),{appLock:_0x365804}=ensureLockScope(_0x3261bf??createEmptyBffLock(),_0xb20bb4[_0x584593(0x1a2)],_0x5045b8[_0x584593(0x192)],_0x584593(0x1a1)),_0x250f43=await scanLocalBffFunctions(_0x5045b8),_0x121631=[],_0x2e4dec=[],_0x39a5cb=[];for(const _0x2e7011 of _0x250f43){const _0x44ab37=await computeFileHash(_0x2e7011[_0x584593(0x196)]),_0x2a7241=_0x365804['functions'][_0x2e7011['lockKey']];if(!_0x2a7241)_0x121631[_0x584593(0x18e)](_0x2e7011[_0x584593(0x184)]);else _0x2a7241['hash']!==_0x44ab37?_0x2e4dec['push'](_0x2e7011[_0x584593(0x184)]):_0x39a5cb['push'](_0x2e7011[_0x584593(0x184)]);}const _0x1d5b8c=[];if(_0xb20bb4[_0x584593(0x193)](_0x584593(0x191))){const _0x1cec53=resolveApiModelSource(_0xb20bb4[_0x584593(0x197)],_0xb20bb4[_0x584593(0x1a2)],_0xb20bb4[_0x584593(0x183)]||_0xb20bb4[_0x584593(0x199)]?.['currentApp']||_0xb20bb4[_0x584593(0x199)]?.[_0x584593(0x185)]),_0x34d3ba=loadAliasMap(_0xb20bb4['apiDir'],undefined,_0x1cec53['filePath'],_0x1cec53[_0x584593(0x18a)]),_0x3680b9=new Map(_0x34d3ba['map'](_0x449772=>[_0x449772[_0x584593(0x189)],_0x449772[_0x584593(0x195)]])),[_0x34ac9d,_0x39d5f8]=await Promise[_0x584593(0x1a0)]([listBffScripts(_0xb20bb4['appCode']),getBffScriptStatistics(_0xb20bb4[_0x584593(0x1a2)])]),_0x132724=createHookLocationMap(_0x39d5f8),_0x5e3b8c=new Set(_0x250f43[_0x584593(0x17f)](_0x19671d=>_0x19671d[_0x584593(0x184)]));for(const _0x1b2217 of _0x34ac9d){const _0x82a7dd=resolveRemoteScriptTarget(_0x5045b8,_0x1b2217,_0x132724,_0x365804[_0x584593(0x19f)],_0x3680b9);_0x82a7dd&&!_0x5e3b8c['has'](_0x82a7dd['lockKey'])&&_0x1d5b8c[_0x584593(0x18e)](_0x82a7dd[_0x584593(0x184)]);}}const _0x546dbd=_0x121631[_0x584593(0x198)]===0x0&&_0x2e4dec[_0x584593(0x198)]===0x0&&_0x1d5b8c['length']===0x0;return{'ok':!![],'data':{'added':_0x121631,'modified':_0x2e4dec,'unchanged':_0x39a5cb,'remoteOnly':_0x1d5b8c},'message':_0x546dbd?_0x584593(0x18f):_0x121631[_0x584593(0x198)]+_0x584593(0x186)+_0x2e4dec[_0x584593(0x198)]+_0x584593(0x17e)+_0x39a5cb[_0x584593(0x198)]+_0x584593(0x182)+(_0x1d5b8c[_0x584593(0x198)]>0x0?',\x20'+_0x1d5b8c['length']+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x501385=a45_0x4a36;function a45_0x4a36(_0x5c3ed6,_0x51d945){_0x5c3ed6=_0x5c3ed6-0xc6;const _0x51d387=a45_0x51d3();let _0x4a36e8=_0x51d387[_0x5c3ed6];return _0x4a36e8;}(function(_0x90b36f,_0x7b012d){const _0x34b6ed=a45_0x4a36,_0x41b9b4=_0x90b36f();while(!![]){try{const _0x2a17e9=-parseInt(_0x34b6ed(0xda))/0x1*(parseInt(_0x34b6ed(0xd0))/0x2)+parseInt(_0x34b6ed(0xcc))/0x3+-parseInt(_0x34b6ed(0xd9))/0x4*(parseInt(_0x34b6ed(0xe1))/0x5)+parseInt(_0x34b6ed(0xcd))/0x6+-parseInt(_0x34b6ed(0xd4))/0x7*(parseInt(_0x34b6ed(0xd1))/0x8)+parseInt(_0x34b6ed(0xd7))/0x9*(-parseInt(_0x34b6ed(0xe4))/0xa)+parseInt(_0x34b6ed(0xcb))/0xb;if(_0x2a17e9===_0x7b012d)break;else _0x41b9b4['push'](_0x41b9b4['shift']());}catch(_0x45ef51){_0x41b9b4['push'](_0x41b9b4['shift']());}}}(a45_0x51d3,0xad80d));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a45_0x51d3(){const _0x3a5c57=['cli-skill','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','1861555CCppoY','\x20via\x20skills@latest','\x20is\x20already\x20current','3124270qyRYMj','apiError','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','code','install','\x20at\x20','installedPath',']:\x20','32315613mBcGrE','1424658Jyatju','7002870wDwAjE','info','CLI\x20Built-in\x20Skill\x20','2IXamgr','6998056VsnsVe','unknown','changed','7KdVhwf','cli-skill-install','setLogPath','27bmTpft','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','12IRwGPU','940174kUKBzq','skillVersion','pipe','Built-in\x20Skill\x20install\x20failed\x20[','repairCommand'];a45_0x51d3=function(){return _0x3a5c57;};return a45_0x51d3();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a45_0x501385(0xdf),'command':a45_0x501385(0xc7),'description':a45_0x501385(0xe6),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x47f735){const _0x33037d=a45_0x501385;logger[_0x33037d(0xd6)](process['cwd']()),logger[_0x33037d(0xce)](_0x33037d(0xd5),_0x33037d(0xe0));const _0x518954=installBuiltinSkill({'stdio':_0x47f735['nonInteractive']?_0x33037d(0xdc):'inherit'});if(!_0x518954['ok'])throw CliErrors[_0x33037d(0xe5)](_0x33037d(0xdd)+_0x518954[_0x33037d(0xc6)]+_0x33037d(0xca)+(_0x518954['error']||_0x33037d(0xd2)),_0x33037d(0xd8)+_0x518954[_0x33037d(0xde)]);return console['log'](_0x518954[_0x33037d(0xd3)]?_0x33037d(0xcf)+_0x518954[_0x33037d(0xdb)]+'\x20installed'+(_0x518954['installedPath']?_0x33037d(0xc8)+_0x518954[_0x33037d(0xc9)]:_0x33037d(0xe2)):'CLI\x20Built-in\x20Skill\x20'+_0x518954[_0x33037d(0xdb)]+_0x33037d(0xe3)+(_0x518954[_0x33037d(0xc9)]?_0x33037d(0xc8)+_0x518954[_0x33037d(0xc9)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x6622b0=a46_0x229d;(function(_0xc07e98,_0x124eaf){const _0xd4bf46=a46_0x229d,_0x55a506=_0xc07e98();while(!![]){try{const _0x253d16=-parseInt(_0xd4bf46(0x111))/0x1*(parseInt(_0xd4bf46(0xeb))/0x2)+parseInt(_0xd4bf46(0x100))/0x3*(-parseInt(_0xd4bf46(0xfa))/0x4)+parseInt(_0xd4bf46(0xe2))/0x5*(-parseInt(_0xd4bf46(0xe5))/0x6)+-parseInt(_0xd4bf46(0xfd))/0x7+parseInt(_0xd4bf46(0xfb))/0x8*(-parseInt(_0xd4bf46(0xee))/0x9)+-parseInt(_0xd4bf46(0xe0))/0xa*(-parseInt(_0xd4bf46(0xda))/0xb)+parseInt(_0xd4bf46(0xfe))/0xc;if(_0x253d16===_0x124eaf)break;else _0x55a506['push'](_0x55a506['shift']());}catch(_0x55d70b){_0x55a506['push'](_0x55a506['shift']());}}}(a46_0x2b4e,0x49442));import a46_0x6c1d3a from'chalk';import a46_0x43f9c4 from'ora';import a46_0x232578 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 _0x4d0a45=a46_0x229d;return GIT_COMMIT!==_0x4d0a45(0xe6)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xed3f19=a46_0x229d,_0x984af=process['execPath']['toLowerCase']();if(_0x984af[_0xed3f19(0xf3)](_0xed3f19(0xe4)))return _0xed3f19(0xe4);return _0xed3f19(0xf2);}const updateFlags=[{'name':a46_0x6622b0(0x119),'type':'boolean','description':a46_0x6622b0(0x11e),'default':![]},{'name':a46_0x6622b0(0x115),'type':a46_0x6622b0(0xd8),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function a46_0x229d(_0x26debf,_0x210a6c){_0x26debf=_0x26debf-0xd3;const _0x2b4ed7=a46_0x2b4e();let _0x229ded=_0x2b4ed7[_0x26debf];return _0x229ded;}function getRequestedVersion(_0x4c39d5){const _0x3b24dd=a46_0x6622b0;return _0x4c39d5[_0x3b24dd(0x11b)](_0x3b24dd(0x115))[_0x3b24dd(0x121)]();}async function validateUpdateFlags(_0x52b780){const _0x2ea8c1=a46_0x6622b0,_0x3f441d=_0x52b780[_0x2ea8c1(0x108)](_0x2ea8c1(0x119)),_0x506731=getRequestedVersion(_0x52b780);if(_0x3f441d&&_0x506731)throw CliErrors[_0x2ea8c1(0x10d)](_0x2ea8c1(0x120),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x506731&&!a46_0x232578[_0x2ea8c1(0xed)](_0x506731))throw CliErrors[_0x2ea8c1(0x10d)]('Invalid\x20version:\x20'+_0x506731,_0x2ea8c1(0xd3));}async function fetchNpmDistTags(){const _0x3b340f=a46_0x6622b0;try{const _0x32888f=await fetch(_0x3b340f(0xd7)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3b340f(0xea),{'signal':AbortSignal[_0x3b340f(0xf5)](0x2710)});if(!_0x32888f['ok'])return null;const _0x1cb13a=await _0x32888f[_0x3b340f(0xef)]();if(!_0x1cb13a||typeof _0x1cb13a!=='object')return null;return Object[_0x3b340f(0xdf)](Object[_0x3b340f(0xf6)](_0x1cb13a)[_0x3b340f(0x11d)](([,_0xcd43db])=>typeof _0xcd43db===_0x3b340f(0xd8)&&_0xcd43db['trim']()[_0x3b340f(0xdb)]>0x0)['map'](([_0x2627b7,_0x47a920])=>[_0x2627b7,String(_0x47a920)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2ca0ba){const _0xb48317=await fetchNpmDistTags();return _0xb48317?.[_0x2ca0ba]??null;}async function fetchLatestVersion(){const _0x27ccf6=a46_0x6622b0;return fetchNpmDistTagVersion(_0x27ccf6(0xe8));}async function resolveTargetVersion(_0xbd8cf7){const _0x589920=a46_0x6622b0,_0x33879a=getRequestedVersion(_0xbd8cf7);if(_0x33879a)return{'version':_0x33879a,'source':_0x589920(0x115)};if(_0xbd8cf7[_0x589920(0x108)](_0x589920(0x119))){const _0x1d433=await fetchNpmDistTagVersion(_0x589920(0x119));if(!_0x1d433)return null;return{'version':_0x1d433,'source':_0x589920(0x119)};}const _0x39c920=await fetchLatestVersion();if(!_0x39c920)return null;return{'version':_0x39c920,'source':_0x589920(0xe8)};}function shouldInstallTarget(_0x474a8b,_0x20f9d7){const _0x68ed72=a46_0x6622b0;if(_0x20f9d7[_0x68ed72(0x10b)]===_0x68ed72(0x115)||_0x20f9d7[_0x68ed72(0x10b)]===_0x68ed72(0x119))return!a46_0x232578['eq'](_0x474a8b,_0x20f9d7['version']);return a46_0x232578['lt'](_0x474a8b,_0x20f9d7[_0x68ed72(0x115)]);}function getInstallPlanLabel(_0x2f805d,_0x5375ba){const _0x618ec9=a46_0x6622b0;switch(_0x5375ba['source']){case _0x618ec9(0x119):return'Beta\x20version:\x20'+a46_0x6c1d3a[_0x618ec9(0xe9)](_0x2f805d)+_0x618ec9(0xf1)+a46_0x6c1d3a[_0x618ec9(0x102)](_0x5375ba[_0x618ec9(0x115)]);case'version':return _0x618ec9(0x103)+a46_0x6c1d3a[_0x618ec9(0xe9)](_0x2f805d)+_0x618ec9(0xf1)+a46_0x6c1d3a[_0x618ec9(0x102)](_0x5375ba['version']);case _0x618ec9(0xe8):default:return'Update\x20available:\x20'+a46_0x6c1d3a[_0x618ec9(0xe9)](_0x2f805d)+_0x618ec9(0xf1)+a46_0x6c1d3a[_0x618ec9(0x102)](_0x5375ba['version']);}}function repairCurrentBuiltinSkill(){const _0x1f7b21=a46_0x6622b0;console[_0x1f7b21(0x126)](a46_0x6c1d3a[_0x1f7b21(0x112)](_0x1f7b21(0xe7)));const _0x4efd34=installBuiltinSkill();if(_0x4efd34['ok']){console[_0x1f7b21(0x126)](a46_0x6c1d3a[_0x1f7b21(0x112)](_0x1f7b21(0x10a)+_0x4efd34[_0x1f7b21(0x106)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors['apiError'](_0x1f7b21(0x109)+_0x4efd34[_0x1f7b21(0x101)]+_0x1f7b21(0x11c)+(_0x4efd34['error']||_0x1f7b21(0xe6)),_0x1f7b21(0x104)+_0x4efd34['repairCommand']+_0x1f7b21(0xe3)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x3a9d98){const _0x58f145=a46_0x6622b0,_0x11d025=inspectInstalledBuiltinSkillVersion(_0x3a9d98);if(_0x11d025['state']==='current'){console['log'](a46_0x6c1d3a[_0x58f145(0x112)](_0x58f145(0x10a)+_0x3a9d98+_0x58f145(0x11f)));return;}const _0x2e81a8=_0x11d025[_0x58f145(0x106)]?_0x58f145(0xde)+_0x3a9d98+_0x58f145(0x105)+_0x11d025[_0x58f145(0x106)]:_0x58f145(0xde)+_0x3a9d98+_0x58f145(0xf8)+_0x11d025[_0x58f145(0xdc)];throw CliErrors[_0x58f145(0x10f)](_0x58f145(0x122)+_0x3a9d98+_0x58f145(0xd4)+_0x2e81a8,'Run:\x20'+_0x11d025[_0x58f145(0x125)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x58f145(0x118));}function a46_0x2b4e(){const _0xbc86a0=['CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20\x20CLI\x20Built-in\x20Skill\x20','source','error','validation','Checking\x20for\x20updates...','apiError','fail','5283Pjlrpm','gray','start','update','version','Version\x20comparison\x20failed','Update\x20failed','\x20doctor','beta','\x20\x20Try\x20manually:\x20','str',']:\x20','filter','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20is\x20up\x20to\x20date.','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','trim','CLI\x20updated\x20to\x20v','install','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','repairCommand','log','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','Updated\x20to\x20v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','https://registry.npmjs.org/-/package/','string','Current\x20version:\x20','1934273tWvMJx','length','state','message','expected\x20','fromEntries','30LoDfba','\x20is\x20newer\x20than\x20npm\x20latest\x20v','878260MwRQYF',',\x20then\x20verify\x20with:\x20','bun','6TCKcdj','unknown','Checking\x20CLI\x20Built-in\x20Skill...','latest','yellow','/dist-tags','210qjcmWI','succeed','valid','987579HWwmYH','json','...','\x20→\x20','npm','includes','pipe','timeout','entries','Already\x20on\x20requested\x20version\x20(v',',\x20state\x20','Updating\x20via\x20','1325224uFRhGx','8lewimi','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','735028ERAVGp','12587724RTUdit','run','3JFptqc','code','green','Requested\x20version:\x20','Run:\x20',',\x20found\x20','skillVersion','\x20install\x20-g\x20','bool'];a46_0x2b4e=function(){return _0xbc86a0;};return a46_0x2b4e();}async function execute(_0x19280b){const _0x513331=a46_0x6622b0;await validateUpdateFlags(_0x19280b);const _0x41607b=getCurrentVersion();console['log'](_0x513331(0xd9)+_0x41607b);const _0x307d36=a46_0x43f9c4(_0x513331(0x10e))['start'](),_0x54e186=await resolveTargetVersion(_0x19280b);if(!_0x54e186){const _0x55be4b=_0x19280b[_0x513331(0x108)](_0x513331(0x119))?_0x513331(0xfc):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x307d36['fail'](_0x55be4b),console['log'](a46_0x6c1d3a['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x55be4b};}const _0xd95a35=a46_0x232578[_0x513331(0xed)](VERSION),_0x31ad57=a46_0x232578[_0x513331(0xed)](_0x54e186[_0x513331(0x115)]);if(!_0xd95a35||!_0x31ad57)return _0x307d36[_0x513331(0x110)](_0x513331(0x116)),{'ok':![],'message':_0x513331(0x116)};if(!shouldInstallTarget(_0xd95a35,_0x54e186)){const _0x5b25ff=_0x54e186[_0x513331(0x10b)]==='version'?_0x513331(0xf7)+_0x54e186['version']+')':a46_0x232578['gt'](_0xd95a35,_0x31ad57)?'Current\x20version\x20v'+_0x41607b+_0x513331(0xe1)+_0x54e186[_0x513331(0x115)]:'Already\x20up\x20to\x20date\x20(v'+_0x54e186[_0x513331(0x115)]+')';return _0x307d36[_0x513331(0xec)](_0x5b25ff),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x307d36['info'](getInstallPlanLabel(_0x41607b,_0x54e186));const _0x41af71=detectPackageManager(),_0x4ba771=_0x41af71===_0x513331(0xf2)?resolveNpmBin(_0x513331(0xf2)):_0x41af71,_0x346b73=a46_0x43f9c4(_0x513331(0xf9)+_0x41af71+_0x513331(0xf0))[_0x513331(0x113)]();try{await execa(_0x4ba771,[_0x513331(0x123),'-g',NPM_PACKAGE_NAME+'@'+_0x54e186[_0x513331(0x115)]],{'stdio':_0x513331(0xf4)}),_0x346b73['succeed'](_0x513331(0xd5)+_0x54e186[_0x513331(0x115)]),console[_0x513331(0x126)](a46_0x6c1d3a[_0x513331(0x112)](_0x513331(0xd6)));}catch(_0x406d1e){return _0x346b73['fail'](_0x513331(0x117)),console[_0x513331(0x10c)](a46_0x6c1d3a['red']('\x20\x20'+_0x406d1e['message'])),console[_0x513331(0x126)](a46_0x6c1d3a[_0x513331(0x112)](_0x513331(0x11a)+_0x41af71+_0x513331(0x107)+NPM_PACKAGE_NAME+'@'+_0x54e186['version'])),{'ok':![],'message':_0x406d1e[_0x513331(0xdd)]};}return verifyUpdatedBuiltinSkill(_0x54e186['version']),{'ok':!![]};}export const updateDefinition={'service':a46_0x6622b0(0x114),'command':a46_0x6622b0(0xff),'description':a46_0x6622b0(0x124),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a46_0x1a70f5=a46_0x6314;(function(_0x216582,_0x1840dc){const _0x32e947=a46_0x6314,_0x113fac=_0x216582();while(!![]){try{const _0x3c741a=parseInt(_0x32e947(0x1ae))/0x1*(-parseInt(_0x32e947(0x191))/0x2)+-parseInt(_0x32e947(0x16c))/0x3*(parseInt(_0x32e947(0x178))/0x4)+-parseInt(_0x32e947(0x15e))/0x5+-parseInt(_0x32e947(0x173))/0x6+parseInt(_0x32e947(0x1a3))/0x7*(-parseInt(_0x32e947(0x182))/0x8)+parseInt(_0x32e947(0x172))/0x9+parseInt(_0x32e947(0x1b2))/0xa;if(_0x3c741a===_0x1840dc)break;else _0x113fac['push'](_0x113fac['shift']());}catch(_0xc09105){_0x113fac['push'](_0x113fac['shift']());}}}(a46_0x412b,0xbf9a4));function a46_0x412b(){const _0x181dc0=['Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','7067410cByfFJ',',\x20found\x20','\x20\x20Try\x20manually:\x20','toLowerCase','/dist-tags','skillVersion','beta','Checking\x20CLI\x20Built-in\x20Skill...','fromEntries','boolean','https://registry.npmjs.org/-/package/','validation','filter','Already\x20up\x20to\x20date\x20(v','2853JwpCIv','gray','install','length','json','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','6229926gBBMVC','1796796upEPrb','Checking\x20for\x20updates...',',\x20then\x20verify\x20with:\x20','bun','\x20doctor','5708lsuFlc','repairCommand','run','start','version','object','Run:\x20','code','green','Current\x20version:\x20','8ukeLPU','Update\x20failed','state',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','error','source','log','npm','Already\x20on\x20requested\x20version\x20(v','Version\x20comparison\x20failed','apiError','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','timeout','includes','Beta\x20version:\x20','62qcGCri','\x20install\x20-g\x20','Current\x20version\x20v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','bool','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','execPath','slice','@latest','Invalid\x20version:\x20',']:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag',',\x20state\x20','latest','valid','\x20is\x20up\x20to\x20date.','4668055jhCSJs','\x20→\x20','string','Install\x20a\x20specific\x20CLI\x20version','Updating\x20via\x20','succeed','Updated\x20to\x20v','Update\x20available:\x20','unknown','fail','pipe','47765cgMaFC','trim','expected\x20','yellow','53101950BrFcTR'];a46_0x412b=function(){return _0x181dc0;};return a46_0x412b();}import a46_0x1ddbda from'chalk';function a46_0x6314(_0x280b33,_0x33a26f){_0x280b33=_0x280b33-0x15d;const _0x412b72=a46_0x412b();let _0x63143b=_0x412b72[_0x280b33];return _0x63143b;}import a46_0x2c1ccd from'ora';import a46_0x1bb9a3 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 _0x21b6e9=a46_0x6314;return GIT_COMMIT!==_0x21b6e9(0x1ab)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x21b6e9(0x198)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5a1a9f=a46_0x6314,_0x37dd91=process[_0x5a1a9f(0x197)][_0x5a1a9f(0x161)]();if(_0x37dd91[_0x5a1a9f(0x18f)](_0x5a1a9f(0x176)))return _0x5a1a9f(0x176);return _0x5a1a9f(0x189);}const updateFlags=[{'name':'beta','type':a46_0x1a70f5(0x167),'description':a46_0x1a70f5(0x19e),'default':![]},{'name':a46_0x1a70f5(0x17c),'type':a46_0x1a70f5(0x1a5),'description':a46_0x1a70f5(0x1a6)}];function getRequestedVersion(_0x3dccca){const _0x164c18=a46_0x1a70f5;return _0x3dccca['str'](_0x164c18(0x17c))[_0x164c18(0x1af)]();}async function validateUpdateFlags(_0x5b6a1d){const _0x151419=a46_0x1a70f5,_0x12331b=_0x5b6a1d[_0x151419(0x195)](_0x151419(0x164)),_0x1a4bd7=getRequestedVersion(_0x5b6a1d);if(_0x12331b&&_0x1a4bd7)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x151419(0x15d));if(_0x1a4bd7&&!a46_0x1bb9a3[_0x151419(0x1a1)](_0x1a4bd7))throw CliErrors[_0x151419(0x169)](_0x151419(0x19a)+_0x1a4bd7,_0x151419(0x18d));}async function fetchNpmDistTags(){const _0x36aa9c=a46_0x1a70f5;try{const _0x48fb80=await fetch(_0x36aa9c(0x168)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x36aa9c(0x162),{'signal':AbortSignal[_0x36aa9c(0x18e)](0x2710)});if(!_0x48fb80['ok'])return null;const _0x388042=await _0x48fb80[_0x36aa9c(0x170)]();if(!_0x388042||typeof _0x388042!==_0x36aa9c(0x17d))return null;return Object[_0x36aa9c(0x166)](Object['entries'](_0x388042)[_0x36aa9c(0x16a)](([,_0x155574])=>typeof _0x155574==='string'&&_0x155574['trim']()[_0x36aa9c(0x16f)]>0x0)['map'](([_0x31a13,_0x573703])=>[_0x31a13,String(_0x573703)[_0x36aa9c(0x1af)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3493b7){const _0x4f2278=await fetchNpmDistTags();return _0x4f2278?.[_0x3493b7]??null;}async function fetchLatestVersion(){const _0x514cd5=a46_0x1a70f5;return fetchNpmDistTagVersion(_0x514cd5(0x1a0));}async function resolveTargetVersion(_0x5aa066){const _0x1612a7=a46_0x1a70f5,_0xed84a9=getRequestedVersion(_0x5aa066);if(_0xed84a9)return{'version':_0xed84a9,'source':_0x1612a7(0x17c)};if(_0x5aa066[_0x1612a7(0x195)](_0x1612a7(0x164))){const _0x21c32a=await fetchNpmDistTagVersion(_0x1612a7(0x164));if(!_0x21c32a)return null;return{'version':_0x21c32a,'source':_0x1612a7(0x164)};}const _0x4007cc=await fetchLatestVersion();if(!_0x4007cc)return null;return{'version':_0x4007cc,'source':_0x1612a7(0x1a0)};}function shouldInstallTarget(_0x2ff95c,_0x25a927){const _0x3731f2=a46_0x1a70f5;if(_0x25a927[_0x3731f2(0x187)]===_0x3731f2(0x17c)||_0x25a927['source']===_0x3731f2(0x164))return!a46_0x1bb9a3['eq'](_0x2ff95c,_0x25a927[_0x3731f2(0x17c)]);return a46_0x1bb9a3['lt'](_0x2ff95c,_0x25a927['version']);}function getInstallPlanLabel(_0x3383b4,_0xd0804f){const _0x4ca43a=a46_0x1a70f5;switch(_0xd0804f[_0x4ca43a(0x187)]){case'beta':return _0x4ca43a(0x190)+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+_0x4ca43a(0x1a4)+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f['version']);case _0x4ca43a(0x17c):return'Requested\x20version:\x20'+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+_0x4ca43a(0x1a4)+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f[_0x4ca43a(0x17c)]);case _0x4ca43a(0x1a0):default:return _0x4ca43a(0x1aa)+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+'\x20→\x20'+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f[_0x4ca43a(0x17c)]);}}function repairCurrentBuiltinSkill(){const _0x35d424=a46_0x1a70f5;console['log'](a46_0x1ddbda[_0x35d424(0x16d)](_0x35d424(0x165)));const _0x1f4ea1=installBuiltinSkill();if(_0x1f4ea1['ok']){console[_0x35d424(0x188)](a46_0x1ddbda[_0x35d424(0x16d)](_0x35d424(0x19c)+_0x1f4ea1['skillVersion']+_0x35d424(0x1a2)));return;}throw CliErrors[_0x35d424(0x18c)](_0x35d424(0x196)+_0x1f4ea1[_0x35d424(0x17f)]+_0x35d424(0x19b)+(_0x1f4ea1[_0x35d424(0x186)]||_0x35d424(0x1ab)),_0x35d424(0x17e)+_0x1f4ea1[_0x35d424(0x179)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x35d424(0x177));}function verifyUpdatedBuiltinSkill(_0x14dc4a){const _0x5c0cb8=a46_0x1a70f5,_0x439720=inspectInstalledBuiltinSkillVersion(_0x14dc4a);if(_0x439720[_0x5c0cb8(0x184)]==='current'){console[_0x5c0cb8(0x188)](a46_0x1ddbda['gray'](_0x5c0cb8(0x19c)+_0x14dc4a+_0x5c0cb8(0x1a2)));return;}const _0x4177f6=_0x439720[_0x5c0cb8(0x163)]?_0x5c0cb8(0x1b0)+_0x14dc4a+_0x5c0cb8(0x15f)+_0x439720[_0x5c0cb8(0x163)]:_0x5c0cb8(0x1b0)+_0x14dc4a+_0x5c0cb8(0x19f)+_0x439720[_0x5c0cb8(0x184)];throw CliErrors[_0x5c0cb8(0x18c)]('CLI\x20updated\x20to\x20v'+_0x14dc4a+_0x5c0cb8(0x185)+_0x4177f6,_0x5c0cb8(0x17e)+_0x439720[_0x5c0cb8(0x179)]+_0x5c0cb8(0x175)+CLI_BIN_NAME+_0x5c0cb8(0x177));}async function execute(_0x33b8ab){const _0x2043ee=a46_0x1a70f5;await validateUpdateFlags(_0x33b8ab);const _0x46f1e0=getCurrentVersion();console[_0x2043ee(0x188)](_0x2043ee(0x181)+_0x46f1e0);const _0x5cef0d=a46_0x2c1ccd(_0x2043ee(0x174))[_0x2043ee(0x17b)](),_0x2a401a=await resolveTargetVersion(_0x33b8ab);if(!_0x2a401a){const _0x21a769=_0x33b8ab[_0x2043ee(0x195)](_0x2043ee(0x164))?_0x2043ee(0x19d):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x5cef0d[_0x2043ee(0x1ac)](_0x21a769),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x171)+NPM_PACKAGE_NAME+_0x2043ee(0x199))),{'ok':![],'message':_0x21a769};}const _0xe042b9=a46_0x1bb9a3['valid'](VERSION),_0x50dbdb=a46_0x1bb9a3[_0x2043ee(0x1a1)](_0x2a401a[_0x2043ee(0x17c)]);if(!_0xe042b9||!_0x50dbdb)return _0x5cef0d[_0x2043ee(0x1ac)](_0x2043ee(0x18b)),{'ok':![],'message':_0x2043ee(0x18b)};if(!shouldInstallTarget(_0xe042b9,_0x2a401a)){const _0x9dc79c=_0x2a401a[_0x2043ee(0x187)]===_0x2043ee(0x17c)?_0x2043ee(0x18a)+_0x2a401a['version']+')':a46_0x1bb9a3['gt'](_0xe042b9,_0x50dbdb)?_0x2043ee(0x193)+_0x46f1e0+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x2a401a[_0x2043ee(0x17c)]:_0x2043ee(0x16b)+_0x2a401a[_0x2043ee(0x17c)]+')';return _0x5cef0d[_0x2043ee(0x1a8)](_0x9dc79c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x5cef0d['info'](getInstallPlanLabel(_0x46f1e0,_0x2a401a));const _0x16407d=detectPackageManager(),_0x4c0e25=_0x16407d===_0x2043ee(0x189)?resolveNpmBin(_0x2043ee(0x189)):_0x16407d,_0x1d24fb=a46_0x2c1ccd(_0x2043ee(0x1a7)+_0x16407d+'...')['start']();try{await execa(_0x4c0e25,[_0x2043ee(0x16e),'-g',NPM_PACKAGE_NAME+'@'+_0x2a401a[_0x2043ee(0x17c)]],{'stdio':_0x2043ee(0x1ad)}),_0x1d24fb[_0x2043ee(0x1a8)](_0x2043ee(0x1a9)+_0x2a401a[_0x2043ee(0x17c)]),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x194)));}catch(_0x248c90){return _0x1d24fb[_0x2043ee(0x1ac)](_0x2043ee(0x183)),console[_0x2043ee(0x186)](a46_0x1ddbda['red']('\x20\x20'+_0x248c90['message'])),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x160)+_0x16407d+_0x2043ee(0x192)+NPM_PACKAGE_NAME+'@'+_0x2a401a[_0x2043ee(0x17c)])),{'ok':![],'message':_0x248c90['message']};}return verifyUpdatedBuiltinSkill(_0x2a401a[_0x2043ee(0x17c)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a46_0x1a70f5(0x17a),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x38223e,_0x318433){const _0xeaeec2=a47_0x5a11,_0x4165b3=_0x38223e();while(!![]){try{const _0x32c086=parseInt(_0xeaeec2(0x16a))/0x1*(parseInt(_0xeaeec2(0x170))/0x2)+parseInt(_0xeaeec2(0x172))/0x3+parseInt(_0xeaeec2(0x171))/0x4*(parseInt(_0xeaeec2(0x16f))/0x5)+parseInt(_0xeaeec2(0x16b))/0x6+parseInt(_0xeaeec2(0x16e))/0x7+parseInt(_0xeaeec2(0x16c))/0x8+-parseInt(_0xeaeec2(0x16d))/0x9;if(_0x32c086===_0x318433)break;else _0x4165b3['push'](_0x4165b3['shift']());}catch(_0x3df454){_0x4165b3['push'](_0x4165b3['shift']());}}}(a47_0x7ef4,0x20c3e));function a47_0x5a11(_0x2232d9,_0xb1efdd){_0x2232d9=_0x2232d9-0x16a;const _0x7ef4db=a47_0x7ef4();let _0x5a1146=_0x7ef4db[_0x2232d9];return _0x5a1146;}import{codegenSdk}from'../../commands/codegen/sdk.js';function a47_0x7ef4(){const _0x1798cd=['842170kbvrJd','40475WCMoVL','10GbysRk','108eXwvsy','430902tebHCB','50843ybjOPW','863388kDRvpn','769288BGtIQA','7583193OpzuiS'];a47_0x7ef4=function(){return _0x1798cd;};return a47_0x7ef4();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0xd36460=a48_0x378a;(function(_0x58382a,_0x1c1fac){const _0x5908b1=a48_0x378a,_0x6e17ac=_0x58382a();while(!![]){try{const _0x51f461=-parseInt(_0x5908b1(0x18d))/0x1*(parseInt(_0x5908b1(0x195))/0x2)+parseInt(_0x5908b1(0x183))/0x3*(-parseInt(_0x5908b1(0x189))/0x4)+parseInt(_0x5908b1(0x19d))/0x5*(parseInt(_0x5908b1(0x190))/0x6)+-parseInt(_0x5908b1(0x18f))/0x7*(parseInt(_0x5908b1(0x19b))/0x8)+-parseInt(_0x5908b1(0x196))/0x9*(parseInt(_0x5908b1(0x18b))/0xa)+parseInt(_0x5908b1(0x184))/0xb+parseInt(_0x5908b1(0x185))/0xc*(parseInt(_0x5908b1(0x191))/0xd);if(_0x51f461===_0x1c1fac)break;else _0x6e17ac['push'](_0x6e17ac['shift']());}catch(_0x250247){_0x6e17ac['push'](_0x6e17ac['shift']());}}}(a48_0x24a5,0x2494a));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a48_0x378a(_0x1e12da,_0x46fbc0){_0x1e12da=_0x1e12da-0x183;const _0x24a58c=a48_0x24a5();let _0x378a0e=_0x24a58c[_0x1e12da];return _0x378a0e;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a48_0x24a5(){const _0x487c4d=['9dkBOsY','read','bool','name','sdk','8LOIeKp','tableName','1028015STdJEW','3PognMi','2459314zBBALM','8870652oezhRE','operation','string','str','1018976ObQYZV','Omit\x20import\x20statements\x20from\x20generated\x20code','2566570hCsGxU','boolean','2KWEutq','alias','1641815ddIZeD','6hAJkZO','13RLEmbd','code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','skip-imports','272618eGqVyu'];a48_0x24a5=function(){return _0x487c4d;};return a48_0x24a5();}export const codegenSdk={'service':'codegen','command':a48_0xd36460(0x19a),'description':a48_0xd36460(0x193),'risk':a48_0xd36460(0x197),'flags':[CODE_FLAG_OPTIONAL,{'name':a48_0xd36460(0x18e),'type':a48_0xd36460(0x187),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a48_0xd36460(0x186),'type':a48_0xd36460(0x187),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a48_0xd36460(0x194),'type':a48_0xd36460(0x18c),'description':a48_0xd36460(0x18a)}],async 'execute'(_0x94da2e){const _0x10f711=a48_0xd36460,{dataset:_0xf9930c,operation:_0x5edef6}=await getOperationDetail(_0x94da2e['appCode'],_0x94da2e[_0x10f711(0x188)](_0x10f711(0x192)),_0x94da2e['str'](_0x10f711(0x186))),_0x2de929=generateSdkCode(_0xf9930c,_0x5edef6,{'includeImports':!_0x94da2e[_0x10f711(0x198)](_0x10f711(0x194))});return{'ok':!![],'data':{'dataset':{'name':_0xf9930c[_0x10f711(0x199)],'code':_0xf9930c[_0x10f711(0x192)],'tableName':_0xf9930c[_0x10f711(0x19c)]},'operation':_0x94da2e[_0x10f711(0x188)](_0x10f711(0x186)),'code':_0x2de929}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x4f3c(_0x48f2fe,_0x4e7e7f){_0x48f2fe=_0x48f2fe-0x1df;const _0x133cbd=a49_0x133c();let _0x4f3c68=_0x133cbd[_0x48f2fe];return _0x4f3c68;}const a49_0x551e90=a49_0x4f3c;(function(_0x129b6e,_0x4c197d){const _0x4c920b=a49_0x4f3c,_0x457e68=_0x129b6e();while(!![]){try{const _0x295ef6=parseInt(_0x4c920b(0x1f1))/0x1*(parseInt(_0x4c920b(0x1f5))/0x2)+-parseInt(_0x4c920b(0x1f4))/0x3*(parseInt(_0x4c920b(0x1f3))/0x4)+parseInt(_0x4c920b(0x1e6))/0x5+parseInt(_0x4c920b(0x1f0))/0x6+parseInt(_0x4c920b(0x1e2))/0x7+parseInt(_0x4c920b(0x1e0))/0x8*(-parseInt(_0x4c920b(0x1f2))/0x9)+-parseInt(_0x4c920b(0x1ec))/0xa;if(_0x295ef6===_0x4c197d)break;else _0x457e68['push'](_0x457e68['shift']());}catch(_0x2e0e14){_0x457e68['push'](_0x457e68['shift']());}}}(a49_0x133c,0x1f5c6));function a49_0x133c(){const _0x1d6438=['Omit\x20import\x20statements\x20from\x20generated\x20code','295080WQplCx','string','sqlName','sqlcode','sdk','sqlCode','1258650IKkMHT','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bool','no-imports','907872KbSVhi','138124AgVJPP','9UvsRZy','20iDgcat','120771zZSWBp','2bNjvpx','bff','target','boolean','588376rrmaih','sql','1264893qOUvkO','appCode','str'];a49_0x133c=function(){return _0x1d6438;};return a49_0x133c();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a49_0x551e90(0x1e1),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':a49_0x551e90(0x1f7),'type':a49_0x551e90(0x1e7),'description':a49_0x551e90(0x1ed),'default':a49_0x551e90(0x1ea),'enum':[a49_0x551e90(0x1ea),a49_0x551e90(0x1f6)]},{'name':a49_0x551e90(0x1ef),'type':a49_0x551e90(0x1df),'description':a49_0x551e90(0x1e5)}],async 'execute'(_0x2b30ef){const _0x455a69=a49_0x551e90,_0x1f3a62=await getSqlQueryInfo(_0x2b30ef[_0x455a69(0x1e3)],_0x2b30ef[_0x455a69(0x1e4)](_0x455a69(0x1e9))),_0x56f742=_0x2b30ef[_0x455a69(0x1e4)]('target')||_0x455a69(0x1ea),_0x39af5f=generateSqlCodeTemplate(_0x1f3a62,{'target':_0x56f742,'includeImports':!_0x2b30ef[_0x455a69(0x1ee)](_0x455a69(0x1ef))});return{'ok':!![],'data':{'sqlCode':_0x1f3a62[_0x455a69(0x1eb)],'sqlName':_0x1f3a62[_0x455a69(0x1e8)],'target':_0x56f742,'code':_0x39af5f}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x1af358,_0x1ea459){const _0xb8bbab=a50_0xa849,_0x2b4c48=_0x1af358();while(!![]){try{const _0x18f58e=-parseInt(_0xb8bbab(0x160))/0x1*(parseInt(_0xb8bbab(0x176))/0x2)+-parseInt(_0xb8bbab(0x179))/0x3+parseInt(_0xb8bbab(0x182))/0x4*(parseInt(_0xb8bbab(0x186))/0x5)+parseInt(_0xb8bbab(0x189))/0x6+parseInt(_0xb8bbab(0x173))/0x7+-parseInt(_0xb8bbab(0x17f))/0x8+parseInt(_0xb8bbab(0x162))/0x9;if(_0x18f58e===_0x1ea459)break;else _0x2b4c48['push'](_0x2b4c48['shift']());}catch(_0x12bbf4){_0x2b4c48['push'](_0x2b4c48['shift']());}}}(a50_0x46cc,0x40c6f));import{CliErrors}from'../../errors.js';function a50_0x46cc(){const _0x335a9e=['bool','3668658ESjqVk','global','keys','142BBglva','\x22\x20(appcode:\x20','\x20<name>\x20--appcode\x20<code>','454935icdPVm','validation','\x20<name>\x20[--global]','apps','args','appcode','3703984izeSpW','defaultApp','object','707908WvEiqT','\x22\x20not\x20found.','Usage:\x20','boolean','10WGNkPr','str','\x20app\x20\x22','53982uNdNWD','App\x20code','2353WXcpjy','globalConfig','1439892wTcRzA','projectConfig','project','trim','\x20Default\x20app\x20is\x20\x22','both','\x20<name>','App\x20\x22','Use\x20global\x20config\x20scope','Added','\x22\x20still\x20defined\x20in\x20','Missing\x20app\x20name.','\x20Note:\x20app\x20\x22','\x20Remaining\x20app\x20\x22','Removed\x20app\x20\x22','\x20Default\x20app\x20changed\x20to\x20\x22'];a50_0x46cc=function(){return _0x335a9e;};return a50_0x46cc();}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 _0xb00b1b=a50_0xa849;return[{'name':'appcode','type':'string','description':_0xb00b1b(0x15f),'required':!![]},{'name':_0xb00b1b(0x174),'type':_0xb00b1b(0x185),'description':_0xb00b1b(0x16a),'default':![]},...getAppProfileFlagDefs()];}function a50_0xa849(_0x8fec12,_0x429773){_0x8fec12=_0x8fec12-0x15f;const _0x46ccf9=a50_0x46cc();let _0xa849d5=_0x46ccf9[_0x8fec12];return _0xa849d5;}export function buildAppRemoveFlags(){const _0x4c992f=a50_0xa849;return[{'name':'global','type':_0x4c992f(0x185),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x555473,_0x5cd291){const _0x2bc122=a50_0xa849,_0x37ab81=_0x555473['args'][0x0]?.[_0x2bc122(0x165)]();if(!_0x37ab81)throw CliErrors[_0x2bc122(0x17a)](_0x2bc122(0x16d),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5cd291+_0x2bc122(0x168));}export async function runAppAdd(_0x8d94a,_0x1c34db){const _0x5e011a=a50_0xa849,_0x95c3dd=_0x8d94a[_0x5e011a(0x17d)][0x0]?.[_0x5e011a(0x165)]();if(!_0x95c3dd)throw CliErrors[_0x5e011a(0x17a)](_0x5e011a(0x16d),_0x5e011a(0x184)+CLI_BIN_NAME+'\x20'+_0x1c34db+_0x5e011a(0x178));const _0x2da552=_0x8d94a['str'](_0x5e011a(0x17e));if(!_0x2da552)throw CliErrors['flagMissing'](_0x5e011a(0x17e),_0x5e011a(0x184)+CLI_BIN_NAME+'\x20'+_0x1c34db+_0x5e011a(0x178));const _0x2de3f6={'global':_0x8d94a['bool'](_0x5e011a(0x174))},_0x9fd6d7=readConfig(_0x2de3f6);if(!_0x9fd6d7[_0x5e011a(0x17c)])_0x9fd6d7[_0x5e011a(0x17c)]={};const _0x2e6b12={'appcode':_0x2da552,...collectAppProfileOverrides(_0x47dd88=>_0x8d94a[_0x5e011a(0x187)](_0x47dd88))},_0x484ce9=_0x9fd6d7['apps'],_0x3830a3=Object['keys'](_0x484ce9),_0x56fdfe=typeof _0x9fd6d7[_0x5e011a(0x180)]==='string'&&_0x484ce9[_0x9fd6d7['defaultApp']]?_0x9fd6d7[_0x5e011a(0x180)]:_0x3830a3['length']===0x1?_0x3830a3[0x0]:undefined,_0x1e7fe0=!!_0x484ce9[_0x95c3dd];_0x484ce9[_0x95c3dd]=_0x2e6b12;const _0x58cd92=normalizeStoredDefaultApp(_0x9fd6d7,_0x56fdfe);writeConfig(_0x9fd6d7,_0x2de3f6);const _0x1732c0=!_0x1e7fe0&&_0x58cd92?_0x5e011a(0x166)+_0x58cd92+'\x22.':'',_0x4766f2=(_0x1e7fe0?'Updated':_0x5e011a(0x16b))+_0x5e011a(0x188)+_0x95c3dd+_0x5e011a(0x177)+_0x2da552+')'+scopeLabel(_0x2de3f6)+'.'+_0x1732c0;return{'ok':!![],'message':_0x4766f2};}export async function runAppRemove(_0x1ffb0b,_0x2851a7){const _0x5eed1f=a50_0xa849,_0x5560e5=_0x1ffb0b[_0x5eed1f(0x17d)][0x0]?.['trim']();if(!_0x5560e5)throw CliErrors[_0x5eed1f(0x17a)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2851a7+_0x5eed1f(0x17b));const _0x1dd33e=_0x1ffb0b[_0x5eed1f(0x172)]('global'),{config:_0x259c08,layers:_0x19c891}=readRawConfigWithLayers(),_0x1fc2a9=_0x259c08[_0x5eed1f(0x17c)]??{};if(!_0x1fc2a9[_0x5560e5])throw CliErrors[_0x5eed1f(0x17a)]('App\x20\x22'+_0x5560e5+'\x22\x20not\x20found.');const _0x3a21a0=_0x19c891['globalConfig'][_0x5eed1f(0x17c)]&&typeof _0x19c891[_0x5eed1f(0x161)][_0x5eed1f(0x17c)]===_0x5eed1f(0x181)?_0x19c891[_0x5eed1f(0x161)][_0x5eed1f(0x17c)]:{},_0x18bd6e=_0x19c891[_0x5eed1f(0x163)][_0x5eed1f(0x17c)]&&typeof _0x19c891['projectConfig']['apps']===_0x5eed1f(0x181)?_0x19c891[_0x5eed1f(0x163)][_0x5eed1f(0x17c)]:{},_0x526885=appDefinedIn(_0x5560e5,_0x3a21a0,_0x18bd6e),_0x41851c=resolveAppScopeForWrite(_0x5560e5,_0x1dd33e,_0x19c891),_0x298229={'global':_0x41851c===_0x5eed1f(0x174)},_0x1957c6=readConfig(_0x298229),_0x367564=_0x1957c6[_0x5eed1f(0x17c)];if(!_0x367564||!_0x367564[_0x5560e5])throw CliErrors[_0x5eed1f(0x17a)](_0x5eed1f(0x169)+_0x5560e5+_0x5eed1f(0x183));delete _0x367564[_0x5560e5];let _0xd92a1a='';const _0x1125b5=typeof _0x1957c6[_0x5eed1f(0x180)]==='string'?_0x1957c6[_0x5eed1f(0x180)]:undefined,_0x18e2d6=Object['keys'](_0x367564),_0x608a30=_0x1125b5===_0x5560e5?_0x18e2d6[0x0]:_0x1125b5,_0x13d2b5=normalizeStoredDefaultApp(_0x1957c6,_0x608a30);if(_0x1125b5===_0x5560e5&&_0x18e2d6['length']===0x1)_0xd92a1a=_0x5eed1f(0x16f)+_0x18e2d6[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x1125b5===_0x5560e5&&_0x13d2b5&&(_0xd92a1a=_0x5eed1f(0x171)+_0x13d2b5+'\x22.');Object[_0x5eed1f(0x175)](_0x367564)['length']===0x0&&(delete _0x1957c6[_0x5eed1f(0x17c)],delete _0x1957c6[_0x5eed1f(0x180)]);writeConfig(_0x1957c6,_0x298229);const _0x3f211c=_0x526885===_0x5eed1f(0x167)?_0x5eed1f(0x16e)+_0x5560e5+_0x5eed1f(0x16c)+(_0x41851c===_0x5eed1f(0x164)?_0x5eed1f(0x174):_0x5eed1f(0x164))+'\x20config.':'';return{'ok':!![],'message':_0x5eed1f(0x170)+_0x5560e5+'\x22'+scopeLabel(_0x298229)+'.'+_0xd92a1a+_0x3f211c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4aa0c0,_0x9df2a2){const _0x53a0b3=a51_0x2057,_0x22e377=_0x4aa0c0();while(!![]){try{const _0x23d084=parseInt(_0x53a0b3(0x203))/0x1+parseInt(_0x53a0b3(0x201))/0x2*(parseInt(_0x53a0b3(0x205))/0x3)+parseInt(_0x53a0b3(0x212))/0x4*(parseInt(_0x53a0b3(0x213))/0x5)+-parseInt(_0x53a0b3(0x207))/0x6+parseInt(_0x53a0b3(0x1f3))/0x7+-parseInt(_0x53a0b3(0x1f6))/0x8*(-parseInt(_0x53a0b3(0x214))/0x9)+-parseInt(_0x53a0b3(0x202))/0xa;if(_0x23d084===_0x9df2a2)break;else _0x22e377['push'](_0x22e377['shift']());}catch(_0x55be92){_0x22e377['push'](_0x22e377['shift']());}}}(a51_0x3445,0x90c31));import{input,checkbox,select}from'@inquirer/prompts';import a51_0x579f31 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x582ab0=a51_0x2057,_0x9aba77=await input({'message':_0x582ab0(0x210),'validate':_0x2c542e=>{const _0x14961c=_0x582ab0,_0x2c08bd=validateAppcode(_0x2c542e[_0x14961c(0x20c)]());return _0x2c08bd['valid']||_0x2c08bd[_0x14961c(0x20e)]||_0x14961c(0x1f4);}});return _0x9aba77[_0x582ab0(0x20c)]();}export async function promptAppSelection(_0x191a3a){const _0xfda70f=a51_0x2057,_0x22c16f=[{'name':a51_0x579f31[_0xfda70f(0x1f7)](_0xfda70f(0x20f)),'value':-0x1},..._0x191a3a[_0xfda70f(0x1fa)]((_0x1fa111,_0x2b484c)=>({'name':_0x1fa111[_0xfda70f(0x20a)]+'\x20\x20'+a51_0x579f31[_0xfda70f(0x1fe)]('('+_0x1fa111[_0xfda70f(0x206)]+')'),'value':_0x2b484c}))],_0x4d9825=await checkbox({'message':_0xfda70f(0x215)+a51_0x579f31[_0xfda70f(0x204)](_0x191a3a['length'])+_0xfda70f(0x211),'choices':_0x22c16f,'loop':![]});if(_0x4d9825['includes'](-0x1))return _0xfda70f(0x1ff);if(_0x4d9825[_0xfda70f(0x208)]===0x0)return _0xfda70f(0x1ff);return _0x4d9825[_0xfda70f(0x1fa)](_0x467223=>_0x191a3a[_0x467223]);}export async function promptSingleAppSelection(_0x24eeef){const _0x57bf9a=a51_0x2057,_0x23ec9e=[{'name':a51_0x579f31[_0x57bf9a(0x1fe)](_0x57bf9a(0x1fc)),'value':'skip'},{'name':a51_0x579f31['yellow'](_0x57bf9a(0x20f)),'value':_0x57bf9a(0x1ff)},..._0x24eeef[_0x57bf9a(0x1fa)](_0xd27940=>({'name':_0xd27940[_0x57bf9a(0x20a)]+'\x20\x20'+a51_0x579f31[_0x57bf9a(0x1fe)]('('+_0xd27940[_0x57bf9a(0x206)]+')'),'value':_0xd27940[_0x57bf9a(0x206)]}))],_0x316d67=await select({'message':_0x57bf9a(0x1f5),'choices':_0x23ec9e});if(_0x316d67==='skip')return _0x57bf9a(0x1f8);if(_0x316d67==='custom')return _0x57bf9a(0x1ff);return _0x24eeef[_0x57bf9a(0x1fd)](_0x4e9cc8=>_0x4e9cc8[_0x57bf9a(0x206)]===_0x316d67);}function a51_0x3445(){const _0x1472d6=['length','(Skip;\x20configure\x20later)','appName','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','trim','\x0aNo\x20available\x20apps\x20found.','message','✎\x20Enter\x20appcode\x20manually','App\x20Code:','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','656wsBidJ','21885vtowBL','9MWGoDP','Found\x20','\x20\x20(','7627823fxcGtq','Invalid\x20App\x20Code','Select\x20the\x20app\x20to\x20bind:','4979896aqAutG','yellow','skip','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','map','Fetching\x20available\x20apps...','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','find','gray','custom','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','278346vzlNDx','20629330pRbPXA','257399EkDINx','cyan','18yWuUxw','appCode','5199378QiWize'];a51_0x3445=function(){return _0x1472d6;};return a51_0x3445();}export async function selectSingleAppcode(_0x333e89){const _0x5ce34b=a51_0x2057;if(!_0x333e89)return writeCliSideChannelLine(a51_0x579f31[_0x5ce34b(0x1fe)](_0x5ce34b(0x20b))),_fallbackOrSkip();writeCliSideChannelLine(_0x5ce34b(0x1fb));let _0x5ea428;try{_0x5ea428=await withActiveCookie(_0x333e89,()=>listRemoteApps());}catch(_0x122410){writeCliSideChannelLine(a51_0x579f31[_0x5ce34b(0x1f7)](_0x5ce34b(0x1f9)));if(_0x122410 instanceof Error)writeCliSideChannelLine(a51_0x579f31['gray'](_0x5ce34b(0x216)+_0x122410[_0x5ce34b(0x20e)]+')'));return _fallbackOrSkip();}if(_0x5ea428[_0x5ce34b(0x208)]===0x0)return writeCliSideChannelLine(a51_0x579f31[_0x5ce34b(0x1f7)]('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x6488db=await promptSingleAppSelection(_0x5ea428);if(_0x6488db===_0x5ce34b(0x1f8))return'';if(_0x6488db==='custom')return promptCustomAppcode();return _0x6488db['appCode'];}function a51_0x2057(_0x470527,_0x2dc548){_0x470527=_0x470527-0x1f3;const _0x3445c4=a51_0x3445();let _0x205724=_0x3445c4[_0x470527];return _0x205724;}export async function selectMultipleApps(_0x4ea2b8){const _0x571734=a51_0x2057;writeCliSideChannelLine(_0x571734(0x1fb));let _0x124813;try{_0x124813=await withActiveCookie(_0x4ea2b8,()=>listRemoteApps());}catch(_0x37a700){writeCliSideChannelLine(_0x571734(0x200));if(_0x37a700 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x37a700['message']+')');return _0x571734(0x1ff);}if(_0x124813['length']===0x0)return writeCliSideChannelLine(_0x571734(0x20d)),_0x571734(0x1ff);return promptAppSelection(_0x124813);}async function _fallbackOrSkip(){const _0x4cbfec=a51_0x2057,_0x140605=await select({'message':_0x4cbfec(0x210),'choices':[{'name':a51_0x579f31[_0x4cbfec(0x1fe)](_0x4cbfec(0x209)),'value':_0x4cbfec(0x1f8)},{'name':a51_0x579f31[_0x4cbfec(0x1f7)]('✎\x20Enter\x20manually'),'value':'manual'}]});if(_0x140605==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a52_0x2aa0(){const _0x43d9d6=['toUpperCase','63yTzGnB','taskId','replace','26ejQmpc','errorMessage','has','FAILED','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20--appcode\x20','\x20is\x20processing.','PROCESSING','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','apiError','string','SUCCESS','trim','Async\x20task\x20','PENDING','2265775IHlpdW','492zBIuOH','30144HRWWNJ','\x27\x5c\x27\x27','7445152pFBSjO','1186486XGAIVQ','\x20completed\x20successfully.','Task\x20','status','\x20failed:\x20','805060INXAWk','\x20task\x20status\x20--task-id\x20','44583oeyZrV','\x20--format\x20compress','302128WWOjhF','\x20failed.'];a52_0x2aa0=function(){return _0x43d9d6;};return a52_0x2aa0();}const a52_0x406bfc=a52_0x57e3;(function(_0x471558,_0xacd8bc){const _0x452b4c=a52_0x57e3,_0x301b05=_0x471558();while(!![]){try{const _0x3ad81e=parseInt(_0x452b4c(0x200))/0x1+parseInt(_0x452b4c(0x1ec))/0x2*(-parseInt(_0x452b4c(0x1fd))/0x3)+-parseInt(_0x452b4c(0x209))/0x4+-parseInt(_0x452b4c(0x1fb))/0x5+-parseInt(_0x452b4c(0x1fc))/0x6*(-parseInt(_0x452b4c(0x207))/0x7)+-parseInt(_0x452b4c(0x1ff))/0x8+-parseInt(_0x452b4c(0x1e9))/0x9*(-parseInt(_0x452b4c(0x205))/0xa);if(_0x3ad81e===_0xacd8bc)break;else _0x301b05['push'](_0x301b05['shift']());}catch(_0x28f6b9){_0x301b05['push'](_0x301b05['shift']());}}}(a52_0x2aa0,0xa695b));function a52_0x57e3(_0x51b8ae,_0x28e040){_0x51b8ae=_0x51b8ae-0x1e7;const _0x2aa0fd=a52_0x2aa0();let _0x57e3ba=_0x2aa0fd[_0x51b8ae];return _0x57e3ba;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a52_0x406bfc(0x1f7),a52_0x406bfc(0x1ef)]),NON_TERMINAL_STATUSES=new Set([a52_0x406bfc(0x1fa),a52_0x406bfc(0x1f3)]);export function normalizeAsyncTask(_0x402658){const _0x2b77e2=a52_0x406bfc,_0x583503=typeof _0x402658?.[_0x2b77e2(0x1ea)]===_0x2b77e2(0x1f6)?_0x402658[_0x2b77e2(0x1ea)][_0x2b77e2(0x1f8)]():'';if(!_0x583503)throw CliErrors[_0x2b77e2(0x1f5)](_0x2b77e2(0x1f4));const _0x482b79=typeof _0x402658[_0x2b77e2(0x203)]===_0x2b77e2(0x1f6)?_0x402658['status']['trim']()[_0x2b77e2(0x1e8)]():'';if(!_0x482b79)throw CliErrors['apiError'](_0x2b77e2(0x1f9)+_0x583503+_0x2b77e2(0x1f0));return{'taskId':_0x583503,'status':_0x482b79,'errorMessage':typeof _0x402658[_0x2b77e2(0x1ed)]==='string'&&_0x402658[_0x2b77e2(0x1ed)]['trim']()?_0x402658[_0x2b77e2(0x1ed)][_0x2b77e2(0x1f8)]():null,'isTerminal':TERMINAL_STATUSES[_0x2b77e2(0x1ee)](_0x482b79),'knownStatus':TERMINAL_STATUSES[_0x2b77e2(0x1ee)](_0x482b79)||NON_TERMINAL_STATUSES[_0x2b77e2(0x1ee)](_0x482b79)};}export function buildAsyncTaskStatusCommand(_0x298185,_0x4d49c8){const _0x43f7f9=a52_0x406bfc;return CLI_BIN_NAME+_0x43f7f9(0x206)+quoteShellArg(_0x298185)+_0x43f7f9(0x1f1)+quoteShellArg(_0x4d49c8)+_0x43f7f9(0x208);}export function asyncTaskMessage(_0x3533bb){const _0x4be88e=a52_0x406bfc;switch(_0x3533bb[_0x4be88e(0x203)]){case'PENDING':return'Task\x20'+_0x3533bb['taskId']+'\x20is\x20pending.';case _0x4be88e(0x1f3):return _0x4be88e(0x202)+_0x3533bb['taskId']+_0x4be88e(0x1f2);case _0x4be88e(0x1f7):return _0x4be88e(0x202)+_0x3533bb[_0x4be88e(0x1ea)]+_0x4be88e(0x201);case _0x4be88e(0x1ef):return _0x3533bb['errorMessage']?_0x4be88e(0x202)+_0x3533bb[_0x4be88e(0x1ea)]+_0x4be88e(0x204)+_0x3533bb['errorMessage']:_0x4be88e(0x202)+_0x3533bb[_0x4be88e(0x1ea)]+_0x4be88e(0x1e7);default:return'Task\x20'+_0x3533bb[_0x4be88e(0x1ea)]+'\x20returned\x20unknown\x20status\x20'+_0x3533bb['status']+'.';}}function quoteShellArg(_0x77faad){const _0x43bb28=a52_0x406bfc;return'\x27'+_0x77faad[_0x43bb28(0x1eb)](/'/g,_0x43bb28(0x1fe))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a53_0x2f69(_0xef7391,_0x795670){_0xef7391=_0xef7391-0x19d;var _0x5b1314=a53_0x5b13();var _0x2f69a6=_0x5b1314[_0xef7391];return _0x2f69a6;}function a53_0x5b13(){var _0x1e8469=['11cbPMGl','939088AGrJon','method','96UopZEM','description','688332YJCxgn','25JDfnVC','1296315KdIzHT','522235AYsOsr','282984PjRVzX','url','14qXWoAe','21764VeAEiG','defineProperties','1215790URBXiw'];a53_0x5b13=function(){return _0x1e8469;};return a53_0x5b13();}(function(_0x55097d,_0x463870){var _0x4ac971=a53_0x2f69,_0x35f437=_0x55097d();while(!![]){try{var _0x529c0a=-parseInt(_0x4ac971(0x1a8))/0x1+parseInt(_0x4ac971(0x19d))/0x2*(parseInt(_0x4ac971(0x1a3))/0x3)+parseInt(_0x4ac971(0x1a5))/0x4+-parseInt(_0x4ac971(0x1a6))/0x5*(parseInt(_0x4ac971(0x1a9))/0x6)+-parseInt(_0x4ac971(0x1ab))/0x7*(-parseInt(_0x4ac971(0x1a1))/0x8)+parseInt(_0x4ac971(0x1a7))/0x9+parseInt(_0x4ac971(0x19f))/0xa*(parseInt(_0x4ac971(0x1a0))/0xb);if(_0x529c0a===_0x463870)break;else _0x35f437['push'](_0x35f437['shift']());}catch(_0x592214){_0x35f437['push'](_0x35f437['shift']());}}}(a53_0x5b13,0x401ee));export function asDryRunResult(_0x225e88,_0x414982){var _0x3f6a60=a53_0x2f69;return Object[_0x3f6a60(0x19e)](_0x225e88,{'method':{'value':_0x414982[_0x3f6a60(0x1a2)],'enumerable':![]},'url':{'value':_0x414982[_0x3f6a60(0x1aa)],'enumerable':![]},..._0x414982[_0x3f6a60(0x1a4)]?{'description':{'value':_0x414982[_0x3f6a60(0x1a4)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x13fd32=a54_0x3b5a;(function(_0x5affe7,_0x4089f3){const _0x4ce4bd=a54_0x3b5a,_0x29e54a=_0x5affe7();while(!![]){try{const _0x529476=-parseInt(_0x4ce4bd(0x137))/0x1+parseInt(_0x4ce4bd(0x12b))/0x2+parseInt(_0x4ce4bd(0x13d))/0x3*(-parseInt(_0x4ce4bd(0x134))/0x4)+-parseInt(_0x4ce4bd(0x146))/0x5+-parseInt(_0x4ce4bd(0x140))/0x6*(parseInt(_0x4ce4bd(0x128))/0x7)+parseInt(_0x4ce4bd(0x136))/0x8*(parseInt(_0x4ce4bd(0x139))/0x9)+-parseInt(_0x4ce4bd(0x138))/0xa*(-parseInt(_0x4ce4bd(0x130))/0xb);if(_0x529476===_0x4089f3)break;else _0x29e54a['push'](_0x29e54a['shift']());}catch(_0x14d05b){_0x29e54a['push'](_0x29e54a['shift']());}}}(a54_0x52c6,0xb45cd));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':'from-datasetcode','type':'string','required':!![],'description':'Source\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a54_0x13fd32(0x14a),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x141)};function a54_0x3b5a(_0xa7d3ee,_0x4149ba){_0xa7d3ee=_0xa7d3ee-0x128;const _0x52c6be=a54_0x52c6();let _0x3b5a55=_0x52c6be[_0xa7d3ee];return _0x3b5a55;}export const CROSS_RELATION_TO_DATASET_FLAG={'name':a54_0x13fd32(0x144),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x143)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a54_0x13fd32(0x14b),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x14f)};export const CROSS_RELATION_DBLINK_FLAG={'name':'from-dblink-id','type':a54_0x13fd32(0x14d),'description':a54_0x13fd32(0x13a)};export const CROSS_RELATION_LABEL_FLAG={'name':a54_0x13fd32(0x12d),'type':a54_0x13fd32(0x142),'description':a54_0x13fd32(0x12c)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a54_0x13fd32(0x150),'type':a54_0x13fd32(0x142),'enum':[a54_0x13fd32(0x129),'ONE_TO_MANY',a54_0x13fd32(0x14e),a54_0x13fd32(0x13c)],'description':a54_0x13fd32(0x13f)};export const GLOBAL_SCOPE_FLAG={'name':a54_0x13fd32(0x148),'type':a54_0x13fd32(0x145),'default':![],'description':a54_0x13fd32(0x151)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a54_0x13fd32(0x12a)};export const CODE_FLAG={'name':a54_0x13fd32(0x13b),'type':a54_0x13fd32(0x142),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a54_0x13fd32(0x12e)};export const SQLCODE_FLAG={'name':a54_0x13fd32(0x14c),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x13e),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a54_0x13fd32(0x131)}};export const APPCODE_FLAG_OPTIONAL={'name':a54_0x13fd32(0x133),'type':'string','required':![],'description':a54_0x13fd32(0x135)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};function a54_0x52c6(){const _0x77a1c3=['App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','555568UusJXF','1354746vSTgVY','1990hjyioP','153vcFEtl','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','code','MANY_TO_MANY','6oWUjOV','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','383424WJHMfK','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','string','Target\x20DB_TABLE\x20dataset\x20code','to-datasetcode','boolean','4610065mySQoM','dbtype','global','skip-connection-test','from-column','to-column','sqlcode','number','MANY_TO_ONE','Target\x20field\x20name','cardinality','Write\x20to\x20the\x20global\x20configuration','Database\x20product\x20type','MYSQL','49FsTMnP','ONE_TO_ONE','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','1880682kKKEdr','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','to-label-column','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','111683gpxqUw','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','appcode','1357036uanBlu'];a54_0x52c6=function(){return _0x77a1c3;};return a54_0x52c6();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a54_0x13fd32(0x12f)};export const DB_TYPE_FLAG={'name':a54_0x13fd32(0x147),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x152),'enum':[a54_0x13fd32(0x153),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a54_0x13fd32(0x149),'type':a54_0x13fd32(0x145),'description':a54_0x13fd32(0x132)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a55_0x1ae5(_0x91a8f5,_0x3e1ed4){_0x91a8f5=_0x91a8f5-0xef;const _0x462174=a55_0x4621();let _0x1ae520=_0x462174[_0x91a8f5];return _0x1ae520;}(function(_0x28218d,_0x298b28){const _0x2210dd=a55_0x1ae5,_0x28934f=_0x28218d();while(!![]){try{const _0x310ecb=parseInt(_0x2210dd(0xf7))/0x1+-parseInt(_0x2210dd(0xfa))/0x2+-parseInt(_0x2210dd(0xf1))/0x3*(-parseInt(_0x2210dd(0xff))/0x4)+parseInt(_0x2210dd(0xf3))/0x5*(parseInt(_0x2210dd(0x100))/0x6)+parseInt(_0x2210dd(0xfe))/0x7*(parseInt(_0x2210dd(0xf5))/0x8)+parseInt(_0x2210dd(0x101))/0x9+-parseInt(_0x2210dd(0xfc))/0xa;if(_0x310ecb===_0x298b28)break;else _0x28934f['push'](_0x28934f['shift']());}catch(_0x135947){_0x28934f['push'](_0x28934f['shift']());}}}(a55_0x4621,0xec32b));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 a55_0x4621(){const _0x581b66=['trim','365NuoHHF','validation','14499872PGQESr','\x20path\x20is\x20required.','1572471DDfYlb','size','File\x20not\x20found:\x20','3383036mwOwFe','File\x20is\x20not\x20a\x20regular\x20file:\x20','31659830paVqpV','ceil','7vQvXHB','148qdmHOC','39426cpvixw','3974985TLLOPH','isFile','toFixed','123135SArBwc'];a55_0x4621=function(){return _0x581b66;};return a55_0x4621();}function formatBytes(_0x292cd1){const _0x4c1578=a55_0x1ae5;if(_0x292cd1>=BYTES_PER_MB){const _0x3bddc3=Math[_0x4c1578(0xfd)](_0x292cd1/BYTES_PER_MB*0x64)/0x64;return _0x3bddc3[_0x4c1578(0xf0)](0x2)+'\x20MB';}return _0x292cd1+'\x20B';}export function requireDevelopmentUploadFile(_0x3e9035,_0x28eec3){const _0xdf5e76=a55_0x1ae5,_0x1e5efe=_0x3e9035[_0xdf5e76(0xf2)]();if(!_0x1e5efe)throw CliErrors[_0xdf5e76(0xf4)](_0x28eec3+_0xdf5e76(0xf6));if(!existsSync(_0x1e5efe))throw CliErrors['validation'](_0xdf5e76(0xf9)+_0x1e5efe);const _0x548851=statSync(_0x1e5efe);if(!_0x548851[_0xdf5e76(0xef)]())throw CliErrors[_0xdf5e76(0xf4)](_0xdf5e76(0xfb)+_0x1e5efe);if(_0x548851[_0xdf5e76(0xf8)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x1e5efe+'\x20('+formatBytes(_0x548851[_0xdf5e76(0xf8)])+')');return{'path':_0x1e5efe,'size':_0x548851[_0xdf5e76(0xf8)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xdb617f,_0x21e44e){const _0x500d62=a56_0xb3a6,_0x2ebcf5=_0xdb617f();while(!![]){try{const _0x3fc563=-parseInt(_0x500d62(0xb0))/0x1*(parseInt(_0x500d62(0xb3))/0x2)+parseInt(_0x500d62(0xbb))/0x3*(parseInt(_0x500d62(0xb9))/0x4)+parseInt(_0x500d62(0xb1))/0x5+parseInt(_0x500d62(0xb8))/0x6*(parseInt(_0x500d62(0xbc))/0x7)+-parseInt(_0x500d62(0xb4))/0x8+-parseInt(_0x500d62(0xb6))/0x9*(-parseInt(_0x500d62(0xad))/0xa)+-parseInt(_0x500d62(0xb2))/0xb;if(_0x3fc563===_0x21e44e)break;else _0x2ebcf5['push'](_0x2ebcf5['shift']());}catch(_0x15c768){_0x2ebcf5['push'](_0x2ebcf5['shift']());}}}(a56_0x4a12,0xcc216));function a56_0xb3a6(_0x100000,_0x3bc066){_0x100000=_0x100000-0xad;const _0x4a120a=a56_0x4a12();let _0xb3a62d=_0x4a120a[_0x100000];return _0xb3a62d;}function a56_0x4a12(){const _0x1ff6f6=['10hxIKpd','App\x20Code\x20cannot\x20be\x20empty','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1648uECYTP','6495115mhwzUI','19212864OMPXGA','1522eBIPdd','1460616stBVOE','length','6934041KAlDqi','test','209478eilKzG','5006860PxwAPM','trim','3vTtXzz','140mTXFRE'];a56_0x4a12=function(){return _0x1ff6f6;};return a56_0x4a12();}export function validateAppcode(_0x24c1db){const _0x282e74=a56_0xb3a6,_0x843d59=_0x24c1db[_0x282e74(0xba)]();if(!_0x843d59)return{'valid':![],'message':_0x282e74(0xae)};if(_0x843d59[_0x282e74(0xb5)]>0x64)return{'valid':![],'message':_0x282e74(0xaf)};if(!/^[A-Za-z0-9_-]+$/[_0x282e74(0xb7)](_0x843d59))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x5d173e=a57_0x51d7;function a57_0x51d7(_0x123979,_0x3fbbbf){_0x123979=_0x123979-0x81;const _0x57f49d=a57_0x57f4();let _0x51d754=_0x57f49d[_0x123979];return _0x51d754;}(function(_0x51afa6,_0x104c18){const _0x241144=a57_0x51d7,_0xae6859=_0x51afa6();while(!![]){try{const _0x33f333=-parseInt(_0x241144(0x86))/0x1+parseInt(_0x241144(0x91))/0x2*(parseInt(_0x241144(0x81))/0x3)+parseInt(_0x241144(0xa0))/0x4*(parseInt(_0x241144(0x9d))/0x5)+parseInt(_0x241144(0x83))/0x6*(parseInt(_0x241144(0x8d))/0x7)+-parseInt(_0x241144(0x85))/0x8+-parseInt(_0x241144(0x90))/0x9*(-parseInt(_0x241144(0xa2))/0xa)+-parseInt(_0x241144(0x9c))/0xb;if(_0x33f333===_0x104c18)break;else _0xae6859['push'](_0xae6859['shift']());}catch(_0x3c2f40){_0xae6859['push'](_0xae6859['shift']());}}}(a57_0x57f4,0x6186f));import{CliErrors}from'../../errors.js';function a57_0x57f4(){const _0x570b27=['3UbBOaY','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','6924NzPMyp','\x22\x20is\x20not\x20deletable.','3704264BIAazx','517456yYMHgN','\x20config\x20delete\x20<key>\x20[--global]','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','args','riskLevel','Project','623YXaVif','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','Global','63vUchmo','1108596SEVLfl','Usage:\x20','trim','Missing\x20key\x20argument.','validation','delete','has','global','\x20already\x20absent','Top-level\x20key\x20\x22','bool','1048278KKKSdH','20MXcBfj','routing','config','358480qwUHoz','defaultApp','656820QwVdzx','boolean'];a57_0x57f4=function(){return _0x570b27;};return a57_0x57f4();}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a57_0x5d173e(0xa1),a57_0x5d173e(0x9e)]);async function execute(_0x4d1625){const _0x30130c=a57_0x5d173e,_0x296b18=_0x4d1625[_0x30130c(0x8a)][0x0]?.[_0x30130c(0x93)]();if(!_0x296b18)throw CliErrors[_0x30130c(0x95)](_0x30130c(0x94),_0x30130c(0x92)+CLI_BIN_NAME+_0x30130c(0x87));if(_0x296b18===_0x30130c(0x8b))throw CliErrors[_0x30130c(0x95)](_0x30130c(0x82));if(!isTopLevelConfigKey(_0x296b18)&&!EXTRA_DELETABLE_KEYS[_0x30130c(0x97)](_0x296b18)&&!LEGACY_DELETABLE_KEYS['has'](_0x296b18))throw CliErrors[_0x30130c(0x95)](_0x30130c(0x9a)+_0x296b18+_0x30130c(0x84),_0x30130c(0x8e));const _0x528ee0=resolveWriteScope({'global':_0x4d1625[_0x30130c(0x9b)](_0x30130c(0x98))}),_0x591845=readScopedConfig(_0x528ee0),_0x2e8162=Object['prototype']['hasOwnProperty']['call'](_0x591845,_0x296b18);_0x2e8162&&(delete _0x591845[_0x296b18],writeScopedConfig(_0x591845,_0x528ee0));const _0x3bf936=_0x528ee0===_0x30130c(0x98)?_0x30130c(0x8f):_0x30130c(0x8c);return{'ok':!![],'message':_0x2e8162?'✓\x20'+_0x3bf936+'\x20'+_0x296b18+'\x20deleted':'✓\x20'+_0x3bf936+'\x20'+_0x296b18+_0x30130c(0x99),'data':{'key':_0x296b18,'scope':_0x528ee0,'changed':_0x2e8162}};}export const configDeleteDefinition={'service':a57_0x5d173e(0x9f),'command':a57_0x5d173e(0x96),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a57_0x5d173e(0x88),'required':!![]}],'flags':[{'name':a57_0x5d173e(0x98),'type':a57_0x5d173e(0xa3),'description':a57_0x5d173e(0x89),'default':![]}],'execute':execute};
|