@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x197c1a=a44_0x40cc;(function(_0x1cbba4,_0x4a831a){const _0x1b4b46=a44_0x40cc,_0x55591f=_0x1cbba4();while(!![]){try{const _0x269dd6=parseInt(_0x1b4b46(0x22e))/0x1+-parseInt(_0x1b4b46(0x1f6))/0x2*(-parseInt(_0x1b4b46(0x1ed))/0x3)+parseInt(_0x1b4b46(0x22c))/0x4+parseInt(_0x1b4b46(0x214))/0x5+parseInt(_0x1b4b46(0x242))/0x6+parseInt(_0x1b4b46(0x202))/0x7*(parseInt(_0x1b4b46(0x240))/0x8)+-parseInt(_0x1b4b46(0x1fc))/0x9*(parseInt(_0x1b4b46(0x222))/0xa);if(_0x269dd6===_0x4a831a)break;else _0x55591f['push'](_0x55591f['shift']());}catch(_0x314950){_0x55591f['push'](_0x55591f['shift']());}}}(a44_0x4cca,0xef7b7));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a44_0x40cc(_0x9ec71b,_0x1de5f8){_0x9ec71b=_0x9ec71b-0x1e1;const _0x4ccae3=a44_0x4cca();let _0x40ccdc=_0x4ccae3[_0x9ec71b];return _0x40ccdc;}import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';function a44_0x4cca(){const _0x156b15=['validation','scriptType','Push\x20only\x20this\x20script\x20type','datasetCode','selectedAppName','functions','datasetId','HOOK_DATASET_NOT_FOUND:','3045338JARtno','filePath','attempted','version','force','warnings','3087NmdZic','dataset','has','Push\x20complete:\x20','length','hash','27839fMnoOG','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','size','\x20skipped','cleared','flatMap','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','failed','beforeScriptId','alias','functionNode','\x20uploaded','after','utf8','profileName','\x20failed','Lock\x20scope\x20for\x20app\x20\x22','remoteId','5978595aVoDtN','update','lastSync','test',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','join','string','map','Force\x20push\x20ignoring\x20hash\x20protection','POST','mergedCli','requires','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','functionName','185530wlRqho','message','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','appCode','str','HOOK','BFF_REMOTE_VERSION_MISSING','apiDir','toISOString','existingHooks','1538584bIPGik','lockFilePath','1242909ajJGgQ','filter','operationType','delete','script','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','bff','apps','currentApp','BFF_REMOTE_VERSION_CHANGED','add','scriptsRoot','\x20resolution','write','defaultApp','parse','EXISTING_HOOK_BINDING_PRESERVED','type','3768MErRWY','before','6752928tNPqEq','Runtime\x20script\x20cache\x20cleared.','status','name','resolutions','some','bool','ENDPOINT','\x22\x20not\x20found\x20after\x20ensureLockScope.','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','get','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','unchanged','set','COMMON','\x20bff\x20detail\x20--id\x20','failures','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','description','runtime\x20cache\x20clear\x20failed','would_push','values','push','runtime\x20cache\x20not\x20needed','boolean','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','No\x20local\x20Backend\x20Function\x20scripts\x20found.','review_remote_and_merge','require','lockKey','3ImoCBG'];a44_0x4cca=function(){return _0x156b15;};return a44_0x4cca();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0x197c1a(0x234),'command':a44_0x197c1a(0x1e5),'description':a44_0x197c1a(0x203),'risk':a44_0x197c1a(0x23b),'structuredErrors':!![],'flags':[{'name':a44_0x197c1a(0x23f),'type':a44_0x197c1a(0x21a),'description':a44_0x197c1a(0x1f0),'enum':[a44_0x197c1a(0x250),a44_0x197c1a(0x249),'HOOK']},{'name':a44_0x197c1a(0x245),'type':a44_0x197c1a(0x21a),'description':a44_0x197c1a(0x24d)},{'name':a44_0x197c1a(0x1fa),'type':a44_0x197c1a(0x1e7),'description':a44_0x197c1a(0x21c)}],async 'dryRun'(_0xab1951){const _0x53479c=a44_0x197c1a,_0x323362=loadBffProjectConfig(_0xab1951[_0x53479c(0x225)]),_0x3a7f74=await readBffLockFile(_0x323362['lockFilePath']),{appLock:_0x5b9466}=ensureLockScope(_0x3a7f74??createEmptyBffLock(),_0xab1951['appCode'],_0x323362[_0x53479c(0x239)],_0x53479c(0x1e5)),_0x23dd90=await getTargetFunctions(_0x323362,_0xab1951),_0xfd089b=_0x23dd90[_0x53479c(0x247)](_0x56e036=>_0x56e036[_0x53479c(0x23f)]===_0x53479c(0x227))?await scanLocalBffFunctions(_0x323362,_0x53479c(0x227)):_0x23dd90,_0x3da653=await buildHookMaps(_0xab1951[_0x53479c(0x225)],_0xab1951[_0x53479c(0x229)],_0xfd089b,_0x5b9466,_0xab1951[_0x53479c(0x1f2)]||_0xab1951[_0x53479c(0x21e)]?.['currentApp']||_0xab1951[_0x53479c(0x21e)]?.[_0x53479c(0x23c)]),_0x52d590=_0xab1951[_0x53479c(0x248)](_0x53479c(0x1fa)),_0x1066db=[];for(const _0x3db1ee of _0x23dd90){const _0x4abcbd=await computeFileHash(_0x3db1ee[_0x53479c(0x1f7)]),_0x42d91a=_0x5b9466['functions'][_0x3db1ee[_0x53479c(0x1ec)]],_0x1d6693=!!_0x42d91a&&_0x42d91a[_0x53479c(0x201)]===_0x4abcbd,_0x43f006=_0x3da653[_0x53479c(0x246)]['get'](_0x3db1ee[_0x53479c(0x1ec)]),_0x18c350=!!_0x42d91a?.[_0x53479c(0x213)]&&_0x42d91a[_0x53479c(0x1f9)]==null&&(_0x52d590||!_0x1d6693),_0x2cbfdf=_0x18c350?missingRemoteVersionConflict(_0x3db1ee,_0x42d91a):undefined,_0x2688a5=_0x3da653[_0x53479c(0x252)][_0x53479c(0x1fe)](_0x3db1ee[_0x53479c(0x1ec)])?_0x53479c(0x209):!_0x52d590&&_0x1d6693?'unchanged':_0x2cbfdf?'conflict':'would_push';_0x1066db[_0x53479c(0x1e5)]({'lockKey':_0x3db1ee['lockKey'],'filePath':_0x3db1ee[_0x53479c(0x1f7)],'remoteId':_0x42d91a?.[_0x53479c(0x213)]??null,'mode':_0x42d91a?.[_0x53479c(0x213)]?_0x53479c(0x215):'create','status':_0x2688a5,..._0x3da653[_0x53479c(0x252)][_0x53479c(0x1fe)](_0x3db1ee[_0x53479c(0x1ec)])?{'error':_0x3da653[_0x53479c(0x252)][_0x53479c(0x24c)](_0x3db1ee[_0x53479c(0x1ec)])}:{},..._0x2cbfdf?{'conflict':_0x2cbfdf}:{},..._0x3da653[_0x53479c(0x22b)]['has'](_0x3db1ee[_0x53479c(0x1ec)])?{'datasetCode':_0x42d91a?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x3db1ee['lockKey'])]}:{},..._0x43f006?{'alias':_0x43f006[_0x53479c(0x20b)]??null,'datasetCode':_0x43f006['datasetCode'],'operationType':_0x3db1ee[_0x53479c(0x230)],'functionNode':_0x3db1ee[_0x53479c(0x20c)],'warnings':_0x43f006[_0x53479c(0x1fb)]}:{}});}return{'method':_0x53479c(0x21d),'url':'/api/management/library/scripts/save','body':{'appCode':_0xab1951[_0x53479c(0x225)],'force':_0x52d590,'files':_0x1066db,'cacheClearAtRuntime':_0x1066db[_0x53479c(0x247)](_0x7cb2fe=>_0x7cb2fe[_0x53479c(0x244)]==='would_push'),'cacheClearAtRuntimeTimes':_0x1066db[_0x53479c(0x247)](_0x30e0fe=>_0x30e0fe[_0x53479c(0x244)]===_0x53479c(0x1e3))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x1066db['length']+_0x53479c(0x224)};},async 'execute'(_0x3204c6){const _0x2d4ef7=a44_0x197c1a,_0x38f16c=loadBffProjectConfig(_0x3204c6['appCode']),_0x5b9ced=await readBffLockFile(_0x38f16c[_0x2d4ef7(0x22d)]),{lockData:_0x3b9550,appLock:_0x230067}=ensureLockScope(_0x5b9ced??createEmptyBffLock(),_0x3204c6[_0x2d4ef7(0x225)],_0x38f16c['scriptsRoot'],_0x2d4ef7(0x1e5)),_0x4fbee9=await getTargetFunctions(_0x38f16c,_0x3204c6);if(_0x4fbee9[_0x2d4ef7(0x200)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x2d4ef7(0x1e9)};const _0x84a65f=_0x3204c6['bool'](_0x2d4ef7(0x1fa)),_0x25d175=JSON[_0x2d4ef7(0x23d)](JSON['stringify'](_0x3b9550)),_0x173e48=_0x25d175['apps'][_0x3204c6[_0x2d4ef7(0x225)]];if(!_0x173e48)throw new Error(_0x2d4ef7(0x212)+_0x3204c6[_0x2d4ef7(0x225)]+_0x2d4ef7(0x24a));const _0x522fd1=_0x4fbee9[_0x2d4ef7(0x247)](_0x105fd3=>_0x105fd3[_0x2d4ef7(0x23f)]===_0x2d4ef7(0x227))?await scanLocalBffFunctions(_0x38f16c,_0x2d4ef7(0x227)):_0x4fbee9,_0x3a99a3=await buildHookMaps(_0x3204c6[_0x2d4ef7(0x225)],_0x3204c6[_0x2d4ef7(0x229)],_0x522fd1,_0x173e48,_0x3204c6[_0x2d4ef7(0x1f2)]||_0x3204c6[_0x2d4ef7(0x21e)]?.[_0x2d4ef7(0x236)]||_0x3204c6[_0x2d4ef7(0x21e)]?.[_0x2d4ef7(0x23c)]),_0x4df3ef=[],_0xb4251d=[],_0x47d4e1=[],_0x395f7f=[];for(const _0x4896e8 of _0x4fbee9){const _0x17ff73=_0x3a99a3[_0x2d4ef7(0x252)][_0x2d4ef7(0x24c)](_0x4896e8['lockKey']);if(_0x17ff73){_0x395f7f[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'error':_0x17ff73});continue;}const _0x1b8819=await computeFileHash(_0x4896e8[_0x2d4ef7(0x1f7)]),_0x13a22e=_0x173e48['functions'][_0x4896e8[_0x2d4ef7(0x1ec)]];if(!_0x84a65f&&_0x13a22e&&_0x13a22e['hash']===_0x1b8819){_0xb4251d[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'reason':_0x2d4ef7(0x24e)});continue;}if(_0x13a22e?.[_0x2d4ef7(0x213)]&&_0x13a22e[_0x2d4ef7(0x1f9)]==null){_0x47d4e1[_0x2d4ef7(0x1e5)](missingRemoteVersionConflict(_0x4896e8,_0x13a22e));continue;}try{await uploadSingleFunction(_0x3204c6[_0x2d4ef7(0x225)],_0x4896e8,_0x173e48,_0x3a99a3);const _0x51013a=_0x173e48[_0x2d4ef7(0x1f3)][_0x4896e8[_0x2d4ef7(0x1ec)]];_0x4df3ef[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'remoteId':_0x51013a?.[_0x2d4ef7(0x213)]??0x0});}catch(_0x7e652f){const _0x27aa93=remoteVersionChangedConflict(_0x4896e8,_0x13a22e,_0x7e652f);if(_0x27aa93){_0x47d4e1[_0x2d4ef7(0x1e5)](_0x27aa93);continue;}_0x395f7f[_0x2d4ef7(0x1e5)]({'lockKey':_0x4896e8[_0x2d4ef7(0x1ec)],'error':_0x7e652f instanceof Error?_0x7e652f[_0x2d4ef7(0x223)]:String(_0x7e652f)});}}_0x173e48[_0x2d4ef7(0x216)]=new Date()[_0x2d4ef7(0x22a)](),await writeBffLockFile(_0x38f16c[_0x2d4ef7(0x22d)],_0x25d175),await waitForUploadedLockEntries(_0x38f16c[_0x2d4ef7(0x22d)],_0x3204c6['appCode'],_0x4df3ef[_0x2d4ef7(0x21b)](_0x1bae03=>_0x1bae03['lockKey']));let _0x34b055={'attempted':![],'cleared':![]};if(_0x4df3ef[_0x2d4ef7(0x200)]>0x0)try{let _0x1a1387='';for(let _0x21e090=0x0;_0x21e090<CACHE_CLEAR_ATTEMPTS;_0x21e090+=0x1){_0x1a1387=await clearBffScriptCache(),_0x21e090<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x34b055={'attempted':!![],'cleared':!![],'message':_0x1a1387||_0x2d4ef7(0x243)};}catch(_0x48d28d){_0x34b055={'attempted':!![],'cleared':![],'error':_0x48d28d instanceof Error?_0x48d28d[_0x2d4ef7(0x223)]:String(_0x48d28d)};}const _0x8d7a7e=_0x395f7f[_0x2d4ef7(0x200)]===0x0&&(_0x34b055[_0x2d4ef7(0x1f8)]?_0x34b055[_0x2d4ef7(0x206)]:!![]),_0x27b95c=_0x8d7a7e,_0x3dced5=_0x34b055[_0x2d4ef7(0x1f8)]?_0x34b055[_0x2d4ef7(0x206)]?'runtime\x20cache\x20cleared':_0x2d4ef7(0x1e2):_0x2d4ef7(0x1e6);return{'ok':_0x27b95c,'data':{'uploaded':_0x4df3ef,'skipped':_0xb4251d,'conflicts':_0x47d4e1,'failed':_0x395f7f,'cacheClear':_0x34b055,'warnings':[...[..._0x3a99a3[_0x2d4ef7(0x246)][_0x2d4ef7(0x1e4)]()][_0x2d4ef7(0x207)](_0x3a18fd=>_0x3a18fd[_0x2d4ef7(0x1fb)]),...[..._0x3a99a3[_0x2d4ef7(0x22b)]][_0x2d4ef7(0x21b)](existingHookWarning)]},'message':formatPushMessage(_0x4df3ef[_0x2d4ef7(0x200)],_0xb4251d[_0x2d4ef7(0x200)],_0x47d4e1[_0x2d4ef7(0x200)],_0x395f7f[_0x2d4ef7(0x200)],_0x3dced5)};}};function missingRemoteVersionConflict(_0x3c0514,_0x35a6ad){const _0x495cd7=a44_0x197c1a;return remoteVersionConflict(_0x3c0514,_0x35a6ad,_0x495cd7(0x228),_0x495cd7(0x24b));}function remoteVersionChangedConflict(_0x214c16,_0x569353,_0x368b6f){const _0x59cb69=a44_0x197c1a;if(!_0x569353?.['remoteId']||_0x569353[_0x59cb69(0x1f9)]==null||!isRemoteVersionConflict(_0x368b6f))return undefined;return remoteVersionConflict(_0x214c16,_0x569353,_0x59cb69(0x237),_0x59cb69(0x253));}function remoteVersionConflict(_0x474711,_0x1f4e59,_0x546e32,_0x483c16){const _0x436966=a44_0x197c1a;return{'code':_0x546e32,'lockKey':_0x474711[_0x436966(0x1ec)],'filePath':_0x474711[_0x436966(0x1f7)],'remoteId':_0x1f4e59[_0x436966(0x213)],..._0x1f4e59[_0x436966(0x1f9)]!=null?{'expectedVersion':_0x1f4e59[_0x436966(0x1f9)]}:{},'message':_0x483c16,'nextAction':{'action':_0x436966(0x1ea),'command':CLI_BIN_NAME+_0x436966(0x251)+_0x1f4e59[_0x436966(0x213)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x436966(0x233)}};}function isRemoteVersionConflict(_0x58ee56){const _0x5144ac=a44_0x197c1a,_0x1e907f=_0x58ee56 instanceof Error?_0x58ee56[_0x5144ac(0x223)]:String(_0x58ee56),_0x5957d2=getPlatformErrorCode(_0x58ee56)??'';return[_0x1e907f,_0x5957d2][_0x5144ac(0x247)](_0x1ede1e=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x5144ac(0x217)](_0x1ede1e));}function formatPushMessage(_0x4a3549,_0x26df7b,_0x44a82d,_0x2bb0ce,_0x4947a6){const _0x553b6d=a44_0x197c1a,_0x38e8ec=[_0x553b6d(0x1ff)+_0x4a3549+_0x553b6d(0x20d),_0x26df7b+_0x553b6d(0x205)];_0x44a82d>0x0&&_0x38e8ec[_0x553b6d(0x1e5)](_0x44a82d+'\x20conflict'+(_0x44a82d===0x1?'':'s')+'\x20'+(_0x44a82d===0x1?_0x553b6d(0x21f):_0x553b6d(0x1eb))+_0x553b6d(0x23a));if(_0x2bb0ce>0x0)_0x38e8ec['push'](_0x2bb0ce+_0x553b6d(0x211));return _0x38e8ec[_0x553b6d(0x1e5)](_0x4947a6),_0x38e8ec[_0x553b6d(0x219)](',\x20');}async function getTargetFunctions(_0x509f7c,_0x313e55){const _0xc7987f=a44_0x197c1a,_0x41897f=_0x313e55[_0xc7987f(0x226)](_0xc7987f(0x23f)),_0x3d6407=_0x313e55[_0xc7987f(0x226)](_0xc7987f(0x245)),_0x5dcc61=normalizeBffType(_0x41897f)??undefined;if(_0x3d6407&&!_0x5dcc61)throw CliErrors[_0xc7987f(0x1ee)](_0xc7987f(0x1e8));const _0x556a79=await scanLocalBffFunctions(_0x509f7c,_0x5dcc61);if(_0x3d6407){const _0x30abc9=_0x556a79[_0xc7987f(0x22f)](_0x24a621=>_0x24a621['name']===_0x3d6407);if(_0x30abc9[_0xc7987f(0x200)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x5dcc61+'/'+_0x3d6407);return _0x30abc9;}return _0x556a79;}function existingHookWarning(_0x4d91ec){const _0x274e57=a44_0x197c1a;return{'code':_0x274e57(0x23e),'lockKey':_0x4d91ec,'message':'Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.'};}async function buildHookMaps(_0x34f34f,_0x473c83,_0x57ad5e,_0x1f0e29,_0x20a3c5){const _0x4506b3=a44_0x197c1a,_0x44cba5=_0x57ad5e['some'](_0x2ed58c=>_0x2ed58c['type']===_0x4506b3(0x227));if(!_0x44cba5)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x2555e1=resolveApiModelSource(_0x473c83,_0x34f34f,_0x20a3c5),_0x2fe370=loadAliasMap(_0x473c83,undefined,_0x2555e1[_0x4506b3(0x1f7)],_0x2555e1[_0x4506b3(0x210)]);assertUnambiguousHookAliases(_0x2fe370);const _0x3b5466=[..._0x2fe370[_0x4506b3(0x21b)](_0x541009=>[_0x541009['alias'],_0x541009[_0x4506b3(0x1f1)]]),...trackedHookDirectoryMappings(_0x1f0e29)[_0x4506b3(0x21b)](_0x3914a3=>[_0x3914a3[_0x4506b3(0x20b)],_0x3914a3[_0x4506b3(0x1f1)]])],_0x1a48a2=await listDatasets(_0x34f34f);assertUnambiguousHookDirectoryMappings(_0x3b5466[_0x4506b3(0x21b)](([_0x15f647,_0xa26cbf])=>({'alias':_0x15f647,'datasetCode':_0xa26cbf})));const _0x3c248a=buildHookDirectoryIndexes(_0x1a48a2,_0x3b5466),_0x34f32d=new Map(),_0x45d1c6=preflightPushHookDirectories(_0x57ad5e,_0x1f0e29,_0x3c248a,_0x34f32d),_0x44b18b=new Set(),_0x34ac15=_0x57ad5e[_0x4506b3(0x22f)](_0x413624=>_0x34f32d[_0x4506b3(0x24c)](_0x413624['lockKey'])?.['startsWith'](_0x4506b3(0x1f5))&&_0x1f0e29[_0x4506b3(0x1f3)][_0x413624[_0x4506b3(0x1ec)]]?.[_0x4506b3(0x213)]&&_0x1f0e29['functions'][_0x413624[_0x4506b3(0x1ec)]]?.[_0x4506b3(0x1f1)]);if(_0x34ac15['length']>0x0){let _0x47fba1;try{_0x47fba1=await getBffScriptStatistics(_0x34f34f);}catch(_0x1ac0c9){for(const _0x4ea93b of _0x34ac15)_0x34f32d[_0x4506b3(0x24f)](_0x4ea93b[_0x4506b3(0x1ec)],_0x4506b3(0x208)+(_0x1ac0c9 instanceof Error?_0x1ac0c9[_0x4506b3(0x223)]:String(_0x1ac0c9)));return{'resolutions':_0x45d1c6,'failures':_0x34f32d,'existingHooks':_0x44b18b};}for(const _0x4ae36a of _0x34ac15){const _0xce08a3=_0x1f0e29['functions'][_0x4ae36a['lockKey']];try{const _0xa276c2=new Set(_0x57ad5e[_0x4506b3(0x22f)](_0x318bbd=>_0x318bbd[_0x4506b3(0x23f)]===_0x4506b3(0x227)&&_0x1f0e29[_0x4506b3(0x1f3)][_0x318bbd['lockKey']]?.[_0x4506b3(0x1f1)]===_0xce08a3[_0x4506b3(0x1f1)])[_0x4506b3(0x21b)](_0xec443b=>_0xec443b['alias']));if(_0xa276c2[_0x4506b3(0x204)]>0x1)throw CliErrors['validation']('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x122dfa=_0x47fba1[_0x4506b3(0x207)](_0x3f0073=>[{'datasetCode':_0x3f0073[_0x4506b3(0x1f1)],'operationType':snakeToCamel(_0x3f0073[_0x4506b3(0x230)]),'functionNode':_0x4506b3(0x241),'id':_0x3f0073[_0x4506b3(0x20a)]},{'datasetCode':_0x3f0073['datasetCode'],'operationType':snakeToCamel(_0x3f0073[_0x4506b3(0x230)]),'functionNode':_0x4506b3(0x20e),'id':_0x3f0073['afterScriptId']}])[_0x4506b3(0x22f)](_0x448ae6=>_0x448ae6['id']===_0xce08a3[_0x4506b3(0x213)]),_0x5435e1=await getBffScriptInfo(_0xce08a3[_0x4506b3(0x213)]);if(_0x5435e1['id']!==_0xce08a3[_0x4506b3(0x213)]||_0x5435e1[_0x4506b3(0x225)]!==_0x34f34f||_0x5435e1[_0x4506b3(0x1ef)]!==_0x4506b3(0x227)||_0x5435e1[_0x4506b3(0x221)]!==_0x4ae36a[_0x4506b3(0x245)]||_0xce08a3[_0x4506b3(0x1f9)]==null||_0x5435e1['version']!==_0xce08a3[_0x4506b3(0x1f9)]||_0x122dfa[_0x4506b3(0x200)]!==0x1||_0x122dfa[0x0]['datasetCode']!==_0xce08a3['datasetCode']||_0x122dfa[0x0][_0x4506b3(0x230)]!==_0x4ae36a[_0x4506b3(0x230)]||_0x122dfa[0x0]['functionNode']!==_0x4ae36a[_0x4506b3(0x20c)]||_0xce08a3[_0x4506b3(0x230)]!==_0x4ae36a[_0x4506b3(0x230)]||_0xce08a3['functionNode']!==_0x4ae36a['functionNode'])throw CliErrors['validation']('Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.');_0x44b18b[_0x4506b3(0x238)](_0x4ae36a[_0x4506b3(0x1ec)]),_0x34f32d[_0x4506b3(0x231)](_0x4ae36a[_0x4506b3(0x1ec)]);}catch(_0xbfdaa8){_0x34f32d['set'](_0x4ae36a[_0x4506b3(0x1ec)],_0xbfdaa8 instanceof Error?_0xbfdaa8['message']:String(_0xbfdaa8));}}}return{'resolutions':_0x45d1c6,'failures':_0x34f32d,'existingHooks':_0x44b18b};}async function uploadSingleFunction(_0x148dc9,_0x4c91ac,_0x50545e,_0x42a2ed){const _0x39e5a5=a44_0x197c1a,_0x1fb094=await readFile(_0x4c91ac[_0x39e5a5(0x1f7)],_0x39e5a5(0x20f)),_0xdf5d23=await computeFileHash(_0x4c91ac[_0x39e5a5(0x1f7)]),_0x4cfb23=_0x50545e[_0x39e5a5(0x1f3)][_0x4c91ac[_0x39e5a5(0x1ec)]];if(_0x4cfb23?.[_0x39e5a5(0x213)]&&_0x4cfb23[_0x39e5a5(0x1f9)]==null)throw CliErrors['validation'](_0x4c91ac[_0x39e5a5(0x1ec)]+_0x39e5a5(0x218));let _0x42033e=extractScriptDescription(_0x1fb094);if(!_0x42033e&&_0x4cfb23?.[_0x39e5a5(0x213)]){const _0x554e59=await getBffScriptInfo(_0x4cfb23['remoteId']);_0x42033e=_0x554e59['description']||undefined;}const _0xaabb8c={'appCode':_0x148dc9,'functionName':_0x4c91ac[_0x39e5a5(0x245)],'scriptType':_0x4c91ac['type'],'scriptContent':_0x1fb094};if(_0x4cfb23?.[_0x39e5a5(0x213)])_0xaabb8c['id']=_0x4cfb23[_0x39e5a5(0x213)];if(_0x4cfb23?.[_0x39e5a5(0x1f9)]!=null)_0xaabb8c['version']=_0x4cfb23[_0x39e5a5(0x1f9)];if(_0x42033e)_0xaabb8c[_0x39e5a5(0x1e1)]=_0x42033e;if(_0x4c91ac[_0x39e5a5(0x23f)]===_0x39e5a5(0x227)){const _0x27ee42=_0x42a2ed['resolutions'][_0x39e5a5(0x24c)](_0x4c91ac['lockKey']);if(!_0x27ee42&&!_0x42a2ed[_0x39e5a5(0x22b)][_0x39e5a5(0x1fe)](_0x4c91ac[_0x39e5a5(0x1ec)])||!_0x4c91ac['operationType']||!_0x4c91ac[_0x39e5a5(0x20c)])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x4c91ac[_0x39e5a5(0x1ec)]);_0x27ee42&&(_0xaabb8c[_0x39e5a5(0x1f4)]=_0x27ee42[_0x39e5a5(0x1fd)]['id'],_0xaabb8c[_0x39e5a5(0x230)]=_0x4c91ac[_0x39e5a5(0x230)]),_0xaabb8c[_0x39e5a5(0x20c)]=_0x4c91ac['functionNode'];}const _0x56bf4c=await saveBffScript(_0xaabb8c),_0x562b05=_0x56bf4c['id'],_0x12a30b=_0x56bf4c[_0x39e5a5(0x232)]??await getBffScriptInfo(_0x562b05),_0x29ac57={'hash':_0xdf5d23,'remoteId':_0x562b05,'version':_0x12a30b[_0x39e5a5(0x1f9)]};if(_0x4c91ac[_0x39e5a5(0x23f)]===_0x39e5a5(0x227)){const _0x26b184=_0x42a2ed[_0x39e5a5(0x246)][_0x39e5a5(0x24c)](_0x4c91ac[_0x39e5a5(0x1ec)]);if(!_0x26b184){_0x50545e['functions'][_0x4c91ac['lockKey']]={..._0x4cfb23,..._0x29ac57};return;}_0x29ac57['alias']=_0x26b184[_0x39e5a5(0x20b)]??_0x4cfb23?.[_0x39e5a5(0x20b)],_0x29ac57[_0x39e5a5(0x1f1)]=_0x26b184[_0x39e5a5(0x1f1)],_0x29ac57['operationType']=_0x4c91ac['operationType'],_0x29ac57['functionNode']=_0x4c91ac['functionNode'];}_0x50545e[_0x39e5a5(0x1f3)][_0x4c91ac[_0x39e5a5(0x1ec)]]=_0x29ac57;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1c3c3b,_0x5ee08a,_0x559753){const _0x244e22=a44_0x197c1a;if(_0x559753[_0x244e22(0x200)]===0x0)return;for(let _0x300732=0x0;_0x300732<LOCK_SETTLE_RETRY_COUNT;_0x300732+=0x1){const _0x4fa784=await readBffLockFile(_0x1c3c3b),_0x5c37bf=_0x4fa784?.[_0x244e22(0x235)]?.[_0x5ee08a]?.[_0x244e22(0x1f3)]??{},_0x3b96fe=_0x559753['every'](_0x51c778=>!!_0x5c37bf[_0x51c778]?.[_0x244e22(0x213)]);if(_0x3b96fe)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x244e22(0x220)+_0x559753[_0x244e22(0x219)](',\x20')+'.');}
|
|
1
|
+
const a44_0x4ba12c=a44_0x2bee;(function(_0x279675,_0x453cdc){const _0x27354f=a44_0x2bee,_0x44791e=_0x279675();while(!![]){try{const _0x269c25=-parseInt(_0x27354f(0x22b))/0x1+-parseInt(_0x27354f(0x1f7))/0x2+-parseInt(_0x27354f(0x258))/0x3+parseInt(_0x27354f(0x203))/0x4+-parseInt(_0x27354f(0x21b))/0x5*(parseInt(_0x27354f(0x216))/0x6)+-parseInt(_0x27354f(0x205))/0x7+parseInt(_0x27354f(0x242))/0x8;if(_0x269c25===_0x453cdc)break;else _0x44791e['push'](_0x44791e['shift']());}catch(_0x2dc17d){_0x44791e['push'](_0x44791e['shift']());}}}(a44_0x309e,0x2e147));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;function a44_0x2bee(_0x5768b0,_0x374373){_0x5768b0=_0x5768b0-0x1ea;const _0x309ead=a44_0x309e();let _0x2bee42=_0x309ead[_0x5768b0];return _0x2bee42;}export const bffPush={'service':a44_0x4ba12c(0x237),'command':a44_0x4ba12c(0x20e),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a44_0x4ba12c(0x22a),'structuredErrors':!![],'flags':[{'name':a44_0x4ba12c(0x20a),'type':a44_0x4ba12c(0x236),'description':a44_0x4ba12c(0x213),'enum':[a44_0x4ba12c(0x1ed),a44_0x4ba12c(0x238),'HOOK']},{'name':'name','type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a44_0x4ba12c(0x1fe),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x4bb079){const _0x4c1ad3=a44_0x4ba12c,_0xbb6534=loadBffProjectConfig(_0x4bb079[_0x4c1ad3(0x1ee)]),_0x334819=await readBffLockFile(_0xbb6534[_0x4c1ad3(0x241)]),{appLock:_0x1c5095}=ensureLockScope(_0x334819??createEmptyBffLock(),_0x4bb079[_0x4c1ad3(0x1ee)],_0xbb6534[_0x4c1ad3(0x222)],_0x4c1ad3(0x20e)),_0x463d4a=await getTargetFunctions(_0xbb6534,_0x4bb079),_0x27e968=_0x463d4a[_0x4c1ad3(0x24c)](_0x526a5d=>_0x526a5d['type']===_0x4c1ad3(0x243))?await scanLocalBffFunctions(_0xbb6534,_0x4c1ad3(0x243)):_0x463d4a,_0x54a60d=await buildHookMaps(_0x4bb079[_0x4c1ad3(0x1ee)],_0x4bb079[_0x4c1ad3(0x1f3)],_0x27e968,_0x1c5095,_0x4bb079[_0x4c1ad3(0x214)]||_0x4bb079[_0x4c1ad3(0x21d)]?.[_0x4c1ad3(0x22c)]||_0x4bb079[_0x4c1ad3(0x21d)]?.[_0x4c1ad3(0x21a)]),_0xbf5ef1=_0x4bb079[_0x4c1ad3(0x23a)]('force'),_0x5bf465=[];for(const _0x800ea6 of _0x463d4a){const _0x482387=await computeFileHash(_0x800ea6[_0x4c1ad3(0x229)]),_0x57f687=_0x1c5095[_0x4c1ad3(0x226)][_0x800ea6[_0x4c1ad3(0x209)]],_0x2e4c99=!!_0x57f687&&_0x57f687[_0x4c1ad3(0x246)]===_0x482387,_0x4ba153=_0x54a60d['resolutions'][_0x4c1ad3(0x217)](_0x800ea6[_0x4c1ad3(0x209)]),_0x1cb8c7=!!_0x57f687?.[_0x4c1ad3(0x202)]&&_0x57f687[_0x4c1ad3(0x215)]==null&&(_0xbf5ef1||!_0x2e4c99),_0x495633=_0x1cb8c7?missingRemoteVersionConflict(_0x800ea6,_0x57f687):undefined,_0x491b93=_0x54a60d['failures']['has'](_0x800ea6[_0x4c1ad3(0x209)])?'failed':!_0xbf5ef1&&_0x2e4c99?'unchanged':_0x495633?_0x4c1ad3(0x253):'would_push';_0x5bf465['push']({'lockKey':_0x800ea6[_0x4c1ad3(0x209)],'filePath':_0x800ea6['filePath'],'remoteId':_0x57f687?.[_0x4c1ad3(0x202)]??null,'mode':_0x57f687?.['remoteId']?_0x4c1ad3(0x234):_0x4c1ad3(0x1ea),'status':_0x491b93,..._0x54a60d[_0x4c1ad3(0x245)]['has'](_0x800ea6[_0x4c1ad3(0x209)])?{'error':_0x54a60d[_0x4c1ad3(0x245)][_0x4c1ad3(0x217)](_0x800ea6[_0x4c1ad3(0x209)])}:{},..._0x495633?{'conflict':_0x495633}:{},..._0x54a60d['existingHooks'][_0x4c1ad3(0x1fa)](_0x800ea6[_0x4c1ad3(0x209)])?{'datasetCode':_0x57f687?.[_0x4c1ad3(0x254)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x800ea6[_0x4c1ad3(0x209)])]}:{},..._0x4ba153?{'alias':_0x4ba153[_0x4c1ad3(0x211)]??null,'datasetCode':_0x4ba153[_0x4c1ad3(0x254)],'operationType':_0x800ea6[_0x4c1ad3(0x232)],'functionNode':_0x800ea6['functionNode'],'warnings':_0x4ba153[_0x4c1ad3(0x233)]}:{}});}return{'method':_0x4c1ad3(0x1f9),'url':_0x4c1ad3(0x208),'body':{'appCode':_0x4bb079[_0x4c1ad3(0x1ee)],'force':_0xbf5ef1,'files':_0x5bf465,'cacheClearAtRuntime':_0x5bf465[_0x4c1ad3(0x24c)](_0x16fb5b=>_0x16fb5b[_0x4c1ad3(0x252)]==='would_push'),'cacheClearAtRuntimeTimes':_0x5bf465[_0x4c1ad3(0x24c)](_0x15a034=>_0x15a034[_0x4c1ad3(0x252)]===_0x4c1ad3(0x20f))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4c1ad3(0x24d)+_0x5bf465[_0x4c1ad3(0x1fd)]+_0x4c1ad3(0x1eb)};},async 'execute'(_0xe346cc){const _0x330f7e=a44_0x4ba12c,_0x426f61=loadBffProjectConfig(_0xe346cc[_0x330f7e(0x1ee)]),_0x16eeed=await readBffLockFile(_0x426f61[_0x330f7e(0x241)]),{lockData:_0x1a6661,appLock:_0x1e94b0}=ensureLockScope(_0x16eeed??createEmptyBffLock(),_0xe346cc[_0x330f7e(0x1ee)],_0x426f61[_0x330f7e(0x222)],_0x330f7e(0x20e)),_0x5d7d73=await getTargetFunctions(_0x426f61,_0xe346cc);if(_0x5d7d73[_0x330f7e(0x1fd)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x330f7e(0x201)};const _0x2d52e9=_0xe346cc[_0x330f7e(0x23a)](_0x330f7e(0x1fe)),_0x26dd1d=JSON[_0x330f7e(0x1ec)](JSON['stringify'](_0x1a6661)),_0x49c7be=_0x26dd1d[_0x330f7e(0x24a)][_0xe346cc[_0x330f7e(0x1ee)]];if(!_0x49c7be)throw new Error(_0x330f7e(0x21e)+_0xe346cc[_0x330f7e(0x1ee)]+_0x330f7e(0x210));const _0xede0f9=_0x5d7d73['some'](_0x218750=>_0x218750['type']==='HOOK')?await scanLocalBffFunctions(_0x426f61,_0x330f7e(0x243)):_0x5d7d73,_0x4fe7c2=await buildHookMaps(_0xe346cc[_0x330f7e(0x1ee)],_0xe346cc['apiDir'],_0xede0f9,_0x49c7be,_0xe346cc[_0x330f7e(0x214)]||_0xe346cc['mergedCli']?.[_0x330f7e(0x22c)]||_0xe346cc[_0x330f7e(0x21d)]?.[_0x330f7e(0x21a)]),_0x36b9c7=[],_0x3bdb72=[],_0x2d04e2=[],_0x11ba55=[];for(const _0x835129 of _0x5d7d73){const _0x394425=_0x4fe7c2[_0x330f7e(0x245)][_0x330f7e(0x217)](_0x835129[_0x330f7e(0x209)]);if(_0x394425){_0x11ba55['push']({'lockKey':_0x835129[_0x330f7e(0x209)],'error':_0x394425});continue;}const _0xd68ceb=await computeFileHash(_0x835129[_0x330f7e(0x229)]),_0x37ec12=_0x49c7be[_0x330f7e(0x226)][_0x835129[_0x330f7e(0x209)]];if(!_0x2d52e9&&_0x37ec12&&_0x37ec12[_0x330f7e(0x246)]===_0xd68ceb){_0x3bdb72['push']({'lockKey':_0x835129['lockKey'],'reason':_0x330f7e(0x204)});continue;}if(_0x37ec12?.['remoteId']&&_0x37ec12['version']==null){_0x2d04e2['push'](missingRemoteVersionConflict(_0x835129,_0x37ec12));continue;}try{await uploadSingleFunction(_0xe346cc[_0x330f7e(0x1ee)],_0x835129,_0x49c7be,_0x4fe7c2);const _0x5c9fee=_0x49c7be[_0x330f7e(0x226)][_0x835129[_0x330f7e(0x209)]];_0x36b9c7[_0x330f7e(0x20e)]({'lockKey':_0x835129['lockKey'],'remoteId':_0x5c9fee?.['remoteId']??0x0});}catch(_0x130c04){const _0x454395=remoteVersionChangedConflict(_0x835129,_0x37ec12,_0x130c04);if(_0x454395){_0x2d04e2['push'](_0x454395);continue;}_0x11ba55[_0x330f7e(0x20e)]({'lockKey':_0x835129[_0x330f7e(0x209)],'error':_0x130c04 instanceof Error?_0x130c04[_0x330f7e(0x1ef)]:String(_0x130c04)});}}_0x49c7be[_0x330f7e(0x251)]=new Date()['toISOString'](),await writeBffLockFile(_0x426f61['lockFilePath'],_0x26dd1d),await waitForUploadedLockEntries(_0x426f61[_0x330f7e(0x241)],_0xe346cc[_0x330f7e(0x1ee)],_0x36b9c7[_0x330f7e(0x23f)](_0x358052=>_0x358052[_0x330f7e(0x209)]));let _0x5c6690={'attempted':![],'cleared':![]};if(_0x36b9c7['length']>0x0)try{let _0x2e82de='';for(let _0x46f5a4=0x0;_0x46f5a4<CACHE_CLEAR_ATTEMPTS;_0x46f5a4+=0x1){_0x2e82de=await clearBffScriptCache(),_0x46f5a4<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5c6690={'attempted':!![],'cleared':!![],'message':_0x2e82de||_0x330f7e(0x218)};}catch(_0x33b53c){_0x5c6690={'attempted':!![],'cleared':![],'error':_0x33b53c instanceof Error?_0x33b53c[_0x330f7e(0x1ef)]:String(_0x33b53c)};}const _0x4f67ae=_0x11ba55[_0x330f7e(0x1fd)]===0x0&&(_0x5c6690[_0x330f7e(0x20d)]?_0x5c6690['cleared']:!![]),_0x3bfb07=_0x4f67ae,_0x1f7770=_0x5c6690['attempted']?_0x5c6690[_0x330f7e(0x224)]?'runtime\x20cache\x20cleared':_0x330f7e(0x22f):_0x330f7e(0x23d);return{'ok':_0x3bfb07,'data':{'uploaded':_0x36b9c7,'skipped':_0x3bdb72,'conflicts':_0x2d04e2,'failed':_0x11ba55,'cacheClear':_0x5c6690,'warnings':[...[..._0x4fe7c2['resolutions'][_0x330f7e(0x23b)]()]['flatMap'](_0x5eab67=>_0x5eab67[_0x330f7e(0x233)]),...[..._0x4fe7c2[_0x330f7e(0x259)]][_0x330f7e(0x23f)](existingHookWarning)]},'message':formatPushMessage(_0x36b9c7[_0x330f7e(0x1fd)],_0x3bdb72[_0x330f7e(0x1fd)],_0x2d04e2[_0x330f7e(0x1fd)],_0x11ba55[_0x330f7e(0x1fd)],_0x1f7770)};}};function missingRemoteVersionConflict(_0x48f267,_0x425f07){const _0x5307af=a44_0x4ba12c;return remoteVersionConflict(_0x48f267,_0x425f07,_0x5307af(0x1f0),_0x5307af(0x1f5));}function remoteVersionChangedConflict(_0x174f41,_0x297538,_0xb6a2e7){const _0x5452c4=a44_0x4ba12c;if(!_0x297538?.[_0x5452c4(0x202)]||_0x297538[_0x5452c4(0x215)]==null||!isRemoteVersionConflict(_0xb6a2e7))return undefined;return remoteVersionConflict(_0x174f41,_0x297538,_0x5452c4(0x21f),_0x5452c4(0x1f4));}function remoteVersionConflict(_0x1cfb91,_0x165f4f,_0x52e43a,_0x1180b1){const _0x1ffcf7=a44_0x4ba12c;return{'code':_0x52e43a,'lockKey':_0x1cfb91[_0x1ffcf7(0x209)],'filePath':_0x1cfb91[_0x1ffcf7(0x229)],'remoteId':_0x165f4f['remoteId'],..._0x165f4f[_0x1ffcf7(0x215)]!=null?{'expectedVersion':_0x165f4f[_0x1ffcf7(0x215)]}:{},'message':_0x1180b1,'nextAction':{'action':'review_remote_and_merge','command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x165f4f[_0x1ffcf7(0x202)]+_0x1ffcf7(0x1ff),'requiresReview':!![],'message':_0x1ffcf7(0x248)}};}function isRemoteVersionConflict(_0x236ec5){const _0x2abe87=a44_0x4ba12c,_0x320ae2=_0x236ec5 instanceof Error?_0x236ec5['message']:String(_0x236ec5),_0x40456b=getPlatformErrorCode(_0x236ec5)??'';return[_0x320ae2,_0x40456b][_0x2abe87(0x24c)](_0x417222=>/(?: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[_0x2abe87(0x200)](_0x417222));}function formatPushMessage(_0x24ade9,_0xf7861,_0x5b6149,_0x489c37,_0xbfa166){const _0x13508a=a44_0x4ba12c,_0x50b310=[_0x13508a(0x244)+_0x24ade9+_0x13508a(0x225),_0xf7861+_0x13508a(0x1f1)];_0x5b6149>0x0&&_0x50b310['push'](_0x5b6149+'\x20conflict'+(_0x5b6149===0x1?'':'s')+'\x20'+(_0x5b6149===0x1?_0x13508a(0x230):'require')+_0x13508a(0x256));if(_0x489c37>0x0)_0x50b310[_0x13508a(0x20e)](_0x489c37+_0x13508a(0x206));return _0x50b310[_0x13508a(0x20e)](_0xbfa166),_0x50b310[_0x13508a(0x247)](',\x20');}async function getTargetFunctions(_0x377963,_0x1947a2){const _0x5a7bef=a44_0x4ba12c,_0xdd7c15=_0x1947a2['str'](_0x5a7bef(0x20a)),_0x5f3662=_0x1947a2['str'](_0x5a7bef(0x20c)),_0x59c3b5=normalizeBffType(_0xdd7c15)??undefined;if(_0x5f3662&&!_0x59c3b5)throw CliErrors[_0x5a7bef(0x207)](_0x5a7bef(0x219));const _0x4f20a1=await scanLocalBffFunctions(_0x377963,_0x59c3b5);if(_0x5f3662){const _0x1cb169=_0x4f20a1['filter'](_0x5b9f6b=>_0x5b9f6b['name']===_0x5f3662);if(_0x1cb169[_0x5a7bef(0x1fd)]===0x0)throw CliErrors[_0x5a7bef(0x207)]('Local\x20function\x20not\x20found:\x20'+_0x59c3b5+'/'+_0x5f3662);return _0x1cb169;}return _0x4f20a1;}function existingHookWarning(_0x244155){const _0x5b3dc7=a44_0x4ba12c;return{'code':_0x5b3dc7(0x24f),'lockKey':_0x244155,'message':_0x5b3dc7(0x22e)};}function a44_0x309e(){const _0x264849=['scriptType','functionName','scriptsRoot','add','cleared','\x20uploaded','functions','size','script','filePath','write','281177wvpKUw','currentApp','dataset','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','runtime\x20cache\x20clear\x20failed','requires','utf8','operationType','warnings','update','startsWith','string','bff','ENDPOINT','filter','bool','values','before','runtime\x20cache\x20not\x20needed','HOOK_DATASET_NOT_FOUND:','map','beforeScriptId','lockFilePath','9743544ZZambo','HOOK','Push\x20complete:\x20','failures','hash','join','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.','set','apps','Incomplete\x20HOOK\x20path:\x20','some','Would\x20inspect\x20','delete','EXISTING_HOOK_BINDING_PRESERVED',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','lastSync','status','conflict','datasetCode','datasetId','\x20resolution','afterScriptId','1108263RXYbOD','existingHooks','create','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','parse','COMMON','appCode','message','BFF_REMOTE_VERSION_MISSING','\x20skipped','after','apiDir','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','description','444194HIyFEQ','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','POST','has','profileName','resolutions','length','force','\x20--format\x20compress','test','No\x20local\x20Backend\x20Function\x20scripts\x20found.','remoteId','1110688IrTOst','unchanged','2591197hyQLOh','\x20failed','validation','/api/management/library/scripts/save','lockKey','type','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','name','attempted','push','would_push','\x22\x20not\x20found\x20after\x20ensureLockScope.','alias','functionNode','Push\x20only\x20this\x20script\x20type','selectedAppName','version','192018WMJBWT','get','Runtime\x20script\x20cache\x20cleared.','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','defaultApp','10UXIjJP','every','mergedCli','Lock\x20scope\x20for\x20app\x20\x22','BFF_REMOTE_VERSION_CHANGED'];a44_0x309e=function(){return _0x264849;};return a44_0x309e();}async function buildHookMaps(_0x417927,_0x3b19d2,_0x1ab168,_0x570491,_0x49f2cf){const _0x156462=a44_0x4ba12c,_0x5f2853=_0x1ab168[_0x156462(0x24c)](_0x6eb286=>_0x6eb286[_0x156462(0x20a)]===_0x156462(0x243));if(!_0x5f2853)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x1786fe=resolveApiModelSource(_0x3b19d2,_0x417927,_0x49f2cf),_0x39da04=loadAliasMap(_0x3b19d2,undefined,_0x1786fe['filePath'],_0x1786fe[_0x156462(0x1fb)]);assertUnambiguousHookAliases(_0x39da04);const _0x20013c=[..._0x39da04['map'](_0x5411ef=>[_0x5411ef[_0x156462(0x211)],_0x5411ef[_0x156462(0x254)]]),...trackedHookDirectoryMappings(_0x570491)[_0x156462(0x23f)](_0x51efe7=>[_0x51efe7[_0x156462(0x211)],_0x51efe7['datasetCode']])],_0x2a15d9=await listDatasets(_0x417927);assertUnambiguousHookDirectoryMappings(_0x20013c[_0x156462(0x23f)](([_0x5b707a,_0x51385d])=>({'alias':_0x5b707a,'datasetCode':_0x51385d})));const _0x5dafb3=buildHookDirectoryIndexes(_0x2a15d9,_0x20013c),_0x5b28c0=new Map(),_0x5d6c18=preflightPushHookDirectories(_0x1ab168,_0x570491,_0x5dafb3,_0x5b28c0),_0x5d03a7=new Set(),_0x46b84e=_0x1ab168['filter'](_0x4b723f=>_0x5b28c0[_0x156462(0x217)](_0x4b723f['lockKey'])?.[_0x156462(0x235)](_0x156462(0x23e))&&_0x570491[_0x156462(0x226)][_0x4b723f['lockKey']]?.[_0x156462(0x202)]&&_0x570491[_0x156462(0x226)][_0x4b723f[_0x156462(0x209)]]?.['datasetCode']);if(_0x46b84e[_0x156462(0x1fd)]>0x0){let _0x142a40;try{_0x142a40=await getBffScriptStatistics(_0x417927);}catch(_0x4d6867){for(const _0x2b0e52 of _0x46b84e)_0x5b28c0[_0x156462(0x249)](_0x2b0e52[_0x156462(0x209)],'Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20'+(_0x4d6867 instanceof Error?_0x4d6867['message']:String(_0x4d6867)));return{'resolutions':_0x5d6c18,'failures':_0x5b28c0,'existingHooks':_0x5d03a7};}for(const _0x233275 of _0x46b84e){const _0x2b4042=_0x570491[_0x156462(0x226)][_0x233275[_0x156462(0x209)]];try{const _0x3b9f20=new Set(_0x1ab168[_0x156462(0x239)](_0x2d53e2=>_0x2d53e2['type']===_0x156462(0x243)&&_0x570491[_0x156462(0x226)][_0x2d53e2['lockKey']]?.[_0x156462(0x254)]===_0x2b4042['datasetCode'])[_0x156462(0x23f)](_0x1835a2=>_0x1835a2['alias']));if(_0x3b9f20[_0x156462(0x227)]>0x1)throw CliErrors[_0x156462(0x207)](_0x156462(0x20b));const _0x4e53ce=_0x142a40['flatMap'](_0x52ed35=>[{'datasetCode':_0x52ed35[_0x156462(0x254)],'operationType':snakeToCamel(_0x52ed35['operationType']),'functionNode':_0x156462(0x23c),'id':_0x52ed35[_0x156462(0x240)]},{'datasetCode':_0x52ed35['datasetCode'],'operationType':snakeToCamel(_0x52ed35[_0x156462(0x232)]),'functionNode':_0x156462(0x1f2),'id':_0x52ed35[_0x156462(0x257)]}])[_0x156462(0x239)](_0x1cf08e=>_0x1cf08e['id']===_0x2b4042[_0x156462(0x202)]),_0x1890fc=await getBffScriptInfo(_0x2b4042['remoteId']);if(_0x1890fc['id']!==_0x2b4042[_0x156462(0x202)]||_0x1890fc[_0x156462(0x1ee)]!==_0x417927||_0x1890fc[_0x156462(0x220)]!==_0x156462(0x243)||_0x1890fc[_0x156462(0x221)]!==_0x233275['name']||_0x2b4042[_0x156462(0x215)]==null||_0x1890fc[_0x156462(0x215)]!==_0x2b4042[_0x156462(0x215)]||_0x4e53ce[_0x156462(0x1fd)]!==0x1||_0x4e53ce[0x0][_0x156462(0x254)]!==_0x2b4042[_0x156462(0x254)]||_0x4e53ce[0x0]['operationType']!==_0x233275[_0x156462(0x232)]||_0x4e53ce[0x0][_0x156462(0x212)]!==_0x233275[_0x156462(0x212)]||_0x2b4042[_0x156462(0x232)]!==_0x233275[_0x156462(0x232)]||_0x2b4042[_0x156462(0x212)]!==_0x233275[_0x156462(0x212)])throw CliErrors['validation'](_0x156462(0x1f8));_0x5d03a7[_0x156462(0x223)](_0x233275['lockKey']),_0x5b28c0[_0x156462(0x24e)](_0x233275[_0x156462(0x209)]);}catch(_0x48cbdd){_0x5b28c0['set'](_0x233275[_0x156462(0x209)],_0x48cbdd instanceof Error?_0x48cbdd[_0x156462(0x1ef)]:String(_0x48cbdd));}}}return{'resolutions':_0x5d6c18,'failures':_0x5b28c0,'existingHooks':_0x5d03a7};}async function uploadSingleFunction(_0x1babb6,_0x1c5694,_0x5ab335,_0x2b8d21){const _0x2fc6c2=a44_0x4ba12c,_0x3f8277=await readFile(_0x1c5694[_0x2fc6c2(0x229)],_0x2fc6c2(0x231)),_0x5691cd=await computeFileHash(_0x1c5694[_0x2fc6c2(0x229)]),_0x51a6ae=_0x5ab335[_0x2fc6c2(0x226)][_0x1c5694[_0x2fc6c2(0x209)]];if(_0x51a6ae?.[_0x2fc6c2(0x202)]&&_0x51a6ae[_0x2fc6c2(0x215)]==null)throw CliErrors['validation'](_0x1c5694[_0x2fc6c2(0x209)]+_0x2fc6c2(0x250));let _0x490454=extractScriptDescription(_0x3f8277);if(!_0x490454&&_0x51a6ae?.['remoteId']){const _0x5a9a2a=await getBffScriptInfo(_0x51a6ae['remoteId']);_0x490454=_0x5a9a2a['description']||undefined;}const _0x3fe952={'appCode':_0x1babb6,'functionName':_0x1c5694['name'],'scriptType':_0x1c5694[_0x2fc6c2(0x20a)],'scriptContent':_0x3f8277};if(_0x51a6ae?.[_0x2fc6c2(0x202)])_0x3fe952['id']=_0x51a6ae[_0x2fc6c2(0x202)];if(_0x51a6ae?.[_0x2fc6c2(0x215)]!=null)_0x3fe952['version']=_0x51a6ae[_0x2fc6c2(0x215)];if(_0x490454)_0x3fe952[_0x2fc6c2(0x1f6)]=_0x490454;if(_0x1c5694['type']===_0x2fc6c2(0x243)){const _0x2dd89c=_0x2b8d21[_0x2fc6c2(0x1fc)][_0x2fc6c2(0x217)](_0x1c5694[_0x2fc6c2(0x209)]);if(!_0x2dd89c&&!_0x2b8d21[_0x2fc6c2(0x259)][_0x2fc6c2(0x1fa)](_0x1c5694[_0x2fc6c2(0x209)])||!_0x1c5694['operationType']||!_0x1c5694['functionNode'])throw CliErrors[_0x2fc6c2(0x207)](_0x2fc6c2(0x24b)+_0x1c5694[_0x2fc6c2(0x209)]);_0x2dd89c&&(_0x3fe952[_0x2fc6c2(0x255)]=_0x2dd89c[_0x2fc6c2(0x22d)]['id'],_0x3fe952[_0x2fc6c2(0x232)]=_0x1c5694[_0x2fc6c2(0x232)]),_0x3fe952[_0x2fc6c2(0x212)]=_0x1c5694['functionNode'];}const _0x1eed4f=await saveBffScript(_0x3fe952),_0x5c9dd9=_0x1eed4f['id'],_0x4d1381=_0x1eed4f[_0x2fc6c2(0x228)]??await getBffScriptInfo(_0x5c9dd9),_0x438d42={'hash':_0x5691cd,'remoteId':_0x5c9dd9,'version':_0x4d1381[_0x2fc6c2(0x215)]};if(_0x1c5694[_0x2fc6c2(0x20a)]===_0x2fc6c2(0x243)){const _0x2d17e3=_0x2b8d21[_0x2fc6c2(0x1fc)][_0x2fc6c2(0x217)](_0x1c5694['lockKey']);if(!_0x2d17e3){_0x5ab335[_0x2fc6c2(0x226)][_0x1c5694[_0x2fc6c2(0x209)]]={..._0x51a6ae,..._0x438d42};return;}_0x438d42[_0x2fc6c2(0x211)]=_0x2d17e3[_0x2fc6c2(0x211)]??_0x51a6ae?.[_0x2fc6c2(0x211)],_0x438d42['datasetCode']=_0x2d17e3[_0x2fc6c2(0x254)],_0x438d42[_0x2fc6c2(0x232)]=_0x1c5694['operationType'],_0x438d42[_0x2fc6c2(0x212)]=_0x1c5694[_0x2fc6c2(0x212)];}_0x5ab335['functions'][_0x1c5694[_0x2fc6c2(0x209)]]=_0x438d42;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1ed925,_0x100e61,_0x51cca6){const _0x54ed9b=a44_0x4ba12c;if(_0x51cca6[_0x54ed9b(0x1fd)]===0x0)return;for(let _0xb6d44a=0x0;_0xb6d44a<LOCK_SETTLE_RETRY_COUNT;_0xb6d44a+=0x1){const _0x56a29a=await readBffLockFile(_0x1ed925),_0x446913=_0x56a29a?.[_0x54ed9b(0x24a)]?.[_0x100e61]?.[_0x54ed9b(0x226)]??{},_0x3203c3=_0x51cca6[_0x54ed9b(0x21c)](_0x10a9b6=>!!_0x446913[_0x10a9b6]?.[_0x54ed9b(0x202)]);if(_0x3203c3)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x51cca6[_0x54ed9b(0x247)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x130028=a45_0x45c7;(function(_0x1a51d4,_0x1fb0e2){const _0x565879=a45_0x45c7,_0x226f35=_0x1a51d4();while(!![]){try{const _0x1e48ef=-parseInt(_0x565879(0x90))/0x1*(parseInt(_0x565879(0x7a))/0x2)+parseInt(_0x565879(0x99))/0x3+parseInt(_0x565879(0x98))/0x4*(parseInt(_0x565879(0x9b))/0x5)+parseInt(_0x565879(0x82))/0x6+parseInt(_0x565879(0x75))/0x7*(parseInt(_0x565879(0x95))/0x8)+-parseInt(_0x565879(0x84))/0x9*(parseInt(_0x565879(0x7c))/0xa)+-parseInt(_0x565879(0x96))/0xb*(-parseInt(_0x565879(0x89))/0xc);if(_0x1e48ef===_0x1fb0e2)break;else _0x226f35['push'](_0x226f35['shift']());}catch(_0x152594){_0x226f35['push'](_0x226f35['shift']());}}}(a45_0x8d24,0x49f55));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';function a45_0x45c7(_0x348e0e,_0x1028f0){_0x348e0e=_0x348e0e-0x75;const _0x8d2421=a45_0x8d24();let _0x45c766=_0x8d2421[_0x348e0e];return _0x45c766;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a45_0x8d24(){const _0x9f2f20=['31410NzxQua','length','status','filePath','functions','842724jloKIa','lockKey','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','appCode','defaultApp','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','\x20unchanged','522569nzfZCv','\x20added,\x20','apiDir','selectedAppName','currentApp','8bLSwXp','11YuLTiY','lockFilePath','19336oWPkqf','453651pZBKqe','alias','5dLUYdi','mergedCli','scriptsRoot','push','2182733eRwiSd','\x20remote-only','map','all','has','2NlwpSf','remote','130ULAKZr','boolean','\x20modified,\x20','read','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','hash','1996650LTsfjX','datasetCode'];a45_0x8d24=function(){return _0x9f2f20;};return a45_0x8d24();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a45_0x130028(0x86),'description':a45_0x130028(0x8e),'risk':a45_0x130028(0x7f),'flags':[{'name':a45_0x130028(0x7b),'type':a45_0x130028(0x7d),'description':a45_0x130028(0x80)}],async 'execute'(_0x3b2d23){const _0x5d930c=a45_0x130028,_0x4ea889=loadBffProjectConfig(_0x3b2d23[_0x5d930c(0x8c)]),_0x5a624e=await readBffLockFile(_0x4ea889[_0x5d930c(0x97)]),{appLock:_0xeff0fa}=ensureLockScope(_0x5a624e??createEmptyBffLock(),_0x3b2d23[_0x5d930c(0x8c)],_0x4ea889[_0x5d930c(0x9d)],_0x5d930c(0x86)),_0x2da8d2=await scanLocalBffFunctions(_0x4ea889),_0x2497f4=[],_0x138316=[],_0x3d9b2c=[];for(const _0x2579fa of _0x2da8d2){const _0x57a3d6=await computeFileHash(_0x2579fa['filePath']),_0x271b19=_0xeff0fa[_0x5d930c(0x88)][_0x2579fa['lockKey']];if(!_0x271b19)_0x2497f4[_0x5d930c(0x9e)](_0x2579fa[_0x5d930c(0x8a)]);else _0x271b19[_0x5d930c(0x81)]!==_0x57a3d6?_0x138316[_0x5d930c(0x9e)](_0x2579fa['lockKey']):_0x3d9b2c[_0x5d930c(0x9e)](_0x2579fa[_0x5d930c(0x8a)]);}const _0x2ff0da=[];if(_0x3b2d23['bool'](_0x5d930c(0x7b))){const _0x2d6b7c=resolveApiModelSource(_0x3b2d23[_0x5d930c(0x92)],_0x3b2d23[_0x5d930c(0x8c)],_0x3b2d23[_0x5d930c(0x93)]||_0x3b2d23[_0x5d930c(0x9c)]?.[_0x5d930c(0x94)]||_0x3b2d23['mergedCli']?.[_0x5d930c(0x8d)]),_0x15607c=loadAliasMap(_0x3b2d23['apiDir'],undefined,_0x2d6b7c[_0x5d930c(0x87)],_0x2d6b7c['profileName']),_0x3f16d8=new Map(_0x15607c[_0x5d930c(0x77)](_0xbe1952=>[_0xbe1952[_0x5d930c(0x83)],_0xbe1952[_0x5d930c(0x9a)]])),[_0x173128,_0x495c82]=await Promise[_0x5d930c(0x78)]([listBffScripts(_0x3b2d23[_0x5d930c(0x8c)]),getBffScriptStatistics(_0x3b2d23[_0x5d930c(0x8c)])]),_0x25ea23=createHookLocationMap(_0x495c82),_0x49d705=new Set(_0x2da8d2[_0x5d930c(0x77)](_0x55972c=>_0x55972c[_0x5d930c(0x8a)]));for(const _0x5f0530 of _0x173128){const _0x1a024f=resolveRemoteScriptTarget(_0x4ea889,_0x5f0530,_0x25ea23,_0xeff0fa[_0x5d930c(0x88)],_0x3f16d8);_0x1a024f&&!_0x49d705[_0x5d930c(0x79)](_0x1a024f['lockKey'])&&_0x2ff0da[_0x5d930c(0x9e)](_0x1a024f[_0x5d930c(0x8a)]);}}const _0x2d9da9=_0x2497f4[_0x5d930c(0x85)]===0x0&&_0x138316['length']===0x0&&_0x2ff0da[_0x5d930c(0x85)]===0x0;return{'ok':!![],'data':{'added':_0x2497f4,'modified':_0x138316,'unchanged':_0x3d9b2c,'remoteOnly':_0x2ff0da},'message':_0x2d9da9?_0x5d930c(0x8b):_0x2497f4[_0x5d930c(0x85)]+_0x5d930c(0x91)+_0x138316[_0x5d930c(0x85)]+_0x5d930c(0x7e)+_0x3d9b2c[_0x5d930c(0x85)]+_0x5d930c(0x8f)+(_0x2ff0da[_0x5d930c(0x85)]>0x0?',\x20'+_0x2ff0da[_0x5d930c(0x85)]+_0x5d930c(0x76):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x8b200d=a46_0x5b9d;(function(_0x220168,_0x593a11){const _0x25b7ef=a46_0x5b9d,_0x12a009=_0x220168();while(!![]){try{const _0xf16b1=-parseInt(_0x25b7ef(0x147))/0x1*(parseInt(_0x25b7ef(0x152))/0x2)+parseInt(_0x25b7ef(0x153))/0x3+-parseInt(_0x25b7ef(0x141))/0x4*(parseInt(_0x25b7ef(0x155))/0x5)+parseInt(_0x25b7ef(0x15c))/0x6*(parseInt(_0x25b7ef(0x14f))/0x7)+-parseInt(_0x25b7ef(0x156))/0x8+parseInt(_0x25b7ef(0x150))/0x9*(-parseInt(_0x25b7ef(0x15b))/0xa)+-parseInt(_0x25b7ef(0x151))/0xb*(-parseInt(_0x25b7ef(0x15e))/0xc);if(_0xf16b1===_0x593a11)break;else _0x12a009['push'](_0x12a009['shift']());}catch(_0x54efce){_0x12a009['push'](_0x12a009['shift']());}}}(a46_0x6b0a,0x295dd));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a46_0x5b9d(_0x5157fe,_0x5bf73d){_0x5157fe=_0x5157fe-0x141;const _0x6b0adf=a46_0x6b0a();let _0x5b9d0b=_0x6b0adf[_0x5157fe];return _0x5b9d0b;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0x8b200d(0x142),'command':a46_0x8b200d(0x14e),'description':a46_0x8b200d(0x143),'risk':a46_0x8b200d(0x144),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4e8e8e){const _0x26436c=a46_0x8b200d;logger[_0x26436c(0x14d)](process['cwd']()),logger[_0x26436c(0x14b)](_0x26436c(0x158),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x530e5f=installBuiltinSkill({'stdio':_0x4e8e8e[_0x26436c(0x149)]?_0x26436c(0x157):'inherit'});if(!_0x530e5f['ok'])throw CliErrors['apiError'](_0x26436c(0x14c)+_0x530e5f[_0x26436c(0x15a)]+_0x26436c(0x15f)+(_0x530e5f[_0x26436c(0x160)]||'unknown'),_0x26436c(0x154)+_0x530e5f['repairCommand']);return console['log'](_0x530e5f[_0x26436c(0x15d)]?'CLI\x20Built-in\x20Skill\x20'+_0x530e5f[_0x26436c(0x146)]+_0x26436c(0x145)+(_0x530e5f[_0x26436c(0x159)]?'\x20at\x20'+_0x530e5f[_0x26436c(0x159)]:_0x26436c(0x14a)):'CLI\x20Built-in\x20Skill\x20'+_0x530e5f[_0x26436c(0x146)]+'\x20is\x20already\x20current'+(_0x530e5f[_0x26436c(0x159)]?_0x26436c(0x148)+_0x530e5f[_0x26436c(0x159)]:'')),{'ok':!![]};}}];function a46_0x6b0a(){const _0x4c8b63=['error','4ywiRAJ','cli-skill','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','read','\x20installed','skillVersion','113099sKNAvx','\x20at\x20','nonInteractive','\x20via\x20skills@latest','info','Built-in\x20Skill\x20install\x20failed\x20[','setLogPath','install','878402VXmEeN','9dfIcno','918401KKCQLI','2remmwt','739770qwfpxt','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','318345aJWRNe','2478104dxlazy','pipe','cli-skill-install','installedPath','code','2170540UPCMIY','6WRNwLE','changed','72NibHOD',']:\x20'];a46_0x6b0a=function(){return _0x4c8b63;};return a46_0x6b0a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x56bb12=a47_0x304f;(function(_0x5b4155,_0x5d8735){const _0x4e3d79=a47_0x304f,_0x546cee=_0x5b4155();while(!![]){try{const _0x3ecdda=-parseInt(_0x4e3d79(0x10f))/0x1*(parseInt(_0x4e3d79(0xf4))/0x2)+parseInt(_0x4e3d79(0xeb))/0x3+-parseInt(_0x4e3d79(0xcc))/0x4*(-parseInt(_0x4e3d79(0xf7))/0x5)+parseInt(_0x4e3d79(0xcf))/0x6+parseInt(_0x4e3d79(0xe3))/0x7+-parseInt(_0x4e3d79(0xd9))/0x8*(-parseInt(_0x4e3d79(0xc8))/0x9)+-parseInt(_0x4e3d79(0xcb))/0xa*(parseInt(_0x4e3d79(0xf6))/0xb);if(_0x3ecdda===_0x5d8735)break;else _0x546cee['push'](_0x546cee['shift']());}catch(_0x2d2072){_0x546cee['push'](_0x546cee['shift']());}}}(a47_0x95bf,0xe2826));function a47_0x304f(_0x268c42,_0x29cbfa){_0x268c42=_0x268c42-0xc8;const _0x95bf68=a47_0x95bf();let _0x304fd=_0x95bf68[_0x268c42];return _0x304fd;}import a47_0x1c0e65 from'chalk';import a47_0x1bef0f from'ora';import a47_0x3ad014 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function a47_0x95bf(){const _0x59fb77=['fromEntries','3455577ZWcPqZ','error','filter','3759170KyicDp','1928516PzxQkQ','\x20update\x20--version\x20<version>','toLowerCase','2687394vFRkXV','latest','json','message','Run:\x20','bool','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','entries','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','update','8qmbzfD','info','/dist-tags','CLI\x20updated\x20to\x20v','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','map','slice','\x20doctor',']:\x20','fail','3514630pFSyan','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','valid','bun','Requested\x20version:\x20','execPath','Version\x20comparison\x20failed','skillVersion','267777pZzMXL','boolean','object','\x20\x20CLI\x20Built-in\x20Skill\x20','unknown','str','code','...','Updated\x20to\x20v','78TvVVLw','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','11iMuDxy','15WgFCuG','Already\x20up\x20to\x20date\x20(v','Try\x20manually:\x20','Already\x20on\x20requested\x20version\x20(v','succeed','Updating\x20via\x20','Update\x20failed:\x20','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','start','source',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','green','\x20install\x20-g\x20','timeout','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','read','run',',\x20then\x20verify\x20with:\x20','beta','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','gray','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20→\x20','40151ktnnQf','Invalid\x20version:\x20','npm','yellow','install','log','apiError','state','Try\x20manually:\x20npm\x20install\x20-g\x20','Current\x20version:\x20','\x20is\x20up\x20to\x20date.','repairCommand','version','trim','validation','expected\x20','Install\x20a\x20specific\x20CLI\x20version','Current\x20version\x20v','string',',\x20state\x20'];a47_0x95bf=function(){return _0x59fb77;};return a47_0x95bf();}function getCurrentVersion(){const _0x233897=a47_0x304f;return GIT_COMMIT!==_0x233897(0xef)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x233897(0xdf)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x28143d=a47_0x304f,_0x421ea2=process[_0x28143d(0xe8)][_0x28143d(0xce)]();if(_0x421ea2['includes']('bun'))return _0x28143d(0xe6);return'npm';}const updateFlags=[{'name':'beta','type':a47_0x56bb12(0xec),'description':a47_0x56bb12(0x10d),'default':![]},{'name':a47_0x56bb12(0x11b),'type':a47_0x56bb12(0x121),'description':a47_0x56bb12(0x11f)}];function getRequestedVersion(_0x375877){const _0x4fc375=a47_0x56bb12;return _0x375877[_0x4fc375(0xf0)](_0x4fc375(0x11b))[_0x4fc375(0x11c)]();}async function validateUpdateFlags(_0x5be47b){const _0x1733e9=a47_0x56bb12,_0x3ee99f=_0x5be47b[_0x1733e9(0xd4)](_0x1733e9(0x10a)),_0x1f24b3=getRequestedVersion(_0x5be47b);if(_0x3ee99f&&_0x1f24b3)throw CliErrors[_0x1733e9(0x11d)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x1733e9(0x10b));if(_0x1f24b3&&!a47_0x3ad014[_0x1733e9(0xe5)](_0x1f24b3))throw CliErrors[_0x1733e9(0x11d)](_0x1733e9(0x110)+_0x1f24b3,_0x1733e9(0xdd));}async function fetchNpmDistTags(){const _0x1d56b2=a47_0x56bb12;try{const _0x1fa6ff=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x1d56b2(0xdb),{'signal':AbortSignal[_0x1d56b2(0x104)](0x2710)});if(!_0x1fa6ff['ok'])return null;const _0x20ce2e=await _0x1fa6ff[_0x1d56b2(0xd1)]();if(!_0x20ce2e||typeof _0x20ce2e!==_0x1d56b2(0xed))return null;return Object[_0x1d56b2(0x123)](Object[_0x1d56b2(0xd6)](_0x20ce2e)[_0x1d56b2(0xca)](([,_0x5d7e5a])=>typeof _0x5d7e5a===_0x1d56b2(0x121)&&_0x5d7e5a['trim']()['length']>0x0)[_0x1d56b2(0xde)](([_0x13f540,_0x494a1])=>[_0x13f540,String(_0x494a1)[_0x1d56b2(0x11c)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3b596e){const _0x8f38d9=await fetchNpmDistTags();return _0x8f38d9?.[_0x3b596e]??null;}async function fetchLatestVersion(){const _0x10504b=a47_0x56bb12;return fetchNpmDistTagVersion(_0x10504b(0xd0));}async function resolveTargetVersion(_0x281e93){const _0x2d9e84=a47_0x56bb12,_0x4175f2=getRequestedVersion(_0x281e93);if(_0x4175f2)return{'version':_0x4175f2,'source':_0x2d9e84(0x11b)};if(_0x281e93[_0x2d9e84(0xd4)](_0x2d9e84(0x10a))){const _0x161186=await fetchNpmDistTagVersion('beta');if(!_0x161186)return null;return{'version':_0x161186,'source':_0x2d9e84(0x10a)};}const _0xdc3256=await fetchLatestVersion();if(!_0xdc3256)return null;return{'version':_0xdc3256,'source':'latest'};}function shouldInstallTarget(_0x38b874,_0x40b371){const _0xb42d2d=a47_0x56bb12;if(_0x40b371[_0xb42d2d(0x100)]==='version'||_0x40b371[_0xb42d2d(0x100)]===_0xb42d2d(0x10a))return!a47_0x3ad014['eq'](_0x38b874,_0x40b371['version']);return a47_0x3ad014['lt'](_0x38b874,_0x40b371[_0xb42d2d(0x11b)]);}function getInstallPlanLabel(_0x373f09,_0x2638eb){const _0x376c9=a47_0x56bb12;switch(_0x2638eb[_0x376c9(0x100)]){case _0x376c9(0x10a):return'Beta\x20version:\x20'+a47_0x1c0e65['yellow'](_0x373f09)+_0x376c9(0x10e)+a47_0x1c0e65[_0x376c9(0x102)](_0x2638eb[_0x376c9(0x11b)]);case'version':return _0x376c9(0xe7)+a47_0x1c0e65[_0x376c9(0x112)](_0x373f09)+_0x376c9(0x10e)+a47_0x1c0e65[_0x376c9(0x102)](_0x2638eb['version']);case _0x376c9(0xd0):default:return'Update\x20available:\x20'+a47_0x1c0e65[_0x376c9(0x112)](_0x373f09)+_0x376c9(0x10e)+a47_0x1c0e65[_0x376c9(0x102)](_0x2638eb[_0x376c9(0x11b)]);}}function repairCurrentBuiltinSkill(){const _0x21288f=a47_0x56bb12;console[_0x21288f(0x114)](a47_0x1c0e65[_0x21288f(0x10c)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x2dcf35=installBuiltinSkill();if(_0x2dcf35['ok']){console[_0x21288f(0x114)](a47_0x1c0e65[_0x21288f(0x10c)](_0x21288f(0xee)+_0x2dcf35[_0x21288f(0xea)]+_0x21288f(0x119)));return;}throw CliErrors[_0x21288f(0x115)](_0x21288f(0xf5)+_0x2dcf35[_0x21288f(0xf1)]+_0x21288f(0xe1)+(_0x2dcf35[_0x21288f(0xc9)]||_0x21288f(0xef)),'Run:\x20'+_0x2dcf35[_0x21288f(0x11a)]+_0x21288f(0x109)+CLI_BIN_NAME+_0x21288f(0xe0));}function verifyUpdatedBuiltinSkill(_0x45160c){const _0x1c34f0=a47_0x56bb12,_0x2f71ed=inspectInstalledBuiltinSkillVersion(_0x45160c);if(_0x2f71ed[_0x1c34f0(0x116)]==='current'){console[_0x1c34f0(0x114)](a47_0x1c0e65[_0x1c34f0(0x10c)](_0x1c34f0(0xee)+_0x45160c+_0x1c34f0(0x119)));return;}const _0x5637d2=_0x2f71ed[_0x1c34f0(0xea)]?_0x1c34f0(0x11e)+_0x45160c+',\x20found\x20'+_0x2f71ed['skillVersion']:'expected\x20'+_0x45160c+_0x1c34f0(0x122)+_0x2f71ed[_0x1c34f0(0x116)];throw CliErrors[_0x1c34f0(0x115)](_0x1c34f0(0xdc)+_0x45160c+_0x1c34f0(0x101)+_0x5637d2,_0x1c34f0(0xd3)+_0x2f71ed[_0x1c34f0(0x11a)]+_0x1c34f0(0x109)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0xfd9db){const _0x407642=a47_0x56bb12;await validateUpdateFlags(_0xfd9db);const _0xfca9=getCurrentVersion();console['log'](_0x407642(0x118)+_0xfca9);const _0x3e6a05=a47_0x1bef0f('Checking\x20for\x20updates...')['start'](),_0x5e08ab=await resolveTargetVersion(_0xfd9db);if(!_0x5e08ab){const _0x5571c0=_0xfd9db[_0x407642(0xd4)](_0x407642(0x10a))?_0x407642(0x106):_0x407642(0xd5);_0x3e6a05[_0x407642(0xe2)](_0x5571c0);throw CliErrors[_0x407642(0x115)](_0x5571c0,_0x407642(0x117)+NPM_PACKAGE_NAME+'@'+(_0xfd9db[_0x407642(0xd4)](_0x407642(0x10a))?'beta':_0x407642(0xd0)));}const _0x5b3dfb=a47_0x3ad014[_0x407642(0xe5)](VERSION),_0x39b50d=a47_0x3ad014[_0x407642(0xe5)](_0x5e08ab[_0x407642(0x11b)]);if(!_0x5b3dfb||!_0x39b50d){_0x3e6a05[_0x407642(0xe2)](_0x407642(0xe9));throw CliErrors['apiError'](_0x407642(0xe9),_0x407642(0xfe)+CLI_BIN_NAME+_0x407642(0xcd));}if(!shouldInstallTarget(_0x5b3dfb,_0x5e08ab)){const _0x1ec008=_0x5e08ab[_0x407642(0x100)]===_0x407642(0x11b)?_0x407642(0xfa)+_0x5e08ab['version']+')':a47_0x3ad014['gt'](_0x5b3dfb,_0x39b50d)?_0x407642(0x120)+_0xfca9+_0x407642(0x105)+_0x5e08ab[_0x407642(0x11b)]:_0x407642(0xf8)+_0x5e08ab['version']+')';return _0x3e6a05[_0x407642(0xfb)](_0x1ec008),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3e6a05[_0x407642(0xda)](getInstallPlanLabel(_0xfca9,_0x5e08ab));const _0x3af093=detectPackageManager(),_0x492aec=_0x3af093==='npm'?resolveNpmBin(_0x407642(0x111)):_0x3af093,_0x17b24d=a47_0x1bef0f(_0x407642(0xfc)+_0x3af093+_0x407642(0xf2))[_0x407642(0xff)]();try{await execa(_0x492aec,[_0x407642(0x113),'-g',NPM_PACKAGE_NAME+'@'+_0x5e08ab[_0x407642(0x11b)]],{'stdio':'pipe'}),_0x17b24d[_0x407642(0xfb)](_0x407642(0xf3)+_0x5e08ab[_0x407642(0x11b)]),console[_0x407642(0x114)](a47_0x1c0e65[_0x407642(0x10c)](_0x407642(0xe4)));}catch(_0x21b705){_0x17b24d[_0x407642(0xe2)]('Update\x20failed');throw CliErrors[_0x407642(0x115)](_0x407642(0xfd)+(_0x21b705 instanceof Error?_0x21b705[_0x407642(0xd2)]:String(_0x21b705)),_0x407642(0xf9)+_0x3af093+_0x407642(0x103)+NPM_PACKAGE_NAME+'@'+_0x5e08ab[_0x407642(0x11b)]);}return verifyUpdatedBuiltinSkill(_0x5e08ab[_0x407642(0x11b)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x56bb12(0xd8),'command':a47_0x56bb12(0x108),'description':a47_0x56bb12(0xd7),'risk':a47_0x56bb12(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x2c3134=a47_0x1ddb;(function(_0x24d619,_0x3d4b1a){const _0x37f107=a47_0x1ddb,_0x4f3d7d=_0x24d619();while(!![]){try{const _0x33363a=parseInt(_0x37f107(0x1b6))/0x1*(parseInt(_0x37f107(0x1f6))/0x2)+parseInt(_0x37f107(0x1d5))/0x3*(-parseInt(_0x37f107(0x1ca))/0x4)+parseInt(_0x37f107(0x1fc))/0x5+-parseInt(_0x37f107(0x1d0))/0x6*(parseInt(_0x37f107(0x209))/0x7)+-parseInt(_0x37f107(0x1e6))/0x8*(parseInt(_0x37f107(0x1f9))/0x9)+parseInt(_0x37f107(0x202))/0xa*(-parseInt(_0x37f107(0x1c6))/0xb)+parseInt(_0x37f107(0x1c3))/0xc;if(_0x33363a===_0x3d4b1a)break;else _0x4f3d7d['push'](_0x4f3d7d['shift']());}catch(_0x482549){_0x4f3d7d['push'](_0x4f3d7d['shift']());}}}(a47_0x5887,0x6a3ab));import a47_0x11ceea from'chalk';import a47_0x1e85a9 from'ora';import a47_0x333c2b 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(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1dee53=a47_0x1ddb,_0x4e4097=process[_0x1dee53(0x1e9)][_0x1dee53(0x1b9)]();if(_0x4e4097['includes'](_0x1dee53(0x1b8)))return _0x1dee53(0x1b8);return _0x1dee53(0x1bf);}const updateFlags=[{'name':a47_0x2c3134(0x1cf),'type':a47_0x2c3134(0x20d),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a47_0x2c3134(0x1d7),'type':'string','description':a47_0x2c3134(0x1f8)}];function getRequestedVersion(_0x36a542){const _0x3ad5ce=a47_0x2c3134;return _0x36a542[_0x3ad5ce(0x1e2)](_0x3ad5ce(0x1d7))['trim']();}async function validateUpdateFlags(_0x3dd3ef){const _0x25dd6e=a47_0x2c3134,_0x2da5f8=_0x3dd3ef[_0x25dd6e(0x1fa)](_0x25dd6e(0x1cf)),_0x5ba148=getRequestedVersion(_0x3dd3ef);if(_0x2da5f8&&_0x5ba148)throw CliErrors[_0x25dd6e(0x203)](_0x25dd6e(0x204),_0x25dd6e(0x1fe));if(_0x5ba148&&!a47_0x333c2b[_0x25dd6e(0x1f5)](_0x5ba148))throw CliErrors[_0x25dd6e(0x203)]('Invalid\x20version:\x20'+_0x5ba148,_0x25dd6e(0x1e3));}async function fetchNpmDistTags(){const _0x4aac88=a47_0x2c3134;try{const _0x56b14a=await fetch(_0x4aac88(0x1b7)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x4aac88(0x1e8)](0x2710)});if(!_0x56b14a['ok'])return null;const _0x4ba813=await _0x56b14a['json']();if(!_0x4ba813||typeof _0x4ba813!==_0x4aac88(0x1bc))return null;return Object[_0x4aac88(0x1e1)](Object[_0x4aac88(0x20b)](_0x4ba813)[_0x4aac88(0x1f3)](([,_0x25d019])=>typeof _0x25d019===_0x4aac88(0x1ec)&&_0x25d019['trim']()[_0x4aac88(0x1c5)]>0x0)['map'](([_0x240a87,_0x2dff4d])=>[_0x240a87,String(_0x2dff4d)[_0x4aac88(0x206)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x37f3fa){const _0x508c99=await fetchNpmDistTags();return _0x508c99?.[_0x37f3fa]??null;}async function fetchLatestVersion(){const _0x359151=a47_0x2c3134;return fetchNpmDistTagVersion(_0x359151(0x1eb));}async function resolveTargetVersion(_0x36cd41){const _0x349ba0=a47_0x2c3134,_0x6615c5=getRequestedVersion(_0x36cd41);if(_0x6615c5)return{'version':_0x6615c5,'source':_0x349ba0(0x1d7)};if(_0x36cd41[_0x349ba0(0x1fa)](_0x349ba0(0x1cf))){const _0xd82d6e=await fetchNpmDistTagVersion(_0x349ba0(0x1cf));if(!_0xd82d6e)return null;return{'version':_0xd82d6e,'source':'beta'};}const _0x8ce99c=await fetchLatestVersion();if(!_0x8ce99c)return null;return{'version':_0x8ce99c,'source':'latest'};}function shouldInstallTarget(_0x1ea65c,_0x314f82){const _0x2f86c8=a47_0x2c3134;if(_0x314f82[_0x2f86c8(0x200)]==='version'||_0x314f82[_0x2f86c8(0x200)]==='beta')return!a47_0x333c2b['eq'](_0x1ea65c,_0x314f82[_0x2f86c8(0x1d7)]);return a47_0x333c2b['lt'](_0x1ea65c,_0x314f82['version']);}function getInstallPlanLabel(_0x334470,_0x1ec4d5){const _0x425600=a47_0x2c3134;switch(_0x1ec4d5[_0x425600(0x200)]){case _0x425600(0x1cf):return _0x425600(0x1ff)+a47_0x11ceea['yellow'](_0x334470)+_0x425600(0x201)+a47_0x11ceea[_0x425600(0x1d2)](_0x1ec4d5['version']);case _0x425600(0x1d7):return _0x425600(0x1ed)+a47_0x11ceea['yellow'](_0x334470)+_0x425600(0x201)+a47_0x11ceea[_0x425600(0x1d2)](_0x1ec4d5[_0x425600(0x1d7)]);case _0x425600(0x1eb):default:return _0x425600(0x20e)+a47_0x11ceea[_0x425600(0x1d1)](_0x334470)+_0x425600(0x201)+a47_0x11ceea['green'](_0x1ec4d5[_0x425600(0x1d7)]);}}function repairCurrentBuiltinSkill(){const _0x530479=a47_0x2c3134;console['log'](a47_0x11ceea['gray'](_0x530479(0x1d9)));const _0x475585=installBuiltinSkill();if(_0x475585['ok']){console[_0x530479(0x1d4)](a47_0x11ceea['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x475585[_0x530479(0x1ea)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x530479(0x1e5)](_0x530479(0x1df)+_0x475585[_0x530479(0x1fd)]+_0x530479(0x1f1)+(_0x475585[_0x530479(0x1de)]||_0x530479(0x1bb)),_0x530479(0x1c0)+_0x475585[_0x530479(0x1dd)]+_0x530479(0x1f7)+CLI_BIN_NAME+_0x530479(0x1e7));}function a47_0x5887(){const _0x35a5a1=['state','Checking\x20for\x20updates...','28TiBOsr','read','entries','Try\x20manually:\x20','boolean','Update\x20available:\x20','766097PYPRJs','https://registry.npmjs.org/-/package/','bun','toLowerCase','Update\x20failed:\x20','unknown','object','update','run','npm','Run:\x20','Try\x20manually:\x20npm\x20install\x20-g\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','13042356knwuxr','pipe','length','374WohPCV','Updating\x20via\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.',',\x20found\x20','117280SoQEvv','gray','\x20is\x20newer\x20than\x20npm\x20latest\x20v','start','expected\x20','beta','1000074ksGFlr','yellow','green','current','log','60zELlOo','...','version','Updated\x20to\x20v','Checking\x20CLI\x20Built-in\x20Skill...','fail','Version\x20comparison\x20failed','succeed','repairCommand','error','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Current\x20version:\x20','fromEntries','str','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','apiError','8aecNXq','\x20doctor','timeout','execPath','skillVersion','latest','string','Requested\x20version:\x20','Already\x20on\x20requested\x20version\x20(v','message',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20',']:\x20','install','filter','\x20\x20CLI\x20Built-in\x20Skill\x20','valid','2OcROaS',',\x20then\x20verify\x20with:\x20','Install\x20a\x20specific\x20CLI\x20version','623988UvVLsG','bool','info','1947895RPIREB','code','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Beta\x20version:\x20','source','\x20→\x20','142640nNWAVQ','validation','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Update\x20failed','trim'];a47_0x5887=function(){return _0x35a5a1;};return a47_0x5887();}function verifyUpdatedBuiltinSkill(_0x44f29e){const _0x2f9e89=a47_0x2c3134,_0x185652=inspectInstalledBuiltinSkillVersion(_0x44f29e);if(_0x185652[_0x2f9e89(0x207)]===_0x2f9e89(0x1d3)){console[_0x2f9e89(0x1d4)](a47_0x11ceea[_0x2f9e89(0x1cb)](_0x2f9e89(0x1f4)+_0x44f29e+'\x20is\x20up\x20to\x20date.'));return;}const _0x2b5b89=_0x185652['skillVersion']?_0x2f9e89(0x1ce)+_0x44f29e+_0x2f9e89(0x1c9)+_0x185652[_0x2f9e89(0x1ea)]:_0x2f9e89(0x1ce)+_0x44f29e+',\x20state\x20'+_0x185652['state'];throw CliErrors['apiError']('CLI\x20updated\x20to\x20v'+_0x44f29e+_0x2f9e89(0x1f0)+_0x2b5b89,_0x2f9e89(0x1c0)+_0x185652['repairCommand']+_0x2f9e89(0x1f7)+CLI_BIN_NAME+_0x2f9e89(0x1e7));}async function execute(_0xa3acd5){const _0x568456=a47_0x2c3134;await validateUpdateFlags(_0xa3acd5);const _0x459c4e=getCurrentVersion();console[_0x568456(0x1d4)](_0x568456(0x1e0)+_0x459c4e);const _0x44bb69=a47_0x1e85a9(_0x568456(0x208))[_0x568456(0x1cd)](),_0x7513e=await resolveTargetVersion(_0xa3acd5);if(!_0x7513e){const _0x3ce584=_0xa3acd5[_0x568456(0x1fa)](_0x568456(0x1cf))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x568456(0x1c2);_0x44bb69[_0x568456(0x1da)](_0x3ce584);throw CliErrors[_0x568456(0x1e5)](_0x3ce584,_0x568456(0x1c1)+NPM_PACKAGE_NAME+'@'+(_0xa3acd5[_0x568456(0x1fa)]('beta')?_0x568456(0x1cf):'latest'));}const _0x49b089=a47_0x333c2b[_0x568456(0x1f5)](VERSION),_0x35e228=a47_0x333c2b['valid'](_0x7513e[_0x568456(0x1d7)]);if(!_0x49b089||!_0x35e228){_0x44bb69['fail'](_0x568456(0x1db));throw CliErrors['apiError'](_0x568456(0x1db),'Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20'+CLI_BIN_NAME+'\x20update\x20--version\x20<version>');}if(!shouldInstallTarget(_0x49b089,_0x7513e)){const _0x185eb=_0x7513e[_0x568456(0x200)]==='version'?_0x568456(0x1ee)+_0x7513e['version']+')':a47_0x333c2b['gt'](_0x49b089,_0x35e228)?'Current\x20version\x20v'+_0x459c4e+_0x568456(0x1cc)+_0x7513e[_0x568456(0x1d7)]:'Already\x20up\x20to\x20date\x20(v'+_0x7513e[_0x568456(0x1d7)]+')';return _0x44bb69[_0x568456(0x1dc)](_0x185eb),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x44bb69[_0x568456(0x1fb)](getInstallPlanLabel(_0x459c4e,_0x7513e));const _0x2a460a=detectPackageManager(),_0xdd66b=_0x2a460a===_0x568456(0x1bf)?resolveNpmBin(_0x568456(0x1bf)):_0x2a460a,_0x1df0a4=a47_0x1e85a9(_0x568456(0x1c7)+_0x2a460a+_0x568456(0x1d6))['start']();try{await execa(_0xdd66b,[_0x568456(0x1f2),'-g',NPM_PACKAGE_NAME+'@'+_0x7513e[_0x568456(0x1d7)]],{'stdio':_0x568456(0x1c4)}),_0x1df0a4[_0x568456(0x1dc)](_0x568456(0x1d8)+_0x7513e[_0x568456(0x1d7)]),console[_0x568456(0x1d4)](a47_0x11ceea[_0x568456(0x1cb)](_0x568456(0x1c8)));}catch(_0x3a32c1){_0x1df0a4[_0x568456(0x1da)](_0x568456(0x205));throw CliErrors[_0x568456(0x1e5)](_0x568456(0x1ba)+(_0x3a32c1 instanceof Error?_0x3a32c1[_0x568456(0x1ef)]:String(_0x3a32c1)),_0x568456(0x20c)+_0x2a460a+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x7513e[_0x568456(0x1d7)]);}return verifyUpdatedBuiltinSkill(_0x7513e[_0x568456(0x1d7)]),{'ok':!![]};}function a47_0x1ddb(_0x1a8a09,_0x385fd9){_0x1a8a09=_0x1a8a09-0x1b6;const _0x5887eb=a47_0x5887();let _0x1ddb32=_0x5887eb[_0x1a8a09];return _0x1ddb32;}export const updateDefinition={'service':a47_0x2c3134(0x1bd),'command':a47_0x2c3134(0x1be),'description':a47_0x2c3134(0x1e4),'risk':a47_0x2c3134(0x20a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ea324,_0x404feb){const _0x3924d5=a48_0x2605,_0x37b2f0=_0x1ea324();while(!![]){try{const _0x3c8c54=parseInt(_0x3924d5(0x12d))/0x1+-parseInt(_0x3924d5(0x126))/0x2*(-parseInt(_0x3924d5(0x129))/0x3)+parseInt(_0x3924d5(0x12c))/0x4+-parseInt(_0x3924d5(0x128))/0x5*(-parseInt(_0x3924d5(0x12e))/0x6)+parseInt(_0x3924d5(0x127))/0x7*(-parseInt(_0x3924d5(0x124))/0x8)+-parseInt(_0x3924d5(0x125))/0x9+parseInt(_0x3924d5(0x12a))/0xa*(-parseInt(_0x3924d5(0x12b))/0xb);if(_0x3c8c54===_0x404feb)break;else _0x37b2f0['push'](_0x37b2f0['shift']());}catch(_0x44c31f){_0x37b2f0['push'](_0x37b2f0['shift']());}}}(a48_0x4b8c,0x60ffd));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a48_0x2605(_0x540523,_0x5eb505){_0x540523=_0x540523-0x124;const _0x4b8ca9=a48_0x4b8c();let _0x260550=_0x4b8ca9[_0x540523];return _0x260550;}function a48_0x4b8c(){const _0x5ef015=['2710323uScVLI','2TeuGNt','38892RALOMF','163970SpIhoe','560049fNAZTE','2010SjnvAW','33407IDWYSM','2670300TpKeoV','528489IyRRjl','18IElZIY','248rfchCl'];a48_0x4b8c=function(){return _0x5ef015;};return a48_0x4b8c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x5dad(_0x383bea,_0x5463be){_0x383bea=_0x383bea-0x10e;const _0x17198a=a49_0x1719();let _0x5dadc8=_0x17198a[_0x383bea];return _0x5dadc8;}function a49_0x1719(){const _0x357b5=['sdk','21065BShVSw','str','3467016DVSRgi','8607906TSzErL','string','Omit\x20import\x20statements\x20from\x20generated\x20code','skip-imports','10GZFlXU','390985GnHEWr','appCode','1430085YWamiO','name','tableName','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','20hWNIUj','493191vuhPpl','30OTSZTe','code','78KdNNTC','read','12701535ZIYVVN','alias','codegen'];a49_0x1719=function(){return _0x357b5;};return a49_0x1719();}const a49_0xa6da92=a49_0x5dad;(function(_0x3c8a36,_0xb3b38){const _0x3a1ece=a49_0x5dad,_0x307c98=_0x3c8a36();while(!![]){try{const _0x1617c2=parseInt(_0x3a1ece(0x115))/0x1*(-parseInt(_0x3a1ece(0x10f))/0x2)+-parseInt(_0x3a1ece(0x124))/0x3*(-parseInt(_0x3a1ece(0x123))/0x4)+parseInt(_0x3a1ece(0x11f))/0x5+parseInt(_0x3a1ece(0x125))/0x6*(-parseInt(_0x3a1ece(0x11d))/0x7)+parseInt(_0x3a1ece(0x117))/0x8+-parseInt(_0x3a1ece(0x118))/0x9*(parseInt(_0x3a1ece(0x11c))/0xa)+parseInt(_0x3a1ece(0x111))/0xb;if(_0x1617c2===_0xb3b38)break;else _0x307c98['push'](_0x307c98['shift']());}catch(_0x38971b){_0x307c98['push'](_0x307c98['shift']());}}}(a49_0x1719,0x9bf64));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a49_0xa6da92(0x113),'command':a49_0xa6da92(0x114),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a49_0xa6da92(0x110),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0xa6da92(0x112),'type':a49_0xa6da92(0x119),'description':a49_0xa6da92(0x122)},{'name':'operation','type':a49_0xa6da92(0x119),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a49_0xa6da92(0x11b),'type':'boolean','description':a49_0xa6da92(0x11a)}],async 'execute'(_0x35de88){const _0x3d5d41=a49_0xa6da92,{dataset:_0x451609,operation:_0x1d8190}=await getOperationDetail(_0x35de88[_0x3d5d41(0x11e)],_0x35de88[_0x3d5d41(0x116)](_0x3d5d41(0x10e)),_0x35de88['str']('operation')),_0x2b5f7a=generateSdkCode(_0x451609,_0x1d8190,{'includeImports':!_0x35de88['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x451609[_0x3d5d41(0x120)],'code':_0x451609[_0x3d5d41(0x10e)],'tableName':_0x451609[_0x3d5d41(0x121)]},'operation':_0x35de88['str']('operation'),'code':_0x2b5f7a}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a50_0x3a8e6f=a50_0x27da;(function(_0x511e70,_0x532f3c){const _0x17b3a4=a50_0x27da,_0x2fa149=_0x511e70();while(!![]){try{const _0x53dd13=parseInt(_0x17b3a4(0x9b))/0x1+parseInt(_0x17b3a4(0xa4))/0x2*(parseInt(_0x17b3a4(0x9f))/0x3)+-parseInt(_0x17b3a4(0xac))/0x4+parseInt(_0x17b3a4(0xaf))/0x5*(-parseInt(_0x17b3a4(0xaa))/0x6)+parseInt(_0x17b3a4(0x95))/0x7+-parseInt(_0x17b3a4(0xa2))/0x8*(-parseInt(_0x17b3a4(0xa8))/0x9)+-parseInt(_0x17b3a4(0x9e))/0xa;if(_0x53dd13===_0x532f3c)break;else _0x2fa149['push'](_0x2fa149['shift']());}catch(_0x1348fe){_0x2fa149['push'](_0x2fa149['shift']());}}}(a50_0x3253,0x963e4));function a50_0x27da(_0x6321e3,_0x1e0493){_0x6321e3=_0x6321e3-0x95;const _0x3253b4=a50_0x3253();let _0x27da3e=_0x3253b4[_0x6321e3];return _0x27da3e;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a50_0x3a8e6f(0xad),'command':a50_0x3a8e6f(0xab),'description':a50_0x3a8e6f(0x97),'risk':a50_0x3a8e6f(0xa6),'flags':[SQLCODE_FLAG,{'name':a50_0x3a8e6f(0xa7),'type':a50_0x3a8e6f(0xa3),'description':a50_0x3a8e6f(0x9a),'default':a50_0x3a8e6f(0xa1),'enum':[a50_0x3a8e6f(0xa1),a50_0x3a8e6f(0x96)]},{'name':a50_0x3a8e6f(0x9c),'type':a50_0x3a8e6f(0x99),'description':a50_0x3a8e6f(0xb0)}],async 'execute'(_0x30d012){const _0x507b36=a50_0x3a8e6f,_0x1a897b=await getSqlQueryInfo(_0x30d012[_0x507b36(0xae)],_0x30d012[_0x507b36(0xa0)](_0x507b36(0xa5))),_0x14017d=_0x30d012[_0x507b36(0xa0)](_0x507b36(0xa7))||'sdk',_0x52e8e9=generateSqlCodeTemplate(_0x1a897b,{'target':_0x14017d,'includeImports':!_0x30d012[_0x507b36(0x9d)](_0x507b36(0x9c))});return{'ok':!![],'data':{'sqlCode':_0x1a897b[_0x507b36(0xa9)],'sqlName':_0x1a897b[_0x507b36(0x98)],'target':_0x14017d,'code':_0x52e8e9}};}};function a50_0x3253(){const _0x7858be=['sqlcode','read','target','9TniwSR','sqlCode','8028TRndWJ','sql','1005768JeuYxi','codegen','appCode','1235ATHFhj','Omit\x20import\x20statements\x20from\x20generated\x20code','1092826JACLma','bff','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sqlName','boolean','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','1210106teDtrI','no-imports','bool','5438220ORfXMH','11811ghpLDc','str','sdk','1771032iaUmJl','string','78LFfDKD'];a50_0x3253=function(){return _0x7858be;};return a50_0x3253();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21c16b,_0x2c30e0){const _0xb7d82=a51_0x37a6,_0x27ff0f=_0x21c16b();while(!![]){try{const _0x1080ef=-parseInt(_0xb7d82(0x16d))/0x1*(parseInt(_0xb7d82(0x15c))/0x2)+-parseInt(_0xb7d82(0x16c))/0x3+parseInt(_0xb7d82(0x158))/0x4*(-parseInt(_0xb7d82(0x178))/0x5)+-parseInt(_0xb7d82(0x162))/0x6*(parseInt(_0xb7d82(0x168))/0x7)+parseInt(_0xb7d82(0x14f))/0x8*(parseInt(_0xb7d82(0x17f))/0x9)+parseInt(_0xb7d82(0x17c))/0xa*(-parseInt(_0xb7d82(0x153))/0xb)+-parseInt(_0xb7d82(0x15f))/0xc*(-parseInt(_0xb7d82(0x160))/0xd);if(_0x1080ef===_0x2c30e0)break;else _0x27ff0f['push'](_0x27ff0f['shift']());}catch(_0x2d8894){_0x27ff0f['push'](_0x27ff0f['shift']());}}}(a51_0x141c,0xcffdd));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x2c37aa=a51_0x37a6;return[{'name':_0x2c37aa(0x166),'type':_0x2c37aa(0x152),'description':_0x2c37aa(0x15b),'required':!![]},{'name':'global','type':_0x2c37aa(0x155),'description':_0x2c37aa(0x169),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x18e356=a51_0x37a6;return[{'name':_0x18e356(0x174),'type':_0x18e356(0x155),'description':_0x18e356(0x169),'default':![]}];}export async function validateAppName(_0x24f7a8,_0x2464bf){const _0x4baaf4=a51_0x37a6,_0x323dfb=_0x24f7a8['args'][0x0]?.[_0x4baaf4(0x150)]();if(!_0x323dfb)throw CliErrors[_0x4baaf4(0x154)](_0x4baaf4(0x17d),_0x4baaf4(0x157)+CLI_BIN_NAME+'\x20'+_0x2464bf+'\x20<name>');}export async function runAppAdd(_0x1961b0,_0x22bd14){const _0x20f43d=a51_0x37a6,_0x498413=_0x1961b0[_0x20f43d(0x173)][0x0]?.[_0x20f43d(0x150)]();if(!_0x498413)throw CliErrors[_0x20f43d(0x154)](_0x20f43d(0x17d),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x22bd14+'\x20<name>\x20--appcode\x20<code>');const _0x15a506=_0x1961b0[_0x20f43d(0x172)]('appcode');if(!_0x15a506)throw CliErrors[_0x20f43d(0x15a)](_0x20f43d(0x166),_0x20f43d(0x157)+CLI_BIN_NAME+'\x20'+_0x22bd14+_0x20f43d(0x161));const _0x2d71be={'global':_0x1961b0[_0x20f43d(0x17a)](_0x20f43d(0x174))},_0x54cfd0=readConfig(_0x2d71be);if(!_0x54cfd0['apps'])_0x54cfd0[_0x20f43d(0x16e)]={};const _0x5a5a45={'appcode':_0x15a506,...collectAppProfileOverrides(_0x5b617b=>_0x1961b0['str'](_0x5b617b))},_0x430f42=_0x54cfd0[_0x20f43d(0x16e)],_0x35859e=Object['keys'](_0x430f42),_0x5dde49=typeof _0x54cfd0[_0x20f43d(0x163)]===_0x20f43d(0x152)&&_0x430f42[_0x54cfd0[_0x20f43d(0x163)]]?_0x54cfd0[_0x20f43d(0x163)]:_0x35859e[_0x20f43d(0x151)]===0x1?_0x35859e[0x0]:undefined,_0x375fc6=!!_0x430f42[_0x498413];_0x430f42[_0x498413]=_0x5a5a45;const _0x4ae56b=normalizeStoredDefaultApp(_0x54cfd0,_0x5dde49);writeConfig(_0x54cfd0,_0x2d71be);const _0x423a9c=!_0x375fc6&&_0x4ae56b?_0x20f43d(0x15d)+_0x4ae56b+'\x22.':'',_0x51a49f=(_0x375fc6?'Updated':_0x20f43d(0x175))+_0x20f43d(0x167)+_0x498413+_0x20f43d(0x17b)+_0x15a506+')'+scopeLabel(_0x2d71be)+'.'+_0x423a9c;return{'ok':!![],'message':_0x51a49f};}function a51_0x37a6(_0x59ccb3,_0x10e871){_0x59ccb3=_0x59ccb3-0x14f;const _0x141c31=a51_0x141c();let _0x37a626=_0x141c31[_0x59ccb3];return _0x37a626;}function a51_0x141c(){const _0x3bd1ff=['both','171haWMrd','607192ygYbOU','trim','length','string','5338058gAZvfj','validation','boolean','\x22\x20is\x20selected\x20automatically.','Usage:\x20','8wTCTEI','object','flagMissing','App\x20code','124RqmtpM','\x20Default\x20app\x20is\x20\x22','\x20Note:\x20app\x20\x22','9564TqpCdx','35269XSdvYW','\x20<name>\x20--appcode\x20<code>','174uDeGPr','defaultApp','\x22\x20not\x20found.','App\x20\x22','appcode','\x20app\x20\x22','108087tPLEOm','Use\x20global\x20config\x20scope','\x22\x20still\x20defined\x20in\x20','globalConfig','247542lGgVDm','10990uiFFpt','apps','projectConfig','\x20config.','\x20Default\x20app\x20changed\x20to\x20\x22','str','args','global','Added','project','Removed\x20app\x20\x22','212230OfHlqb','keys','bool','\x22\x20(appcode:\x20','30wWdoGy','Missing\x20app\x20name.'];a51_0x141c=function(){return _0x3bd1ff;};return a51_0x141c();}export async function runAppRemove(_0x5ecad2,_0x3c57b0){const _0x3d3625=a51_0x37a6,_0x45d63f=_0x5ecad2[_0x3d3625(0x173)][0x0]?.[_0x3d3625(0x150)]();if(!_0x45d63f)throw CliErrors[_0x3d3625(0x154)]('Missing\x20app\x20name.',_0x3d3625(0x157)+CLI_BIN_NAME+'\x20'+_0x3c57b0+'\x20<name>\x20[--global]');const _0x4f6a46=_0x5ecad2[_0x3d3625(0x17a)]('global'),{config:_0x53e7cc,layers:_0x557e4f}=readRawConfigWithLayers(),_0x3042be=_0x53e7cc['apps']??{};if(!_0x3042be[_0x45d63f])throw CliErrors[_0x3d3625(0x154)]('App\x20\x22'+_0x45d63f+_0x3d3625(0x164));const _0x12b948=_0x557e4f['globalConfig']['apps']&&typeof _0x557e4f[_0x3d3625(0x16b)][_0x3d3625(0x16e)]===_0x3d3625(0x159)?_0x557e4f[_0x3d3625(0x16b)][_0x3d3625(0x16e)]:{},_0x393ab6=_0x557e4f['projectConfig']['apps']&&typeof _0x557e4f[_0x3d3625(0x16f)][_0x3d3625(0x16e)]===_0x3d3625(0x159)?_0x557e4f['projectConfig'][_0x3d3625(0x16e)]:{},_0x10fbf8=appDefinedIn(_0x45d63f,_0x12b948,_0x393ab6),_0x266a21=resolveAppScopeForWrite(_0x45d63f,_0x4f6a46,_0x557e4f),_0x152f34={'global':_0x266a21===_0x3d3625(0x174)},_0x14271b=readConfig(_0x152f34),_0x210b10=_0x14271b[_0x3d3625(0x16e)];if(!_0x210b10||!_0x210b10[_0x45d63f])throw CliErrors[_0x3d3625(0x154)](_0x3d3625(0x165)+_0x45d63f+'\x22\x20not\x20found.');delete _0x210b10[_0x45d63f];let _0x39257c='';const _0x13682f=typeof _0x14271b['defaultApp']===_0x3d3625(0x152)?_0x14271b[_0x3d3625(0x163)]:undefined,_0x34cdd8=Object[_0x3d3625(0x179)](_0x210b10),_0x582678=_0x13682f===_0x45d63f?_0x34cdd8[0x0]:_0x13682f,_0x41a4dd=normalizeStoredDefaultApp(_0x14271b,_0x582678);if(_0x13682f===_0x45d63f&&_0x34cdd8['length']===0x1)_0x39257c='\x20Remaining\x20app\x20\x22'+_0x34cdd8[0x0]+_0x3d3625(0x156);else _0x13682f===_0x45d63f&&_0x41a4dd&&(_0x39257c=_0x3d3625(0x171)+_0x41a4dd+'\x22.');Object[_0x3d3625(0x179)](_0x210b10)['length']===0x0&&(delete _0x14271b[_0x3d3625(0x16e)],delete _0x14271b[_0x3d3625(0x163)]);writeConfig(_0x14271b,_0x152f34);const _0x599ae0=_0x10fbf8===_0x3d3625(0x17e)?_0x3d3625(0x15e)+_0x45d63f+_0x3d3625(0x16a)+(_0x266a21===_0x3d3625(0x176)?_0x3d3625(0x174):'project')+_0x3d3625(0x170):'';return{'ok':!![],'message':_0x3d3625(0x177)+_0x45d63f+'\x22'+scopeLabel(_0x152f34)+'.'+_0x39257c+_0x599ae0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a52_0x2d2e(_0x3894e4,_0x446d76){_0x3894e4=_0x3894e4-0x117;const _0x285110=a52_0x2851();let _0x2d2e42=_0x285110[_0x3894e4];return _0x2d2e42;}(function(_0x1b70c9,_0x372883){const _0x2df0cb=a52_0x2d2e,_0x3dcac9=_0x1b70c9();while(!![]){try{const _0x5849e8=-parseInt(_0x2df0cb(0x135))/0x1*(-parseInt(_0x2df0cb(0x126))/0x2)+parseInt(_0x2df0cb(0x13a))/0x3*(parseInt(_0x2df0cb(0x12c))/0x4)+parseInt(_0x2df0cb(0x122))/0x5+parseInt(_0x2df0cb(0x124))/0x6+parseInt(_0x2df0cb(0x11d))/0x7+parseInt(_0x2df0cb(0x119))/0x8*(-parseInt(_0x2df0cb(0x12d))/0x9)+-parseInt(_0x2df0cb(0x12f))/0xa;if(_0x5849e8===_0x372883)break;else _0x3dcac9['push'](_0x3dcac9['shift']());}catch(_0x2f4a01){_0x3dcac9['push'](_0x3dcac9['shift']());}}}(a52_0x2851,0xcc18a));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x255ae5 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 _0x7a6d05=a52_0x2d2e,_0x513c4c=await input({'message':_0x7a6d05(0x139),'validate':_0x2cae6d=>{const _0x3f456c=_0x7a6d05,_0x1942ea=validateAppcode(_0x2cae6d['trim']());return _0x1942ea[_0x3f456c(0x132)]||_0x1942ea[_0x3f456c(0x128)]||_0x3f456c(0x136);}});return _0x513c4c[_0x7a6d05(0x137)]();}function a52_0x2851(){const _0x46718e=['\x20\x20(','skip','valid','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','✎\x20Enter\x20manually','70916PKyqSs','Invalid\x20App\x20Code','trim','custom','App\x20Code:','3rDJyQG','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','gray','includes','✎\x20Enter\x20appcode\x20manually','2349608cSexJV','appName','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','map','5401683iqFknW','cyan','\x0aNo\x20available\x20apps\x20found.','No\x20available\x20apps\x20found.','Fetching\x20available\x20apps...','1877220FtEfki','appCode','3061662KcJcia','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','22KuEhFH','find','message','(Skip;\x20configure\x20later)','length','manual','3612488LVXbJM','45Dwtoli','yellow','10361050IHcbeJ'];a52_0x2851=function(){return _0x46718e;};return a52_0x2851();}export async function promptAppSelection(_0x310d5d){const _0x2c1f1d=a52_0x2d2e,_0x311d23=[{'name':a52_0x255ae5[_0x2c1f1d(0x12e)](_0x2c1f1d(0x118)),'value':-0x1},..._0x310d5d[_0x2c1f1d(0x11c)]((_0xb373f4,_0x74d985)=>({'name':_0xb373f4['appName']+'\x20\x20'+a52_0x255ae5[_0x2c1f1d(0x13c)]('('+_0xb373f4['appCode']+')'),'value':_0x74d985}))],_0xaeef02=await checkbox({'message':'Found\x20'+a52_0x255ae5[_0x2c1f1d(0x11e)](_0x310d5d[_0x2c1f1d(0x12a)])+_0x2c1f1d(0x125),'choices':_0x311d23,'loop':![]});if(_0xaeef02[_0x2c1f1d(0x117)](-0x1))return _0x2c1f1d(0x138);if(_0xaeef02[_0x2c1f1d(0x12a)]===0x0)return _0x2c1f1d(0x138);return _0xaeef02['map'](_0x31678f=>_0x310d5d[_0x31678f]);}export async function promptSingleAppSelection(_0x2fe321){const _0x21e9b3=a52_0x2d2e,_0x153ba4=[{'name':a52_0x255ae5[_0x21e9b3(0x13c)]('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x21e9b3(0x131)},{'name':a52_0x255ae5[_0x21e9b3(0x12e)](_0x21e9b3(0x118)),'value':_0x21e9b3(0x138)},..._0x2fe321[_0x21e9b3(0x11c)](_0x173105=>({'name':_0x173105[_0x21e9b3(0x11a)]+'\x20\x20'+a52_0x255ae5[_0x21e9b3(0x13c)]('('+_0x173105[_0x21e9b3(0x123)]+')'),'value':_0x173105['appCode']}))],_0x38db63=await select({'message':'Select\x20the\x20app\x20to\x20bind:','choices':_0x153ba4});if(_0x38db63==='skip')return _0x21e9b3(0x131);if(_0x38db63===_0x21e9b3(0x138))return _0x21e9b3(0x138);return _0x2fe321[_0x21e9b3(0x127)](_0x146b71=>_0x146b71[_0x21e9b3(0x123)]===_0x38db63);}export async function selectSingleAppcode(_0x5d7d7f){const _0x1bae5c=a52_0x2d2e;if(!_0x5d7d7f)return writeCliSideChannelLine(a52_0x255ae5[_0x1bae5c(0x13c)](_0x1bae5c(0x133))),_fallbackOrSkip();writeCliSideChannelLine(_0x1bae5c(0x121));let _0x209f13;try{_0x209f13=await withActiveCookie(_0x5d7d7f,()=>listRemoteApps());}catch(_0x570256){writeCliSideChannelLine(a52_0x255ae5['yellow'](_0x1bae5c(0x13b)));if(_0x570256 instanceof Error)writeCliSideChannelLine(a52_0x255ae5[_0x1bae5c(0x13c)](_0x1bae5c(0x130)+_0x570256['message']+')'));return _fallbackOrSkip();}if(_0x209f13[_0x1bae5c(0x12a)]===0x0)return writeCliSideChannelLine(a52_0x255ae5['yellow'](_0x1bae5c(0x120))),_fallbackOrSkip();const _0x1dcdfa=await promptSingleAppSelection(_0x209f13);if(_0x1dcdfa==='skip')return'';if(_0x1dcdfa===_0x1bae5c(0x138))return promptCustomAppcode();return _0x1dcdfa[_0x1bae5c(0x123)];}export async function selectMultipleApps(_0x4b7323){const _0x133707=a52_0x2d2e;writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x164c74;try{_0x164c74=await withActiveCookie(_0x4b7323,()=>listRemoteApps());}catch(_0x3ab213){writeCliSideChannelLine(_0x133707(0x11b));if(_0x3ab213 instanceof Error)writeCliSideChannelLine(_0x133707(0x130)+_0x3ab213[_0x133707(0x128)]+')');return _0x133707(0x138);}if(_0x164c74[_0x133707(0x12a)]===0x0)return writeCliSideChannelLine(_0x133707(0x11f)),_0x133707(0x138);return promptAppSelection(_0x164c74);}async function _fallbackOrSkip(){const _0x51fbd6=a52_0x2d2e,_0xadd692=await select({'message':_0x51fbd6(0x139),'choices':[{'name':a52_0x255ae5[_0x51fbd6(0x13c)](_0x51fbd6(0x129)),'value':'skip'},{'name':a52_0x255ae5[_0x51fbd6(0x12e)](_0x51fbd6(0x134)),'value':_0x51fbd6(0x12b)}]});if(_0xadd692===_0x51fbd6(0x131))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x298e8b=a53_0x4173;(function(_0x4a746d,_0x3a4c1e){const _0x325179=a53_0x4173,_0x12f70e=_0x4a746d();while(!![]){try{const _0x304c9a=-parseInt(_0x325179(0x17b))/0x1+-parseInt(_0x325179(0x173))/0x2+parseInt(_0x325179(0x17a))/0x3*(parseInt(_0x325179(0x189))/0x4)+-parseInt(_0x325179(0x179))/0x5*(-parseInt(_0x325179(0x184))/0x6)+-parseInt(_0x325179(0x172))/0x7*(-parseInt(_0x325179(0x17d))/0x8)+-parseInt(_0x325179(0x181))/0x9*(-parseInt(_0x325179(0x16e))/0xa)+-parseInt(_0x325179(0x183))/0xb*(-parseInt(_0x325179(0x171))/0xc);if(_0x304c9a===_0x3a4c1e)break;else _0x12f70e['push'](_0x12f70e['shift']());}catch(_0x8e4180){_0x12f70e['push'](_0x12f70e['shift']());}}}(a53_0xecc3,0x86244));function a53_0xecc3(){const _0xba87ba=['9drDgTL','\x20is\x20processing.','3078977XscBxM','108rqAzxp','string','trim','status','\x20--appcode\x20','440372ODMBAz','toUpperCase','replace','PROCESSING','\x27\x5c\x27\x27','6246560wPrSzp','apiError','PENDING','12haevvU','329hJiflJ','999292vbNLQb','has','errorMessage','\x20completed\x20successfully.','Async\x20task\x20','\x20is\x20pending.','134630JJyEbQ','15JhKMSU','1035178SqvdcI','Task\x20','24608EdpdLV','SUCCESS','FAILED','taskId'];a53_0xecc3=function(){return _0xba87ba;};return a53_0xecc3();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x298e8b(0x17e),a53_0x298e8b(0x17f)]),NON_TERMINAL_STATUSES=new Set([a53_0x298e8b(0x170),'PROCESSING']);function a53_0x4173(_0x5c4449,_0xba2885){_0x5c4449=_0x5c4449-0x16e;const _0xecc3ac=a53_0xecc3();let _0x4173ea=_0xecc3ac[_0x5c4449];return _0x4173ea;}export function normalizeAsyncTask(_0x3e7862){const _0x430c69=a53_0x298e8b,_0x3fbe8c=typeof _0x3e7862?.[_0x430c69(0x180)]==='string'?_0x3e7862[_0x430c69(0x180)][_0x430c69(0x186)]():'';if(!_0x3fbe8c)throw CliErrors[_0x430c69(0x16f)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x1afb83=typeof _0x3e7862[_0x430c69(0x187)]===_0x430c69(0x185)?_0x3e7862[_0x430c69(0x187)]['trim']()[_0x430c69(0x18a)]():'';if(!_0x1afb83)throw CliErrors[_0x430c69(0x16f)](_0x430c69(0x177)+_0x3fbe8c+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x3fbe8c,'status':_0x1afb83,'errorMessage':typeof _0x3e7862[_0x430c69(0x175)]==='string'&&_0x3e7862[_0x430c69(0x175)][_0x430c69(0x186)]()?_0x3e7862['errorMessage'][_0x430c69(0x186)]():null,'isTerminal':TERMINAL_STATUSES[_0x430c69(0x174)](_0x1afb83),'knownStatus':TERMINAL_STATUSES[_0x430c69(0x174)](_0x1afb83)||NON_TERMINAL_STATUSES[_0x430c69(0x174)](_0x1afb83)};}export function buildAsyncTaskStatusCommand(_0x33e11c,_0x7a6c77){const _0x38eda3=a53_0x298e8b;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x33e11c)+_0x38eda3(0x188)+quoteShellArg(_0x7a6c77)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x220253){const _0x55eba5=a53_0x298e8b;switch(_0x220253[_0x55eba5(0x187)]){case'PENDING':return _0x55eba5(0x17c)+_0x220253[_0x55eba5(0x180)]+_0x55eba5(0x178);case _0x55eba5(0x18c):return _0x55eba5(0x17c)+_0x220253[_0x55eba5(0x180)]+_0x55eba5(0x182);case _0x55eba5(0x17e):return _0x55eba5(0x17c)+_0x220253[_0x55eba5(0x180)]+_0x55eba5(0x176);case _0x55eba5(0x17f):return _0x220253[_0x55eba5(0x175)]?_0x55eba5(0x17c)+_0x220253[_0x55eba5(0x180)]+'\x20failed:\x20'+_0x220253['errorMessage']:_0x55eba5(0x17c)+_0x220253[_0x55eba5(0x180)]+'\x20failed.';default:return _0x55eba5(0x17c)+_0x220253[_0x55eba5(0x180)]+'\x20returned\x20unknown\x20status\x20'+_0x220253[_0x55eba5(0x187)]+'.';}}function quoteShellArg(_0x3c16c2){const _0x4e251f=a53_0x298e8b;return'\x27'+_0x3c16c2[_0x4e251f(0x18b)](/'/g,_0x4e251f(0x18d))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c5214,_0x5b6daa){var _0x47a64f=a54_0x14be,_0x1a6c70=_0x1c5214();while(!![]){try{var _0x243393=parseInt(_0x47a64f(0x12e))/0x1+-parseInt(_0x47a64f(0x12f))/0x2*(parseInt(_0x47a64f(0x136))/0x3)+-parseInt(_0x47a64f(0x130))/0x4+-parseInt(_0x47a64f(0x12d))/0x5*(-parseInt(_0x47a64f(0x12a))/0x6)+parseInt(_0x47a64f(0x12c))/0x7+parseInt(_0x47a64f(0x129))/0x8*(-parseInt(_0x47a64f(0x133))/0x9)+parseInt(_0x47a64f(0x134))/0xa;if(_0x243393===_0x5b6daa)break;else _0x1a6c70['push'](_0x1a6c70['shift']());}catch(_0x2152e6){_0x1a6c70['push'](_0x1a6c70['shift']());}}}(a54_0x2033,0x7297b));export function asDryRunResult(_0x5f1c39,_0x14b42c){var _0x717cad=a54_0x14be;return Object[_0x717cad(0x132)](_0x5f1c39,{'method':{'value':_0x14b42c[_0x717cad(0x135)],'enumerable':![]},'url':{'value':_0x14b42c[_0x717cad(0x131)],'enumerable':![]},..._0x14b42c[_0x717cad(0x12b)]?{'description':{'value':_0x14b42c['description'],'enumerable':![]}}:{}});}function a54_0x14be(_0x216d42,_0x1b8305){_0x216d42=_0x216d42-0x129;var _0x203395=a54_0x2033();var _0x14be42=_0x203395[_0x216d42];return _0x14be42;}function a54_0x2033(){var _0x1eda58=['description','5015731ipPZJA','165aysNpb','643768nORrEP','2unGTye','2491144CEPJeU','url','defineProperties','47997TFZLTZ','2538330LbdlZR','method','195897CduJDU','696YnjHGX','1326oQjpxM'];a54_0x2033=function(){return _0x1eda58;};return a54_0x2033();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x8f317b=a55_0xe3e2;(function(_0x50b633,_0x4f12cb){const _0x34e45b=a55_0xe3e2,_0x486a60=_0x50b633();while(!![]){try{const _0x3b299c=parseInt(_0x34e45b(0xc7))/0x1*(-parseInt(_0x34e45b(0xca))/0x2)+-parseInt(_0x34e45b(0xd3))/0x3+-parseInt(_0x34e45b(0xe4))/0x4+parseInt(_0x34e45b(0xc3))/0x5+parseInt(_0x34e45b(0xe5))/0x6+parseInt(_0x34e45b(0xe1))/0x7*(-parseInt(_0x34e45b(0xd5))/0x8)+-parseInt(_0x34e45b(0xcc))/0x9*(-parseInt(_0x34e45b(0xc5))/0xa);if(_0x3b299c===_0x4f12cb)break;else _0x486a60['push'](_0x486a60['shift']());}catch(_0x4edfd1){_0x486a60['push'](_0x486a60['shift']());}}}(a55_0x4b37,0xdd1e2));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x8f317b(0xdb),'type':'string','required':!![],'description':a55_0x8f317b(0xc1)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':'from-column','type':a55_0x8f317b(0xdd),'required':!![],'description':a55_0x8f317b(0xe2)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x8f317b(0xc4),'type':a55_0x8f317b(0xdd),'required':!![],'description':a55_0x8f317b(0xc9)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x8f317b(0xd8),'type':a55_0x8f317b(0xdd),'required':!![],'description':a55_0x8f317b(0xd7)};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x8f317b(0xd9),'type':a55_0x8f317b(0xcb),'description':a55_0x8f317b(0xde)};export const CROSS_RELATION_LABEL_FLAG={'name':'to-label-column','type':a55_0x8f317b(0xdd),'description':a55_0x8f317b(0xda)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x8f317b(0xce),'type':a55_0x8f317b(0xdd),'enum':[a55_0x8f317b(0xdf),a55_0x8f317b(0xc2),a55_0x8f317b(0xd4),a55_0x8f317b(0xcf)],'description':a55_0x8f317b(0xd6)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x8f317b(0xcd),'type':a55_0x8f317b(0xd1),'default':![],'description':a55_0x8f317b(0xc6)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x8f317b(0xc0)};function a55_0x4b37(){const _0x420e39=['Database\x20product\x20type','boolean','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','1273437kCXVYh','MANY_TO_ONE','4424clciTz','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','Target\x20field\x20name','to-column','from-dblink-id','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','from-datasetcode','dbtype','string','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','ONE_TO_ONE','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','13755iMKZeQ','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','4017668XokicT','3516mpzgEm','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','Source\x20DB_TABLE\x20dataset\x20code','ONE_TO_MANY','3557335ZFrklJ','to-datasetcode','10lVNYPx','Write\x20to\x20the\x20global\x20configuration','1268006TgHAsO','code','Target\x20DB_TABLE\x20dataset\x20code','2DTjYcK','number','35794728ksDvqP','global','cardinality','MANY_TO_MANY'];a55_0x4b37=function(){return _0x420e39;};return a55_0x4b37();}export const CODE_FLAG={'name':a55_0x8f317b(0xc8),'type':a55_0x8f317b(0xdd),'required':!![],'description':a55_0x8f317b(0xe0),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a55_0x8f317b(0xe0)};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a55_0x8f317b(0xe3),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x8f317b(0xd2)}};function a55_0xe3e2(_0xfd65e9,_0x53733b){_0xfd65e9=_0xfd65e9-0xc0;const _0x4b379b=a55_0x4b37();let _0xe3e2cd=_0x4b379b[_0xfd65e9];return _0xe3e2cd;}export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':'string','required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x8f317b(0xcb),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a55_0x8f317b(0xdc),'type':'string','required':!![],'description':a55_0x8f317b(0xd0),'enum':['MYSQL','POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':'boolean','description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x418925,_0x11f65b){const _0x1987a2=a56_0x3b4d,_0x5829d3=_0x418925();while(!![]){try{const _0x19e0dd=-parseInt(_0x1987a2(0x1e3))/0x1+-parseInt(_0x1987a2(0x1e8))/0x2+-parseInt(_0x1987a2(0x1de))/0x3*(parseInt(_0x1987a2(0x1e5))/0x4)+-parseInt(_0x1987a2(0x1eb))/0x5*(parseInt(_0x1987a2(0x1df))/0x6)+-parseInt(_0x1987a2(0x1ea))/0x7+parseInt(_0x1987a2(0x1e7))/0x8+parseInt(_0x1987a2(0x1e9))/0x9*(parseInt(_0x1987a2(0x1e0))/0xa);if(_0x19e0dd===_0x11f65b)break;else _0x5829d3['push'](_0x5829d3['shift']());}catch(_0x99f59a){_0x5829d3['push'](_0x5829d3['shift']());}}}(a56_0x222b,0x809e8));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x222b(){const _0x5c39e0=['22130520lvoguq','trim','\x20MB','568341FniJWi','validation','4Mgdcsj','File\x20not\x20found:\x20','4886560Gvyqva','1476236buPvQP','9tbOsUL','1212974fomtqI','5JjkvrJ','size','\x20path\x20is\x20required.','ceil','70527REsZPo','4762788iVYdJN'];a56_0x222b=function(){return _0x5c39e0;};return a56_0x222b();}function a56_0x3b4d(_0x26315b,_0x50b5d8){_0x26315b=_0x26315b-0x1db;const _0x222b19=a56_0x222b();let _0x3b4d20=_0x222b19[_0x26315b];return _0x3b4d20;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x2ed336){const _0x561be5=a56_0x3b4d;if(_0x2ed336>=BYTES_PER_MB){const _0x5301e0=Math[_0x561be5(0x1dd)](_0x2ed336/BYTES_PER_MB*0x64)/0x64;return _0x5301e0['toFixed'](0x2)+_0x561be5(0x1e2);}return _0x2ed336+'\x20B';}export function requireDevelopmentUploadFile(_0x47410e,_0x30d7b7){const _0x365496=a56_0x3b4d,_0x2f605a=_0x47410e[_0x365496(0x1e1)]();if(!_0x2f605a)throw CliErrors[_0x365496(0x1e4)](_0x30d7b7+_0x365496(0x1dc));if(!existsSync(_0x2f605a))throw CliErrors[_0x365496(0x1e4)](_0x365496(0x1e6)+_0x2f605a);const _0xbdc34b=statSync(_0x2f605a);if(!_0xbdc34b['isFile']())throw CliErrors[_0x365496(0x1e4)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2f605a);if(_0xbdc34b[_0x365496(0x1db)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x365496(0x1e4)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2f605a+'\x20('+formatBytes(_0xbdc34b[_0x365496(0x1db)])+')');return{'path':_0x2f605a,'size':_0xbdc34b[_0x365496(0x1db)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x28df72,_0x6eba13){const _0x395b39=a57_0x328d,_0x51c4aa=_0x28df72();while(!![]){try{const _0x1a818a=parseInt(_0x395b39(0x120))/0x1*(-parseInt(_0x395b39(0x112))/0x2)+-parseInt(_0x395b39(0x11b))/0x3+parseInt(_0x395b39(0x118))/0x4*(-parseInt(_0x395b39(0x117))/0x5)+-parseInt(_0x395b39(0x11a))/0x6*(-parseInt(_0x395b39(0x11e))/0x7)+-parseInt(_0x395b39(0x110))/0x8*(-parseInt(_0x395b39(0x119))/0x9)+parseInt(_0x395b39(0x113))/0xa+-parseInt(_0x395b39(0x116))/0xb;if(_0x1a818a===_0x6eba13)break;else _0x51c4aa['push'](_0x51c4aa['shift']());}catch(_0x2fad83){_0x51c4aa['push'](_0x51c4aa['shift']());}}}(a57_0x4fa4,0x61fd9));export function validateAppcode(_0x1e0256){const _0x3b4e63=a57_0x328d,_0x20bf36=_0x1e0256[_0x3b4e63(0x11f)]();if(!_0x20bf36)return{'valid':![],'message':_0x3b4e63(0x111)};if(_0x20bf36[_0x3b4e63(0x114)]>0x64)return{'valid':![],'message':_0x3b4e63(0x11c)};if(!/^[A-Za-z0-9_-]+$/[_0x3b4e63(0x115)](_0x20bf36))return{'valid':![],'message':_0x3b4e63(0x11d)};return{'valid':!![]};}function a57_0x328d(_0x2d262e,_0x2a9a5f){_0x2d262e=_0x2d262e-0x110;const _0x4fa4fa=a57_0x4fa4();let _0x328d22=_0x4fa4fa[_0x2d262e];return _0x328d22;}function a57_0x4fa4(){const _0xf19f60=['12MtTFee','126684qOCJZf','App\x20Code\x20cannot\x20exceed\x20100\x20characters','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','2673867MeLyBZ','trim','1517VndNER','16KwCZVa','App\x20Code\x20cannot\x20be\x20empty','268oRkvnv','3581180FEOdqd','length','test','4021149dcEgGa','10lXiIaE','1142276nqYSOd','2076714UKIThg'];a57_0x4fa4=function(){return _0xf19f60;};return a57_0x4fa4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a58_0x18d1(){const _0x4b4bd1=['3OGSRgG','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','global','has','validation','write','call','args','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','2402991JNLVWa','10uQYHIx','trim','\x20config\x20delete\x20<key>\x20[--global]','5021800TXiSKS','routing','delete','riskLevel','config','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','16149QQFwHG','defaultApp','3656IwHAVd','Global','Missing\x20key\x20argument.','10924089XciHTq','hasOwnProperty','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x22\x20is\x20not\x20deletable.','2dtAysG','Top-level\x20key\x20\x22','\x20already\x20absent','514018ARPfye','boolean','4046358jiWiqa','3373960aMfJDZ'];a58_0x18d1=function(){return _0x4b4bd1;};return a58_0x18d1();}const a58_0x112b86=a58_0x3d37;(function(_0x2cafc3,_0x3035df){const _0x2fecf0=a58_0x3d37,_0x3982a4=_0x2cafc3();while(!![]){try{const _0x334ff4=-parseInt(_0x2fecf0(0xf4))/0x1*(parseInt(_0x2fecf0(0x115))/0x2)+-parseInt(_0x2fecf0(0xf8))/0x3*(parseInt(_0x2fecf0(0xf7))/0x4)+-parseInt(_0x2fecf0(0x106))/0x5+parseInt(_0x2fecf0(0xf6))/0x6+parseInt(_0x2fecf0(0x10c))/0x7*(parseInt(_0x2fecf0(0x10e))/0x8)+-parseInt(_0x2fecf0(0x102))/0x9*(-parseInt(_0x2fecf0(0x103))/0xa)+parseInt(_0x2fecf0(0x111))/0xb;if(_0x334ff4===_0x3035df)break;else _0x3982a4['push'](_0x3982a4['shift']());}catch(_0x16839d){_0x3982a4['push'](_0x3982a4['shift']());}}}(a58_0x18d1,0x990ea));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a58_0x112b86(0x10d),a58_0x112b86(0x107)]);async function execute(_0x39f1c2){const _0x545748=a58_0x112b86,_0x32ad84=_0x39f1c2[_0x545748(0x100)][0x0]?.[_0x545748(0x104)]();if(!_0x32ad84)throw CliErrors[_0x545748(0xfd)](_0x545748(0x110),'Usage:\x20'+CLI_BIN_NAME+_0x545748(0x105));if(_0x32ad84===_0x545748(0x109))throw CliErrors[_0x545748(0xfd)](_0x545748(0xfa));if(!isTopLevelConfigKey(_0x32ad84)&&!EXTRA_DELETABLE_KEYS[_0x545748(0xfc)](_0x32ad84)&&!LEGACY_DELETABLE_KEYS[_0x545748(0xfc)](_0x32ad84))throw CliErrors[_0x545748(0xfd)](_0x545748(0x116)+_0x32ad84+_0x545748(0x114),_0x545748(0x113));const _0x4902c3=resolveWriteScope({'global':_0x39f1c2['bool'](_0x545748(0xfb))}),_0x1c7114=readScopedConfig(_0x4902c3),_0x2fcd2e=Object['prototype'][_0x545748(0x112)][_0x545748(0xff)](_0x1c7114,_0x32ad84);_0x2fcd2e&&(delete _0x1c7114[_0x32ad84],writeScopedConfig(_0x1c7114,_0x4902c3));const _0x2b79bb=_0x4902c3===_0x545748(0xfb)?_0x545748(0x10f):'Project';return{'ok':!![],'message':_0x2fcd2e?'✓\x20'+_0x2b79bb+'\x20'+_0x32ad84+'\x20deleted':'✓\x20'+_0x2b79bb+'\x20'+_0x32ad84+_0x545748(0x117),'data':{'key':_0x32ad84,'scope':_0x4902c3,'changed':_0x2fcd2e}};}function a58_0x3d37(_0x55b6dc,_0x3b521f){_0x55b6dc=_0x55b6dc-0xf4;const _0x18d1d3=a58_0x18d1();let _0x3d3735=_0x18d1d3[_0x55b6dc];return _0x3d3735;}export const configDeleteDefinition={'service':a58_0x112b86(0x10a),'command':a58_0x112b86(0x108),'description':a58_0x112b86(0xf9),'risk':a58_0x112b86(0xfe),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a58_0x112b86(0x10b),'required':!![]}],'flags':[{'name':a58_0x112b86(0xfb),'type':a58_0x112b86(0xf5),'description':a58_0x112b86(0x101),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x4ee06e=a59_0x13b0;(function(_0x12dfae,_0x4d23d7){const _0xcecbd5=a59_0x13b0,_0x2f9eb6=_0x12dfae();while(!![]){try{const _0x2afc93=-parseInt(_0xcecbd5(0x1e0))/0x1*(-parseInt(_0xcecbd5(0x1e3))/0x2)+parseInt(_0xcecbd5(0x1ce))/0x3*(-parseInt(_0xcecbd5(0x1d1))/0x4)+-parseInt(_0xcecbd5(0x1d5))/0x5*(parseInt(_0xcecbd5(0x1dd))/0x6)+parseInt(_0xcecbd5(0x1d7))/0x7*(parseInt(_0xcecbd5(0x1d4))/0x8)+parseInt(_0xcecbd5(0x1d0))/0x9+-parseInt(_0xcecbd5(0x1cf))/0xa+parseInt(_0xcecbd5(0x1d2))/0xb;if(_0x2afc93===_0x4d23d7)break;else _0x2f9eb6['push'](_0x2f9eb6['shift']());}catch(_0x245e30){_0x2f9eb6['push'](_0x2f9eb6['shift']());}}}(a59_0x276f,0x7f1f7));function a59_0x13b0(_0x33512b,_0x1177ee){_0x33512b=_0x33512b-0x1ce;const _0x276f20=a59_0x276f();let _0x13b049=_0x276f20[_0x33512b];return _0x13b049;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a59_0x276f(){const _0x4011bf=['Missing\x20key.','1170736jzIIlA','string','config','key','Usage:\x20','validation','828810ebjdeO','object','Get\x20a\x20config\x20value\x20by\x20key','14213WEGGcD','\x20config\x20get\x20--key\x20<key>','app','118cOQZSt','3XwzHrT','8025850iyRExt','3222747KcTcLU','690652VZleWV','10249162JlksJH','appcode','16iFKdDu','35NgOsZz'];a59_0x276f=function(){return _0x4011bf;};return a59_0x276f();}async function execute(_0x15ffcb){const _0x31299b=a59_0x13b0,_0x1e25d4=_0x15ffcb['str']('key');if(!_0x1e25d4)throw CliErrors[_0x31299b(0x1dc)](_0x31299b(0x1d6),_0x31299b(0x1db)+CLI_BIN_NAME+_0x31299b(0x1e1));const _0x3fd409=readConfig(),_0x55392c=_0x1e25d4===_0x31299b(0x1e2)?_0x31299b(0x1d3):_0x1e25d4,_0x353345=_0x3fd409[_0x55392c];if(_0x353345===undefined)throw CliErrors[_0x31299b(0x1dc)]('Key\x20not\x20found:\x20'+_0x1e25d4);return{'ok':!![],'data':typeof _0x353345===_0x31299b(0x1de)?_0x353345:{[_0x55392c]:_0x353345},'message':typeof _0x353345===_0x31299b(0x1de)?undefined:String(_0x353345)};}export const configGetDefinition={'service':a59_0x4ee06e(0x1d9),'command':'get','description':a59_0x4ee06e(0x1df),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x4ee06e(0x1da),'type':a59_0x4ee06e(0x1d8),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|