@lovrabet/rabetbase-cli 2.5.10 → 2.5.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.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_0x2e36ad=a44_0x2cd0;(function(_0x16252b,_0x54e1d9){const _0x1ad594=a44_0x2cd0,_0x3d6e8c=_0x16252b();while(!![]){try{const _0x489490=-parseInt(_0x1ad594(0x1c7))/0x1*(parseInt(_0x1ad594(0x1f9))/0x2)+-parseInt(_0x1ad594(0x1bc))/0x3+parseInt(_0x1ad594(0x1f4))/0x4+-parseInt(_0x1ad594(0x1ad))/0x5*(-parseInt(_0x1ad594(0x1c8))/0x6)+-parseInt(_0x1ad594(0x1a0))/0x7*(-parseInt(_0x1ad594(0x19f))/0x8)+-parseInt(_0x1ad594(0x1d9))/0x9*(parseInt(_0x1ad594(0x1b7))/0xa)+parseInt(_0x1ad594(0x1c0))/0xb*(parseInt(_0x1ad594(0x1e7))/0xc);if(_0x489490===_0x54e1d9)break;else _0x3d6e8c['push'](_0x3d6e8c['shift']());}catch(_0x223b33){_0x3d6e8c['push'](_0x3d6e8c['shift']());}}}(a44_0x3f2e,0xeff1f));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';function a44_0x2cd0(_0x311232,_0x552ce4){_0x311232=_0x311232-0x194;const _0x3f2ea9=a44_0x3f2e();let _0x2cd016=_0x3f2ea9[_0x311232];return _0x2cd016;}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a44_0x3f2e(){const _0x5df1c7=['before','remoteId','defaultApp','Runtime\x20script\x20cache\x20cleared.','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','bff','\x20conflict','has','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','apps','lockKey','review_remote_and_merge','/api/management/library/scripts/save','status','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','10905472YuXbEn','7Sjsgqo','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','bool','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','scriptsRoot','flatMap','\x20skipped','Push\x20complete:\x20','runtime\x20cache\x20cleared','lastSync','set','mergedCli','datasetId','1485075TPfAoo','datasetCode','failures','functionName','description','filePath','filter','push','\x20failed','apiDir','10wjWyhi','version','POST','name','message','4804830tabqbl','unchanged','write','hash','1078ONLSbp','currentApp','length','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','resolutions','conflict','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','610541tReVfI','24todIJX','requires','every','toISOString','join','some','cleared','get','existingHooks','update','operationType','HOOK','values','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','string','Local\x20function\x20not\x20found:\x20','parse','13329135xZMcMF','would_push','\x20resolution','add','map','functionNode','BFF_REMOTE_VERSION_CHANGED','runtime\x20cache\x20not\x20needed','stringify','str','scriptType','\x20bff\x20detail\x20--id\x20','type','functions','267420jycBsM','require','profileName','\x22\x20not\x20found\x20after\x20ensureLockScope.','after','dataset','alias','Incomplete\x20HOOK\x20path:\x20','lockFilePath','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','Push\x20only\x20this\x20script\x20type','selectedAppName','force','2205392Cxxqma','BFF_REMOTE_VERSION_MISSING','EXISTING_HOOK_BINDING_PRESERVED','ENDPOINT','appCode','4FJmiRw','attempted','warnings','test','beforeScriptId','delete','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.','validation','Would\x20inspect\x20','boolean'];a44_0x3f2e=function(){return _0x5df1c7;};return a44_0x3f2e();}import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0x2e36ad(0x194),'command':a44_0x2e36ad(0x1b4),'description':a44_0x2e36ad(0x1f0),'risk':a44_0x2e36ad(0x1be),'structuredErrors':!![],'flags':[{'name':a44_0x2e36ad(0x1e5),'type':a44_0x2e36ad(0x1d6),'description':a44_0x2e36ad(0x1f1),'enum':['COMMON',a44_0x2e36ad(0x1f7),a44_0x2e36ad(0x1d3)]},{'name':a44_0x2e36ad(0x1ba),'type':'string','description':a44_0x2e36ad(0x1c6)},{'name':'force','type':a44_0x2e36ad(0x202),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x31ee57){const _0x27aff0=a44_0x2e36ad,_0xf7d8e8=loadBffProjectConfig(_0x31ee57[_0x27aff0(0x1f8)]),_0x43dcc4=await readBffLockFile(_0xf7d8e8[_0x27aff0(0x1ef)]),{appLock:_0x51ef34}=ensureLockScope(_0x43dcc4??createEmptyBffLock(),_0x31ee57[_0x27aff0(0x1f8)],_0xf7d8e8[_0x27aff0(0x1a4)],_0x27aff0(0x1b4)),_0x266599=await getTargetFunctions(_0xf7d8e8,_0x31ee57),_0x4f3a5d=_0x266599[_0x27aff0(0x1cd)](_0xd3e00e=>_0xd3e00e['type']===_0x27aff0(0x1d3))?await scanLocalBffFunctions(_0xf7d8e8,_0x27aff0(0x1d3)):_0x266599,_0x596425=await buildHookMaps(_0x31ee57[_0x27aff0(0x1f8)],_0x31ee57[_0x27aff0(0x1b6)],_0x4f3a5d,_0x51ef34,_0x31ee57[_0x27aff0(0x1f2)]||_0x31ee57[_0x27aff0(0x1ab)]?.['currentApp']||_0x31ee57[_0x27aff0(0x1ab)]?.[_0x27aff0(0x205)]),_0x4e18aa=_0x31ee57['bool'](_0x27aff0(0x1f3)),_0x276a13=[];for(const _0x17ac0a of _0x266599){const _0x23c7c3=await computeFileHash(_0x17ac0a[_0x27aff0(0x1b2)]),_0x4cbe1c=_0x51ef34[_0x27aff0(0x1e6)][_0x17ac0a['lockKey']],_0x4a2117=!!_0x4cbe1c&&_0x4cbe1c[_0x27aff0(0x1bf)]===_0x23c7c3,_0xf17e82=_0x596425['resolutions'][_0x27aff0(0x1cf)](_0x17ac0a[_0x27aff0(0x199)]),_0x4fb990=!!_0x4cbe1c?.[_0x27aff0(0x204)]&&_0x4cbe1c['version']==null&&(_0x4e18aa||!_0x4a2117),_0x508235=_0x4fb990?missingRemoteVersionConflict(_0x17ac0a,_0x4cbe1c):undefined,_0x169ae=_0x596425[_0x27aff0(0x1af)][_0x27aff0(0x196)](_0x17ac0a[_0x27aff0(0x199)])?'failed':!_0x4e18aa&&_0x4a2117?_0x27aff0(0x1bd):_0x508235?_0x27aff0(0x1c5):_0x27aff0(0x1da);_0x276a13[_0x27aff0(0x1b4)]({'lockKey':_0x17ac0a[_0x27aff0(0x199)],'filePath':_0x17ac0a[_0x27aff0(0x1b2)],'remoteId':_0x4cbe1c?.[_0x27aff0(0x204)]??null,'mode':_0x4cbe1c?.[_0x27aff0(0x204)]?_0x27aff0(0x1d1):'create','status':_0x169ae,..._0x596425[_0x27aff0(0x1af)][_0x27aff0(0x196)](_0x17ac0a[_0x27aff0(0x199)])?{'error':_0x596425[_0x27aff0(0x1af)]['get'](_0x17ac0a['lockKey'])}:{},..._0x508235?{'conflict':_0x508235}:{},..._0x596425[_0x27aff0(0x1d0)][_0x27aff0(0x196)](_0x17ac0a[_0x27aff0(0x199)])?{'datasetCode':_0x4cbe1c?.[_0x27aff0(0x1ae)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x17ac0a[_0x27aff0(0x199)])]}:{},..._0xf17e82?{'alias':_0xf17e82[_0x27aff0(0x1ed)]??null,'datasetCode':_0xf17e82['datasetCode'],'operationType':_0x17ac0a['operationType'],'functionNode':_0x17ac0a['functionNode'],'warnings':_0xf17e82[_0x27aff0(0x1fb)]}:{}});}return{'method':_0x27aff0(0x1b9),'url':_0x27aff0(0x19b),'body':{'appCode':_0x31ee57['appCode'],'force':_0x4e18aa,'files':_0x276a13,'cacheClearAtRuntime':_0x276a13[_0x27aff0(0x1cd)](_0x2040ee=>_0x2040ee[_0x27aff0(0x19c)]===_0x27aff0(0x1da)),'cacheClearAtRuntimeTimes':_0x276a13[_0x27aff0(0x1cd)](_0x279cd4=>_0x279cd4[_0x27aff0(0x19c)]===_0x27aff0(0x1da))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x27aff0(0x201)+_0x276a13[_0x27aff0(0x1c2)]+_0x27aff0(0x1d5)};},async 'execute'(_0x58245d){const _0x20716f=a44_0x2e36ad,_0x465c86=loadBffProjectConfig(_0x58245d[_0x20716f(0x1f8)]),_0x20fa63=await readBffLockFile(_0x465c86[_0x20716f(0x1ef)]),{lockData:_0xff9c41,appLock:_0x3d0b15}=ensureLockScope(_0x20fa63??createEmptyBffLock(),_0x58245d[_0x20716f(0x1f8)],_0x465c86[_0x20716f(0x1a4)],_0x20716f(0x1b4)),_0x305436=await getTargetFunctions(_0x465c86,_0x58245d);if(_0x305436[_0x20716f(0x1c2)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x9e0a0e=_0x58245d[_0x20716f(0x1a2)](_0x20716f(0x1f3)),_0x1a2c6e=JSON[_0x20716f(0x1d8)](JSON[_0x20716f(0x1e1)](_0xff9c41)),_0x1a4220=_0x1a2c6e[_0x20716f(0x198)][_0x58245d[_0x20716f(0x1f8)]];if(!_0x1a4220)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x58245d[_0x20716f(0x1f8)]+_0x20716f(0x1ea));const _0x1cd731=_0x305436['some'](_0x13c321=>_0x13c321[_0x20716f(0x1e5)]==='HOOK')?await scanLocalBffFunctions(_0x465c86,_0x20716f(0x1d3)):_0x305436,_0x5738b5=await buildHookMaps(_0x58245d[_0x20716f(0x1f8)],_0x58245d[_0x20716f(0x1b6)],_0x1cd731,_0x1a4220,_0x58245d[_0x20716f(0x1f2)]||_0x58245d['mergedCli']?.[_0x20716f(0x1c1)]||_0x58245d['mergedCli']?.[_0x20716f(0x205)]),_0x2cfb0a=[],_0x27bbca=[],_0x100660=[],_0x52ed3d=[];for(const _0x107088 of _0x305436){const _0x43ceca=_0x5738b5[_0x20716f(0x1af)][_0x20716f(0x1cf)](_0x107088[_0x20716f(0x199)]);if(_0x43ceca){_0x52ed3d[_0x20716f(0x1b4)]({'lockKey':_0x107088[_0x20716f(0x199)],'error':_0x43ceca});continue;}const _0x1a11d8=await computeFileHash(_0x107088[_0x20716f(0x1b2)]),_0x1ba84a=_0x1a4220[_0x20716f(0x1e6)][_0x107088['lockKey']];if(!_0x9e0a0e&&_0x1ba84a&&_0x1ba84a[_0x20716f(0x1bf)]===_0x1a11d8){_0x27bbca['push']({'lockKey':_0x107088[_0x20716f(0x199)],'reason':_0x20716f(0x1bd)});continue;}if(_0x1ba84a?.[_0x20716f(0x204)]&&_0x1ba84a[_0x20716f(0x1b8)]==null){_0x100660[_0x20716f(0x1b4)](missingRemoteVersionConflict(_0x107088,_0x1ba84a));continue;}try{await uploadSingleFunction(_0x58245d[_0x20716f(0x1f8)],_0x107088,_0x1a4220,_0x5738b5);const _0x4c3563=_0x1a4220[_0x20716f(0x1e6)][_0x107088[_0x20716f(0x199)]];_0x2cfb0a[_0x20716f(0x1b4)]({'lockKey':_0x107088['lockKey'],'remoteId':_0x4c3563?.[_0x20716f(0x204)]??0x0});}catch(_0x2e9076){const _0x4eeb89=remoteVersionChangedConflict(_0x107088,_0x1ba84a,_0x2e9076);if(_0x4eeb89){_0x100660[_0x20716f(0x1b4)](_0x4eeb89);continue;}_0x52ed3d[_0x20716f(0x1b4)]({'lockKey':_0x107088[_0x20716f(0x199)],'error':_0x2e9076 instanceof Error?_0x2e9076[_0x20716f(0x1bb)]:String(_0x2e9076)});}}_0x1a4220[_0x20716f(0x1a9)]=new Date()[_0x20716f(0x1cb)](),await writeBffLockFile(_0x465c86['lockFilePath'],_0x1a2c6e),await waitForUploadedLockEntries(_0x465c86['lockFilePath'],_0x58245d[_0x20716f(0x1f8)],_0x2cfb0a[_0x20716f(0x1dd)](_0x440432=>_0x440432[_0x20716f(0x199)]));let _0x479ad6={'attempted':![],'cleared':![]};if(_0x2cfb0a[_0x20716f(0x1c2)]>0x0)try{let _0xa131b='';for(let _0x38b5b8=0x0;_0x38b5b8<CACHE_CLEAR_ATTEMPTS;_0x38b5b8+=0x1){_0xa131b=await clearBffScriptCache(),_0x38b5b8<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x479ad6={'attempted':!![],'cleared':!![],'message':_0xa131b||_0x20716f(0x206)};}catch(_0xcb4c25){_0x479ad6={'attempted':!![],'cleared':![],'error':_0xcb4c25 instanceof Error?_0xcb4c25[_0x20716f(0x1bb)]:String(_0xcb4c25)};}const _0x5cbb5d=_0x52ed3d['length']===0x0&&(_0x479ad6[_0x20716f(0x1fa)]?_0x479ad6[_0x20716f(0x1ce)]:!![]),_0x5cb9d7=_0x5cbb5d,_0x5ba097=_0x479ad6[_0x20716f(0x1fa)]?_0x479ad6['cleared']?_0x20716f(0x1a8):'runtime\x20cache\x20clear\x20failed':_0x20716f(0x1e0);return{'ok':_0x5cb9d7,'data':{'uploaded':_0x2cfb0a,'skipped':_0x27bbca,'conflicts':_0x100660,'failed':_0x52ed3d,'cacheClear':_0x479ad6,'warnings':[...[..._0x5738b5[_0x20716f(0x1c4)][_0x20716f(0x1d4)]()][_0x20716f(0x1a5)](_0x525838=>_0x525838[_0x20716f(0x1fb)]),...[..._0x5738b5[_0x20716f(0x1d0)]][_0x20716f(0x1dd)](existingHookWarning)]},'message':formatPushMessage(_0x2cfb0a[_0x20716f(0x1c2)],_0x27bbca[_0x20716f(0x1c2)],_0x100660[_0x20716f(0x1c2)],_0x52ed3d[_0x20716f(0x1c2)],_0x5ba097)};}};function missingRemoteVersionConflict(_0x160513,_0x3b9e0d){const _0x25c5bc=a44_0x2e36ad;return remoteVersionConflict(_0x160513,_0x3b9e0d,_0x25c5bc(0x1f5),_0x25c5bc(0x1c3));}function remoteVersionChangedConflict(_0x1d8073,_0x3d7d42,_0x42875b){const _0x3d0cc8=a44_0x2e36ad;if(!_0x3d7d42?.[_0x3d0cc8(0x204)]||_0x3d7d42[_0x3d0cc8(0x1b8)]==null||!isRemoteVersionConflict(_0x42875b))return undefined;return remoteVersionConflict(_0x1d8073,_0x3d7d42,_0x3d0cc8(0x1df),_0x3d0cc8(0x207));}function remoteVersionConflict(_0x2468b6,_0xd899b5,_0x227341,_0x1d8af7){const _0x3e6cf2=a44_0x2e36ad;return{'code':_0x227341,'lockKey':_0x2468b6[_0x3e6cf2(0x199)],'filePath':_0x2468b6[_0x3e6cf2(0x1b2)],'remoteId':_0xd899b5[_0x3e6cf2(0x204)],..._0xd899b5[_0x3e6cf2(0x1b8)]!=null?{'expectedVersion':_0xd899b5['version']}:{},'message':_0x1d8af7,'nextAction':{'action':_0x3e6cf2(0x19a),'command':CLI_BIN_NAME+_0x3e6cf2(0x1e4)+_0xd899b5[_0x3e6cf2(0x204)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x3e6cf2(0x1ff)}};}function isRemoteVersionConflict(_0xab2c05){const _0x4f0d83=a44_0x2e36ad,_0xfea04c=_0xab2c05 instanceof Error?_0xab2c05['message']:String(_0xab2c05),_0x341b8d=getPlatformErrorCode(_0xab2c05)??'';return[_0xfea04c,_0x341b8d][_0x4f0d83(0x1cd)](_0x2ef0ed=>/(?: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[_0x4f0d83(0x1fc)](_0x2ef0ed));}function formatPushMessage(_0x8d0e6b,_0x5cef02,_0x21a5cd,_0x54492,_0x37abd2){const _0x501665=a44_0x2e36ad,_0x5573f1=[_0x501665(0x1a7)+_0x8d0e6b+'\x20uploaded',_0x5cef02+_0x501665(0x1a6)];_0x21a5cd>0x0&&_0x5573f1['push'](_0x21a5cd+_0x501665(0x195)+(_0x21a5cd===0x1?'':'s')+'\x20'+(_0x21a5cd===0x1?_0x501665(0x1c9):_0x501665(0x1e8))+_0x501665(0x1db));if(_0x54492>0x0)_0x5573f1[_0x501665(0x1b4)](_0x54492+_0x501665(0x1b5));return _0x5573f1[_0x501665(0x1b4)](_0x37abd2),_0x5573f1[_0x501665(0x1cc)](',\x20');}async function getTargetFunctions(_0x1dd75c,_0x1b12be){const _0x513b96=a44_0x2e36ad,_0x26a81b=_0x1b12be[_0x513b96(0x1e2)](_0x513b96(0x1e5)),_0x3c87f9=_0x1b12be[_0x513b96(0x1e2)](_0x513b96(0x1ba)),_0x5517a6=normalizeBffType(_0x26a81b)??undefined;if(_0x3c87f9&&!_0x5517a6)throw CliErrors[_0x513b96(0x200)](_0x513b96(0x19e));const _0x423b4d=await scanLocalBffFunctions(_0x1dd75c,_0x5517a6);if(_0x3c87f9){const _0x316fd4=_0x423b4d[_0x513b96(0x1b3)](_0x371351=>_0x371351[_0x513b96(0x1ba)]===_0x3c87f9);if(_0x316fd4[_0x513b96(0x1c2)]===0x0)throw CliErrors[_0x513b96(0x200)](_0x513b96(0x1d7)+_0x5517a6+'/'+_0x3c87f9);return _0x316fd4;}return _0x423b4d;}function existingHookWarning(_0x5320d2){const _0x39cfa8=a44_0x2e36ad;return{'code':_0x39cfa8(0x1f6),'lockKey':_0x5320d2,'message':_0x39cfa8(0x197)};}async function buildHookMaps(_0x3b2595,_0x3fb3ec,_0x515783,_0xc0025a,_0x653e44){const _0x213d45=a44_0x2e36ad,_0x503594=_0x515783[_0x213d45(0x1cd)](_0x450a32=>_0x450a32[_0x213d45(0x1e5)]==='HOOK');if(!_0x503594)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x3ac3a9=resolveApiModelSource(_0x3fb3ec,_0x3b2595,_0x653e44),_0x343d15=loadAliasMap(_0x3fb3ec,undefined,_0x3ac3a9['filePath'],_0x3ac3a9[_0x213d45(0x1e9)]);assertUnambiguousHookAliases(_0x343d15);const _0x316611=[..._0x343d15[_0x213d45(0x1dd)](_0x4f72bc=>[_0x4f72bc['alias'],_0x4f72bc['datasetCode']]),...trackedHookDirectoryMappings(_0xc0025a)[_0x213d45(0x1dd)](_0x471d80=>[_0x471d80[_0x213d45(0x1ed)],_0x471d80[_0x213d45(0x1ae)]])],_0x43d5f0=await listDatasets(_0x3b2595);assertUnambiguousHookDirectoryMappings(_0x316611[_0x213d45(0x1dd)](([_0x5596c4,_0x1e8d92])=>({'alias':_0x5596c4,'datasetCode':_0x1e8d92})));const _0x432762=buildHookDirectoryIndexes(_0x43d5f0,_0x316611),_0x3e76de=new Map(),_0x5cca6d=preflightPushHookDirectories(_0x515783,_0xc0025a,_0x432762,_0x3e76de),_0x33a8e7=new Set(),_0x9f0168=_0x515783['filter'](_0x5ac83e=>_0x3e76de['get'](_0x5ac83e[_0x213d45(0x199)])?.['startsWith']('HOOK_DATASET_NOT_FOUND:')&&_0xc0025a[_0x213d45(0x1e6)][_0x5ac83e['lockKey']]?.[_0x213d45(0x204)]&&_0xc0025a[_0x213d45(0x1e6)][_0x5ac83e[_0x213d45(0x199)]]?.[_0x213d45(0x1ae)]);if(_0x9f0168['length']>0x0){let _0x4ce351;try{_0x4ce351=await getBffScriptStatistics(_0x3b2595);}catch(_0x4469f9){for(const _0x2189ae of _0x9f0168)_0x3e76de[_0x213d45(0x1aa)](_0x2189ae['lockKey'],_0x213d45(0x1a1)+(_0x4469f9 instanceof Error?_0x4469f9[_0x213d45(0x1bb)]:String(_0x4469f9)));return{'resolutions':_0x5cca6d,'failures':_0x3e76de,'existingHooks':_0x33a8e7};}for(const _0x39aee6 of _0x9f0168){const _0x36ffa7=_0xc0025a[_0x213d45(0x1e6)][_0x39aee6[_0x213d45(0x199)]];try{const _0x5c7cc5=new Set(_0x515783[_0x213d45(0x1b3)](_0x9150a8=>_0x9150a8['type']==='HOOK'&&_0xc0025a[_0x213d45(0x1e6)][_0x9150a8[_0x213d45(0x199)]]?.[_0x213d45(0x1ae)]===_0x36ffa7['datasetCode'])[_0x213d45(0x1dd)](_0x487100=>_0x487100[_0x213d45(0x1ed)]));if(_0x5c7cc5['size']>0x1)throw CliErrors[_0x213d45(0x200)]('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x5d1fdc=_0x4ce351[_0x213d45(0x1a5)](_0x4fc11d=>[{'datasetCode':_0x4fc11d[_0x213d45(0x1ae)],'operationType':snakeToCamel(_0x4fc11d[_0x213d45(0x1d2)]),'functionNode':_0x213d45(0x203),'id':_0x4fc11d[_0x213d45(0x1fd)]},{'datasetCode':_0x4fc11d['datasetCode'],'operationType':snakeToCamel(_0x4fc11d[_0x213d45(0x1d2)]),'functionNode':_0x213d45(0x1eb),'id':_0x4fc11d['afterScriptId']}])[_0x213d45(0x1b3)](_0x24b139=>_0x24b139['id']===_0x36ffa7[_0x213d45(0x204)]),_0x5e5a00=await getBffScriptInfo(_0x36ffa7[_0x213d45(0x204)]);if(_0x5e5a00['id']!==_0x36ffa7['remoteId']||_0x5e5a00[_0x213d45(0x1f8)]!==_0x3b2595||_0x5e5a00[_0x213d45(0x1e3)]!==_0x213d45(0x1d3)||_0x5e5a00[_0x213d45(0x1b0)]!==_0x39aee6[_0x213d45(0x1ba)]||_0x36ffa7[_0x213d45(0x1b8)]==null||_0x5e5a00[_0x213d45(0x1b8)]!==_0x36ffa7[_0x213d45(0x1b8)]||_0x5d1fdc[_0x213d45(0x1c2)]!==0x1||_0x5d1fdc[0x0][_0x213d45(0x1ae)]!==_0x36ffa7[_0x213d45(0x1ae)]||_0x5d1fdc[0x0]['operationType']!==_0x39aee6[_0x213d45(0x1d2)]||_0x5d1fdc[0x0][_0x213d45(0x1de)]!==_0x39aee6[_0x213d45(0x1de)]||_0x36ffa7[_0x213d45(0x1d2)]!==_0x39aee6[_0x213d45(0x1d2)]||_0x36ffa7[_0x213d45(0x1de)]!==_0x39aee6[_0x213d45(0x1de)])throw CliErrors[_0x213d45(0x200)](_0x213d45(0x1a3));_0x33a8e7[_0x213d45(0x1dc)](_0x39aee6['lockKey']),_0x3e76de[_0x213d45(0x1fe)](_0x39aee6[_0x213d45(0x199)]);}catch(_0x32816c){_0x3e76de[_0x213d45(0x1aa)](_0x39aee6[_0x213d45(0x199)],_0x32816c instanceof Error?_0x32816c['message']:String(_0x32816c));}}}return{'resolutions':_0x5cca6d,'failures':_0x3e76de,'existingHooks':_0x33a8e7};}async function uploadSingleFunction(_0x4f12eb,_0x4d4da7,_0x33d85a,_0x5d6c66){const _0x238c77=a44_0x2e36ad,_0x16cf9e=await readFile(_0x4d4da7[_0x238c77(0x1b2)],'utf8'),_0x18883d=await computeFileHash(_0x4d4da7['filePath']),_0x958e2c=_0x33d85a[_0x238c77(0x1e6)][_0x4d4da7[_0x238c77(0x199)]];if(_0x958e2c?.['remoteId']&&_0x958e2c[_0x238c77(0x1b8)]==null)throw CliErrors[_0x238c77(0x200)](_0x4d4da7[_0x238c77(0x199)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x2f9f3a=extractScriptDescription(_0x16cf9e);if(!_0x2f9f3a&&_0x958e2c?.[_0x238c77(0x204)]){const _0x31e72e=await getBffScriptInfo(_0x958e2c['remoteId']);_0x2f9f3a=_0x31e72e[_0x238c77(0x1b1)]||undefined;}const _0x20dc97={'appCode':_0x4f12eb,'functionName':_0x4d4da7[_0x238c77(0x1ba)],'scriptType':_0x4d4da7[_0x238c77(0x1e5)],'scriptContent':_0x16cf9e};if(_0x958e2c?.['remoteId'])_0x20dc97['id']=_0x958e2c['remoteId'];if(_0x958e2c?.[_0x238c77(0x1b8)]!=null)_0x20dc97[_0x238c77(0x1b8)]=_0x958e2c[_0x238c77(0x1b8)];if(_0x2f9f3a)_0x20dc97[_0x238c77(0x1b1)]=_0x2f9f3a;if(_0x4d4da7[_0x238c77(0x1e5)]==='HOOK'){const _0x43079a=_0x5d6c66['resolutions'][_0x238c77(0x1cf)](_0x4d4da7['lockKey']);if(!_0x43079a&&!_0x5d6c66[_0x238c77(0x1d0)][_0x238c77(0x196)](_0x4d4da7['lockKey'])||!_0x4d4da7[_0x238c77(0x1d2)]||!_0x4d4da7[_0x238c77(0x1de)])throw CliErrors[_0x238c77(0x200)](_0x238c77(0x1ee)+_0x4d4da7['lockKey']);_0x43079a&&(_0x20dc97[_0x238c77(0x1ac)]=_0x43079a[_0x238c77(0x1ec)]['id'],_0x20dc97[_0x238c77(0x1d2)]=_0x4d4da7['operationType']),_0x20dc97[_0x238c77(0x1de)]=_0x4d4da7['functionNode'];}const _0x198e82=await saveBffScript(_0x20dc97),_0x4f460c=_0x198e82['id'],_0x2da482=_0x198e82['script']??await getBffScriptInfo(_0x4f460c),_0x25fa86={'hash':_0x18883d,'remoteId':_0x4f460c,'version':_0x2da482[_0x238c77(0x1b8)]};if(_0x4d4da7[_0x238c77(0x1e5)]===_0x238c77(0x1d3)){const _0x2215d8=_0x5d6c66[_0x238c77(0x1c4)][_0x238c77(0x1cf)](_0x4d4da7[_0x238c77(0x199)]);if(!_0x2215d8){_0x33d85a[_0x238c77(0x1e6)][_0x4d4da7[_0x238c77(0x199)]]={..._0x958e2c,..._0x25fa86};return;}_0x25fa86[_0x238c77(0x1ed)]=_0x2215d8[_0x238c77(0x1ed)]??_0x958e2c?.[_0x238c77(0x1ed)],_0x25fa86['datasetCode']=_0x2215d8[_0x238c77(0x1ae)],_0x25fa86['operationType']=_0x4d4da7[_0x238c77(0x1d2)],_0x25fa86['functionNode']=_0x4d4da7[_0x238c77(0x1de)];}_0x33d85a['functions'][_0x4d4da7[_0x238c77(0x199)]]=_0x25fa86;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x12887d,_0x30970b,_0x285a64){const _0x49282b=a44_0x2e36ad;if(_0x285a64['length']===0x0)return;for(let _0x27eb15=0x0;_0x27eb15<LOCK_SETTLE_RETRY_COUNT;_0x27eb15+=0x1){const _0x1d9686=await readBffLockFile(_0x12887d),_0x1418da=_0x1d9686?.[_0x49282b(0x198)]?.[_0x30970b]?.[_0x49282b(0x1e6)]??{},_0x28a3e2=_0x285a64[_0x49282b(0x1ca)](_0x192304=>!!_0x1418da[_0x192304]?.['remoteId']);if(_0x28a3e2)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x49282b(0x19d)+_0x285a64[_0x49282b(0x1cc)](',\x20')+'.');}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x31a351=a45_0x27fe;function a45_0x5320(){const _0x2f5515=['map','alias','boolean','1231632aSZozQ','push','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','5217093GLCRes','status','read','scriptsRoot','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','\x20unchanged','\x20remote-only','mergedCli','apiDir','lockFilePath','functions','5tSNyNn','416680tgYROS','filePath','appCode','selectedAppName','9428424dahFOX','has','4528576TLJJqS','length','lockKey','30gNDtBc','9jbGCRq','2857019gcnXhx','all','388964RMqfsO','profileName','bool','bff','3sEtCWT','remote'];a45_0x5320=function(){return _0x2f5515;};return a45_0x5320();}(function(_0x5d9dc3,_0x56ca97){const _0x260649=a45_0x27fe,_0xfc67ba=_0x5d9dc3();while(!![]){try{const _0x4ef2a3=parseInt(_0x260649(0x20e))/0x1+parseInt(_0x260649(0x1f6))/0x2*(-parseInt(_0x260649(0x1fa))/0x3)+-parseInt(_0x260649(0x1ff))/0x4+-parseInt(_0x260649(0x20d))/0x5*(-parseInt(_0x260649(0x212))/0x6)+-parseInt(_0x260649(0x202))/0x7+parseInt(_0x260649(0x214))/0x8*(-parseInt(_0x260649(0x1f3))/0x9)+-parseInt(_0x260649(0x1f2))/0xa*(-parseInt(_0x260649(0x1f4))/0xb);if(_0x4ef2a3===_0x56ca97)break;else _0xfc67ba['push'](_0xfc67ba['shift']());}catch(_0x1f4dda){_0xfc67ba['push'](_0xfc67ba['shift']());}}}(a45_0x5320,0xe8ca6));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a45_0x27fe(_0x569c67,_0x3347b4){_0x569c67=_0x569c67-0x1f2;const _0x5320e0=a45_0x5320();let _0x27fe04=_0x5320e0[_0x569c67];return _0x27fe04;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a45_0x31a351(0x1f9),'command':a45_0x31a351(0x203),'description':a45_0x31a351(0x206),'risk':a45_0x31a351(0x204),'flags':[{'name':a45_0x31a351(0x1fb),'type':a45_0x31a351(0x1fe),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x571cfb){const _0x4a41b3=a45_0x31a351,_0x5dcac9=loadBffProjectConfig(_0x571cfb[_0x4a41b3(0x210)]),_0x13c6e5=await readBffLockFile(_0x5dcac9[_0x4a41b3(0x20b)]),{appLock:_0x4cf2be}=ensureLockScope(_0x13c6e5??createEmptyBffLock(),_0x571cfb[_0x4a41b3(0x210)],_0x5dcac9[_0x4a41b3(0x205)],'status'),_0x3562b0=await scanLocalBffFunctions(_0x5dcac9),_0x4d1f07=[],_0x44b185=[],_0x4b870c=[];for(const _0x388714 of _0x3562b0){const _0x1c6ec7=await computeFileHash(_0x388714['filePath']),_0x4870fa=_0x4cf2be[_0x4a41b3(0x20c)][_0x388714[_0x4a41b3(0x216)]];if(!_0x4870fa)_0x4d1f07['push'](_0x388714['lockKey']);else _0x4870fa['hash']!==_0x1c6ec7?_0x44b185[_0x4a41b3(0x200)](_0x388714['lockKey']):_0x4b870c[_0x4a41b3(0x200)](_0x388714[_0x4a41b3(0x216)]);}const _0x44ea08=[];if(_0x571cfb[_0x4a41b3(0x1f8)](_0x4a41b3(0x1fb))){const _0x5c2727=resolveApiModelSource(_0x571cfb[_0x4a41b3(0x20a)],_0x571cfb[_0x4a41b3(0x210)],_0x571cfb[_0x4a41b3(0x211)]||_0x571cfb[_0x4a41b3(0x209)]?.['currentApp']||_0x571cfb[_0x4a41b3(0x209)]?.['defaultApp']),_0x5e4991=loadAliasMap(_0x571cfb[_0x4a41b3(0x20a)],undefined,_0x5c2727[_0x4a41b3(0x20f)],_0x5c2727[_0x4a41b3(0x1f7)]),_0x46e9ec=new Map(_0x5e4991[_0x4a41b3(0x1fc)](_0x39db0b=>[_0x39db0b['datasetCode'],_0x39db0b[_0x4a41b3(0x1fd)]])),[_0x16a578,_0xee94de]=await Promise[_0x4a41b3(0x1f5)]([listBffScripts(_0x571cfb[_0x4a41b3(0x210)]),getBffScriptStatistics(_0x571cfb[_0x4a41b3(0x210)])]),_0x37f838=createHookLocationMap(_0xee94de),_0x5d5717=new Set(_0x3562b0[_0x4a41b3(0x1fc)](_0x4adb6e=>_0x4adb6e['lockKey']));for(const _0xdb8c50 of _0x16a578){const _0x235382=resolveRemoteScriptTarget(_0x5dcac9,_0xdb8c50,_0x37f838,_0x4cf2be[_0x4a41b3(0x20c)],_0x46e9ec);_0x235382&&!_0x5d5717[_0x4a41b3(0x213)](_0x235382[_0x4a41b3(0x216)])&&_0x44ea08[_0x4a41b3(0x200)](_0x235382['lockKey']);}}const _0x20922d=_0x4d1f07[_0x4a41b3(0x215)]===0x0&&_0x44b185[_0x4a41b3(0x215)]===0x0&&_0x44ea08[_0x4a41b3(0x215)]===0x0;return{'ok':!![],'data':{'added':_0x4d1f07,'modified':_0x44b185,'unchanged':_0x4b870c,'remoteOnly':_0x44ea08},'message':_0x20922d?_0x4a41b3(0x201):_0x4d1f07[_0x4a41b3(0x215)]+'\x20added,\x20'+_0x44b185[_0x4a41b3(0x215)]+'\x20modified,\x20'+_0x4b870c['length']+_0x4a41b3(0x207)+(_0x44ea08['length']>0x0?',\x20'+_0x44ea08[_0x4a41b3(0x215)]+_0x4a41b3(0x208):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x1bbbad=a46_0xa0d4;function a46_0x241c(){const _0x88e33d=['\x20at\x20','328654LCKkPp','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','5bXbtPd','\x20installed','setLogPath','skillVersion','CLI\x20Built-in\x20Skill\x20','apiError',']:\x20','install','3rQvMEl','Built-in\x20Skill\x20install\x20failed\x20[','changed','cli-skill','nonInteractive','installedPath','200ZwCSfL','1121452jRXQHt','\x20via\x20skills@latest','error','code','1702876agbnDN','446330BtuXJI','pipe','repairCommand','1130526eadeew','557523AxvomU','4087280XRoFwZ','log','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.'];a46_0x241c=function(){return _0x88e33d;};return a46_0x241c();}function a46_0xa0d4(_0xe4aa,_0x20bb63){_0xe4aa=_0xe4aa-0x7c;const _0x241c5d=a46_0x241c();let _0xa0d43a=_0x241c5d[_0xe4aa];return _0xa0d43a;}(function(_0x24bd80,_0x4d97d2){const _0x27c01a=a46_0xa0d4,_0x31c268=_0x24bd80();while(!![]){try{const _0x18202d=parseInt(_0x27c01a(0x84))/0x1+-parseInt(_0x27c01a(0x8d))/0x2*(parseInt(_0x27c01a(0x97))/0x3)+-parseInt(_0x27c01a(0x7f))/0x4*(-parseInt(_0x27c01a(0x8f))/0x5)+parseInt(_0x27c01a(0x87))/0x6+parseInt(_0x27c01a(0x83))/0x7+parseInt(_0x27c01a(0x89))/0x8+-parseInt(_0x27c01a(0x88))/0x9*(parseInt(_0x27c01a(0x7e))/0xa);if(_0x18202d===_0x4d97d2)break;else _0x31c268['push'](_0x31c268['shift']());}catch(_0x507e36){_0x31c268['push'](_0x31c268['shift']());}}}(a46_0x241c,0x40f29));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0x1bbbad(0x9a),'command':a46_0x1bbbad(0x96),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4d5225){const _0x4fe996=a46_0x1bbbad;logger[_0x4fe996(0x91)](process['cwd']()),logger['info']('cli-skill-install',_0x4fe996(0x8b));const _0x47dc72=installBuiltinSkill({'stdio':_0x4d5225[_0x4fe996(0x7c)]?_0x4fe996(0x85):'inherit'});if(!_0x47dc72['ok'])throw CliErrors[_0x4fe996(0x94)](_0x4fe996(0x98)+_0x47dc72[_0x4fe996(0x82)]+_0x4fe996(0x95)+(_0x47dc72[_0x4fe996(0x81)]||'unknown'),_0x4fe996(0x8e)+_0x47dc72[_0x4fe996(0x86)]);return console[_0x4fe996(0x8a)](_0x47dc72[_0x4fe996(0x99)]?_0x4fe996(0x93)+_0x47dc72[_0x4fe996(0x92)]+_0x4fe996(0x90)+(_0x47dc72[_0x4fe996(0x7d)]?_0x4fe996(0x8c)+_0x47dc72[_0x4fe996(0x7d)]:_0x4fe996(0x80)):_0x4fe996(0x93)+_0x47dc72[_0x4fe996(0x92)]+'\x20is\x20already\x20current'+(_0x47dc72['installedPath']?_0x4fe996(0x8c)+_0x47dc72[_0x4fe996(0x7d)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a47_0x30d9(_0x3eefb9,_0x41704b){_0x3eefb9=_0x3eefb9-0x114;const _0x29f758=a47_0x29f7();let _0x30d9a0=_0x29f758[_0x3eefb9];return _0x30d9a0;}const a47_0x377e96=a47_0x30d9;(function(_0x34ebbf,_0x12359e){const _0x15bf05=a47_0x30d9,_0x4e3492=_0x34ebbf();while(!![]){try{const _0x647045=-parseInt(_0x15bf05(0x159))/0x1+-parseInt(_0x15bf05(0x150))/0x2*(parseInt(_0x15bf05(0x15d))/0x3)+parseInt(_0x15bf05(0x147))/0x4*(parseInt(_0x15bf05(0x143))/0x5)+-parseInt(_0x15bf05(0x168))/0x6+parseInt(_0x15bf05(0x133))/0x7*(-parseInt(_0x15bf05(0x145))/0x8)+-parseInt(_0x15bf05(0x124))/0x9*(-parseInt(_0x15bf05(0x15a))/0xa)+parseInt(_0x15bf05(0x14b))/0xb;if(_0x647045===_0x12359e)break;else _0x4e3492['push'](_0x4e3492['shift']());}catch(_0x5d0224){_0x4e3492['push'](_0x4e3492['shift']());}}}(a47_0x29f7,0x9bd0f));import a47_0x5b546f from'chalk';import a47_0x519d76 from'ora';import a47_0x18872e from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x3beae8=a47_0x30d9;return GIT_COMMIT!==_0x3beae8(0x11e)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3beae8(0x114)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2cc8e8=a47_0x30d9,_0x3531f4=process[_0x2cc8e8(0x12b)][_0x2cc8e8(0x131)]();if(_0x3531f4['includes'](_0x2cc8e8(0x125)))return'bun';return _0x2cc8e8(0x13a);}const updateFlags=[{'name':a47_0x377e96(0x151),'type':a47_0x377e96(0x14c),'description':a47_0x377e96(0x121),'default':![]},{'name':a47_0x377e96(0x11f),'type':a47_0x377e96(0x12a),'description':a47_0x377e96(0x161)}];function getRequestedVersion(_0x48a88d){const _0x53b2db=a47_0x377e96;return _0x48a88d[_0x53b2db(0x140)]('version')[_0x53b2db(0x165)]();}async function validateUpdateFlags(_0x294f3b){const _0x186f07=a47_0x377e96,_0x32a9f6=_0x294f3b[_0x186f07(0x130)](_0x186f07(0x151)),_0x475e84=getRequestedVersion(_0x294f3b);if(_0x32a9f6&&_0x475e84)throw CliErrors[_0x186f07(0x156)](_0x186f07(0x167),_0x186f07(0x13c));if(_0x475e84&&!a47_0x18872e[_0x186f07(0x14e)](_0x475e84))throw CliErrors[_0x186f07(0x156)](_0x186f07(0x153)+_0x475e84,_0x186f07(0x139));}async function fetchNpmDistTags(){const _0x43dfbc=a47_0x377e96;try{const _0x2207ab=await fetch(_0x43dfbc(0x15b)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x43dfbc(0x148),{'signal':AbortSignal[_0x43dfbc(0x166)](0x2710)});if(!_0x2207ab['ok'])return null;const _0x36911b=await _0x2207ab[_0x43dfbc(0x14a)]();if(!_0x36911b||typeof _0x36911b!=='object')return null;return Object[_0x43dfbc(0x12f)](Object['entries'](_0x36911b)[_0x43dfbc(0x142)](([,_0x416a47])=>typeof _0x416a47===_0x43dfbc(0x12a)&&_0x416a47[_0x43dfbc(0x165)]()[_0x43dfbc(0x11b)]>0x0)[_0x43dfbc(0x14f)](([_0x3365ac,_0x2dcf39])=>[_0x3365ac,String(_0x2dcf39)[_0x43dfbc(0x165)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3aad22){const _0x1f53d1=await fetchNpmDistTags();return _0x1f53d1?.[_0x3aad22]??null;}async function fetchLatestVersion(){const _0x5882ed=a47_0x377e96;return fetchNpmDistTagVersion(_0x5882ed(0x152));}async function resolveTargetVersion(_0x13eba0){const _0x153bf7=a47_0x377e96,_0x22ac54=getRequestedVersion(_0x13eba0);if(_0x22ac54)return{'version':_0x22ac54,'source':_0x153bf7(0x11f)};if(_0x13eba0['bool'](_0x153bf7(0x151))){const _0x35c397=await fetchNpmDistTagVersion(_0x153bf7(0x151));if(!_0x35c397)return null;return{'version':_0x35c397,'source':'beta'};}const _0x3af4f6=await fetchLatestVersion();if(!_0x3af4f6)return null;return{'version':_0x3af4f6,'source':_0x153bf7(0x152)};}function shouldInstallTarget(_0x3a0c59,_0x1de2f7){const _0x4d899b=a47_0x377e96;if(_0x1de2f7[_0x4d899b(0x126)]===_0x4d899b(0x11f)||_0x1de2f7[_0x4d899b(0x126)]==='beta')return!a47_0x18872e['eq'](_0x3a0c59,_0x1de2f7[_0x4d899b(0x11f)]);return a47_0x18872e['lt'](_0x3a0c59,_0x1de2f7[_0x4d899b(0x11f)]);}function getInstallPlanLabel(_0x5a56c2,_0x47ee1a){const _0x56dc3b=a47_0x377e96;switch(_0x47ee1a[_0x56dc3b(0x126)]){case _0x56dc3b(0x151):return _0x56dc3b(0x137)+a47_0x5b546f[_0x56dc3b(0x11d)](_0x5a56c2)+_0x56dc3b(0x12e)+a47_0x5b546f['green'](_0x47ee1a[_0x56dc3b(0x11f)]);case _0x56dc3b(0x11f):return'Requested\x20version:\x20'+a47_0x5b546f[_0x56dc3b(0x11d)](_0x5a56c2)+_0x56dc3b(0x12e)+a47_0x5b546f[_0x56dc3b(0x13d)](_0x47ee1a[_0x56dc3b(0x11f)]);case _0x56dc3b(0x152):default:return _0x56dc3b(0x127)+a47_0x5b546f[_0x56dc3b(0x11d)](_0x5a56c2)+_0x56dc3b(0x12e)+a47_0x5b546f[_0x56dc3b(0x13d)](_0x47ee1a[_0x56dc3b(0x11f)]);}}function repairCurrentBuiltinSkill(){const _0xe9023=a47_0x377e96;console['log'](a47_0x5b546f[_0xe9023(0x136)](_0xe9023(0x123)));const _0x490fc4=installBuiltinSkill();if(_0x490fc4['ok']){console[_0xe9023(0x149)](a47_0x5b546f[_0xe9023(0x136)](_0xe9023(0x160)+_0x490fc4[_0xe9023(0x13f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors['apiError'](_0xe9023(0x132)+_0x490fc4['code']+']:\x20'+(_0x490fc4[_0xe9023(0x11c)]||'unknown'),'Run:\x20'+_0x490fc4['repairCommand']+_0xe9023(0x119)+CLI_BIN_NAME+_0xe9023(0x11a));}function verifyUpdatedBuiltinSkill(_0x3f8ec3){const _0x160a3c=a47_0x377e96,_0x3c868a=inspectInstalledBuiltinSkillVersion(_0x3f8ec3);if(_0x3c868a[_0x160a3c(0x15f)]==='current'){console[_0x160a3c(0x149)](a47_0x5b546f[_0x160a3c(0x136)](_0x160a3c(0x160)+_0x3f8ec3+_0x160a3c(0x169)));return;}const _0x58e47c=_0x3c868a[_0x160a3c(0x13f)]?'expected\x20'+_0x3f8ec3+_0x160a3c(0x118)+_0x3c868a[_0x160a3c(0x13f)]:_0x160a3c(0x162)+_0x3f8ec3+_0x160a3c(0x12c)+_0x3c868a['state'];throw CliErrors[_0x160a3c(0x120)](_0x160a3c(0x128)+_0x3f8ec3+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x58e47c,'Run:\x20'+_0x3c868a[_0x160a3c(0x122)]+_0x160a3c(0x119)+CLI_BIN_NAME+_0x160a3c(0x11a));}function a47_0x29f7(){const _0x49537e=['bun','source','Update\x20available:\x20','CLI\x20updated\x20to\x20v','start','string','execPath',',\x20state\x20','Checking\x20for\x20updates...','\x20→\x20','fromEntries','bool','toLowerCase','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','7NDbwGT','Version\x20comparison\x20failed','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','gray','Beta\x20version:\x20','\x20update\x20--version\x20<version>','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','npm','fail','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','green','Try\x20manually:\x20','skillVersion','str','run','filter','5997465PPOFiM','Current\x20version\x20v','4662472YzdBci','Updated\x20to\x20v','4WtXKsp','/dist-tags','log','json','12482657KmtTzt','boolean','read','valid','map','134438yKPJxs','beta','latest','Invalid\x20version:\x20','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Current\x20version:\x20','validation','install','\x20install\x20-g\x20','806073XaHzaf','10210reUZOd','https://registry.npmjs.org/-/package/','info','3CevZaC','update','state','\x20\x20CLI\x20Built-in\x20Skill\x20','Install\x20a\x20specific\x20CLI\x20version','expected\x20','Already\x20up\x20to\x20date\x20(v','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','trim','timeout','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','4018782bsDFyM','\x20is\x20up\x20to\x20date.','slice','Already\x20on\x20requested\x20version\x20(v','Updating\x20via\x20','succeed',',\x20found\x20',',\x20then\x20verify\x20with:\x20','\x20doctor','length','error','yellow','unknown','version','apiError','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','repairCommand','Checking\x20CLI\x20Built-in\x20Skill...','3789ukiHsL'];a47_0x29f7=function(){return _0x49537e;};return a47_0x29f7();}async function execute(_0x336585){const _0x1136b2=a47_0x377e96;await validateUpdateFlags(_0x336585);const _0x3f1b09=getCurrentVersion();console[_0x1136b2(0x149)](_0x1136b2(0x155)+_0x3f1b09);const _0x3d355d=a47_0x519d76(_0x1136b2(0x12d))[_0x1136b2(0x129)](),_0x35b7f8=await resolveTargetVersion(_0x336585);if(!_0x35b7f8){const _0x4c3d82=_0x336585[_0x1136b2(0x130)](_0x1136b2(0x151))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x1136b2(0x164);_0x3d355d[_0x1136b2(0x13b)](_0x4c3d82);throw CliErrors[_0x1136b2(0x120)](_0x4c3d82,'Try\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+(_0x336585[_0x1136b2(0x130)](_0x1136b2(0x151))?_0x1136b2(0x151):'latest'));}const _0x125417=a47_0x18872e['valid'](VERSION),_0x4572ae=a47_0x18872e[_0x1136b2(0x14e)](_0x35b7f8[_0x1136b2(0x11f)]);if(!_0x125417||!_0x4572ae){_0x3d355d[_0x1136b2(0x13b)](_0x1136b2(0x134));throw CliErrors[_0x1136b2(0x120)](_0x1136b2(0x134),_0x1136b2(0x135)+CLI_BIN_NAME+_0x1136b2(0x138));}if(!shouldInstallTarget(_0x125417,_0x35b7f8)){const _0x189c1c=_0x35b7f8['source']===_0x1136b2(0x11f)?_0x1136b2(0x115)+_0x35b7f8[_0x1136b2(0x11f)]+')':a47_0x18872e['gt'](_0x125417,_0x4572ae)?_0x1136b2(0x144)+_0x3f1b09+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x35b7f8[_0x1136b2(0x11f)]:_0x1136b2(0x163)+_0x35b7f8[_0x1136b2(0x11f)]+')';return _0x3d355d[_0x1136b2(0x117)](_0x189c1c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3d355d[_0x1136b2(0x15c)](getInstallPlanLabel(_0x3f1b09,_0x35b7f8));const _0x503ee0=detectPackageManager(),_0x19b033=_0x503ee0===_0x1136b2(0x13a)?resolveNpmBin('npm'):_0x503ee0,_0x2079d5=a47_0x519d76(_0x1136b2(0x116)+_0x503ee0+'...')[_0x1136b2(0x129)]();try{await execa(_0x19b033,[_0x1136b2(0x157),'-g',NPM_PACKAGE_NAME+'@'+_0x35b7f8[_0x1136b2(0x11f)]],{'stdio':'pipe'}),_0x2079d5[_0x1136b2(0x117)](_0x1136b2(0x146)+_0x35b7f8[_0x1136b2(0x11f)]),console['log'](a47_0x5b546f[_0x1136b2(0x136)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x1f5188){_0x2079d5[_0x1136b2(0x13b)]('Update\x20failed');throw CliErrors[_0x1136b2(0x120)]('Update\x20failed:\x20'+(_0x1f5188 instanceof Error?_0x1f5188['message']:String(_0x1f5188)),_0x1136b2(0x13e)+_0x503ee0+_0x1136b2(0x158)+NPM_PACKAGE_NAME+'@'+_0x35b7f8['version']);}return verifyUpdatedBuiltinSkill(_0x35b7f8[_0x1136b2(0x11f)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x377e96(0x15e),'command':a47_0x377e96(0x141),'description':a47_0x377e96(0x154),'risk':a47_0x377e96(0x14d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48b260,_0x362d99){const _0x3aa48c=a48_0xa7be,_0x35f644=_0x48b260();while(!![]){try{const _0x1df602=parseInt(_0x3aa48c(0x165))/0x1*(-parseInt(_0x3aa48c(0x15c))/0x2)+parseInt(_0x3aa48c(0x15e))/0x3+-parseInt(_0x3aa48c(0x166))/0x4*(-parseInt(_0x3aa48c(0x163))/0x5)+parseInt(_0x3aa48c(0x15d))/0x6*(parseInt(_0x3aa48c(0x15f))/0x7)+-parseInt(_0x3aa48c(0x162))/0x8*(-parseInt(_0x3aa48c(0x161))/0x9)+-parseInt(_0x3aa48c(0x15b))/0xa+-parseInt(_0x3aa48c(0x164))/0xb*(parseInt(_0x3aa48c(0x160))/0xc);if(_0x1df602===_0x362d99)break;else _0x35f644['push'](_0x35f644['shift']());}catch(_0x47cdcf){_0x35f644['push'](_0x35f644['shift']());}}}(a48_0x5f35,0x8e6fc));import{codegenSdk}from'../../commands/codegen/sdk.js';function a48_0x5f35(){const _0x371453=['18GDaMJn','2371784FYmalK','5yCUhjp','4713236vSLryr','77962xYLOME','3359276BYqTxo','4723580DyVfnq','20cRwCcG','1884Wnacqn','1669617jTmwuM','15673qFaaVX','24OJbMNZ'];a48_0x5f35=function(){return _0x371453;};return a48_0x5f35();}import{codegenSql}from'../../commands/codegen/sql.js';function a48_0xa7be(_0x275183,_0xeb0afe){_0x275183=_0x275183-0x15b;const _0x5f3585=a48_0x5f35();let _0xa7be03=_0x5f3585[_0x275183];return _0xa7be03;}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x3000(){const _0x474e6c=['read','1962xxULft','2NpDXxW','200255EOlcbR','7180ZoIoet','skip-imports','2049363jOohhx','11959779GFNYxJ','appCode','4wVsnZi','12968ZpWHmM','12UbptGa','string','17184brbAZL','sdk','361154amPIsI','bool','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Omit\x20import\x20statements\x20from\x20generated\x20code','tableName','1265CITXNc','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','str','code','operation','469CawnEy'];a49_0x3000=function(){return _0x474e6c;};return a49_0x3000();}const a49_0x5821f5=a49_0x1060;(function(_0x3fdef8,_0xf26f16){const _0xb4c1df=a49_0x1060,_0x374d6f=_0x3fdef8();while(!![]){try{const _0x4f601b=-parseInt(_0xb4c1df(0xce))/0x1*(parseInt(_0xb4c1df(0xc1))/0x2)+-parseInt(_0xb4c1df(0xd2))/0x3*(-parseInt(_0xb4c1df(0xbb))/0x4)+parseInt(_0xb4c1df(0xc6))/0x5*(parseInt(_0xb4c1df(0xbf))/0x6)+-parseInt(_0xb4c1df(0xcb))/0x7*(-parseInt(_0xb4c1df(0xbc))/0x8)+-parseInt(_0xb4c1df(0xcd))/0x9*(-parseInt(_0xb4c1df(0xd0))/0xa)+parseInt(_0xb4c1df(0xcf))/0xb+parseInt(_0xb4c1df(0xbd))/0xc*(-parseInt(_0xb4c1df(0xb9))/0xd);if(_0x4f601b===_0xf26f16)break;else _0x374d6f['push'](_0x374d6f['shift']());}catch(_0x3c66a7){_0x374d6f['push'](_0x374d6f['shift']());}}}(a49_0x3000,0x64138));function a49_0x1060(_0x24b3ea,_0x118398){_0x24b3ea=_0x24b3ea-0xb9;const _0x300003=a49_0x3000();let _0x106003=_0x300003[_0x24b3ea];return _0x106003;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a49_0x5821f5(0xc0),'description':a49_0x5821f5(0xc7),'risk':a49_0x5821f5(0xcc),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':'operation','type':a49_0x5821f5(0xbe),'required':!![],'description':a49_0x5821f5(0xc3)},{'name':a49_0x5821f5(0xd1),'type':'boolean','description':a49_0x5821f5(0xc4)}],async 'execute'(_0x53bde1){const _0x4ce4ef=a49_0x5821f5,{dataset:_0x59df87,operation:_0x50b3c9}=await getOperationDetail(_0x53bde1[_0x4ce4ef(0xba)],_0x53bde1[_0x4ce4ef(0xc8)](_0x4ce4ef(0xc9)),_0x53bde1[_0x4ce4ef(0xc8)]('operation')),_0x185789=generateSdkCode(_0x59df87,_0x50b3c9,{'includeImports':!_0x53bde1[_0x4ce4ef(0xc2)](_0x4ce4ef(0xd1))});return{'ok':!![],'data':{'dataset':{'name':_0x59df87['name'],'code':_0x59df87[_0x4ce4ef(0xc9)],'tableName':_0x59df87[_0x4ce4ef(0xc5)]},'operation':_0x53bde1[_0x4ce4ef(0xc8)](_0x4ce4ef(0xca)),'code':_0x185789}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a50_0x2659(_0x6984f2,_0x56fc10){_0x6984f2=_0x6984f2-0x160;const _0x5ce8f6=a50_0x5ce8();let _0x2659c2=_0x5ce8f6[_0x6984f2];return _0x2659c2;}const a50_0x129c70=a50_0x2659;(function(_0x47910d,_0x1d6d24){const _0x419582=a50_0x2659,_0x469eba=_0x47910d();while(!![]){try{const _0x58a29a=parseInt(_0x419582(0x175))/0x1*(-parseInt(_0x419582(0x164))/0x2)+-parseInt(_0x419582(0x178))/0x3*(parseInt(_0x419582(0x16e))/0x4)+-parseInt(_0x419582(0x162))/0x5*(-parseInt(_0x419582(0x172))/0x6)+-parseInt(_0x419582(0x166))/0x7+parseInt(_0x419582(0x177))/0x8+parseInt(_0x419582(0x16d))/0x9+-parseInt(_0x419582(0x16c))/0xa*(parseInt(_0x419582(0x16b))/0xb);if(_0x58a29a===_0x1d6d24)break;else _0x469eba['push'](_0x469eba['shift']());}catch(_0x632005){_0x469eba['push'](_0x469eba['shift']());}}}(a50_0x5ce8,0x1f38a));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a50_0x5ce8(){const _0x50bb5b=['Omit\x20import\x20statements\x20from\x20generated\x20code','982590HZHbYq','bff','8lJQIgl','sdk','1038814bQoPLw','target','no-imports','sqlName','appCode','187uevRPo','26350zcjmgV','2292669UtGrFn','104fqRhcp','bool','string','str','6GNsKUM','codegen','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','43721OMMYPi','sql','631152TwksFF','3945DjYHls','sqlCode'];a50_0x5ce8=function(){return _0x50bb5b;};return a50_0x5ce8();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a50_0x129c70(0x173),'command':a50_0x129c70(0x176),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':a50_0x129c70(0x167),'type':a50_0x129c70(0x170),'description':a50_0x129c70(0x174),'default':'sdk','enum':[a50_0x129c70(0x165),a50_0x129c70(0x163)]},{'name':a50_0x129c70(0x168),'type':'boolean','description':a50_0x129c70(0x161)}],async 'execute'(_0x4bd5b8){const _0x333df6=a50_0x129c70,_0x953910=await getSqlQueryInfo(_0x4bd5b8[_0x333df6(0x16a)],_0x4bd5b8[_0x333df6(0x171)]('sqlcode')),_0x44f3f6=_0x4bd5b8[_0x333df6(0x171)]('target')||_0x333df6(0x165),_0x5f7648=generateSqlCodeTemplate(_0x953910,{'target':_0x44f3f6,'includeImports':!_0x4bd5b8[_0x333df6(0x16f)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x953910[_0x333df6(0x160)],'sqlName':_0x953910[_0x333df6(0x169)],'target':_0x44f3f6,'code':_0x5f7648}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d1ef7,_0x5dd4b8){const _0x4209d5=a51_0x3bbc,_0x9024ab=_0x3d1ef7();while(!![]){try{const _0x4fed7e=-parseInt(_0x4209d5(0x159))/0x1+-parseInt(_0x4209d5(0x146))/0x2+-parseInt(_0x4209d5(0x166))/0x3+-parseInt(_0x4209d5(0x151))/0x4*(parseInt(_0x4209d5(0x145))/0x5)+-parseInt(_0x4209d5(0x16a))/0x6+parseInt(_0x4209d5(0x152))/0x7+parseInt(_0x4209d5(0x169))/0x8*(parseInt(_0x4209d5(0x150))/0x9);if(_0x4fed7e===_0x5dd4b8)break;else _0x9024ab['push'](_0x9024ab['shift']());}catch(_0x36f86a){_0x9024ab['push'](_0x9024ab['shift']());}}}(a51_0x5115,0x5c389));function a51_0x5115(){const _0x56341e=['\x20Remaining\x20app\x20\x22','defaultApp','16757379plHutM','2356180Csxjgh','1354500pwcvEO','trim','Missing\x20app\x20name.','global','object','args','string','525186HhfWuK','globalConfig','Use\x20global\x20config\x20scope','keys','\x20Note:\x20app\x20\x22','Added','\x22\x20(appcode:\x20','validation','Updated','\x22\x20still\x20defined\x20in\x20','App\x20code','\x20<name>\x20--appcode\x20<code>','Removed\x20app\x20\x22','638067PvcLCj','\x20app\x20\x22','Usage:\x20','8dPXybv','1803408HKWVqv','boolean','length','5WHJzMx','100412AbnSbo','appcode','\x20<name>\x20[--global]','\x20config.','\x22\x20is\x20selected\x20automatically.','projectConfig','apps','App\x20\x22'];a51_0x5115=function(){return _0x56341e;};return a51_0x5115();}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 _0x47ba76=a51_0x3bbc;return[{'name':_0x47ba76(0x147),'type':_0x47ba76(0x158),'description':_0x47ba76(0x163),'required':!![]},{'name':_0x47ba76(0x155),'type':_0x47ba76(0x143),'description':_0x47ba76(0x15b),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x12982a=a51_0x3bbc;return[{'name':_0x12982a(0x155),'type':_0x12982a(0x143),'description':_0x12982a(0x15b),'default':![]}];}function a51_0x3bbc(_0x532b1e,_0x30fb4e){_0x532b1e=_0x532b1e-0x143;const _0x5115e6=a51_0x5115();let _0x3bbcb7=_0x5115e6[_0x532b1e];return _0x3bbcb7;}export async function validateAppName(_0x25a475,_0x249dcb){const _0x9d7d07=a51_0x3bbc,_0x408142=_0x25a475[_0x9d7d07(0x157)][0x0]?.[_0x9d7d07(0x153)]();if(!_0x408142)throw CliErrors['validation'](_0x9d7d07(0x154),_0x9d7d07(0x168)+CLI_BIN_NAME+'\x20'+_0x249dcb+'\x20<name>');}export async function runAppAdd(_0x1f0e57,_0x3df29c){const _0x3c2297=a51_0x3bbc,_0x1d5feb=_0x1f0e57[_0x3c2297(0x157)][0x0]?.['trim']();if(!_0x1d5feb)throw CliErrors[_0x3c2297(0x160)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3df29c+_0x3c2297(0x164));const _0xed7b0b=_0x1f0e57['str']('appcode');if(!_0xed7b0b)throw CliErrors['flagMissing']('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3df29c+_0x3c2297(0x164));const _0x5052a9={'global':_0x1f0e57['bool'](_0x3c2297(0x155))},_0x31527a=readConfig(_0x5052a9);if(!_0x31527a[_0x3c2297(0x14c)])_0x31527a[_0x3c2297(0x14c)]={};const _0x1f1b0b={'appcode':_0xed7b0b,...collectAppProfileOverrides(_0x2a70e3=>_0x1f0e57['str'](_0x2a70e3))},_0x581d9b=_0x31527a[_0x3c2297(0x14c)],_0x5c96fe=Object[_0x3c2297(0x15c)](_0x581d9b),_0x4f7505=typeof _0x31527a[_0x3c2297(0x14f)]===_0x3c2297(0x158)&&_0x581d9b[_0x31527a[_0x3c2297(0x14f)]]?_0x31527a[_0x3c2297(0x14f)]:_0x5c96fe['length']===0x1?_0x5c96fe[0x0]:undefined,_0x51a697=!!_0x581d9b[_0x1d5feb];_0x581d9b[_0x1d5feb]=_0x1f1b0b;const _0x26d818=normalizeStoredDefaultApp(_0x31527a,_0x4f7505);writeConfig(_0x31527a,_0x5052a9);const _0x3fe939=!_0x51a697&&_0x26d818?'\x20Default\x20app\x20is\x20\x22'+_0x26d818+'\x22.':'',_0x215a5d=(_0x51a697?_0x3c2297(0x161):_0x3c2297(0x15e))+_0x3c2297(0x167)+_0x1d5feb+_0x3c2297(0x15f)+_0xed7b0b+')'+scopeLabel(_0x5052a9)+'.'+_0x3fe939;return{'ok':!![],'message':_0x215a5d};}export async function runAppRemove(_0xf85c1a,_0x4acba8){const _0x358020=a51_0x3bbc,_0x48bd38=_0xf85c1a[_0x358020(0x157)][0x0]?.[_0x358020(0x153)]();if(!_0x48bd38)throw CliErrors[_0x358020(0x160)](_0x358020(0x154),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x4acba8+_0x358020(0x148));const _0x3ebef7=_0xf85c1a['bool'](_0x358020(0x155)),{config:_0x414891,layers:_0x5ea77a}=readRawConfigWithLayers(),_0x316672=_0x414891['apps']??{};if(!_0x316672[_0x48bd38])throw CliErrors[_0x358020(0x160)](_0x358020(0x14d)+_0x48bd38+'\x22\x20not\x20found.');const _0x4ae112=_0x5ea77a[_0x358020(0x15a)][_0x358020(0x14c)]&&typeof _0x5ea77a['globalConfig']['apps']===_0x358020(0x156)?_0x5ea77a[_0x358020(0x15a)][_0x358020(0x14c)]:{},_0x15ca9b=_0x5ea77a[_0x358020(0x14b)][_0x358020(0x14c)]&&typeof _0x5ea77a[_0x358020(0x14b)][_0x358020(0x14c)]===_0x358020(0x156)?_0x5ea77a[_0x358020(0x14b)][_0x358020(0x14c)]:{},_0x2a99e2=appDefinedIn(_0x48bd38,_0x4ae112,_0x15ca9b),_0x4b5275=resolveAppScopeForWrite(_0x48bd38,_0x3ebef7,_0x5ea77a),_0x8fd8eb={'global':_0x4b5275===_0x358020(0x155)},_0x13530e=readConfig(_0x8fd8eb),_0x3e375c=_0x13530e[_0x358020(0x14c)];if(!_0x3e375c||!_0x3e375c[_0x48bd38])throw CliErrors[_0x358020(0x160)](_0x358020(0x14d)+_0x48bd38+'\x22\x20not\x20found.');delete _0x3e375c[_0x48bd38];let _0x3cfb39='';const _0x145497=typeof _0x13530e['defaultApp']===_0x358020(0x158)?_0x13530e[_0x358020(0x14f)]:undefined,_0x4e38e7=Object[_0x358020(0x15c)](_0x3e375c),_0x505176=_0x145497===_0x48bd38?_0x4e38e7[0x0]:_0x145497,_0x158db1=normalizeStoredDefaultApp(_0x13530e,_0x505176);if(_0x145497===_0x48bd38&&_0x4e38e7[_0x358020(0x144)]===0x1)_0x3cfb39=_0x358020(0x14e)+_0x4e38e7[0x0]+_0x358020(0x14a);else _0x145497===_0x48bd38&&_0x158db1&&(_0x3cfb39='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x158db1+'\x22.');Object['keys'](_0x3e375c)[_0x358020(0x144)]===0x0&&(delete _0x13530e[_0x358020(0x14c)],delete _0x13530e[_0x358020(0x14f)]);writeConfig(_0x13530e,_0x8fd8eb);const _0x94dc32=_0x2a99e2==='both'?_0x358020(0x15d)+_0x48bd38+_0x358020(0x162)+(_0x4b5275==='project'?'global':'project')+_0x358020(0x149):'';return{'ok':!![],'message':_0x358020(0x165)+_0x48bd38+'\x22'+scopeLabel(_0x8fd8eb)+'.'+_0x3cfb39+_0x94dc32};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a52_0x2ac8(){const _0x6e14c2=['Invalid\x20App\x20Code','manual','264qAggMU','3451368HEtAee','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','valid','849324PTkQpM','appName','length','10053850XKmWEc','map','trim','55211DwNHZP','Select\x20the\x20app\x20to\x20bind:','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','(Skip;\x20configure\x20later)','message','appCode','cyan','custom','yellow','351760vVekTK','5MpOAUK','3xCDfXK','15449TqCQqc','3333843ujnQBy','Found\x20','gray','skip','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','No\x20available\x20apps\x20found.','\x20\x20(','Fetching\x20available\x20apps...','find','App\x20Code:','✎\x20Enter\x20appcode\x20manually'];a52_0x2ac8=function(){return _0x6e14c2;};return a52_0x2ac8();}(function(_0x24f20f,_0x46dff6){const _0x506fd7=a52_0x1a6a,_0x2e5de0=_0x24f20f();while(!![]){try{const _0x23bcd7=parseInt(_0x506fd7(0x7c))/0x1+parseInt(_0x506fd7(0x76))/0x2+parseInt(_0x506fd7(0x87))/0x3*(-parseInt(_0x506fd7(0x85))/0x4)+parseInt(_0x506fd7(0x86))/0x5*(-parseInt(_0x506fd7(0x73))/0x6)+parseInt(_0x506fd7(0x88))/0x7*(-parseInt(_0x506fd7(0x72))/0x8)+-parseInt(_0x506fd7(0x89))/0x9+parseInt(_0x506fd7(0x79))/0xa;if(_0x23bcd7===_0x46dff6)break;else _0x2e5de0['push'](_0x2e5de0['shift']());}catch(_0x1659ef){_0x2e5de0['push'](_0x2e5de0['shift']());}}}(a52_0x2ac8,0x5c7d0));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x5ab5f4 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a52_0x1a6a(_0x974755,_0x1a38f5){_0x974755=_0x974755-0x66;const _0x2ac81f=a52_0x2ac8();let _0x1a6a00=_0x2ac81f[_0x974755];return _0x1a6a00;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x18a285=a52_0x1a6a,_0x4cb22d=await input({'message':_0x18a285(0x6e),'validate':_0x465b89=>{const _0x1144f1=_0x18a285,_0x1caeaf=validateAppcode(_0x465b89[_0x1144f1(0x7b)]());return _0x1caeaf[_0x1144f1(0x75)]||_0x1caeaf[_0x1144f1(0x80)]||_0x1144f1(0x70);}});return _0x4cb22d[_0x18a285(0x7b)]();}export async function promptAppSelection(_0x14ae43){const _0xffc13b=a52_0x1a6a,_0x4dfc8e=[{'name':a52_0x5ab5f4['yellow'](_0xffc13b(0x6f)),'value':-0x1},..._0x14ae43[_0xffc13b(0x7a)]((_0x2f6737,_0x29e994)=>({'name':_0x2f6737[_0xffc13b(0x77)]+'\x20\x20'+a52_0x5ab5f4[_0xffc13b(0x67)]('('+_0x2f6737[_0xffc13b(0x81)]+')'),'value':_0x29e994}))],_0x4055e4=await checkbox({'message':_0xffc13b(0x66)+a52_0x5ab5f4[_0xffc13b(0x82)](_0x14ae43[_0xffc13b(0x78)])+'\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','choices':_0x4dfc8e,'loop':![]});if(_0x4055e4['includes'](-0x1))return _0xffc13b(0x83);if(_0x4055e4[_0xffc13b(0x78)]===0x0)return'custom';return _0x4055e4[_0xffc13b(0x7a)](_0x569327=>_0x14ae43[_0x569327]);}export async function promptSingleAppSelection(_0x37fddf){const _0x354832=a52_0x1a6a,_0x3ee85a=[{'name':a52_0x5ab5f4[_0x354832(0x67)]('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x354832(0x68)},{'name':a52_0x5ab5f4[_0x354832(0x84)](_0x354832(0x6f)),'value':_0x354832(0x83)},..._0x37fddf['map'](_0xfacd3d=>({'name':_0xfacd3d[_0x354832(0x77)]+'\x20\x20'+a52_0x5ab5f4[_0x354832(0x67)]('('+_0xfacd3d[_0x354832(0x81)]+')'),'value':_0xfacd3d[_0x354832(0x81)]}))],_0x4167a2=await select({'message':_0x354832(0x7d),'choices':_0x3ee85a});if(_0x4167a2===_0x354832(0x68))return _0x354832(0x68);if(_0x4167a2===_0x354832(0x83))return _0x354832(0x83);return _0x37fddf[_0x354832(0x6d)](_0x419071=>_0x419071['appCode']===_0x4167a2);}export async function selectSingleAppcode(_0x2b7887){const _0x1f613b=a52_0x1a6a;if(!_0x2b7887)return writeCliSideChannelLine(a52_0x5ab5f4[_0x1f613b(0x67)](_0x1f613b(0x74))),_fallbackOrSkip();writeCliSideChannelLine(_0x1f613b(0x6c));let _0x909a4d;try{_0x909a4d=await withActiveCookie(_0x2b7887,()=>listRemoteApps());}catch(_0x1a537b){writeCliSideChannelLine(a52_0x5ab5f4[_0x1f613b(0x84)](_0x1f613b(0x7e)));if(_0x1a537b instanceof Error)writeCliSideChannelLine(a52_0x5ab5f4[_0x1f613b(0x67)](_0x1f613b(0x6b)+_0x1a537b[_0x1f613b(0x80)]+')'));return _fallbackOrSkip();}if(_0x909a4d[_0x1f613b(0x78)]===0x0)return writeCliSideChannelLine(a52_0x5ab5f4[_0x1f613b(0x84)](_0x1f613b(0x6a))),_fallbackOrSkip();const _0x2b6ea4=await promptSingleAppSelection(_0x909a4d);if(_0x2b6ea4===_0x1f613b(0x68))return'';if(_0x2b6ea4==='custom')return promptCustomAppcode();return _0x2b6ea4[_0x1f613b(0x81)];}export async function selectMultipleApps(_0xd24557){const _0x4ee185=a52_0x1a6a;writeCliSideChannelLine(_0x4ee185(0x6c));let _0x40cbe2;try{_0x40cbe2=await withActiveCookie(_0xd24557,()=>listRemoteApps());}catch(_0x20ca85){writeCliSideChannelLine(_0x4ee185(0x69));if(_0x20ca85 instanceof Error)writeCliSideChannelLine(_0x4ee185(0x6b)+_0x20ca85[_0x4ee185(0x80)]+')');return _0x4ee185(0x83);}if(_0x40cbe2[_0x4ee185(0x78)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x4ee185(0x83);return promptAppSelection(_0x40cbe2);}async function _fallbackOrSkip(){const _0x106255=a52_0x1a6a,_0x27a56b=await select({'message':_0x106255(0x6e),'choices':[{'name':a52_0x5ab5f4[_0x106255(0x67)](_0x106255(0x7f)),'value':_0x106255(0x68)},{'name':a52_0x5ab5f4[_0x106255(0x84)]('✎\x20Enter\x20manually'),'value':_0x106255(0x71)}]});if(_0x27a56b===_0x106255(0x68))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a53_0x38fc(_0x134a46,_0x5a9696){_0x134a46=_0x134a46-0xcd;const _0x511dec=a53_0x511d();let _0x38fc38=_0x511dec[_0x134a46];return _0x38fc38;}const a53_0x1ec2f8=a53_0x38fc;(function(_0x2bfd73,_0x475547){const _0x2e4836=a53_0x38fc,_0x4cadea=_0x2bfd73();while(!![]){try{const _0x2d72b8=-parseInt(_0x2e4836(0xeb))/0x1+-parseInt(_0x2e4836(0xe1))/0x2+-parseInt(_0x2e4836(0xce))/0x3+-parseInt(_0x2e4836(0xde))/0x4+parseInt(_0x2e4836(0xcf))/0x5+parseInt(_0x2e4836(0xe8))/0x6*(-parseInt(_0x2e4836(0xd3))/0x7)+parseInt(_0x2e4836(0xe7))/0x8*(parseInt(_0x2e4836(0xe0))/0x9);if(_0x2d72b8===_0x475547)break;else _0x4cadea['push'](_0x4cadea['shift']());}catch(_0x46d234){_0x4cadea['push'](_0x4cadea['shift']());}}}(a53_0x511d,0x981b0));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x1ec2f8(0xdf),a53_0x1ec2f8(0xda)]),NON_TERMINAL_STATUSES=new Set([a53_0x1ec2f8(0xdd),a53_0x1ec2f8(0xe6)]);export function normalizeAsyncTask(_0xc66c86){const _0x1ce482=a53_0x1ec2f8,_0x5e2811=typeof _0xc66c86?.['taskId']===_0x1ce482(0xea)?_0xc66c86[_0x1ce482(0xec)][_0x1ce482(0xe9)]():'';if(!_0x5e2811)throw CliErrors['apiError'](_0x1ce482(0xd8));const _0x45d9bf=typeof _0xc66c86[_0x1ce482(0xdb)]===_0x1ce482(0xea)?_0xc66c86[_0x1ce482(0xdb)]['trim']()[_0x1ce482(0xdc)]():'';if(!_0x45d9bf)throw CliErrors[_0x1ce482(0xe4)](_0x1ce482(0xe2)+_0x5e2811+_0x1ce482(0xed));return{'taskId':_0x5e2811,'status':_0x45d9bf,'errorMessage':typeof _0xc66c86['errorMessage']===_0x1ce482(0xea)&&_0xc66c86[_0x1ce482(0xe3)][_0x1ce482(0xe9)]()?_0xc66c86['errorMessage'][_0x1ce482(0xe9)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x45d9bf),'knownStatus':TERMINAL_STATUSES[_0x1ce482(0xd6)](_0x45d9bf)||NON_TERMINAL_STATUSES['has'](_0x45d9bf)};}export function buildAsyncTaskStatusCommand(_0x3645fa,_0x592891){const _0x324874=a53_0x1ec2f8;return CLI_BIN_NAME+_0x324874(0xd2)+quoteShellArg(_0x3645fa)+_0x324874(0xcd)+quoteShellArg(_0x592891)+'\x20--format\x20compress';}export function asyncTaskMessage(_0xe0ad97){const _0x3038c9=a53_0x1ec2f8;switch(_0xe0ad97[_0x3038c9(0xdb)]){case _0x3038c9(0xdd):return _0x3038c9(0xef)+_0xe0ad97['taskId']+_0x3038c9(0xd5);case'PROCESSING':return _0x3038c9(0xef)+_0xe0ad97['taskId']+_0x3038c9(0xd9);case _0x3038c9(0xdf):return _0x3038c9(0xef)+_0xe0ad97['taskId']+_0x3038c9(0xe5);case'FAILED':return _0xe0ad97['errorMessage']?_0x3038c9(0xef)+_0xe0ad97[_0x3038c9(0xec)]+_0x3038c9(0xd7)+_0xe0ad97[_0x3038c9(0xe3)]:_0x3038c9(0xef)+_0xe0ad97[_0x3038c9(0xec)]+_0x3038c9(0xd0);default:return _0x3038c9(0xef)+_0xe0ad97['taskId']+_0x3038c9(0xd1)+_0xe0ad97[_0x3038c9(0xdb)]+'.';}}function a53_0x511d(){const _0x57c05c=['FAILED','status','toUpperCase','PENDING','2671808wRlIzK','SUCCESS','32143365DQhdtZ','1050058WsTWWZ','Async\x20task\x20','errorMessage','apiError','\x20completed\x20successfully.','PROCESSING','8TxXrMH','1186296gnQxZN','trim','string','612712IhPStN','taskId','\x20response\x20did\x20not\x20contain\x20a\x20status.','replace','Task\x20','\x20--appcode\x20','2770689nHjIud','1869715oqVtuR','\x20failed.','\x20returned\x20unknown\x20status\x20','\x20task\x20status\x20--task-id\x20','21RsRaCZ','\x27\x5c\x27\x27','\x20is\x20pending.','has','\x20failed:\x20','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20is\x20processing.'];a53_0x511d=function(){return _0x57c05c;};return a53_0x511d();}function quoteShellArg(_0x5b99fc){const _0x1ff0e5=a53_0x1ec2f8;return'\x27'+_0x5b99fc[_0x1ff0e5(0xee)](/'/g,_0x1ff0e5(0xd4))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x3475(){var _0x1506d2=['948FXkPnI','3258189tKUZMS','description','883632ASqXKD','8PszWeU','12025490BipxNA','defineProperties','108810CdQRTS','705468KjgLSg','833CGbAdS','40vbFRqj','url','335052yQfEMX'];a54_0x3475=function(){return _0x1506d2;};return a54_0x3475();}function a54_0x3b1a(_0x112972,_0x2e5ee4){_0x112972=_0x112972-0x128;var _0x3475b8=a54_0x3475();var _0x3b1a23=_0x3475b8[_0x112972];return _0x3b1a23;}(function(_0x5994b0,_0x34830b){var _0x1092c2=a54_0x3b1a,_0x17b0a5=_0x5994b0();while(!![]){try{var _0x59c5af=parseInt(_0x1092c2(0x134))/0x1+-parseInt(_0x1092c2(0x12f))/0x2+-parseInt(_0x1092c2(0x133))/0x3+parseInt(_0x1092c2(0x12b))/0x4*(-parseInt(_0x1092c2(0x129))/0x5)+parseInt(_0x1092c2(0x12c))/0x6*(parseInt(_0x1092c2(0x128))/0x7)+parseInt(_0x1092c2(0x130))/0x8*(-parseInt(_0x1092c2(0x12d))/0x9)+parseInt(_0x1092c2(0x131))/0xa;if(_0x59c5af===_0x34830b)break;else _0x17b0a5['push'](_0x17b0a5['shift']());}catch(_0x4f621e){_0x17b0a5['push'](_0x17b0a5['shift']());}}}(a54_0x3475,0x65b60));export function asDryRunResult(_0x436c9c,_0x34ebee){var _0x37b203=a54_0x3b1a;return Object[_0x37b203(0x132)](_0x436c9c,{'method':{'value':_0x34ebee['method'],'enumerable':![]},'url':{'value':_0x34ebee[_0x37b203(0x12a)],'enumerable':![]},..._0x34ebee[_0x37b203(0x12e)]?{'description':{'value':_0x34ebee[_0x37b203(0x12e)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x20db21=a55_0x3c88;(function(_0x32c509,_0x57fca2){const _0x2b2221=a55_0x3c88,_0x13d4b6=_0x32c509();while(!![]){try{const _0x175ed8=-parseInt(_0x2b2221(0xf8))/0x1*(-parseInt(_0x2b2221(0xeb))/0x2)+-parseInt(_0x2b2221(0xec))/0x3*(parseInt(_0x2b2221(0xe7))/0x4)+parseInt(_0x2b2221(0x108))/0x5*(-parseInt(_0x2b2221(0x107))/0x6)+-parseInt(_0x2b2221(0x102))/0x7*(-parseInt(_0x2b2221(0xee))/0x8)+parseInt(_0x2b2221(0xfc))/0x9+-parseInt(_0x2b2221(0xf4))/0xa*(-parseInt(_0x2b2221(0x10c))/0xb)+parseInt(_0x2b2221(0x105))/0xc*(-parseInt(_0x2b2221(0x100))/0xd);if(_0x175ed8===_0x57fca2)break;else _0x13d4b6['push'](_0x13d4b6['shift']());}catch(_0x3cddc3){_0x13d4b6['push'](_0x13d4b6['shift']());}}}(a55_0xa2b8,0x93611));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x20db21(0xfb),'type':a55_0x20db21(0xf3),'required':!![],'description':'Source\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x20db21(0xfa),'type':'string','required':!![],'description':a55_0x20db21(0xf9)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x20db21(0x10f),'type':a55_0x20db21(0xf3),'required':!![],'description':'Target\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x20db21(0xf2),'type':a55_0x20db21(0xf3),'required':!![],'description':a55_0x20db21(0x10a)};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x20db21(0x104),'type':a55_0x20db21(0xe8),'description':a55_0x20db21(0xf5)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x20db21(0x106),'type':a55_0x20db21(0xf3),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x20db21(0xff),'type':a55_0x20db21(0xf3),'enum':[a55_0x20db21(0xe5),a55_0x20db21(0x111),'MANY_TO_ONE',a55_0x20db21(0xef)],'description':a55_0x20db21(0x10e)};export const GLOBAL_SCOPE_FLAG={'name':'global','type':a55_0x20db21(0xfd),'default':![],'description':a55_0x20db21(0xf6)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x20db21(0xf1)};export const CODE_FLAG={'name':a55_0x20db21(0xf0),'type':a55_0x20db21(0xf3),'required':!![],'description':a55_0x20db21(0xed),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x20db21(0x103),'description':a55_0x20db21(0xed)};export const SQLCODE_FLAG={'name':a55_0x20db21(0x10b),'type':a55_0x20db21(0xf3),'required':!![],'description':a55_0x20db21(0xf7),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x20db21(0x109)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x20db21(0xea),'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':![]};function a55_0x3c88(_0x2c2188,_0x1621f0){_0x2c2188=_0x2c2188-0xe5;const _0xa2b85f=a55_0xa2b8();let _0x3c8844=_0xa2b85f[_0x2c2188];return _0x3c8844;}function a55_0xa2b8(){const _0x195354=['4sajiyG','number','skip-connection-test','appcode','21686swIyhS','2668701oAlaTk','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','88832BIcLQu','MANY_TO_MANY','code','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','to-column','string','148780Gbpjoy','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','Write\x20to\x20the\x20global\x20configuration','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','86rFUsyj','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','from-column','from-datasetcode','3956913DJjJSB','boolean','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','cardinality','13XbhSkR','Database\x20product\x20type','588UXWEYJ','datasetcode','from-dblink-id','10251372eMmbOM','to-label-column','35004xEKBZC','295wJCKLE','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Target\x20field\x20name','sqlcode','286UjlmDe','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','to-datasetcode','POSTGRESQL','ONE_TO_MANY','dbtype','ONE_TO_ONE','MYSQL'];a55_0xa2b8=function(){return _0x195354;};return a55_0xa2b8();}export const DBLINK_ID_FLAG={'name':'id','type':a55_0x20db21(0xe8),'required':!![],'description':a55_0x20db21(0x10d)};export const DB_TYPE_FLAG={'name':a55_0x20db21(0x112),'type':'string','required':!![],'description':a55_0x20db21(0x101),'enum':[a55_0x20db21(0xe6),a55_0x20db21(0x110)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x20db21(0xe9),'type':'boolean','description':a55_0x20db21(0xfe)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x496fc9,_0x495d6d){const _0x3a9d12=a56_0x33ca,_0x48c80c=_0x496fc9();while(!![]){try{const _0x10ef33=parseInt(_0x3a9d12(0x1d8))/0x1*(parseInt(_0x3a9d12(0x1d9))/0x2)+-parseInt(_0x3a9d12(0x1de))/0x3*(-parseInt(_0x3a9d12(0x1db))/0x4)+parseInt(_0x3a9d12(0x1ea))/0x5*(-parseInt(_0x3a9d12(0x1dd))/0x6)+parseInt(_0x3a9d12(0x1d5))/0x7+-parseInt(_0x3a9d12(0x1dc))/0x8*(parseInt(_0x3a9d12(0x1da))/0x9)+parseInt(_0x3a9d12(0x1e8))/0xa+parseInt(_0x3a9d12(0x1df))/0xb*(parseInt(_0x3a9d12(0x1e1))/0xc);if(_0x10ef33===_0x495d6d)break;else _0x48c80c['push'](_0x48c80c['shift']());}catch(_0x574ca1){_0x48c80c['push'](_0x48c80c['shift']());}}}(a56_0x398b,0x769dc));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a56_0x33ca(_0x4d182e,_0x2743c6){_0x4d182e=_0x4d182e-0x1d4;const _0x398b23=a56_0x398b();let _0x33ca3b=_0x398b23[_0x4d182e];return _0x33ca3b;}function formatBytes(_0x4e7174){const _0x4ff1c9=a56_0x33ca;if(_0x4e7174>=BYTES_PER_MB){const _0x4dc5b7=Math[_0x4ff1c9(0x1d7)](_0x4e7174/BYTES_PER_MB*0x64)/0x64;return _0x4dc5b7[_0x4ff1c9(0x1e6)](0x2)+_0x4ff1c9(0x1d6);}return _0x4e7174+'\x20B';}function a56_0x398b(){const _0x29c46e=['File\x20is\x20not\x20a\x20regular\x20file:\x20','114920UzxRWA','File\x20not\x20found:\x20','2200Emvnju','validation','1638791UhRgav','\x20MB','ceil','492wemDnx','1268Rridhq','1615761ynBtHt','1244068nGTKgZ','8bfjsaE','6996VNFQOo','3RPPYbl','72523HEPbdj','isFile','564kILOte','\x20path\x20is\x20required.','trim','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','size','toFixed'];a56_0x398b=function(){return _0x29c46e;};return a56_0x398b();}export function requireDevelopmentUploadFile(_0x5eb71a,_0x55dcde){const _0x43abef=a56_0x33ca,_0x393370=_0x5eb71a[_0x43abef(0x1e3)]();if(!_0x393370)throw CliErrors[_0x43abef(0x1d4)](_0x55dcde+_0x43abef(0x1e2));if(!existsSync(_0x393370))throw CliErrors[_0x43abef(0x1d4)](_0x43abef(0x1e9)+_0x393370);const _0x5239cc=statSync(_0x393370);if(!_0x5239cc[_0x43abef(0x1e0)]())throw CliErrors['validation'](_0x43abef(0x1e7)+_0x393370);if(_0x5239cc[_0x43abef(0x1e5)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x43abef(0x1e4)+_0x393370+'\x20('+formatBytes(_0x5239cc['size'])+')');return{'path':_0x393370,'size':_0x5239cc[_0x43abef(0x1e5)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a57_0x41a6(){const _0x4e7277=['test','7UDaEOh','305061ejTsPQ','2899899OXbltI','318408fdPDEA','1218WpFBTa','App\x20Code\x20cannot\x20exceed\x20100\x20characters','281094ziZsxi','303585rjMjdH','700xtjeNL','length','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1436264kFFBkD','App\x20Code\x20cannot\x20be\x20empty'];a57_0x41a6=function(){return _0x4e7277;};return a57_0x41a6();}(function(_0x15bf99,_0x5bbb8b){const _0x38d563=a57_0x3139,_0x2f31c2=_0x15bf99();while(!![]){try{const _0x1642f3=parseInt(_0x38d563(0x169))/0x1+-parseInt(_0x38d563(0x16e))/0x2+-parseInt(_0x38d563(0x16c))/0x3*(parseInt(_0x38d563(0x170))/0x4)+-parseInt(_0x38d563(0x16f))/0x5+-parseInt(_0x38d563(0x16b))/0x6*(-parseInt(_0x38d563(0x168))/0x7)+-parseInt(_0x38d563(0x165))/0x8+parseInt(_0x38d563(0x16a))/0x9;if(_0x1642f3===_0x5bbb8b)break;else _0x2f31c2['push'](_0x2f31c2['shift']());}catch(_0x2ef4ef){_0x2f31c2['push'](_0x2f31c2['shift']());}}}(a57_0x41a6,0x37c8d));function a57_0x3139(_0x168b8e,_0x3f8691){_0x168b8e=_0x168b8e-0x163;const _0x41a699=a57_0x41a6();let _0x313914=_0x41a699[_0x168b8e];return _0x313914;}export function validateAppcode(_0x4a3ef2){const _0x3da688=a57_0x3139,_0x196839=_0x4a3ef2['trim']();if(!_0x196839)return{'valid':![],'message':_0x3da688(0x166)};if(_0x196839[_0x3da688(0x163)]>0x64)return{'valid':![],'message':_0x3da688(0x16d)};if(!/^[A-Za-z0-9_-]+$/[_0x3da688(0x167)](_0x196839))return{'valid':![],'message':_0x3da688(0x164)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x141fc1=a58_0x5917;(function(_0x47cfcc,_0xb4fd1b){const _0x2989cf=a58_0x5917,_0x1a6bec=_0x47cfcc();while(!![]){try{const _0x557b0a=-parseInt(_0x2989cf(0x164))/0x1*(-parseInt(_0x2989cf(0x162))/0x2)+parseInt(_0x2989cf(0x14b))/0x3+-parseInt(_0x2989cf(0x15f))/0x4*(parseInt(_0x2989cf(0x15b))/0x5)+-parseInt(_0x2989cf(0x14a))/0x6+parseInt(_0x2989cf(0x156))/0x7+parseInt(_0x2989cf(0x15d))/0x8*(parseInt(_0x2989cf(0x15e))/0x9)+-parseInt(_0x2989cf(0x163))/0xa*(-parseInt(_0x2989cf(0x15a))/0xb);if(_0x557b0a===_0xb4fd1b)break;else _0x1a6bec['push'](_0x1a6bec['shift']());}catch(_0x127914){_0x1a6bec['push'](_0x1a6bec['shift']());}}}(a58_0x3746,0x4bcec));import{CliErrors}from'../../errors.js';function a58_0x3746(){const _0x2b95db=['\x20config\x20delete\x20<key>\x20[--global]','2971402rkMNIu','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','\x20deleted','hasOwnProperty','341VwhgHc','5wLtOWA','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','32EDVqUu','413037gocSFC','2028808MofoQn','boolean','args','885354rtTIOz','12980oLfwYe','1vQswRv','Usage:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','bool','key','delete','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','Global','3508014HUDHJj','934218uvMPPt','validation','global','call','inherit','\x22\x20is\x20not\x20deletable.','has','write','Missing\x20key\x20argument.','routing'];a58_0x3746=function(){return _0x2b95db;};return a58_0x3746();}function a58_0x5917(_0x59981f,_0xa0a922){_0x59981f=_0x59981f-0x147;const _0x374617=a58_0x3746();let _0x59174c=_0x374617[_0x59981f];return _0x59174c;}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a58_0x141fc1(0x14f)]),EXTRA_DELETABLE_KEYS=new Set(['defaultApp',a58_0x141fc1(0x154)]);async function execute(_0x2feb52){const _0x5be06f=a58_0x141fc1,_0x139912=_0x2feb52[_0x5be06f(0x161)][0x0]?.['trim']();if(!_0x139912)throw CliErrors['validation'](_0x5be06f(0x153),_0x5be06f(0x165)+CLI_BIN_NAME+_0x5be06f(0x155));if(_0x139912==='riskLevel')throw CliErrors['validation'](_0x5be06f(0x166));if(!isTopLevelConfigKey(_0x139912)&&!EXTRA_DELETABLE_KEYS[_0x5be06f(0x151)](_0x139912)&&!LEGACY_DELETABLE_KEYS[_0x5be06f(0x151)](_0x139912))throw CliErrors[_0x5be06f(0x14c)]('Top-level\x20key\x20\x22'+_0x139912+_0x5be06f(0x150),_0x5be06f(0x148));const _0x466c9f=resolveWriteScope({'global':_0x2feb52[_0x5be06f(0x167)](_0x5be06f(0x14d))}),_0x4e8520=readScopedConfig(_0x466c9f),_0x281b1f=Object['prototype'][_0x5be06f(0x159)][_0x5be06f(0x14e)](_0x4e8520,_0x139912);_0x281b1f&&(delete _0x4e8520[_0x139912],writeScopedConfig(_0x4e8520,_0x466c9f));const _0x6754d0=_0x466c9f==='global'?_0x5be06f(0x149):'Project';return{'ok':!![],'message':_0x281b1f?'✓\x20'+_0x6754d0+'\x20'+_0x139912+_0x5be06f(0x158):'✓\x20'+_0x6754d0+'\x20'+_0x139912+'\x20already\x20absent','data':{'key':_0x139912,'scope':_0x466c9f,'changed':_0x281b1f}};}export const configDeleteDefinition={'service':'config','command':a58_0x141fc1(0x147),'description':a58_0x141fc1(0x157),'risk':a58_0x141fc1(0x152),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x141fc1(0x168),'description':a58_0x141fc1(0x15c),'required':!![]}],'flags':[{'name':a58_0x141fc1(0x14d),'type':a58_0x141fc1(0x160),'description':'Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|