@lovrabet/rabetbase-cli 2.5.12-beta.1 → 2.5.13-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/guides/custom-page-workflow.md +32 -2
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
- 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/templates/custom-pages/blank.json +1 -1
- package/templates/custom-pages/dashboard.json +1 -1
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a44_0x50da(_0x3258a6,_0x5d9462){_0x3258a6=_0x3258a6-0x13c;const _0x4676ff=a44_0x4676();let _0x50da81=_0x4676ff[_0x3258a6];return _0x50da81;}const a44_0xf9f362=a44_0x50da;(function(_0x3f47f4,_0x19b35e){const _0xafb1c1=a44_0x50da,_0x51ef69=_0x3f47f4();while(!![]){try{const _0x2be072=parseInt(_0xafb1c1(0x144))/0x1*(parseInt(_0xafb1c1(0x171))/0x2)+parseInt(_0xafb1c1(0x190))/0x3+parseInt(_0xafb1c1(0x18c))/0x4+-parseInt(_0xafb1c1(0x158))/0x5*(parseInt(_0xafb1c1(0x15a))/0x6)+parseInt(_0xafb1c1(0x177))/0x7+-parseInt(_0xafb1c1(0x195))/0x8+-parseInt(_0xafb1c1(0x163))/0x9;if(_0x2be072===_0x19b35e)break;else _0x51ef69['push'](_0x51ef69['shift']());}catch(_0x47a3c7){_0x51ef69['push'](_0x51ef69['shift']());}}}(a44_0x4676,0x635e8));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0xf9f362(0x143),'command':'push','description':a44_0xf9f362(0x17d),'risk':a44_0xf9f362(0x14d),'structuredErrors':!![],'flags':[{'name':a44_0xf9f362(0x19d),'type':a44_0xf9f362(0x146),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a44_0xf9f362(0x159),a44_0xf9f362(0x14a)]},{'name':'name','type':a44_0xf9f362(0x146),'description':a44_0xf9f362(0x16b)},{'name':'force','type':a44_0xf9f362(0x164),'description':a44_0xf9f362(0x142)}],async 'dryRun'(_0x74dc3b){const _0x45add1=a44_0xf9f362,_0x35f7b8=loadBffProjectConfig(_0x74dc3b[_0x45add1(0x19b)]),_0x5e9f1d=await readBffLockFile(_0x35f7b8[_0x45add1(0x19f)]),{appLock:_0x544e38}=ensureLockScope(_0x5e9f1d??createEmptyBffLock(),_0x74dc3b['appCode'],_0x35f7b8['scriptsRoot'],'push'),_0x582fbb=await getTargetFunctions(_0x35f7b8,_0x74dc3b),_0x3b7a2a=_0x582fbb['some'](_0x4eafd0=>_0x4eafd0['type']===_0x45add1(0x14a))?await scanLocalBffFunctions(_0x35f7b8,_0x45add1(0x14a)):_0x582fbb,_0x188062=await buildHookMaps(_0x74dc3b['appCode'],_0x74dc3b['apiDir'],_0x3b7a2a,_0x544e38,_0x74dc3b[_0x45add1(0x16a)]||_0x74dc3b[_0x45add1(0x189)]?.[_0x45add1(0x16d)]||_0x74dc3b[_0x45add1(0x189)]?.['defaultApp']),_0x21454d=_0x74dc3b['bool'](_0x45add1(0x154)),_0x295be6=[];for(const _0x38e8cb of _0x582fbb){const _0x156b26=await computeFileHash(_0x38e8cb['filePath']),_0x5f1ba0=_0x544e38[_0x45add1(0x198)][_0x38e8cb[_0x45add1(0x179)]],_0x26fff9=!!_0x5f1ba0&&_0x5f1ba0[_0x45add1(0x152)]===_0x156b26,_0x529b5f=_0x188062[_0x45add1(0x17c)][_0x45add1(0x191)](_0x38e8cb['lockKey']),_0xfc1f01=!!_0x5f1ba0?.['remoteId']&&_0x5f1ba0[_0x45add1(0x15d)]==null&&(_0x21454d||!_0x26fff9),_0x4b2d7f=_0xfc1f01?missingRemoteVersionConflict(_0x38e8cb,_0x5f1ba0):undefined,_0x562b65=_0x188062[_0x45add1(0x19e)][_0x45add1(0x14f)](_0x38e8cb['lockKey'])?'failed':!_0x21454d&&_0x26fff9?_0x45add1(0x141):_0x4b2d7f?'conflict':'would_push';_0x295be6[_0x45add1(0x13c)]({'lockKey':_0x38e8cb[_0x45add1(0x179)],'filePath':_0x38e8cb[_0x45add1(0x14c)],'remoteId':_0x5f1ba0?.[_0x45add1(0x160)]??null,'mode':_0x5f1ba0?.[_0x45add1(0x160)]?_0x45add1(0x18a):'create','status':_0x562b65,..._0x188062[_0x45add1(0x19e)][_0x45add1(0x14f)](_0x38e8cb[_0x45add1(0x179)])?{'error':_0x188062[_0x45add1(0x19e)]['get'](_0x38e8cb[_0x45add1(0x179)])}:{},..._0x4b2d7f?{'conflict':_0x4b2d7f}:{},..._0x188062[_0x45add1(0x181)][_0x45add1(0x14f)](_0x38e8cb['lockKey'])?{'datasetCode':_0x5f1ba0?.[_0x45add1(0x15f)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x38e8cb[_0x45add1(0x179)])]}:{},..._0x529b5f?{'alias':_0x529b5f[_0x45add1(0x176)]??null,'datasetCode':_0x529b5f['datasetCode'],'operationType':_0x38e8cb[_0x45add1(0x156)],'functionNode':_0x38e8cb[_0x45add1(0x150)],'warnings':_0x529b5f[_0x45add1(0x157)]}:{}});}return{'method':_0x45add1(0x166),'url':'/api/management/library/scripts/save','body':{'appCode':_0x74dc3b[_0x45add1(0x19b)],'force':_0x21454d,'files':_0x295be6,'cacheClearAtRuntime':_0x295be6['some'](_0xb383f1=>_0xb383f1[_0x45add1(0x17b)]==='would_push'),'cacheClearAtRuntimeTimes':_0x295be6[_0x45add1(0x180)](_0x3d32ec=>_0x3d32ec[_0x45add1(0x17b)]===_0x45add1(0x184))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x45add1(0x18e)+_0x295be6[_0x45add1(0x17e)]+_0x45add1(0x168)};},async 'execute'(_0x427637){const _0x2a64e3=a44_0xf9f362,_0x8a5179=loadBffProjectConfig(_0x427637[_0x2a64e3(0x19b)]),_0x41a260=await readBffLockFile(_0x8a5179[_0x2a64e3(0x19f)]),{lockData:_0x31d1d3,appLock:_0x4e605e}=ensureLockScope(_0x41a260??createEmptyBffLock(),_0x427637[_0x2a64e3(0x19b)],_0x8a5179[_0x2a64e3(0x15c)],_0x2a64e3(0x13c)),_0x26b098=await getTargetFunctions(_0x8a5179,_0x427637);if(_0x26b098[_0x2a64e3(0x17e)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x1f0646=_0x427637[_0x2a64e3(0x18b)](_0x2a64e3(0x154)),_0x33abea=JSON[_0x2a64e3(0x162)](JSON[_0x2a64e3(0x1a1)](_0x31d1d3)),_0x22c7b4=_0x33abea[_0x2a64e3(0x13f)][_0x427637[_0x2a64e3(0x19b)]];if(!_0x22c7b4)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x427637['appCode']+_0x2a64e3(0x147));const _0x1550bd=_0x26b098[_0x2a64e3(0x180)](_0x4ee77b=>_0x4ee77b[_0x2a64e3(0x19d)]===_0x2a64e3(0x14a))?await scanLocalBffFunctions(_0x8a5179,_0x2a64e3(0x14a)):_0x26b098,_0xc95d70=await buildHookMaps(_0x427637['appCode'],_0x427637['apiDir'],_0x1550bd,_0x22c7b4,_0x427637[_0x2a64e3(0x16a)]||_0x427637[_0x2a64e3(0x189)]?.[_0x2a64e3(0x16d)]||_0x427637[_0x2a64e3(0x189)]?.[_0x2a64e3(0x19c)]),_0x494cb1=[],_0x2ab7c4=[],_0x1e9565=[],_0x4efc29=[];for(const _0x1bcaf3 of _0x26b098){const _0x5c7f09=_0xc95d70[_0x2a64e3(0x19e)][_0x2a64e3(0x191)](_0x1bcaf3['lockKey']);if(_0x5c7f09){_0x4efc29[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'error':_0x5c7f09});continue;}const _0x497c41=await computeFileHash(_0x1bcaf3[_0x2a64e3(0x14c)]),_0x5159c4=_0x22c7b4[_0x2a64e3(0x198)][_0x1bcaf3[_0x2a64e3(0x179)]];if(!_0x1f0646&&_0x5159c4&&_0x5159c4[_0x2a64e3(0x152)]===_0x497c41){_0x2ab7c4[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'reason':'unchanged'});continue;}if(_0x5159c4?.[_0x2a64e3(0x160)]&&_0x5159c4['version']==null){_0x1e9565[_0x2a64e3(0x13c)](missingRemoteVersionConflict(_0x1bcaf3,_0x5159c4));continue;}try{await uploadSingleFunction(_0x427637['appCode'],_0x1bcaf3,_0x22c7b4,_0xc95d70);const _0x505706=_0x22c7b4[_0x2a64e3(0x198)][_0x1bcaf3[_0x2a64e3(0x179)]];_0x494cb1[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'remoteId':_0x505706?.[_0x2a64e3(0x160)]??0x0});}catch(_0x314491){const _0xfa978d=remoteVersionChangedConflict(_0x1bcaf3,_0x5159c4,_0x314491);if(_0xfa978d){_0x1e9565['push'](_0xfa978d);continue;}_0x4efc29[_0x2a64e3(0x13c)]({'lockKey':_0x1bcaf3[_0x2a64e3(0x179)],'error':_0x314491 instanceof Error?_0x314491[_0x2a64e3(0x140)]:String(_0x314491)});}}_0x22c7b4['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x8a5179[_0x2a64e3(0x19f)],_0x33abea),await waitForUploadedLockEntries(_0x8a5179[_0x2a64e3(0x19f)],_0x427637[_0x2a64e3(0x19b)],_0x494cb1[_0x2a64e3(0x13e)](_0x141dea=>_0x141dea[_0x2a64e3(0x179)]));let _0x22e639={'attempted':![],'cleared':![]};if(_0x494cb1['length']>0x0)try{let _0x32cb45='';for(let _0x369cd8=0x0;_0x369cd8<CACHE_CLEAR_ATTEMPTS;_0x369cd8+=0x1){_0x32cb45=await clearBffScriptCache(),_0x369cd8<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x22e639={'attempted':!![],'cleared':!![],'message':_0x32cb45||_0x2a64e3(0x14e)};}catch(_0x47175c){_0x22e639={'attempted':!![],'cleared':![],'error':_0x47175c instanceof Error?_0x47175c['message']:String(_0x47175c)};}const _0x33ebf9=_0x4efc29[_0x2a64e3(0x17e)]===0x0&&(_0x22e639[_0x2a64e3(0x174)]?_0x22e639['cleared']:!![]),_0x435d8d=_0x33ebf9,_0x3a0bdd=_0x22e639['attempted']?_0x22e639['cleared']?_0x2a64e3(0x149):'runtime\x20cache\x20clear\x20failed':_0x2a64e3(0x175);return{'ok':_0x435d8d,'data':{'uploaded':_0x494cb1,'skipped':_0x2ab7c4,'conflicts':_0x1e9565,'failed':_0x4efc29,'cacheClear':_0x22e639,'warnings':[...[..._0xc95d70['resolutions'][_0x2a64e3(0x1a0)]()][_0x2a64e3(0x155)](_0x510cef=>_0x510cef[_0x2a64e3(0x157)]),...[..._0xc95d70[_0x2a64e3(0x181)]][_0x2a64e3(0x13e)](existingHookWarning)]},'message':formatPushMessage(_0x494cb1[_0x2a64e3(0x17e)],_0x2ab7c4[_0x2a64e3(0x17e)],_0x1e9565[_0x2a64e3(0x17e)],_0x4efc29['length'],_0x3a0bdd)};}};function missingRemoteVersionConflict(_0x20068f,_0x1e8076){const _0x285e07=a44_0xf9f362;return remoteVersionConflict(_0x20068f,_0x1e8076,'BFF_REMOTE_VERSION_MISSING',_0x285e07(0x161));}function remoteVersionChangedConflict(_0x60a048,_0x25877a,_0x5cfa9d){const _0x27ad9d=a44_0xf9f362;if(!_0x25877a?.['remoteId']||_0x25877a[_0x27ad9d(0x15d)]==null||!isRemoteVersionConflict(_0x5cfa9d))return undefined;return remoteVersionConflict(_0x60a048,_0x25877a,_0x27ad9d(0x19a),'Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x27775b,_0x1a322d,_0x1ea809,_0x5d7ac2){const _0x47b3a=a44_0xf9f362;return{'code':_0x1ea809,'lockKey':_0x27775b[_0x47b3a(0x179)],'filePath':_0x27775b[_0x47b3a(0x14c)],'remoteId':_0x1a322d[_0x47b3a(0x160)],..._0x1a322d[_0x47b3a(0x15d)]!=null?{'expectedVersion':_0x1a322d['version']}:{},'message':_0x5d7ac2,'nextAction':{'action':_0x47b3a(0x17a),'command':CLI_BIN_NAME+_0x47b3a(0x183)+_0x1a322d[_0x47b3a(0x160)]+_0x47b3a(0x16f),'requiresReview':!![],'message':_0x47b3a(0x186)}};}function isRemoteVersionConflict(_0xc6de9e){const _0x4bdae7=a44_0xf9f362,_0x22525a=_0xc6de9e instanceof Error?_0xc6de9e[_0x4bdae7(0x140)]:String(_0xc6de9e),_0x151d60=getPlatformErrorCode(_0xc6de9e)??'';return[_0x22525a,_0x151d60][_0x4bdae7(0x180)](_0x42756d=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x4bdae7(0x18f)](_0x42756d));}function formatPushMessage(_0x51a84d,_0x4153d5,_0x5e5407,_0x41600a,_0x3b1e23){const _0x466fb0=a44_0xf9f362,_0x5eae19=[_0x466fb0(0x151)+_0x51a84d+'\x20uploaded',_0x4153d5+'\x20skipped'];_0x5e5407>0x0&&_0x5eae19[_0x466fb0(0x13c)](_0x5e5407+_0x466fb0(0x16e)+(_0x5e5407===0x1?'':'s')+'\x20'+(_0x5e5407===0x1?'requires':_0x466fb0(0x165))+_0x466fb0(0x14b));if(_0x41600a>0x0)_0x5eae19[_0x466fb0(0x13c)](_0x41600a+_0x466fb0(0x15e));return _0x5eae19[_0x466fb0(0x13c)](_0x3b1e23),_0x5eae19[_0x466fb0(0x169)](',\x20');}async function getTargetFunctions(_0x4fc868,_0x3b622f){const _0x2fd444=a44_0xf9f362,_0x389ad3=_0x3b622f[_0x2fd444(0x153)]('type'),_0x1361ec=_0x3b622f[_0x2fd444(0x153)](_0x2fd444(0x199)),_0x1fdbf0=normalizeBffType(_0x389ad3)??undefined;if(_0x1361ec&&!_0x1fdbf0)throw CliErrors[_0x2fd444(0x18d)](_0x2fd444(0x185));const _0x451c16=await scanLocalBffFunctions(_0x4fc868,_0x1fdbf0);if(_0x1361ec){const _0xe87572=_0x451c16[_0x2fd444(0x16c)](_0x1761fb=>_0x1761fb['name']===_0x1361ec);if(_0xe87572[_0x2fd444(0x17e)]===0x0)throw CliErrors[_0x2fd444(0x18d)](_0x2fd444(0x192)+_0x1fdbf0+'/'+_0x1361ec);return _0xe87572;}return _0x451c16;}function existingHookWarning(_0x4a5cca){const _0x1f7674=a44_0xf9f362;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x4a5cca,'message':_0x1f7674(0x148)};}async function buildHookMaps(_0xe3d868,_0x20b320,_0x1fb316,_0x2857a0,_0x387461){const _0x5476df=a44_0xf9f362,_0x1fa5b2=_0x1fb316['some'](_0x55df06=>_0x55df06[_0x5476df(0x19d)]===_0x5476df(0x14a));if(!_0x1fa5b2)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x595b7b=resolveApiModelSource(_0x20b320,_0xe3d868,_0x387461),_0x86c2fd=loadAliasMap(_0x20b320,undefined,_0x595b7b[_0x5476df(0x14c)],_0x595b7b['profileName']);assertUnambiguousHookAliases(_0x86c2fd);const _0x4aa2ee=[..._0x86c2fd[_0x5476df(0x13e)](_0x3d3ff3=>[_0x3d3ff3['alias'],_0x3d3ff3[_0x5476df(0x15f)]]),...trackedHookDirectoryMappings(_0x2857a0)[_0x5476df(0x13e)](_0xc1e56a=>[_0xc1e56a[_0x5476df(0x176)],_0xc1e56a[_0x5476df(0x15f)]])],_0x195402=await listDatasets(_0xe3d868);assertUnambiguousHookDirectoryMappings(_0x4aa2ee[_0x5476df(0x13e)](([_0x2c91a9,_0x30dbc5])=>({'alias':_0x2c91a9,'datasetCode':_0x30dbc5})));const _0x5dc6e2=buildHookDirectoryIndexes(_0x195402,_0x4aa2ee),_0x1eeeb7=new Map(),_0x1891c2=preflightPushHookDirectories(_0x1fb316,_0x2857a0,_0x5dc6e2,_0x1eeeb7),_0x20120a=new Set(),_0x4c4a98=_0x1fb316['filter'](_0x12faa5=>_0x1eeeb7[_0x5476df(0x191)](_0x12faa5[_0x5476df(0x179)])?.[_0x5476df(0x193)](_0x5476df(0x17f))&&_0x2857a0[_0x5476df(0x198)][_0x12faa5[_0x5476df(0x179)]]?.[_0x5476df(0x160)]&&_0x2857a0[_0x5476df(0x198)][_0x12faa5['lockKey']]?.[_0x5476df(0x15f)]);if(_0x4c4a98[_0x5476df(0x17e)]>0x0){let _0x42af9c;try{_0x42af9c=await getBffScriptStatistics(_0xe3d868);}catch(_0x29da5c){for(const _0x4575e4 of _0x4c4a98)_0x1eeeb7[_0x5476df(0x188)](_0x4575e4[_0x5476df(0x179)],_0x5476df(0x197)+(_0x29da5c instanceof Error?_0x29da5c[_0x5476df(0x140)]:String(_0x29da5c)));return{'resolutions':_0x1891c2,'failures':_0x1eeeb7,'existingHooks':_0x20120a};}for(const _0x499741 of _0x4c4a98){const _0x53b5fa=_0x2857a0[_0x5476df(0x198)][_0x499741[_0x5476df(0x179)]];try{const _0x1bb329=new Set(_0x1fb316[_0x5476df(0x16c)](_0x2ee2f9=>_0x2ee2f9[_0x5476df(0x19d)]===_0x5476df(0x14a)&&_0x2857a0[_0x5476df(0x198)][_0x2ee2f9[_0x5476df(0x179)]]?.[_0x5476df(0x15f)]===_0x53b5fa['datasetCode'])[_0x5476df(0x13e)](_0x1ad60c=>_0x1ad60c[_0x5476df(0x176)]));if(_0x1bb329[_0x5476df(0x173)]>0x1)throw CliErrors['validation']('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x2d5e97=_0x42af9c['flatMap'](_0xb035cc=>[{'datasetCode':_0xb035cc['datasetCode'],'operationType':snakeToCamel(_0xb035cc[_0x5476df(0x156)]),'functionNode':_0x5476df(0x167),'id':_0xb035cc['beforeScriptId']},{'datasetCode':_0xb035cc[_0x5476df(0x15f)],'operationType':snakeToCamel(_0xb035cc[_0x5476df(0x156)]),'functionNode':'after','id':_0xb035cc[_0x5476df(0x178)]}])[_0x5476df(0x16c)](_0x58fb2a=>_0x58fb2a['id']===_0x53b5fa[_0x5476df(0x160)]),_0x3ad7bc=await getBffScriptInfo(_0x53b5fa[_0x5476df(0x160)]);if(_0x3ad7bc['id']!==_0x53b5fa[_0x5476df(0x160)]||_0x3ad7bc[_0x5476df(0x19b)]!==_0xe3d868||_0x3ad7bc[_0x5476df(0x187)]!=='HOOK'||_0x3ad7bc['functionName']!==_0x499741['name']||_0x53b5fa[_0x5476df(0x15d)]==null||_0x3ad7bc[_0x5476df(0x15d)]!==_0x53b5fa[_0x5476df(0x15d)]||_0x2d5e97[_0x5476df(0x17e)]!==0x1||_0x2d5e97[0x0]['datasetCode']!==_0x53b5fa[_0x5476df(0x15f)]||_0x2d5e97[0x0][_0x5476df(0x156)]!==_0x499741[_0x5476df(0x156)]||_0x2d5e97[0x0]['functionNode']!==_0x499741['functionNode']||_0x53b5fa[_0x5476df(0x156)]!==_0x499741[_0x5476df(0x156)]||_0x53b5fa[_0x5476df(0x150)]!==_0x499741[_0x5476df(0x150)])throw CliErrors[_0x5476df(0x18d)](_0x5476df(0x13d));_0x20120a['add'](_0x499741[_0x5476df(0x179)]),_0x1eeeb7['delete'](_0x499741[_0x5476df(0x179)]);}catch(_0x189486){_0x1eeeb7[_0x5476df(0x188)](_0x499741[_0x5476df(0x179)],_0x189486 instanceof Error?_0x189486['message']:String(_0x189486));}}}return{'resolutions':_0x1891c2,'failures':_0x1eeeb7,'existingHooks':_0x20120a};}async function uploadSingleFunction(_0x58b299,_0x22e75d,_0x12eddc,_0x35c9e8){const _0x2aad5a=a44_0xf9f362,_0x32f074=await readFile(_0x22e75d[_0x2aad5a(0x14c)],'utf8'),_0x2a39b5=await computeFileHash(_0x22e75d['filePath']),_0x3208dd=_0x12eddc[_0x2aad5a(0x198)][_0x22e75d[_0x2aad5a(0x179)]];if(_0x3208dd?.['remoteId']&&_0x3208dd[_0x2aad5a(0x15d)]==null)throw CliErrors['validation'](_0x22e75d[_0x2aad5a(0x179)]+_0x2aad5a(0x172));let _0x30a2bf=extractScriptDescription(_0x32f074);if(!_0x30a2bf&&_0x3208dd?.[_0x2aad5a(0x160)]){const _0x3c4024=await getBffScriptInfo(_0x3208dd[_0x2aad5a(0x160)]);_0x30a2bf=_0x3c4024[_0x2aad5a(0x145)]||undefined;}const _0x322325={'appCode':_0x58b299,'functionName':_0x22e75d[_0x2aad5a(0x199)],'scriptType':_0x22e75d[_0x2aad5a(0x19d)],'scriptContent':_0x32f074};if(_0x3208dd?.[_0x2aad5a(0x160)])_0x322325['id']=_0x3208dd[_0x2aad5a(0x160)];if(_0x3208dd?.[_0x2aad5a(0x15d)]!=null)_0x322325[_0x2aad5a(0x15d)]=_0x3208dd[_0x2aad5a(0x15d)];if(_0x30a2bf)_0x322325[_0x2aad5a(0x145)]=_0x30a2bf;if(_0x22e75d[_0x2aad5a(0x19d)]===_0x2aad5a(0x14a)){const _0x4d0023=_0x35c9e8[_0x2aad5a(0x17c)][_0x2aad5a(0x191)](_0x22e75d['lockKey']);if(!_0x4d0023&&!_0x35c9e8[_0x2aad5a(0x181)][_0x2aad5a(0x14f)](_0x22e75d[_0x2aad5a(0x179)])||!_0x22e75d[_0x2aad5a(0x156)]||!_0x22e75d['functionNode'])throw CliErrors[_0x2aad5a(0x18d)](_0x2aad5a(0x196)+_0x22e75d[_0x2aad5a(0x179)]);_0x4d0023&&(_0x322325[_0x2aad5a(0x182)]=_0x4d0023[_0x2aad5a(0x170)]['id'],_0x322325['operationType']=_0x22e75d['operationType']),_0x322325[_0x2aad5a(0x150)]=_0x22e75d[_0x2aad5a(0x150)];}const _0x30ca32=await saveBffScript(_0x322325),_0x3e97f9=_0x30ca32['id'],_0x96315e=_0x30ca32[_0x2aad5a(0x194)]??await getBffScriptInfo(_0x3e97f9),_0x2d4d71={'hash':_0x2a39b5,'remoteId':_0x3e97f9,'version':_0x96315e[_0x2aad5a(0x15d)]};if(_0x22e75d['type']===_0x2aad5a(0x14a)){const _0x3beb6c=_0x35c9e8[_0x2aad5a(0x17c)][_0x2aad5a(0x191)](_0x22e75d['lockKey']);if(!_0x3beb6c){_0x12eddc[_0x2aad5a(0x198)][_0x22e75d[_0x2aad5a(0x179)]]={..._0x3208dd,..._0x2d4d71};return;}_0x2d4d71[_0x2aad5a(0x176)]=_0x3beb6c[_0x2aad5a(0x176)]??_0x3208dd?.[_0x2aad5a(0x176)],_0x2d4d71[_0x2aad5a(0x15f)]=_0x3beb6c[_0x2aad5a(0x15f)],_0x2d4d71[_0x2aad5a(0x156)]=_0x22e75d['operationType'],_0x2d4d71['functionNode']=_0x22e75d[_0x2aad5a(0x150)];}_0x12eddc['functions'][_0x22e75d[_0x2aad5a(0x179)]]=_0x2d4d71;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a44_0x4676(){const _0x4cfdda=['scriptType','set','mergedCli','update','bool','64788UvMXLc','validation','Would\x20inspect\x20','test','1412205boTrnI','get','Local\x20function\x20not\x20found:\x20','startsWith','script','329472tCTMex','Incomplete\x20HOOK\x20path:\x20','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','functions','name','BFF_REMOTE_VERSION_CHANGED','appCode','defaultApp','type','failures','lockFilePath','values','stringify','push','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','map','apps','message','unchanged','Force\x20push\x20ignoring\x20hash\x20protection','bff','57HBgtoM','description','string','\x22\x20not\x20found\x20after\x20ensureLockScope.','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','runtime\x20cache\x20cleared','HOOK','\x20resolution','filePath','write','Runtime\x20script\x20cache\x20cleared.','has','functionNode','Push\x20complete:\x20','hash','str','force','flatMap','operationType','warnings','20SsRzeg','ENDPOINT','527190DKXBex','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','scriptsRoot','version','\x20failed','datasetCode','remoteId','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','parse','2758464HPIahZ','boolean','require','POST','before','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','join','selectedAppName','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','filter','currentApp','\x20conflict','\x20--format\x20compress','dataset','20302qyLniW',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','size','attempted','runtime\x20cache\x20not\x20needed','alias','284319SoyjuV','afterScriptId','lockKey','review_remote_and_merge','status','resolutions','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','length','HOOK_DATASET_NOT_FOUND:','some','existingHooks','datasetId','\x20bff\x20detail\x20--id\x20','would_push','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'];a44_0x4676=function(){return _0x4cfdda;};return a44_0x4676();}async function waitForUploadedLockEntries(_0x3bea38,_0x4921bb,_0x31d219){const _0x3a2f70=a44_0xf9f362;if(_0x31d219['length']===0x0)return;for(let _0xc71096=0x0;_0xc71096<LOCK_SETTLE_RETRY_COUNT;_0xc71096+=0x1){const _0x442dca=await readBffLockFile(_0x3bea38),_0xed4823=_0x442dca?.[_0x3a2f70(0x13f)]?.[_0x4921bb]?.[_0x3a2f70(0x198)]??{},_0x339cca=_0x31d219['every'](_0x2b54a3=>!!_0xed4823[_0x2b54a3]?.[_0x3a2f70(0x160)]);if(_0x339cca)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x3a2f70(0x15b)+_0x31d219[_0x3a2f70(0x169)](',\x20')+'.');}
|
|
1
|
+
const a44_0xad0615=a44_0x3e85;(function(_0x1960fc,_0x6e2039){const _0x227280=a44_0x3e85,_0x29b8fd=_0x1960fc();while(!![]){try{const _0x32354c=-parseInt(_0x227280(0x1da))/0x1+parseInt(_0x227280(0x21f))/0x2+-parseInt(_0x227280(0x1f4))/0x3+-parseInt(_0x227280(0x206))/0x4*(parseInt(_0x227280(0x201))/0x5)+-parseInt(_0x227280(0x1e1))/0x6+parseInt(_0x227280(0x228))/0x7*(parseInt(_0x227280(0x219))/0x8)+parseInt(_0x227280(0x1bc))/0x9*(parseInt(_0x227280(0x208))/0xa);if(_0x32354c===_0x6e2039)break;else _0x29b8fd['push'](_0x29b8fd['shift']());}catch(_0x5a363c){_0x29b8fd['push'](_0x29b8fd['shift']());}}}(a44_0x3283,0x2ec7f));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_0x3e85(_0x521c7a,_0x3281db){_0x521c7a=_0x521c7a-0x1b7;const _0x328300=a44_0x3283();let _0x3e855c=_0x328300[_0x521c7a];return _0x3e855c;}import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0xad0615(0x20f),'command':a44_0xad0615(0x225),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a44_0xad0615(0x21d),'structuredErrors':!![],'flags':[{'name':a44_0xad0615(0x22b),'type':a44_0xad0615(0x1cd),'description':a44_0xad0615(0x1cc),'enum':['COMMON','ENDPOINT',a44_0xad0615(0x21b)]},{'name':a44_0xad0615(0x1e8),'type':a44_0xad0615(0x1cd),'description':a44_0xad0615(0x1be)},{'name':a44_0xad0615(0x1f9),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x1369e3){const _0x3dfc88=a44_0xad0615,_0x43fc33=loadBffProjectConfig(_0x1369e3[_0x3dfc88(0x1fd)]),_0x557633=await readBffLockFile(_0x43fc33['lockFilePath']),{appLock:_0x54a637}=ensureLockScope(_0x557633??createEmptyBffLock(),_0x1369e3[_0x3dfc88(0x1fd)],_0x43fc33[_0x3dfc88(0x1ec)],'push'),_0x4503df=await getTargetFunctions(_0x43fc33,_0x1369e3),_0x148e38=_0x4503df['some'](_0x3757e0=>_0x3757e0[_0x3dfc88(0x22b)]===_0x3dfc88(0x21b))?await scanLocalBffFunctions(_0x43fc33,_0x3dfc88(0x21b)):_0x4503df,_0x2cac38=await buildHookMaps(_0x1369e3[_0x3dfc88(0x1fd)],_0x1369e3[_0x3dfc88(0x1e7)],_0x148e38,_0x54a637,_0x1369e3[_0x3dfc88(0x202)]||_0x1369e3[_0x3dfc88(0x1c1)]?.['currentApp']||_0x1369e3[_0x3dfc88(0x1c1)]?.[_0x3dfc88(0x1db)]),_0x8452e9=_0x1369e3[_0x3dfc88(0x1f5)](_0x3dfc88(0x1f9)),_0x439961=[];for(const _0x290381 of _0x4503df){const _0x4d24b7=await computeFileHash(_0x290381['filePath']),_0xde73e5=_0x54a637['functions'][_0x290381[_0x3dfc88(0x1f3)]],_0x2cd334=!!_0xde73e5&&_0xde73e5[_0x3dfc88(0x220)]===_0x4d24b7,_0x5a30e4=_0x2cac38[_0x3dfc88(0x1c5)]['get'](_0x290381[_0x3dfc88(0x1f3)]),_0x4e2b6f=!!_0xde73e5?.[_0x3dfc88(0x1fa)]&&_0xde73e5[_0x3dfc88(0x1ef)]==null&&(_0x8452e9||!_0x2cd334),_0x5aee6c=_0x4e2b6f?missingRemoteVersionConflict(_0x290381,_0xde73e5):undefined,_0x15d3a6=_0x2cac38[_0x3dfc88(0x1d1)]['has'](_0x290381[_0x3dfc88(0x1f3)])?_0x3dfc88(0x217):!_0x8452e9&&_0x2cd334?_0x3dfc88(0x1d0):_0x5aee6c?_0x3dfc88(0x1fe):_0x3dfc88(0x21c);_0x439961['push']({'lockKey':_0x290381[_0x3dfc88(0x1f3)],'filePath':_0x290381[_0x3dfc88(0x1de)],'remoteId':_0xde73e5?.[_0x3dfc88(0x1fa)]??null,'mode':_0xde73e5?.[_0x3dfc88(0x1fa)]?'update':_0x3dfc88(0x214),'status':_0x15d3a6,..._0x2cac38[_0x3dfc88(0x1d1)]['has'](_0x290381[_0x3dfc88(0x1f3)])?{'error':_0x2cac38[_0x3dfc88(0x1d1)][_0x3dfc88(0x226)](_0x290381[_0x3dfc88(0x1f3)])}:{},..._0x5aee6c?{'conflict':_0x5aee6c}:{},..._0x2cac38['existingHooks']['has'](_0x290381[_0x3dfc88(0x1f3)])?{'datasetCode':_0xde73e5?.[_0x3dfc88(0x1d9)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x290381['lockKey'])]}:{},..._0x5a30e4?{'alias':_0x5a30e4[_0x3dfc88(0x1e6)]??null,'datasetCode':_0x5a30e4[_0x3dfc88(0x1d9)],'operationType':_0x290381[_0x3dfc88(0x1ed)],'functionNode':_0x290381['functionNode'],'warnings':_0x5a30e4['warnings']}:{}});}return{'method':'POST','url':_0x3dfc88(0x21a),'body':{'appCode':_0x1369e3[_0x3dfc88(0x1fd)],'force':_0x8452e9,'files':_0x439961,'cacheClearAtRuntime':_0x439961[_0x3dfc88(0x223)](_0xf00931=>_0xf00931['status']===_0x3dfc88(0x21c)),'cacheClearAtRuntimeTimes':_0x439961[_0x3dfc88(0x223)](_0x225372=>_0x225372['status']===_0x3dfc88(0x21c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3dfc88(0x221)+_0x439961[_0x3dfc88(0x1f1)]+_0x3dfc88(0x1f6)};},async 'execute'(_0x546e4d){const _0x4e24bc=a44_0xad0615,_0x1e0fa0=loadBffProjectConfig(_0x546e4d[_0x4e24bc(0x1fd)]),_0x198079=await readBffLockFile(_0x1e0fa0[_0x4e24bc(0x1d2)]),{lockData:_0x5bc079,appLock:_0x11da3e}=ensureLockScope(_0x198079??createEmptyBffLock(),_0x546e4d[_0x4e24bc(0x1fd)],_0x1e0fa0[_0x4e24bc(0x1ec)],_0x4e24bc(0x225)),_0x55b057=await getTargetFunctions(_0x1e0fa0,_0x546e4d);if(_0x55b057[_0x4e24bc(0x1f1)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x4e24bc(0x1e0)};const _0x16621e=_0x546e4d[_0x4e24bc(0x1f5)](_0x4e24bc(0x1f9)),_0x1a0147=JSON[_0x4e24bc(0x203)](JSON[_0x4e24bc(0x1c3)](_0x5bc079)),_0x7a9c95=_0x1a0147[_0x4e24bc(0x215)][_0x546e4d[_0x4e24bc(0x1fd)]];if(!_0x7a9c95)throw new Error(_0x4e24bc(0x1bf)+_0x546e4d['appCode']+_0x4e24bc(0x1eb));const _0x175215=_0x55b057[_0x4e24bc(0x223)](_0x32510e=>_0x32510e[_0x4e24bc(0x22b)]==='HOOK')?await scanLocalBffFunctions(_0x1e0fa0,_0x4e24bc(0x21b)):_0x55b057,_0x36bfd1=await buildHookMaps(_0x546e4d['appCode'],_0x546e4d[_0x4e24bc(0x1e7)],_0x175215,_0x7a9c95,_0x546e4d[_0x4e24bc(0x202)]||_0x546e4d[_0x4e24bc(0x1c1)]?.[_0x4e24bc(0x1c0)]||_0x546e4d[_0x4e24bc(0x1c1)]?.[_0x4e24bc(0x1db)]),_0x5c6ab6=[],_0x572eac=[],_0x19e72f=[],_0x47d0cb=[];for(const _0x1d9195 of _0x55b057){const _0x20f35c=_0x36bfd1['failures'][_0x4e24bc(0x226)](_0x1d9195[_0x4e24bc(0x1f3)]);if(_0x20f35c){_0x47d0cb[_0x4e24bc(0x225)]({'lockKey':_0x1d9195[_0x4e24bc(0x1f3)],'error':_0x20f35c});continue;}const _0x2c0d5c=await computeFileHash(_0x1d9195[_0x4e24bc(0x1de)]),_0x57c1f5=_0x7a9c95[_0x4e24bc(0x1e4)][_0x1d9195[_0x4e24bc(0x1f3)]];if(!_0x16621e&&_0x57c1f5&&_0x57c1f5[_0x4e24bc(0x220)]===_0x2c0d5c){_0x572eac[_0x4e24bc(0x225)]({'lockKey':_0x1d9195[_0x4e24bc(0x1f3)],'reason':_0x4e24bc(0x1d0)});continue;}if(_0x57c1f5?.[_0x4e24bc(0x1fa)]&&_0x57c1f5[_0x4e24bc(0x1ef)]==null){_0x19e72f[_0x4e24bc(0x225)](missingRemoteVersionConflict(_0x1d9195,_0x57c1f5));continue;}try{await uploadSingleFunction(_0x546e4d[_0x4e24bc(0x1fd)],_0x1d9195,_0x7a9c95,_0x36bfd1);const _0x1c2659=_0x7a9c95[_0x4e24bc(0x1e4)][_0x1d9195[_0x4e24bc(0x1f3)]];_0x5c6ab6['push']({'lockKey':_0x1d9195['lockKey'],'remoteId':_0x1c2659?.[_0x4e24bc(0x1fa)]??0x0});}catch(_0x214777){const _0x2aa472=remoteVersionChangedConflict(_0x1d9195,_0x57c1f5,_0x214777);if(_0x2aa472){_0x19e72f[_0x4e24bc(0x225)](_0x2aa472);continue;}_0x47d0cb[_0x4e24bc(0x225)]({'lockKey':_0x1d9195[_0x4e24bc(0x1f3)],'error':_0x214777 instanceof Error?_0x214777[_0x4e24bc(0x1df)]:String(_0x214777)});}}_0x7a9c95[_0x4e24bc(0x1dd)]=new Date()['toISOString'](),await writeBffLockFile(_0x1e0fa0[_0x4e24bc(0x1d2)],_0x1a0147),await waitForUploadedLockEntries(_0x1e0fa0[_0x4e24bc(0x1d2)],_0x546e4d[_0x4e24bc(0x1fd)],_0x5c6ab6['map'](_0x13cacb=>_0x13cacb[_0x4e24bc(0x1f3)]));let _0x4447ff={'attempted':![],'cleared':![]};if(_0x5c6ab6['length']>0x0)try{let _0x5198df='';for(let _0x2445eb=0x0;_0x2445eb<CACHE_CLEAR_ATTEMPTS;_0x2445eb+=0x1){_0x5198df=await clearBffScriptCache(),_0x2445eb<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4447ff={'attempted':!![],'cleared':!![],'message':_0x5198df||_0x4e24bc(0x229)};}catch(_0x110e0a){_0x4447ff={'attempted':!![],'cleared':![],'error':_0x110e0a instanceof Error?_0x110e0a[_0x4e24bc(0x1df)]:String(_0x110e0a)};}const _0x29db53=_0x47d0cb[_0x4e24bc(0x1f1)]===0x0&&(_0x4447ff[_0x4e24bc(0x1ff)]?_0x4447ff[_0x4e24bc(0x1e9)]:!![]),_0x41e941=_0x29db53,_0x4d7520=_0x4447ff[_0x4e24bc(0x1ff)]?_0x4447ff[_0x4e24bc(0x1e9)]?_0x4e24bc(0x1dc):_0x4e24bc(0x1bb):_0x4e24bc(0x224);return{'ok':_0x41e941,'data':{'uploaded':_0x5c6ab6,'skipped':_0x572eac,'conflicts':_0x19e72f,'failed':_0x47d0cb,'cacheClear':_0x4447ff,'warnings':[...[..._0x36bfd1[_0x4e24bc(0x1c5)][_0x4e24bc(0x1d8)]()][_0x4e24bc(0x210)](_0x3a5c91=>_0x3a5c91['warnings']),...[..._0x36bfd1[_0x4e24bc(0x1e2)]][_0x4e24bc(0x1c6)](existingHookWarning)]},'message':formatPushMessage(_0x5c6ab6['length'],_0x572eac[_0x4e24bc(0x1f1)],_0x19e72f[_0x4e24bc(0x1f1)],_0x47d0cb['length'],_0x4d7520)};}};function missingRemoteVersionConflict(_0x14251e,_0x5a9afe){const _0x1b47e2=a44_0xad0615;return remoteVersionConflict(_0x14251e,_0x5a9afe,_0x1b47e2(0x212),_0x1b47e2(0x1ea));}function remoteVersionChangedConflict(_0x487e2e,_0x3ad80c,_0x207844){const _0x1c0816=a44_0xad0615;if(!_0x3ad80c?.['remoteId']||_0x3ad80c['version']==null||!isRemoteVersionConflict(_0x207844))return undefined;return remoteVersionConflict(_0x487e2e,_0x3ad80c,_0x1c0816(0x20b),_0x1c0816(0x1fb));}function remoteVersionConflict(_0x17b2e9,_0x2c8b30,_0x483cc0,_0xd1016){const _0x121e43=a44_0xad0615;return{'code':_0x483cc0,'lockKey':_0x17b2e9[_0x121e43(0x1f3)],'filePath':_0x17b2e9[_0x121e43(0x1de)],'remoteId':_0x2c8b30[_0x121e43(0x1fa)],..._0x2c8b30[_0x121e43(0x1ef)]!=null?{'expectedVersion':_0x2c8b30[_0x121e43(0x1ef)]}:{},'message':_0xd1016,'nextAction':{'action':_0x121e43(0x1f0),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x2c8b30[_0x121e43(0x1fa)]+_0x121e43(0x1bd),'requiresReview':!![],'message':_0x121e43(0x204)}};}function isRemoteVersionConflict(_0x4d094f){const _0x4a53ab=a44_0xad0615,_0x31f6b9=_0x4d094f instanceof Error?_0x4d094f[_0x4a53ab(0x1df)]:String(_0x4d094f),_0x298b6b=getPlatformErrorCode(_0x4d094f)??'';return[_0x31f6b9,_0x298b6b]['some'](_0x3edd7c=>/(?: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[_0x4a53ab(0x200)](_0x3edd7c));}function a44_0x3283(){const _0x204300=['9EpSqmE','\x20--format\x20compress','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Lock\x20scope\x20for\x20app\x20\x22','currentApp','mergedCli','afterScriptId','stringify','description','resolutions','map','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','size','dataset','functionName','\x20conflict','Push\x20only\x20this\x20script\x20type','string','before','script','unchanged','failures','lockFilePath','profileName','set','filter','Local\x20function\x20not\x20found:\x20','startsWith','values','datasetCode','58685kRCirP','defaultApp','runtime\x20cache\x20cleared','lastSync','filePath','message','No\x20local\x20Backend\x20Function\x20scripts\x20found.','1515840KRLRnj','existingHooks','\x20uploaded','functions','scriptType','alias','apiDir','name','cleared','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','\x22\x20not\x20found\x20after\x20ensureLockScope.','scriptsRoot','operationType','HOOK_DATASET_NOT_FOUND:','version','review_remote_and_merge','length','datasetId','lockKey','326082OWseyF','bool','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Incomplete\x20HOOK\x20path:\x20','str','force','remoteId','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','appCode','conflict','attempted','test','15INZrch','selectedAppName','parse','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.','every','283924OZkqOX','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','5985680ADfByf','requires','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','BFF_REMOTE_VERSION_CHANGED','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','functionNode','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','bff','flatMap','delete','BFF_REMOTE_VERSION_MISSING','\x20resolution','create','apps',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','failed','join','22736BNgSkk','/api/management/library/scripts/save','HOOK','would_push','write','add','25718QDfpqc','hash','Would\x20inspect\x20','require','some','runtime\x20cache\x20not\x20needed','push','get','beforeScriptId','525OqukVa','Runtime\x20script\x20cache\x20cleared.','Push\x20complete:\x20','type','has','EXISTING_HOOK_BINDING_PRESERVED','utf8','validation','runtime\x20cache\x20clear\x20failed'];a44_0x3283=function(){return _0x204300;};return a44_0x3283();}function formatPushMessage(_0x5e031d,_0x3e1fda,_0x1a3e8f,_0x4054c5,_0x2140ed){const _0x35676c=a44_0xad0615,_0x116840=[_0x35676c(0x22a)+_0x5e031d+_0x35676c(0x1e3),_0x3e1fda+'\x20skipped'];_0x1a3e8f>0x0&&_0x116840[_0x35676c(0x225)](_0x1a3e8f+_0x35676c(0x1cb)+(_0x1a3e8f===0x1?'':'s')+'\x20'+(_0x1a3e8f===0x1?_0x35676c(0x209):_0x35676c(0x222))+_0x35676c(0x213));if(_0x4054c5>0x0)_0x116840['push'](_0x4054c5+'\x20failed');return _0x116840[_0x35676c(0x225)](_0x2140ed),_0x116840[_0x35676c(0x218)](',\x20');}async function getTargetFunctions(_0x2eaa5b,_0x448ab0){const _0x5243ea=a44_0xad0615,_0x337f17=_0x448ab0[_0x5243ea(0x1f8)]('type'),_0x1488bd=_0x448ab0[_0x5243ea(0x1f8)](_0x5243ea(0x1e8)),_0x27d159=normalizeBffType(_0x337f17)??undefined;if(_0x1488bd&&!_0x27d159)throw CliErrors[_0x5243ea(0x1ba)](_0x5243ea(0x1c7));const _0x330b0d=await scanLocalBffFunctions(_0x2eaa5b,_0x27d159);if(_0x1488bd){const _0x234dec=_0x330b0d[_0x5243ea(0x1d5)](_0x8968ee=>_0x8968ee[_0x5243ea(0x1e8)]===_0x1488bd);if(_0x234dec[_0x5243ea(0x1f1)]===0x0)throw CliErrors['validation'](_0x5243ea(0x1d6)+_0x27d159+'/'+_0x1488bd);return _0x234dec;}return _0x330b0d;}function existingHookWarning(_0x4719e7){const _0x48f89b=a44_0xad0615;return{'code':_0x48f89b(0x1b8),'lockKey':_0x4719e7,'message':_0x48f89b(0x1fc)};}async function buildHookMaps(_0x4e2b8f,_0x2624d1,_0x272340,_0x18d400,_0x3bbf26){const _0x199866=a44_0xad0615,_0x17c5a0=_0x272340[_0x199866(0x223)](_0x3f0f24=>_0x3f0f24[_0x199866(0x22b)]==='HOOK');if(!_0x17c5a0)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x2d6e2e=resolveApiModelSource(_0x2624d1,_0x4e2b8f,_0x3bbf26),_0x1ce584=loadAliasMap(_0x2624d1,undefined,_0x2d6e2e['filePath'],_0x2d6e2e[_0x199866(0x1d3)]);assertUnambiguousHookAliases(_0x1ce584);const _0x54c25c=[..._0x1ce584[_0x199866(0x1c6)](_0x525ebc=>[_0x525ebc[_0x199866(0x1e6)],_0x525ebc[_0x199866(0x1d9)]]),...trackedHookDirectoryMappings(_0x18d400)[_0x199866(0x1c6)](_0x4fafe8=>[_0x4fafe8[_0x199866(0x1e6)],_0x4fafe8[_0x199866(0x1d9)]])],_0x3077b7=await listDatasets(_0x4e2b8f);assertUnambiguousHookDirectoryMappings(_0x54c25c[_0x199866(0x1c6)](([_0x41f303,_0x13f596])=>({'alias':_0x41f303,'datasetCode':_0x13f596})));const _0x348128=buildHookDirectoryIndexes(_0x3077b7,_0x54c25c),_0x3c9795=new Map(),_0x57af78=preflightPushHookDirectories(_0x272340,_0x18d400,_0x348128,_0x3c9795),_0x3a5b80=new Set(),_0x373b2d=_0x272340['filter'](_0x16a75a=>_0x3c9795[_0x199866(0x226)](_0x16a75a[_0x199866(0x1f3)])?.[_0x199866(0x1d7)](_0x199866(0x1ee))&&_0x18d400[_0x199866(0x1e4)][_0x16a75a[_0x199866(0x1f3)]]?.[_0x199866(0x1fa)]&&_0x18d400[_0x199866(0x1e4)][_0x16a75a[_0x199866(0x1f3)]]?.[_0x199866(0x1d9)]);if(_0x373b2d[_0x199866(0x1f1)]>0x0){let _0x445a60;try{_0x445a60=await getBffScriptStatistics(_0x4e2b8f);}catch(_0x317dd4){for(const _0x4ace7d of _0x373b2d)_0x3c9795['set'](_0x4ace7d[_0x199866(0x1f3)],_0x199866(0x207)+(_0x317dd4 instanceof Error?_0x317dd4[_0x199866(0x1df)]:String(_0x317dd4)));return{'resolutions':_0x57af78,'failures':_0x3c9795,'existingHooks':_0x3a5b80};}for(const _0x15e312 of _0x373b2d){const _0x1af62c=_0x18d400[_0x199866(0x1e4)][_0x15e312['lockKey']];try{const _0xb71ffd=new Set(_0x272340[_0x199866(0x1d5)](_0x2f18b7=>_0x2f18b7[_0x199866(0x22b)]===_0x199866(0x21b)&&_0x18d400[_0x199866(0x1e4)][_0x2f18b7['lockKey']]?.['datasetCode']===_0x1af62c[_0x199866(0x1d9)])[_0x199866(0x1c6)](_0x20fe21=>_0x20fe21[_0x199866(0x1e6)]));if(_0xb71ffd[_0x199866(0x1c8)]>0x1)throw CliErrors[_0x199866(0x1ba)](_0x199866(0x20a));const _0x3a6a08=_0x445a60[_0x199866(0x210)](_0x26f7a2=>[{'datasetCode':_0x26f7a2['datasetCode'],'operationType':snakeToCamel(_0x26f7a2[_0x199866(0x1ed)]),'functionNode':_0x199866(0x1ce),'id':_0x26f7a2[_0x199866(0x227)]},{'datasetCode':_0x26f7a2['datasetCode'],'operationType':snakeToCamel(_0x26f7a2['operationType']),'functionNode':'after','id':_0x26f7a2[_0x199866(0x1c2)]}])[_0x199866(0x1d5)](_0x31f27d=>_0x31f27d['id']===_0x1af62c[_0x199866(0x1fa)]),_0x68a49b=await getBffScriptInfo(_0x1af62c[_0x199866(0x1fa)]);if(_0x68a49b['id']!==_0x1af62c['remoteId']||_0x68a49b[_0x199866(0x1fd)]!==_0x4e2b8f||_0x68a49b[_0x199866(0x1e5)]!==_0x199866(0x21b)||_0x68a49b[_0x199866(0x1ca)]!==_0x15e312[_0x199866(0x1e8)]||_0x1af62c['version']==null||_0x68a49b[_0x199866(0x1ef)]!==_0x1af62c['version']||_0x3a6a08[_0x199866(0x1f1)]!==0x1||_0x3a6a08[0x0]['datasetCode']!==_0x1af62c[_0x199866(0x1d9)]||_0x3a6a08[0x0][_0x199866(0x1ed)]!==_0x15e312[_0x199866(0x1ed)]||_0x3a6a08[0x0][_0x199866(0x20d)]!==_0x15e312[_0x199866(0x20d)]||_0x1af62c[_0x199866(0x1ed)]!==_0x15e312[_0x199866(0x1ed)]||_0x1af62c['functionNode']!==_0x15e312['functionNode'])throw CliErrors['validation'](_0x199866(0x20e));_0x3a5b80[_0x199866(0x21e)](_0x15e312['lockKey']),_0x3c9795[_0x199866(0x211)](_0x15e312[_0x199866(0x1f3)]);}catch(_0x1421b3){_0x3c9795[_0x199866(0x1d4)](_0x15e312[_0x199866(0x1f3)],_0x1421b3 instanceof Error?_0x1421b3[_0x199866(0x1df)]:String(_0x1421b3));}}}return{'resolutions':_0x57af78,'failures':_0x3c9795,'existingHooks':_0x3a5b80};}async function uploadSingleFunction(_0x41082a,_0x252b88,_0xcae50b,_0x504c0e){const _0x818bb1=a44_0xad0615,_0x20081f=await readFile(_0x252b88[_0x818bb1(0x1de)],_0x818bb1(0x1b9)),_0x5ac78e=await computeFileHash(_0x252b88[_0x818bb1(0x1de)]),_0x11d353=_0xcae50b[_0x818bb1(0x1e4)][_0x252b88['lockKey']];if(_0x11d353?.[_0x818bb1(0x1fa)]&&_0x11d353[_0x818bb1(0x1ef)]==null)throw CliErrors[_0x818bb1(0x1ba)](_0x252b88[_0x818bb1(0x1f3)]+_0x818bb1(0x216));let _0x20e499=extractScriptDescription(_0x20081f);if(!_0x20e499&&_0x11d353?.['remoteId']){const _0x437872=await getBffScriptInfo(_0x11d353['remoteId']);_0x20e499=_0x437872[_0x818bb1(0x1c4)]||undefined;}const _0x1413f1={'appCode':_0x41082a,'functionName':_0x252b88[_0x818bb1(0x1e8)],'scriptType':_0x252b88[_0x818bb1(0x22b)],'scriptContent':_0x20081f};if(_0x11d353?.['remoteId'])_0x1413f1['id']=_0x11d353[_0x818bb1(0x1fa)];if(_0x11d353?.[_0x818bb1(0x1ef)]!=null)_0x1413f1[_0x818bb1(0x1ef)]=_0x11d353[_0x818bb1(0x1ef)];if(_0x20e499)_0x1413f1[_0x818bb1(0x1c4)]=_0x20e499;if(_0x252b88[_0x818bb1(0x22b)]==='HOOK'){const _0x43ed73=_0x504c0e['resolutions'][_0x818bb1(0x226)](_0x252b88[_0x818bb1(0x1f3)]);if(!_0x43ed73&&!_0x504c0e['existingHooks'][_0x818bb1(0x1b7)](_0x252b88[_0x818bb1(0x1f3)])||!_0x252b88[_0x818bb1(0x1ed)]||!_0x252b88[_0x818bb1(0x20d)])throw CliErrors['validation'](_0x818bb1(0x1f7)+_0x252b88[_0x818bb1(0x1f3)]);_0x43ed73&&(_0x1413f1[_0x818bb1(0x1f2)]=_0x43ed73[_0x818bb1(0x1c9)]['id'],_0x1413f1[_0x818bb1(0x1ed)]=_0x252b88[_0x818bb1(0x1ed)]),_0x1413f1[_0x818bb1(0x20d)]=_0x252b88[_0x818bb1(0x20d)];}const _0x4d3495=await saveBffScript(_0x1413f1),_0x3b295a=_0x4d3495['id'],_0x364f97=_0x4d3495[_0x818bb1(0x1cf)]??await getBffScriptInfo(_0x3b295a),_0x12c99d={'hash':_0x5ac78e,'remoteId':_0x3b295a,'version':_0x364f97[_0x818bb1(0x1ef)]};if(_0x252b88[_0x818bb1(0x22b)]===_0x818bb1(0x21b)){const _0x556d1a=_0x504c0e[_0x818bb1(0x1c5)][_0x818bb1(0x226)](_0x252b88[_0x818bb1(0x1f3)]);if(!_0x556d1a){_0xcae50b[_0x818bb1(0x1e4)][_0x252b88[_0x818bb1(0x1f3)]]={..._0x11d353,..._0x12c99d};return;}_0x12c99d[_0x818bb1(0x1e6)]=_0x556d1a[_0x818bb1(0x1e6)]??_0x11d353?.[_0x818bb1(0x1e6)],_0x12c99d[_0x818bb1(0x1d9)]=_0x556d1a['datasetCode'],_0x12c99d[_0x818bb1(0x1ed)]=_0x252b88[_0x818bb1(0x1ed)],_0x12c99d[_0x818bb1(0x20d)]=_0x252b88[_0x818bb1(0x20d)];}_0xcae50b[_0x818bb1(0x1e4)][_0x252b88[_0x818bb1(0x1f3)]]=_0x12c99d;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x16b99b,_0x15fac8,_0x2cc9f0){const _0x1f9fc7=a44_0xad0615;if(_0x2cc9f0[_0x1f9fc7(0x1f1)]===0x0)return;for(let _0x1b8dfa=0x0;_0x1b8dfa<LOCK_SETTLE_RETRY_COUNT;_0x1b8dfa+=0x1){const _0x13eed1=await readBffLockFile(_0x16b99b),_0x545abe=_0x13eed1?.['apps']?.[_0x15fac8]?.['functions']??{},_0x59d6f7=_0x2cc9f0[_0x1f9fc7(0x205)](_0x2ea208=>!!_0x545abe[_0x2ea208]?.[_0x1f9fc7(0x1fa)]);if(_0x59d6f7)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1f9fc7(0x20c)+_0x2cc9f0['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a45_0x20a382=a45_0x3564;(function(_0x277e1d,_0x5a69ff){const _0x5b71bb=a45_0x3564,_0x44c136=_0x277e1d();while(!![]){try{const _0x49a2d6=-parseInt(_0x5b71bb(0xfc))/0x1+-parseInt(_0x5b71bb(0xff))/0x2+parseInt(_0x5b71bb(0xef))/0x3*(-parseInt(_0x5b71bb(0x112))/0x4)+-parseInt(_0x5b71bb(0x10c))/0x5+-parseInt(_0x5b71bb(0x104))/0x6*(-parseInt(_0x5b71bb(0xfe))/0x7)+-parseInt(_0x5b71bb(0x107))/0x8+parseInt(_0x5b71bb(0x105))/0x9;if(_0x49a2d6===_0x5a69ff)break;else _0x44c136['push'](_0x44c136['shift']());}catch(_0x3abda4){_0x44c136['push'](_0x44c136['shift']());}}}(a45_0x5aca,0x710be));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a45_0x5aca(){const _0x398dc1=['profileName','boolean','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','all','2508540jtFQBX','defaultApp','datasetCode','remote','\x20modified,\x20','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','104OccGIL','hash','6504cBuKNS','appCode','apiDir','filePath','length','currentApp','has','read','map','\x20added,\x20','status','bff','\x20remote-only','766729wclWQd','mergedCli','23891yBXwEI','568806NYdWBM','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','bool','\x20unchanged','functions','36LbMWCz','25412346ntIZhH','lockKey','6174608wEbdir'];a45_0x5aca=function(){return _0x398dc1;};return a45_0x5aca();}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';function a45_0x3564(_0x3cca7b,_0x45eb24){_0x3cca7b=_0x3cca7b-0xef;const _0x5aca54=a45_0x5aca();let _0x35644d=_0x5aca54[_0x3cca7b];return _0x35644d;}export const bffStatus={'service':a45_0x20a382(0xfa),'command':'status','description':a45_0x20a382(0x100),'risk':a45_0x20a382(0xf6),'flags':[{'name':a45_0x20a382(0x10f),'type':a45_0x20a382(0x109),'description':a45_0x20a382(0x10a)}],async 'execute'(_0x58397b){const _0x2af1c9=a45_0x20a382,_0x594e9f=loadBffProjectConfig(_0x58397b[_0x2af1c9(0xf0)]),_0x168a75=await readBffLockFile(_0x594e9f['lockFilePath']),{appLock:_0x4b9436}=ensureLockScope(_0x168a75??createEmptyBffLock(),_0x58397b[_0x2af1c9(0xf0)],_0x594e9f['scriptsRoot'],_0x2af1c9(0xf9)),_0x4bd572=await scanLocalBffFunctions(_0x594e9f),_0x40eb4c=[],_0x534170=[],_0x7c27a3=[];for(const _0x5a305a of _0x4bd572){const _0x5dc466=await computeFileHash(_0x5a305a['filePath']),_0x1dc141=_0x4b9436[_0x2af1c9(0x103)][_0x5a305a[_0x2af1c9(0x106)]];if(!_0x1dc141)_0x40eb4c['push'](_0x5a305a[_0x2af1c9(0x106)]);else _0x1dc141[_0x2af1c9(0x113)]!==_0x5dc466?_0x534170['push'](_0x5a305a[_0x2af1c9(0x106)]):_0x7c27a3['push'](_0x5a305a[_0x2af1c9(0x106)]);}const _0x29c63f=[];if(_0x58397b[_0x2af1c9(0x101)]('remote')){const _0xd67065=resolveApiModelSource(_0x58397b[_0x2af1c9(0xf1)],_0x58397b[_0x2af1c9(0xf0)],_0x58397b['selectedAppName']||_0x58397b[_0x2af1c9(0xfd)]?.[_0x2af1c9(0xf4)]||_0x58397b[_0x2af1c9(0xfd)]?.[_0x2af1c9(0x10d)]),_0x3c17f7=loadAliasMap(_0x58397b[_0x2af1c9(0xf1)],undefined,_0xd67065[_0x2af1c9(0xf2)],_0xd67065[_0x2af1c9(0x108)]),_0x4d55a7=new Map(_0x3c17f7[_0x2af1c9(0xf7)](_0x3692f0=>[_0x3692f0[_0x2af1c9(0x10e)],_0x3692f0['alias']])),[_0x192d3c,_0x5b7129]=await Promise[_0x2af1c9(0x10b)]([listBffScripts(_0x58397b['appCode']),getBffScriptStatistics(_0x58397b['appCode'])]),_0x587419=createHookLocationMap(_0x5b7129),_0x3e12d6=new Set(_0x4bd572[_0x2af1c9(0xf7)](_0x20e2a2=>_0x20e2a2['lockKey']));for(const _0x210efb of _0x192d3c){const _0x2b4853=resolveRemoteScriptTarget(_0x594e9f,_0x210efb,_0x587419,_0x4b9436['functions'],_0x4d55a7);_0x2b4853&&!_0x3e12d6[_0x2af1c9(0xf5)](_0x2b4853['lockKey'])&&_0x29c63f['push'](_0x2b4853['lockKey']);}}const _0xab5f95=_0x40eb4c['length']===0x0&&_0x534170[_0x2af1c9(0xf3)]===0x0&&_0x29c63f[_0x2af1c9(0xf3)]===0x0;return{'ok':!![],'data':{'added':_0x40eb4c,'modified':_0x534170,'unchanged':_0x7c27a3,'remoteOnly':_0x29c63f},'message':_0xab5f95?_0x2af1c9(0x111):_0x40eb4c[_0x2af1c9(0xf3)]+_0x2af1c9(0xf8)+_0x534170[_0x2af1c9(0xf3)]+_0x2af1c9(0x110)+_0x7c27a3[_0x2af1c9(0xf3)]+_0x2af1c9(0x102)+(_0x29c63f[_0x2af1c9(0xf3)]>0x0?',\x20'+_0x29c63f[_0x2af1c9(0xf3)]+_0x2af1c9(0xfb):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x1efc(){const _0x4d9526=['inherit','2010306PkURHL','read','apiError','576279hTzDWH','\x20via\x20skills@latest','1756263xmbYBk','CLI\x20Built-in\x20Skill\x20','88dFDBlk','10STujrL','error','repairCommand','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','\x20installed','cli-skill','installedPath','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','\x20at\x20','skillVersion','969160gmZSqT','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','log',']:\x20','\x20is\x20already\x20current','3813754BVVprL','626233aBijtf','info','496496ioxDTm'];a46_0x1efc=function(){return _0x4d9526;};return a46_0x1efc();}const a46_0xa3a594=a46_0x2c1a;function a46_0x2c1a(_0x1db1b5,_0xc890f5){_0x1db1b5=_0x1db1b5-0x169;const _0x1efc71=a46_0x1efc();let _0x2c1a42=_0x1efc71[_0x1db1b5];return _0x2c1a42;}(function(_0x58e954,_0x3368e0){const _0x88a1f9=a46_0x2c1a,_0x27fad5=_0x58e954();while(!![]){try{const _0x2df87d=-parseInt(_0x88a1f9(0x170))/0x1+-parseInt(_0x88a1f9(0x16a))/0x2+-parseInt(_0x88a1f9(0x179))/0x3+parseInt(_0x88a1f9(0x172))/0x4+parseInt(_0x88a1f9(0x17c))/0x5*(parseInt(_0x88a1f9(0x174))/0x6)+parseInt(_0x88a1f9(0x16f))/0x7+parseInt(_0x88a1f9(0x17b))/0x8*(parseInt(_0x88a1f9(0x177))/0x9);if(_0x2df87d===_0x3368e0)break;else _0x27fad5['push'](_0x27fad5['shift']());}catch(_0x2c4ad3){_0x27fad5['push'](_0x27fad5['shift']());}}}(a46_0x1efc,0x54c13));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0xa3a594(0x181),'command':'install','description':a46_0xa3a594(0x17f),'risk':a46_0xa3a594(0x175),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x569e7d){const _0x100cd9=a46_0xa3a594;logger['setLogPath'](process['cwd']()),logger[_0x100cd9(0x171)]('cli-skill-install',_0x100cd9(0x16b));const _0x47b7af=installBuiltinSkill({'stdio':_0x569e7d['nonInteractive']?'pipe':_0x100cd9(0x173)});if(!_0x47b7af['ok'])throw CliErrors[_0x100cd9(0x176)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x47b7af['code']+_0x100cd9(0x16d)+(_0x47b7af[_0x100cd9(0x17d)]||'unknown'),_0x100cd9(0x183)+_0x47b7af[_0x100cd9(0x17e)]);return console[_0x100cd9(0x16c)](_0x47b7af['changed']?_0x100cd9(0x17a)+_0x47b7af[_0x100cd9(0x169)]+_0x100cd9(0x180)+(_0x47b7af[_0x100cd9(0x182)]?_0x100cd9(0x184)+_0x47b7af[_0x100cd9(0x182)]:_0x100cd9(0x178)):_0x100cd9(0x17a)+_0x47b7af[_0x100cd9(0x169)]+_0x100cd9(0x16e)+(_0x47b7af['installedPath']?'\x20at\x20'+_0x47b7af['installedPath']:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x5e5602=a47_0x5698;(function(_0x31072c,_0x4c04f1){const _0x103119=a47_0x5698,_0x89de62=_0x31072c();while(!![]){try{const _0x323a61=parseInt(_0x103119(0x172))/0x1+-parseInt(_0x103119(0x173))/0x2*(parseInt(_0x103119(0x16d))/0x3)+parseInt(_0x103119(0x151))/0x4*(-parseInt(_0x103119(0x14f))/0x5)+parseInt(_0x103119(0x175))/0x6*(-parseInt(_0x103119(0x15d))/0x7)+-parseInt(_0x103119(0x15a))/0x8*(parseInt(_0x103119(0x12e))/0x9)+-parseInt(_0x103119(0x186))/0xa*(parseInt(_0x103119(0x133))/0xb)+parseInt(_0x103119(0x145))/0xc;if(_0x323a61===_0x4c04f1)break;else _0x89de62['push'](_0x89de62['shift']());}catch(_0xf81147){_0x89de62['push'](_0x89de62['shift']());}}}(a47_0x1089,0x6c01e));import a47_0x3a78e2 from'chalk';import a47_0x5bfb24 from'ora';import a47_0x509566 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a47_0x5698(_0x34ce82,_0x5ef103){_0x34ce82=_0x34ce82-0x12e;const _0x1089ab=a47_0x1089();let _0x569899=_0x1089ab[_0x34ce82];return _0x569899;}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3d5958=a47_0x5698,_0x1e52d2=process[_0x3d5958(0x16a)]['toLowerCase']();if(_0x1e52d2['includes'](_0x3d5958(0x183)))return _0x3d5958(0x183);return _0x3d5958(0x154);}const updateFlags=[{'name':'beta','type':a47_0x5e5602(0x140),'description':a47_0x5e5602(0x132),'default':![]},{'name':a47_0x5e5602(0x185),'type':'string','description':a47_0x5e5602(0x144)}];function getRequestedVersion(_0x3cd15d){const _0x78531f=a47_0x5e5602;return _0x3cd15d['str']('version')[_0x78531f(0x150)]();}async function validateUpdateFlags(_0x43fb1f){const _0x40dda5=a47_0x5e5602,_0x121e29=_0x43fb1f[_0x40dda5(0x13e)](_0x40dda5(0x168)),_0x35036d=getRequestedVersion(_0x43fb1f);if(_0x121e29&&_0x35036d)throw CliErrors[_0x40dda5(0x187)](_0x40dda5(0x17c),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x35036d&&!a47_0x509566[_0x40dda5(0x177)](_0x35036d))throw CliErrors[_0x40dda5(0x187)](_0x40dda5(0x17b)+_0x35036d,_0x40dda5(0x148));}async function fetchNpmDistTags(){const _0x55c744=a47_0x5e5602;try{const _0x5dffa6=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x55c744(0x12f),{'signal':AbortSignal[_0x55c744(0x13d)](0x2710)});if(!_0x5dffa6['ok'])return null;const _0x40c9c4=await _0x5dffa6[_0x55c744(0x167)]();if(!_0x40c9c4||typeof _0x40c9c4!==_0x55c744(0x134))return null;return Object[_0x55c744(0x152)](Object[_0x55c744(0x156)](_0x40c9c4)[_0x55c744(0x166)](([,_0x4f4e4f])=>typeof _0x4f4e4f===_0x55c744(0x179)&&_0x4f4e4f['trim']()['length']>0x0)[_0x55c744(0x158)](([_0x4c2440,_0x4327f9])=>[_0x4c2440,String(_0x4327f9)[_0x55c744(0x150)]()]));}catch{return null;}}function a47_0x1089(){const _0x337ac2=['fail',',\x20then\x20verify\x20with:\x20','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','source','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','timeout','bool','Checking\x20CLI\x20Built-in\x20Skill...','boolean','\x20install\x20-g\x20','current','Updating\x20via\x20','Install\x20a\x20specific\x20CLI\x20version','29008884WIYyiu','info','update','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','apiError','Try\x20manually:\x20npm\x20install\x20-g\x20','Try\x20manually:\x20','latest','gray','Requested\x20version:\x20','82565xJjcPE','trim','4ubJNmQ','fromEntries','Checking\x20for\x20updates...','npm','start','entries','Beta\x20version:\x20','map','expected\x20','1624zrbzeD','\x20doctor','Version\x20comparison\x20failed','7bvxOKY','message',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','run','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Current\x20version:\x20',']:\x20','state','unknown','filter','json','beta','Updated\x20to\x20v','execPath','Update\x20available:\x20','Update\x20failed','15LmbFgB','error','\x20→\x20','...','yellow','548373vvQBST','202418lTACPo','succeed','3597462PJWpMy','code','valid','log','string','green','Invalid\x20version:\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20is\x20up\x20to\x20date.','repairCommand','skillVersion',',\x20state\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','\x20update\x20--version\x20<version>','bun','\x20\x20CLI\x20Built-in\x20Skill\x20','version','11140pBVGdL','validation','pipe','Run:\x20','36837kGziPs','/dist-tags','install','Update\x20failed:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','5632XFXxBM','object','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm'];a47_0x1089=function(){return _0x337ac2;};return a47_0x1089();}async function fetchNpmDistTagVersion(_0x3fcc48){const _0x555933=await fetchNpmDistTags();return _0x555933?.[_0x3fcc48]??null;}async function fetchLatestVersion(){const _0x5455ff=a47_0x5e5602;return fetchNpmDistTagVersion(_0x5455ff(0x14c));}async function resolveTargetVersion(_0x26f23e){const _0x1be0f7=a47_0x5e5602,_0xb7237f=getRequestedVersion(_0x26f23e);if(_0xb7237f)return{'version':_0xb7237f,'source':_0x1be0f7(0x185)};if(_0x26f23e[_0x1be0f7(0x13e)](_0x1be0f7(0x168))){const _0x313e64=await fetchNpmDistTagVersion('beta');if(!_0x313e64)return null;return{'version':_0x313e64,'source':'beta'};}const _0x11dd09=await fetchLatestVersion();if(!_0x11dd09)return null;return{'version':_0x11dd09,'source':_0x1be0f7(0x14c)};}function shouldInstallTarget(_0x13366f,_0x1dcd4c){const _0x460100=a47_0x5e5602;if(_0x1dcd4c['source']==='version'||_0x1dcd4c['source']===_0x460100(0x168))return!a47_0x509566['eq'](_0x13366f,_0x1dcd4c[_0x460100(0x185)]);return a47_0x509566['lt'](_0x13366f,_0x1dcd4c[_0x460100(0x185)]);}function getInstallPlanLabel(_0x4f5765,_0x5255a6){const _0x342a94=a47_0x5e5602;switch(_0x5255a6[_0x342a94(0x13b)]){case _0x342a94(0x168):return _0x342a94(0x157)+a47_0x3a78e2['yellow'](_0x4f5765)+_0x342a94(0x16f)+a47_0x3a78e2[_0x342a94(0x17a)](_0x5255a6[_0x342a94(0x185)]);case _0x342a94(0x185):return _0x342a94(0x14e)+a47_0x3a78e2[_0x342a94(0x171)](_0x4f5765)+_0x342a94(0x16f)+a47_0x3a78e2[_0x342a94(0x17a)](_0x5255a6['version']);case'latest':default:return _0x342a94(0x16b)+a47_0x3a78e2[_0x342a94(0x171)](_0x4f5765)+_0x342a94(0x16f)+a47_0x3a78e2[_0x342a94(0x17a)](_0x5255a6[_0x342a94(0x185)]);}}function repairCurrentBuiltinSkill(){const _0x4638c4=a47_0x5e5602;console['log'](a47_0x3a78e2[_0x4638c4(0x14d)](_0x4638c4(0x13f)));const _0x18dfa5=installBuiltinSkill();if(_0x18dfa5['ok']){console[_0x4638c4(0x178)](a47_0x3a78e2[_0x4638c4(0x14d)](_0x4638c4(0x184)+_0x18dfa5[_0x4638c4(0x17f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x4638c4(0x149)](_0x4638c4(0x136)+_0x18dfa5[_0x4638c4(0x176)]+_0x4638c4(0x163)+(_0x18dfa5[_0x4638c4(0x16e)]||_0x4638c4(0x165)),_0x4638c4(0x189)+_0x18dfa5[_0x4638c4(0x17e)]+_0x4638c4(0x139)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0xe84675){const _0x175d92=a47_0x5e5602,_0x2fe177=inspectInstalledBuiltinSkillVersion(_0xe84675);if(_0x2fe177[_0x175d92(0x164)]===_0x175d92(0x142)){console['log'](a47_0x3a78e2[_0x175d92(0x14d)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0xe84675+_0x175d92(0x17d)));return;}const _0x517dcb=_0x2fe177[_0x175d92(0x17f)]?_0x175d92(0x159)+_0xe84675+',\x20found\x20'+_0x2fe177[_0x175d92(0x17f)]:_0x175d92(0x159)+_0xe84675+_0x175d92(0x180)+_0x2fe177[_0x175d92(0x164)];throw CliErrors[_0x175d92(0x149)]('CLI\x20updated\x20to\x20v'+_0xe84675+_0x175d92(0x15f)+_0x517dcb,_0x175d92(0x189)+_0x2fe177[_0x175d92(0x17e)]+_0x175d92(0x139)+CLI_BIN_NAME+_0x175d92(0x15b));}async function execute(_0x3029a6){const _0x2f12c9=a47_0x5e5602;await validateUpdateFlags(_0x3029a6);const _0x528308=getCurrentVersion();console['log'](_0x2f12c9(0x162)+_0x528308);const _0x586252=a47_0x5bfb24(_0x2f12c9(0x153))[_0x2f12c9(0x155)](),_0x131e73=await resolveTargetVersion(_0x3029a6);if(!_0x131e73){const _0x94e49d=_0x3029a6[_0x2f12c9(0x13e)](_0x2f12c9(0x168))?_0x2f12c9(0x137):_0x2f12c9(0x135);_0x586252[_0x2f12c9(0x138)](_0x94e49d);throw CliErrors[_0x2f12c9(0x149)](_0x94e49d,_0x2f12c9(0x14a)+NPM_PACKAGE_NAME+'@'+(_0x3029a6[_0x2f12c9(0x13e)](_0x2f12c9(0x168))?_0x2f12c9(0x168):_0x2f12c9(0x14c)));}const _0x24cf0a=a47_0x509566[_0x2f12c9(0x177)](VERSION),_0x217f0d=a47_0x509566[_0x2f12c9(0x177)](_0x131e73[_0x2f12c9(0x185)]);if(!_0x24cf0a||!_0x217f0d){_0x586252['fail'](_0x2f12c9(0x15c));throw CliErrors[_0x2f12c9(0x149)](_0x2f12c9(0x15c),_0x2f12c9(0x13a)+CLI_BIN_NAME+_0x2f12c9(0x182));}if(!shouldInstallTarget(_0x24cf0a,_0x131e73)){const _0x42db08=_0x131e73[_0x2f12c9(0x13b)]===_0x2f12c9(0x185)?'Already\x20on\x20requested\x20version\x20(v'+_0x131e73[_0x2f12c9(0x185)]+')':a47_0x509566['gt'](_0x24cf0a,_0x217f0d)?'Current\x20version\x20v'+_0x528308+_0x2f12c9(0x181)+_0x131e73[_0x2f12c9(0x185)]:'Already\x20up\x20to\x20date\x20(v'+_0x131e73[_0x2f12c9(0x185)]+')';return _0x586252[_0x2f12c9(0x174)](_0x42db08),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x586252[_0x2f12c9(0x146)](getInstallPlanLabel(_0x528308,_0x131e73));const _0x2b7921=detectPackageManager(),_0x43cf3d=_0x2b7921===_0x2f12c9(0x154)?resolveNpmBin('npm'):_0x2b7921,_0x4b3b7d=a47_0x5bfb24(_0x2f12c9(0x143)+_0x2b7921+_0x2f12c9(0x170))['start']();try{await execa(_0x43cf3d,[_0x2f12c9(0x130),'-g',NPM_PACKAGE_NAME+'@'+_0x131e73[_0x2f12c9(0x185)]],{'stdio':_0x2f12c9(0x188)}),_0x4b3b7d[_0x2f12c9(0x174)](_0x2f12c9(0x169)+_0x131e73['version']),console['log'](a47_0x3a78e2[_0x2f12c9(0x14d)](_0x2f12c9(0x13c)));}catch(_0x2f18af){_0x4b3b7d[_0x2f12c9(0x138)](_0x2f12c9(0x16c));throw CliErrors['apiError'](_0x2f12c9(0x131)+(_0x2f18af instanceof Error?_0x2f18af[_0x2f12c9(0x15e)]:String(_0x2f18af)),_0x2f12c9(0x14b)+_0x2b7921+_0x2f12c9(0x141)+NPM_PACKAGE_NAME+'@'+_0x131e73[_0x2f12c9(0x185)]);}return verifyUpdatedBuiltinSkill(_0x131e73['version']),{'ok':!![]};}export const updateDefinition={'service':a47_0x5e5602(0x147),'command':a47_0x5e5602(0x160),'description':a47_0x5e5602(0x161),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x5bb842=a47_0x107d;(function(_0x3e79cb,_0x23ea10){const _0x5be222=a47_0x107d,_0x1d64a9=_0x3e79cb();while(!![]){try{const _0x2160bb=parseInt(_0x5be222(0xf7))/0x1+parseInt(_0x5be222(0xeb))/0x2*(parseInt(_0x5be222(0xb1))/0x3)+-parseInt(_0x5be222(0xed))/0x4+-parseInt(_0x5be222(0xba))/0x5+-parseInt(_0x5be222(0xe8))/0x6*(parseInt(_0x5be222(0xf1))/0x7)+parseInt(_0x5be222(0xad))/0x8+parseInt(_0x5be222(0xc8))/0x9;if(_0x2160bb===_0x23ea10)break;else _0x1d64a9['push'](_0x1d64a9['shift']());}catch(_0x438460){_0x1d64a9['push'](_0x1d64a9['shift']());}}}(a47_0xf05d,0x495fe));import a47_0x378bf7 from'chalk';import a47_0xf35b70 from'ora';import a47_0x353f3f from'semver';import{execa}from'execa';function a47_0x107d(_0x47ccbe,_0x2c5152){_0x47ccbe=_0x47ccbe-0xac;const _0xf05d67=a47_0xf05d();let _0x107d2a=_0xf05d67[_0x47ccbe];return _0x107d2a;}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 _0xea799e=a47_0x107d;return GIT_COMMIT!==_0xea799e(0xdb)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xea799e(0xb7)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5c6c72=a47_0x107d,_0x57f798=process['execPath'][_0x5c6c72(0xc6)]();if(_0x57f798['includes']('bun'))return'bun';return _0x5c6c72(0xbf);}const updateFlags=[{'name':'beta','type':a47_0x5bb842(0xe0),'description':a47_0x5bb842(0xb9),'default':![]},{'name':a47_0x5bb842(0xdd),'type':a47_0x5bb842(0xb6),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x9241d5){const _0x4bc17b=a47_0x5bb842;return _0x9241d5[_0x4bc17b(0x100)](_0x4bc17b(0xdd))[_0x4bc17b(0xe9)]();}function a47_0xf05d(){const _0x361814=['Try\x20manually:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','source','Run:\x20','expected\x20','state','/dist-tags','Current\x20version:\x20',',\x20then\x20verify\x20with:\x20','beta','unknown','Update\x20failed','version','start','valid','boolean','repairCommand',',\x20state\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','read','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','object','1223058FIbCAI','trim','Beta\x20version:\x20','186qaVulK','fail','418996cwcdjk','\x20doctor','message','run','7zwVwnS','Already\x20on\x20requested\x20version\x20(v','\x20→\x20','Update\x20available:\x20','json','Requested\x20version:\x20','306549GFULoI','current','Try\x20manually:\x20npm\x20install\x20-g\x20','map','\x20update\x20--version\x20<version>','CLI\x20updated\x20to\x20v','bool','length','Updating\x20via\x20','str','validation','skillVersion','272624GKWcSN','pipe','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','filter','3447rCvIuN','update','Checking\x20for\x20updates...','green','Invalid\x20version:\x20','string','slice','\x20install\x20-g\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','1433920BAuhSN','\x20is\x20newer\x20than\x20npm\x20latest\x20v','yellow','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','code','npm','succeed','...','https://registry.npmjs.org/-/package/','error','latest','\x20\x20CLI\x20Built-in\x20Skill\x20','toLowerCase','Already\x20up\x20to\x20date\x20(v','4035906cptpAc','log','apiError','gray','timeout',',\x20found\x20','Updated\x20to\x20v','Version\x20comparison\x20failed','\x20is\x20up\x20to\x20date.'];a47_0xf05d=function(){return _0x361814;};return a47_0xf05d();}async function validateUpdateFlags(_0x409ba7){const _0x270042=a47_0x5bb842,_0x45e429=_0x409ba7[_0x270042(0xfd)](_0x270042(0xda)),_0x3b50eb=getRequestedVersion(_0x409ba7);if(_0x45e429&&_0x3b50eb)throw CliErrors['validation'](_0x270042(0xe6),_0x270042(0xbd));if(_0x3b50eb&&!a47_0x353f3f[_0x270042(0xdf)](_0x3b50eb))throw CliErrors[_0x270042(0x101)](_0x270042(0xb5)+_0x3b50eb,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x478dd0=a47_0x5bb842;try{const _0x574525=await fetch(_0x478dd0(0xc2)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x478dd0(0xd7),{'signal':AbortSignal[_0x478dd0(0xcc)](0x2710)});if(!_0x574525['ok'])return null;const _0x3514d2=await _0x574525[_0x478dd0(0xf5)]();if(!_0x3514d2||typeof _0x3514d2!==_0x478dd0(0xe7))return null;return Object['fromEntries'](Object['entries'](_0x3514d2)[_0x478dd0(0xb0)](([,_0x312e0a])=>typeof _0x312e0a===_0x478dd0(0xb6)&&_0x312e0a['trim']()[_0x478dd0(0xfe)]>0x0)[_0x478dd0(0xfa)](([_0x4e8de,_0x2dc194])=>[_0x4e8de,String(_0x2dc194)[_0x478dd0(0xe9)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x589d90){const _0x21dbc2=await fetchNpmDistTags();return _0x21dbc2?.[_0x589d90]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x1e90ea){const _0x4a2615=a47_0x5bb842,_0x24dcde=getRequestedVersion(_0x1e90ea);if(_0x24dcde)return{'version':_0x24dcde,'source':_0x4a2615(0xdd)};if(_0x1e90ea[_0x4a2615(0xfd)](_0x4a2615(0xda))){const _0x97a04a=await fetchNpmDistTagVersion(_0x4a2615(0xda));if(!_0x97a04a)return null;return{'version':_0x97a04a,'source':_0x4a2615(0xda)};}const _0x1db257=await fetchLatestVersion();if(!_0x1db257)return null;return{'version':_0x1db257,'source':_0x4a2615(0xc4)};}function shouldInstallTarget(_0x111c93,_0x1940be){const _0xa90901=a47_0x5bb842;if(_0x1940be[_0xa90901(0xd3)]===_0xa90901(0xdd)||_0x1940be[_0xa90901(0xd3)]==='beta')return!a47_0x353f3f['eq'](_0x111c93,_0x1940be[_0xa90901(0xdd)]);return a47_0x353f3f['lt'](_0x111c93,_0x1940be[_0xa90901(0xdd)]);}function getInstallPlanLabel(_0xca0e0f,_0x105160){const _0x303131=a47_0x5bb842;switch(_0x105160['source']){case _0x303131(0xda):return _0x303131(0xea)+a47_0x378bf7[_0x303131(0xbc)](_0xca0e0f)+'\x20→\x20'+a47_0x378bf7[_0x303131(0xb4)](_0x105160[_0x303131(0xdd)]);case'version':return _0x303131(0xf6)+a47_0x378bf7[_0x303131(0xbc)](_0xca0e0f)+_0x303131(0xf3)+a47_0x378bf7['green'](_0x105160['version']);case _0x303131(0xc4):default:return _0x303131(0xf4)+a47_0x378bf7[_0x303131(0xbc)](_0xca0e0f)+'\x20→\x20'+a47_0x378bf7['green'](_0x105160[_0x303131(0xdd)]);}}function repairCurrentBuiltinSkill(){const _0x58eec5=a47_0x5bb842;console[_0x58eec5(0xc9)](a47_0x378bf7[_0x58eec5(0xcb)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x581ad7=installBuiltinSkill();if(_0x581ad7['ok']){console['log'](a47_0x378bf7[_0x58eec5(0xcb)](_0x58eec5(0xc5)+_0x581ad7[_0x58eec5(0xac)]+_0x58eec5(0xd0)));return;}throw CliErrors[_0x58eec5(0xca)](_0x58eec5(0xe3)+_0x581ad7[_0x58eec5(0xbe)]+']:\x20'+(_0x581ad7[_0x58eec5(0xc3)]||'unknown'),_0x58eec5(0xd4)+_0x581ad7[_0x58eec5(0xe1)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x58eec5(0xee));}function verifyUpdatedBuiltinSkill(_0x37fba0){const _0x32f171=a47_0x5bb842,_0x42476e=inspectInstalledBuiltinSkillVersion(_0x37fba0);if(_0x42476e[_0x32f171(0xd6)]===_0x32f171(0xf8)){console['log'](a47_0x378bf7[_0x32f171(0xcb)](_0x32f171(0xc5)+_0x37fba0+_0x32f171(0xd0)));return;}const _0x183b5b=_0x42476e[_0x32f171(0xac)]?_0x32f171(0xd5)+_0x37fba0+_0x32f171(0xcd)+_0x42476e[_0x32f171(0xac)]:_0x32f171(0xd5)+_0x37fba0+_0x32f171(0xe2)+_0x42476e[_0x32f171(0xd6)];throw CliErrors['apiError'](_0x32f171(0xfc)+_0x37fba0+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x183b5b,'Run:\x20'+_0x42476e['repairCommand']+_0x32f171(0xd9)+CLI_BIN_NAME+_0x32f171(0xee));}async function execute(_0x316267){const _0x6939a4=a47_0x5bb842;await validateUpdateFlags(_0x316267);const _0x289679=getCurrentVersion();console[_0x6939a4(0xc9)](_0x6939a4(0xd8)+_0x289679);const _0x4aab4c=a47_0xf35b70(_0x6939a4(0xb3))['start'](),_0xd1855=await resolveTargetVersion(_0x316267);if(!_0xd1855){const _0x4bac05=_0x316267[_0x6939a4(0xfd)](_0x6939a4(0xda))?_0x6939a4(0xd2):_0x6939a4(0xe5);_0x4aab4c[_0x6939a4(0xec)](_0x4bac05);throw CliErrors[_0x6939a4(0xca)](_0x4bac05,_0x6939a4(0xf9)+NPM_PACKAGE_NAME+'@'+(_0x316267[_0x6939a4(0xfd)](_0x6939a4(0xda))?_0x6939a4(0xda):_0x6939a4(0xc4)));}const _0x2cc82c=a47_0x353f3f[_0x6939a4(0xdf)](VERSION),_0x4cbffd=a47_0x353f3f['valid'](_0xd1855[_0x6939a4(0xdd)]);if(!_0x2cc82c||!_0x4cbffd){_0x4aab4c[_0x6939a4(0xec)](_0x6939a4(0xcf));throw CliErrors[_0x6939a4(0xca)]('Version\x20comparison\x20failed','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20'+CLI_BIN_NAME+_0x6939a4(0xfb));}if(!shouldInstallTarget(_0x2cc82c,_0xd1855)){const _0x19517f=_0xd1855[_0x6939a4(0xd3)]===_0x6939a4(0xdd)?_0x6939a4(0xf2)+_0xd1855[_0x6939a4(0xdd)]+')':a47_0x353f3f['gt'](_0x2cc82c,_0x4cbffd)?'Current\x20version\x20v'+_0x289679+_0x6939a4(0xbb)+_0xd1855['version']:_0x6939a4(0xc7)+_0xd1855[_0x6939a4(0xdd)]+')';return _0x4aab4c[_0x6939a4(0xc0)](_0x19517f),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x4aab4c['info'](getInstallPlanLabel(_0x289679,_0xd1855));const _0x451be4=detectPackageManager(),_0x9920c1=_0x451be4===_0x6939a4(0xbf)?resolveNpmBin(_0x6939a4(0xbf)):_0x451be4,_0x33b9b6=a47_0xf35b70(_0x6939a4(0xff)+_0x451be4+_0x6939a4(0xc1))[_0x6939a4(0xde)]();try{await execa(_0x9920c1,['install','-g',NPM_PACKAGE_NAME+'@'+_0xd1855[_0x6939a4(0xdd)]],{'stdio':_0x6939a4(0xae)}),_0x33b9b6['succeed'](_0x6939a4(0xce)+_0xd1855[_0x6939a4(0xdd)]),console['log'](a47_0x378bf7[_0x6939a4(0xcb)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x5b0382){_0x33b9b6[_0x6939a4(0xec)](_0x6939a4(0xdc));throw CliErrors['apiError']('Update\x20failed:\x20'+(_0x5b0382 instanceof Error?_0x5b0382[_0x6939a4(0xef)]:String(_0x5b0382)),_0x6939a4(0xd1)+_0x451be4+_0x6939a4(0xb8)+NPM_PACKAGE_NAME+'@'+_0xd1855['version']);}return verifyUpdatedBuiltinSkill(_0xd1855[_0x6939a4(0xdd)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x5bb842(0xb2),'command':a47_0x5bb842(0xf0),'description':a47_0x5bb842(0xaf),'risk':a47_0x5bb842(0xe4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x3b56(_0x56492f,_0x40af5e){_0x56492f=_0x56492f-0xb6;const _0x46fd33=a48_0x46fd();let _0x3b56dc=_0x46fd33[_0x56492f];return _0x3b56dc;}(function(_0x5910fe,_0x10a2f5){const _0xe65b61=a48_0x3b56,_0x1c8bda=_0x5910fe();while(!![]){try{const _0x420c15=-parseInt(_0xe65b61(0xbb))/0x1*(parseInt(_0xe65b61(0xb8))/0x2)+parseInt(_0xe65b61(0xbe))/0x3*(-parseInt(_0xe65b61(0xbf))/0x4)+parseInt(_0xe65b61(0xb6))/0x5*(-parseInt(_0xe65b61(0xb9))/0x6)+-parseInt(_0xe65b61(0xba))/0x7*(-parseInt(_0xe65b61(0xc0))/0x8)+-parseInt(_0xe65b61(0xb7))/0x9*(-parseInt(_0xe65b61(0xc1))/0xa)+parseInt(_0xe65b61(0xbc))/0xb+parseInt(_0xe65b61(0xbd))/0xc;if(_0x420c15===_0x10a2f5)break;else _0x1c8bda['push'](_0x1c8bda['shift']());}catch(_0x3d197c){_0x1c8bda['push'](_0x1c8bda['shift']());}}}(a48_0x46fd,0x62166));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a48_0x46fd(){const _0x4e9c6a=['3094350ScqSZK','5jOzSpX','9PJVQhR','2QBWoNQ','2757912JRpUOj','252eAvhis','157159XxDynD','2546566YdsqpC','6766464ZXvfpN','16584YqwCmi','104tTAFKL','12776rizYuq'];a48_0x46fd=function(){return _0x4e9c6a;};return a48_0x46fd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x32ae(){const _0x340428=['read','9anpKIi','str','2QXufIB','bool','5856EtPIaw','1006192AaujNh','6969300djVdiv','code','tableName','boolean','operation','32VfysHS','appCode','72969kGYpZF','string','9306sASriK','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','911125wWFPem','38826jqGzWG','12851470vNOzkQ','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','1799zQJhaW','alias','sdk'];a49_0x32ae=function(){return _0x340428;};return a49_0x32ae();}const a49_0x543c25=a49_0x59c6;(function(_0x51d905,_0x1b6988){const _0x3922e4=a49_0x59c6,_0x25d29b=_0x51d905();while(!![]){try{const _0x11d116=-parseInt(_0x3922e4(0x16d))/0x1*(parseInt(_0x3922e4(0x177))/0x2)+parseInt(_0x3922e4(0x182))/0x3*(parseInt(_0x3922e4(0x180))/0x4)+parseInt(_0x3922e4(0x17b))/0x5+parseInt(_0x3922e4(0x16e))/0x6*(-parseInt(_0x3922e4(0x171))/0x7)+parseInt(_0x3922e4(0x17a))/0x8+parseInt(_0x3922e4(0x175))/0x9*(parseInt(_0x3922e4(0x16f))/0xa)+-parseInt(_0x3922e4(0x169))/0xb*(-parseInt(_0x3922e4(0x179))/0xc);if(_0x11d116===_0x1b6988)break;else _0x25d29b['push'](_0x25d29b['shift']());}catch(_0x875e42){_0x25d29b['push'](_0x25d29b['shift']());}}}(a49_0x32ae,0xcc999));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a49_0x59c6(_0xe19bbe,_0x1a5a0b){_0xe19bbe=_0xe19bbe-0x169;const _0x32aeae=a49_0x32ae();let _0x59c689=_0x32aeae[_0xe19bbe];return _0x59c689;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a49_0x543c25(0x173),'description':a49_0x543c25(0x170),'risk':a49_0x543c25(0x174),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x543c25(0x172),'type':a49_0x543c25(0x183),'description':a49_0x543c25(0x16b)},{'name':a49_0x543c25(0x17f),'type':a49_0x543c25(0x183),'required':!![],'description':a49_0x543c25(0x16c)},{'name':a49_0x543c25(0x16a),'type':a49_0x543c25(0x17e),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x132603){const _0x43e600=a49_0x543c25,{dataset:_0x2dd463,operation:_0x43fc8a}=await getOperationDetail(_0x132603[_0x43e600(0x181)],_0x132603[_0x43e600(0x176)](_0x43e600(0x17c)),_0x132603[_0x43e600(0x176)](_0x43e600(0x17f))),_0x20b792=generateSdkCode(_0x2dd463,_0x43fc8a,{'includeImports':!_0x132603[_0x43e600(0x178)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2dd463['name'],'code':_0x2dd463[_0x43e600(0x17c)],'tableName':_0x2dd463[_0x43e600(0x17d)]},'operation':_0x132603[_0x43e600(0x176)](_0x43e600(0x17f)),'code':_0x20b792}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a50_0x1e58f2=a50_0x49da;(function(_0x4453cf,_0x59c0f1){const _0x1da548=a50_0x49da,_0x5bf710=_0x4453cf();while(!![]){try{const _0x446d04=-parseInt(_0x1da548(0x118))/0x1*(parseInt(_0x1da548(0x10c))/0x2)+parseInt(_0x1da548(0x10a))/0x3+parseInt(_0x1da548(0x121))/0x4*(-parseInt(_0x1da548(0x112))/0x5)+-parseInt(_0x1da548(0x109))/0x6+-parseInt(_0x1da548(0x116))/0x7*(parseInt(_0x1da548(0x10f))/0x8)+-parseInt(_0x1da548(0x114))/0x9+parseInt(_0x1da548(0x113))/0xa*(parseInt(_0x1da548(0x10b))/0xb);if(_0x446d04===_0x59c0f1)break;else _0x5bf710['push'](_0x5bf710['shift']());}catch(_0x1c0665){_0x5bf710['push'](_0x5bf710['shift']());}}}(a50_0x1f21,0x39a85));function a50_0x49da(_0x270032,_0x2acc85){_0x270032=_0x270032-0x108;const _0x1f213b=a50_0x1f21();let _0x49da4f=_0x1f213b[_0x270032];return _0x49da4f;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a50_0x1f21(){const _0x114be1=['appCode','Omit\x20import\x20statements\x20from\x20generated\x20code','string','no-imports','sqlCode','67444Qscucs','sdk','387576jDbuML','1383276nGJrAB','7794875SRAzzc','146WkRGkN','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','boolean','152KHDMEm','bff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','55TnVeYz','10qbbdvE','3381543mTKtiA','read','50155LJJZdZ','codegen','2351oZxool','str','target','sqlcode'];a50_0x1f21=function(){return _0x114be1;};return a50_0x1f21();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a50_0x1e58f2(0x117),'command':'sql','description':a50_0x1e58f2(0x10d),'risk':a50_0x1e58f2(0x115),'flags':[SQLCODE_FLAG,{'name':'target','type':a50_0x1e58f2(0x11e),'description':a50_0x1e58f2(0x111),'default':a50_0x1e58f2(0x108),'enum':[a50_0x1e58f2(0x108),a50_0x1e58f2(0x110)]},{'name':a50_0x1e58f2(0x11f),'type':a50_0x1e58f2(0x10e),'description':a50_0x1e58f2(0x11d)}],async 'execute'(_0x406e3f){const _0x5a9a18=a50_0x1e58f2,_0x3673ab=await getSqlQueryInfo(_0x406e3f[_0x5a9a18(0x11c)],_0x406e3f[_0x5a9a18(0x119)](_0x5a9a18(0x11b))),_0x170431=_0x406e3f[_0x5a9a18(0x119)](_0x5a9a18(0x11a))||'sdk',_0x58b2f3=generateSqlCodeTemplate(_0x3673ab,{'target':_0x170431,'includeImports':!_0x406e3f['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x3673ab[_0x5a9a18(0x120)],'sqlName':_0x3673ab['sqlName'],'target':_0x170431,'code':_0x58b2f3}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1059a5,_0x2326c3){const _0x4e781b=a51_0x367a,_0x144e88=_0x1059a5();while(!![]){try{const _0xd3ba57=parseInt(_0x4e781b(0x11e))/0x1+parseInt(_0x4e781b(0x100))/0x2*(parseInt(_0x4e781b(0x117))/0x3)+parseInt(_0x4e781b(0x107))/0x4+-parseInt(_0x4e781b(0x11b))/0x5*(-parseInt(_0x4e781b(0x104))/0x6)+parseInt(_0x4e781b(0x125))/0x7*(parseInt(_0x4e781b(0x103))/0x8)+-parseInt(_0x4e781b(0x108))/0x9*(parseInt(_0x4e781b(0x10d))/0xa)+-parseInt(_0x4e781b(0x129))/0xb;if(_0xd3ba57===_0x2326c3)break;else _0x144e88['push'](_0x144e88['shift']());}catch(_0x2c51e9){_0x144e88['push'](_0x144e88['shift']());}}}(a51_0x150a,0xb67d6));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 _0x1494b5=a51_0x367a;return[{'name':'appcode','type':_0x1494b5(0x112),'description':_0x1494b5(0x128),'required':!![]},{'name':_0x1494b5(0x116),'type':_0x1494b5(0x11a),'description':_0x1494b5(0x11c),'default':![]},...getAppProfileFlagDefs()];}function a51_0x367a(_0x5752e6,_0x1a7e62){_0x5752e6=_0x5752e6-0x100;const _0x150ab2=a51_0x150a();let _0x367aa0=_0x150ab2[_0x5752e6];return _0x367aa0;}export function buildAppRemoveFlags(){const _0xcebb91=a51_0x367a;return[{'name':_0xcebb91(0x116),'type':_0xcebb91(0x11a),'description':'Use\x20global\x20config\x20scope','default':![]}];}function a51_0x150a(){const _0x4f2023=['apps','329791uxauxT','\x22\x20not\x20found.','appcode','App\x20code','28233315eKniaZ','length','args','2DPrmCH','Usage:\x20','\x22\x20(appcode:\x20','16imXcNa','162QjqhvA','str','project','5256004EfEIYp','27MZBnYY','\x22\x20is\x20selected\x20automatically.','defaultApp','validation','\x20<name>\x20--appcode\x20<code>','2869450eHOgSt','\x20Note:\x20app\x20\x22','bool','trim','\x20<name>','string','\x20<name>\x20[--global]','App\x20\x22','globalConfig','global','3290343JEPfUx','\x20Remaining\x20app\x20\x22','\x20Default\x20app\x20changed\x20to\x20\x22','boolean','59525hSOnpW','Use\x20global\x20config\x20scope','projectConfig','1348535hvSnee','keys','Updated','flagMissing','\x22\x20still\x20defined\x20in\x20','object'];a51_0x150a=function(){return _0x4f2023;};return a51_0x150a();}export async function validateAppName(_0x3ab488,_0x2bfe69){const _0x28cc32=a51_0x367a,_0x255154=_0x3ab488['args'][0x0]?.[_0x28cc32(0x110)]();if(!_0x255154)throw CliErrors[_0x28cc32(0x10b)]('Missing\x20app\x20name.',_0x28cc32(0x101)+CLI_BIN_NAME+'\x20'+_0x2bfe69+_0x28cc32(0x111));}export async function runAppAdd(_0x504da3,_0x59285b){const _0x2d94ba=a51_0x367a,_0xfe559a=_0x504da3[_0x2d94ba(0x12b)][0x0]?.[_0x2d94ba(0x110)]();if(!_0xfe559a)throw CliErrors[_0x2d94ba(0x10b)]('Missing\x20app\x20name.',_0x2d94ba(0x101)+CLI_BIN_NAME+'\x20'+_0x59285b+_0x2d94ba(0x10c));const _0x5a8c2d=_0x504da3['str'](_0x2d94ba(0x127));if(!_0x5a8c2d)throw CliErrors[_0x2d94ba(0x121)]('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x59285b+_0x2d94ba(0x10c));const _0x377a23={'global':_0x504da3[_0x2d94ba(0x10f)](_0x2d94ba(0x116))},_0x271da4=readConfig(_0x377a23);if(!_0x271da4[_0x2d94ba(0x124)])_0x271da4[_0x2d94ba(0x124)]={};const _0x224a4a={'appcode':_0x5a8c2d,...collectAppProfileOverrides(_0x3fe1b6=>_0x504da3[_0x2d94ba(0x105)](_0x3fe1b6))},_0x474632=_0x271da4[_0x2d94ba(0x124)],_0x48feb6=Object[_0x2d94ba(0x11f)](_0x474632),_0xd8e2b5=typeof _0x271da4[_0x2d94ba(0x10a)]===_0x2d94ba(0x112)&&_0x474632[_0x271da4[_0x2d94ba(0x10a)]]?_0x271da4['defaultApp']:_0x48feb6[_0x2d94ba(0x12a)]===0x1?_0x48feb6[0x0]:undefined,_0x414874=!!_0x474632[_0xfe559a];_0x474632[_0xfe559a]=_0x224a4a;const _0x12abfd=normalizeStoredDefaultApp(_0x271da4,_0xd8e2b5);writeConfig(_0x271da4,_0x377a23);const _0x116f25=!_0x414874&&_0x12abfd?'\x20Default\x20app\x20is\x20\x22'+_0x12abfd+'\x22.':'',_0x1512f5=(_0x414874?_0x2d94ba(0x120):'Added')+'\x20app\x20\x22'+_0xfe559a+_0x2d94ba(0x102)+_0x5a8c2d+')'+scopeLabel(_0x377a23)+'.'+_0x116f25;return{'ok':!![],'message':_0x1512f5};}export async function runAppRemove(_0x1bcb01,_0x574a43){const _0x2658ca=a51_0x367a,_0x1a4737=_0x1bcb01[_0x2658ca(0x12b)][0x0]?.[_0x2658ca(0x110)]();if(!_0x1a4737)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x574a43+_0x2658ca(0x113));const _0x2b09b5=_0x1bcb01[_0x2658ca(0x10f)]('global'),{config:_0x426c63,layers:_0xdbad76}=readRawConfigWithLayers(),_0x1684ec=_0x426c63[_0x2658ca(0x124)]??{};if(!_0x1684ec[_0x1a4737])throw CliErrors[_0x2658ca(0x10b)](_0x2658ca(0x114)+_0x1a4737+_0x2658ca(0x126));const _0x40a9ce=_0xdbad76[_0x2658ca(0x115)]['apps']&&typeof _0xdbad76[_0x2658ca(0x115)][_0x2658ca(0x124)]===_0x2658ca(0x123)?_0xdbad76[_0x2658ca(0x115)][_0x2658ca(0x124)]:{},_0x53ee2d=_0xdbad76[_0x2658ca(0x11d)][_0x2658ca(0x124)]&&typeof _0xdbad76[_0x2658ca(0x11d)][_0x2658ca(0x124)]===_0x2658ca(0x123)?_0xdbad76[_0x2658ca(0x11d)][_0x2658ca(0x124)]:{},_0x788ccf=appDefinedIn(_0x1a4737,_0x40a9ce,_0x53ee2d),_0x31e077=resolveAppScopeForWrite(_0x1a4737,_0x2b09b5,_0xdbad76),_0x262067={'global':_0x31e077===_0x2658ca(0x116)},_0x53655a=readConfig(_0x262067),_0x452ace=_0x53655a[_0x2658ca(0x124)];if(!_0x452ace||!_0x452ace[_0x1a4737])throw CliErrors[_0x2658ca(0x10b)](_0x2658ca(0x114)+_0x1a4737+_0x2658ca(0x126));delete _0x452ace[_0x1a4737];let _0x11c297='';const _0x4b3ae2=typeof _0x53655a[_0x2658ca(0x10a)]===_0x2658ca(0x112)?_0x53655a[_0x2658ca(0x10a)]:undefined,_0x25ab58=Object[_0x2658ca(0x11f)](_0x452ace),_0x594eaa=_0x4b3ae2===_0x1a4737?_0x25ab58[0x0]:_0x4b3ae2,_0xa3ab0f=normalizeStoredDefaultApp(_0x53655a,_0x594eaa);if(_0x4b3ae2===_0x1a4737&&_0x25ab58[_0x2658ca(0x12a)]===0x1)_0x11c297=_0x2658ca(0x118)+_0x25ab58[0x0]+_0x2658ca(0x109);else _0x4b3ae2===_0x1a4737&&_0xa3ab0f&&(_0x11c297=_0x2658ca(0x119)+_0xa3ab0f+'\x22.');Object[_0x2658ca(0x11f)](_0x452ace)['length']===0x0&&(delete _0x53655a['apps'],delete _0x53655a[_0x2658ca(0x10a)]);writeConfig(_0x53655a,_0x262067);const _0x517714=_0x788ccf==='both'?_0x2658ca(0x10e)+_0x1a4737+_0x2658ca(0x122)+(_0x31e077==='project'?_0x2658ca(0x116):_0x2658ca(0x106))+'\x20config.':'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x1a4737+'\x22'+scopeLabel(_0x262067)+'.'+_0x11c297+_0x517714};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x800b2b,_0xf13666){const _0x47a074=a52_0x55fb,_0x245a79=_0x800b2b();while(!![]){try{const _0x498c67=-parseInt(_0x47a074(0xc0))/0x1+parseInt(_0x47a074(0xc1))/0x2+parseInt(_0x47a074(0xb1))/0x3*(parseInt(_0x47a074(0xb6))/0x4)+-parseInt(_0x47a074(0xc4))/0x5*(-parseInt(_0x47a074(0xc8))/0x6)+-parseInt(_0x47a074(0xb0))/0x7+-parseInt(_0x47a074(0xb9))/0x8+parseInt(_0x47a074(0xbc))/0x9;if(_0x498c67===_0xf13666)break;else _0x245a79['push'](_0x245a79['shift']());}catch(_0x21c2f2){_0x245a79['push'](_0x245a79['shift']());}}}(a52_0x5a15,0xe2884));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x548d01 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a52_0x55fb(_0x3694b4,_0x4c8c12){_0x3694b4=_0x3694b4-0xa7;const _0x5a1544=a52_0x5a15();let _0x55fb1f=_0x5a1544[_0x3694b4];return _0x55fb1f;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x23f4f2=a52_0x55fb,_0x54d5ac=await input({'message':'App\x20Code:','validate':_0x200711=>{const _0x5c8f18=a52_0x55fb,_0x35ea74=validateAppcode(_0x200711[_0x5c8f18(0xaf)]());return _0x35ea74[_0x5c8f18(0xc3)]||_0x35ea74[_0x5c8f18(0xb8)]||_0x5c8f18(0xb5);}});return _0x54d5ac[_0x23f4f2(0xaf)]();}export async function promptAppSelection(_0x160f56){const _0xac74e8=a52_0x55fb,_0x339991=[{'name':a52_0x548d01[_0xac74e8(0xc2)](_0xac74e8(0xac)),'value':-0x1},..._0x160f56[_0xac74e8(0xcb)]((_0x29656b,_0x269f2f)=>({'name':_0x29656b[_0xac74e8(0xca)]+'\x20\x20'+a52_0x548d01['gray']('('+_0x29656b[_0xac74e8(0xb3)]+')'),'value':_0x269f2f}))],_0x40fdf1=await checkbox({'message':_0xac74e8(0xa9)+a52_0x548d01[_0xac74e8(0xbe)](_0x160f56['length'])+_0xac74e8(0xc9),'choices':_0x339991,'loop':![]});if(_0x40fdf1[_0xac74e8(0xaa)](-0x1))return _0xac74e8(0xcc);if(_0x40fdf1[_0xac74e8(0xbd)]===0x0)return'custom';return _0x40fdf1[_0xac74e8(0xcb)](_0x45be76=>_0x160f56[_0x45be76]);}export async function promptSingleAppSelection(_0x4e4216){const _0xc7b3e9=a52_0x55fb,_0x42ba8e=[{'name':a52_0x548d01['gray'](_0xc7b3e9(0xa7)),'value':_0xc7b3e9(0xbb)},{'name':a52_0x548d01[_0xc7b3e9(0xc2)]('✎\x20Enter\x20appcode\x20manually'),'value':_0xc7b3e9(0xcc)},..._0x4e4216[_0xc7b3e9(0xcb)](_0x3f1207=>({'name':_0x3f1207[_0xc7b3e9(0xca)]+'\x20\x20'+a52_0x548d01['gray']('('+_0x3f1207[_0xc7b3e9(0xb3)]+')'),'value':_0x3f1207[_0xc7b3e9(0xb3)]}))],_0x55b40a=await select({'message':_0xc7b3e9(0xab),'choices':_0x42ba8e});if(_0x55b40a===_0xc7b3e9(0xbb))return _0xc7b3e9(0xbb);if(_0x55b40a===_0xc7b3e9(0xcc))return'custom';return _0x4e4216[_0xc7b3e9(0xb2)](_0x3add34=>_0x3add34[_0xc7b3e9(0xb3)]===_0x55b40a);}function a52_0x5a15(){const _0x3eeed2=['find','appCode','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','Invalid\x20App\x20Code','18092FOOfve','Fetching\x20available\x20apps...','message','10060440efUVlP','✎\x20Enter\x20manually','skip','20467098OPKizQ','length','cyan','App\x20Code:','1628723pluGJy','1208112dddmNR','yellow','valid','1037725XLzHUg','No\x20available\x20apps\x20found.','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','gray','12aSBAIB','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','appName','map','custom','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','Found\x20','includes','Select\x20the\x20app\x20to\x20bind:','✎\x20Enter\x20appcode\x20manually','\x20\x20(','manual','trim','3857455CFANex','711NUCORs'];a52_0x5a15=function(){return _0x3eeed2;};return a52_0x5a15();}export async function selectSingleAppcode(_0x142f6c){const _0x2a3fd6=a52_0x55fb;if(!_0x142f6c)return writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc7)](_0x2a3fd6(0xa8))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x15e614;try{_0x15e614=await withActiveCookie(_0x142f6c,()=>listRemoteApps());}catch(_0x533a8e){writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc2)](_0x2a3fd6(0xc6)));if(_0x533a8e instanceof Error)writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc7)]('\x20\x20('+_0x533a8e['message']+')'));return _fallbackOrSkip();}if(_0x15e614['length']===0x0)return writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc2)](_0x2a3fd6(0xc5))),_fallbackOrSkip();const _0x458b6c=await promptSingleAppSelection(_0x15e614);if(_0x458b6c===_0x2a3fd6(0xbb))return'';if(_0x458b6c===_0x2a3fd6(0xcc))return promptCustomAppcode();return _0x458b6c['appCode'];}export async function selectMultipleApps(_0x53de7e){const _0x42f056=a52_0x55fb;writeCliSideChannelLine(_0x42f056(0xb7));let _0x5a7d09;try{_0x5a7d09=await withActiveCookie(_0x53de7e,()=>listRemoteApps());}catch(_0x16dc2b){writeCliSideChannelLine(_0x42f056(0xb4));if(_0x16dc2b instanceof Error)writeCliSideChannelLine(_0x42f056(0xad)+_0x16dc2b[_0x42f056(0xb8)]+')');return _0x42f056(0xcc);}if(_0x5a7d09[_0x42f056(0xbd)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x42f056(0xcc);return promptAppSelection(_0x5a7d09);}async function _fallbackOrSkip(){const _0x5cf878=a52_0x55fb,_0x3ae390=await select({'message':_0x5cf878(0xbf),'choices':[{'name':a52_0x548d01['gray']('(Skip;\x20configure\x20later)'),'value':_0x5cf878(0xbb)},{'name':a52_0x548d01[_0x5cf878(0xc2)](_0x5cf878(0xba)),'value':_0x5cf878(0xae)}]});if(_0x3ae390===_0x5cf878(0xbb))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x37c8be=a53_0x471c;(function(_0x27358a,_0x4fffdb){const _0x2d7f71=a53_0x471c,_0x9063d8=_0x27358a();while(!![]){try{const _0x1d9abc=parseInt(_0x2d7f71(0x164))/0x1+parseInt(_0x2d7f71(0x16c))/0x2*(parseInt(_0x2d7f71(0x170))/0x3)+-parseInt(_0x2d7f71(0x15e))/0x4*(parseInt(_0x2d7f71(0x15d))/0x5)+parseInt(_0x2d7f71(0x16a))/0x6*(parseInt(_0x2d7f71(0x175))/0x7)+-parseInt(_0x2d7f71(0x171))/0x8*(-parseInt(_0x2d7f71(0x166))/0x9)+parseInt(_0x2d7f71(0x178))/0xa+-parseInt(_0x2d7f71(0x162))/0xb*(parseInt(_0x2d7f71(0x17c))/0xc);if(_0x1d9abc===_0x4fffdb)break;else _0x9063d8['push'](_0x9063d8['shift']());}catch(_0x3dc2c1){_0x9063d8['push'](_0x9063d8['shift']());}}}(a53_0x94a1,0xa6757));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x37c8be(0x17e),a53_0x37c8be(0x161)]),NON_TERMINAL_STATUSES=new Set([a53_0x37c8be(0x177),a53_0x37c8be(0x16b)]);export function normalizeAsyncTask(_0x3dcabe){const _0x3b7006=a53_0x37c8be,_0x55d3fc=typeof _0x3dcabe?.[_0x3b7006(0x17b)]==='string'?_0x3dcabe[_0x3b7006(0x17b)][_0x3b7006(0x16d)]():'';if(!_0x55d3fc)throw CliErrors[_0x3b7006(0x17d)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x22c7a2=typeof _0x3dcabe[_0x3b7006(0x160)]==='string'?_0x3dcabe[_0x3b7006(0x160)][_0x3b7006(0x16d)]()['toUpperCase']():'';if(!_0x22c7a2)throw CliErrors[_0x3b7006(0x17d)](_0x3b7006(0x167)+_0x55d3fc+_0x3b7006(0x17f));return{'taskId':_0x55d3fc,'status':_0x22c7a2,'errorMessage':typeof _0x3dcabe['errorMessage']==='string'&&_0x3dcabe['errorMessage'][_0x3b7006(0x16d)]()?_0x3dcabe[_0x3b7006(0x163)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x3b7006(0x15f)](_0x22c7a2),'knownStatus':TERMINAL_STATUSES[_0x3b7006(0x15f)](_0x22c7a2)||NON_TERMINAL_STATUSES[_0x3b7006(0x15f)](_0x22c7a2)};}export function buildAsyncTaskStatusCommand(_0x72af9c,_0x173683){const _0x28c369=a53_0x37c8be;return CLI_BIN_NAME+_0x28c369(0x179)+quoteShellArg(_0x72af9c)+_0x28c369(0x165)+quoteShellArg(_0x173683)+'\x20--format\x20compress';}function a53_0x471c(_0x3abd07,_0x106569){_0x3abd07=_0x3abd07-0x15d;const _0x94a15a=a53_0x94a1();let _0x471ccf=_0x94a15a[_0x3abd07];return _0x471ccf;}export function asyncTaskMessage(_0x29e8e8){const _0x3f3ee3=a53_0x37c8be;switch(_0x29e8e8['status']){case'PENDING':return _0x3f3ee3(0x168)+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x174);case _0x3f3ee3(0x16b):return'Task\x20'+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x176);case _0x3f3ee3(0x17e):return _0x3f3ee3(0x168)+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x172);case _0x3f3ee3(0x161):return _0x29e8e8[_0x3f3ee3(0x163)]?_0x3f3ee3(0x168)+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x173)+_0x29e8e8[_0x3f3ee3(0x163)]:'Task\x20'+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x16e);default:return'Task\x20'+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x16f)+_0x29e8e8[_0x3f3ee3(0x160)]+'.';}}function quoteShellArg(_0x4fcee7){const _0x4621aa=a53_0x37c8be;return'\x27'+_0x4fcee7[_0x4621aa(0x17a)](/'/g,_0x4621aa(0x169))+'\x27';}function a53_0x94a1(){const _0x186693=['\x20failed:\x20','\x20is\x20pending.','3066931PxjhxN','\x20is\x20processing.','PENDING','9024460eNtzGT','\x20task\x20status\x20--task-id\x20','replace','taskId','11709828AvKyQQ','apiError','SUCCESS','\x20response\x20did\x20not\x20contain\x20a\x20status.','6329515WlGURl','4aJZwie','has','status','FAILED','11ylklAI','errorMessage','1020116IilRyw','\x20--appcode\x20','32976ePTaNk','Async\x20task\x20','Task\x20','\x27\x5c\x27\x27','6bLGWux','PROCESSING','116WjnpxP','trim','\x20failed.','\x20returned\x20unknown\x20status\x20','12435bQqfEG','704QjVJUz','\x20completed\x20successfully.'];a53_0x94a1=function(){return _0x186693;};return a53_0x94a1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4eb665,_0x1e6bf9){var _0xc29be2=a54_0x2f90,_0x27035b=_0x4eb665();while(!![]){try{var _0x41fd58=parseInt(_0xc29be2(0x83))/0x1+parseInt(_0xc29be2(0x84))/0x2+-parseInt(_0xc29be2(0x82))/0x3+parseInt(_0xc29be2(0x8b))/0x4*(-parseInt(_0xc29be2(0x8c))/0x5)+-parseInt(_0xc29be2(0x7f))/0x6+-parseInt(_0xc29be2(0x8a))/0x7*(parseInt(_0xc29be2(0x86))/0x8)+-parseInt(_0xc29be2(0x80))/0x9*(-parseInt(_0xc29be2(0x89))/0xa);if(_0x41fd58===_0x1e6bf9)break;else _0x27035b['push'](_0x27035b['shift']());}catch(_0x15ab6a){_0x27035b['push'](_0x27035b['shift']());}}}(a54_0x4725,0xe0f57));function a54_0x2f90(_0x37f223,_0x5d2984){_0x37f223=_0x37f223-0x7f;var _0x472538=a54_0x4725();var _0x2f90eb=_0x472538[_0x37f223];return _0x2f90eb;}export function asDryRunResult(_0x22ebf3,_0x39e04a){var _0x15762e=a54_0x2f90;return Object[_0x15762e(0x85)](_0x22ebf3,{'method':{'value':_0x39e04a[_0x15762e(0x88)],'enumerable':![]},'url':{'value':_0x39e04a[_0x15762e(0x81)],'enumerable':![]},..._0x39e04a['description']?{'description':{'value':_0x39e04a[_0x15762e(0x87)],'enumerable':![]}}:{}});}function a54_0x4725(){var _0x3e3838=['description','method','881730ZeFmjJ','7hlVCTQ','4NuBhOf','3765035qrClMB','3291774efclbv','126DwygUB','url','1414554KscGAW','791119gqQzZF','3643606stxAAg','defineProperties','9222072AzLUoH'];a54_0x4725=function(){return _0x3e3838;};return a54_0x4725();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x284042=a55_0x5e6c;function a55_0xc85f(){const _0x4611a9=['1564668jzNkIg','2098302AgtvMO','9034970vUqLdb','2568105xbRFkp','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','MANY_TO_MANY','531055taNgFO','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','ONE_TO_MANY','2187258prOkjX','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','MYSQL','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','datasetcode','from-datasetcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','104eFUpUT','Source\x20DB_TABLE\x20dataset\x20code','15mEKSEA','Database\x20product\x20type','number','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','to-datasetcode','Write\x20to\x20the\x20global\x20configuration','from-column','global','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','string','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','ONE_TO_ONE','Target\x20field\x20name','MANY_TO_ONE','sqlcode','App\x20code\x20(e.g.\x20app-xxxxx)','skip-connection-test','788038NqVCix','appcode','Target\x20DB_TABLE\x20dataset\x20code','4IWsSBu','boolean'];a55_0xc85f=function(){return _0x4611a9;};return a55_0xc85f();}(function(_0x4a260a,_0x2fc4d2){const _0x122cbd=a55_0x5e6c,_0x2ffb07=_0x4a260a();while(!![]){try{const _0x4b3215=-parseInt(_0x122cbd(0x14d))/0x1+parseInt(_0x122cbd(0x152))/0x2+-parseInt(_0x122cbd(0x153))/0x3*(parseInt(_0x122cbd(0x150))/0x4)+parseInt(_0x122cbd(0x164))/0x5*(parseInt(_0x122cbd(0x15b))/0x6)+-parseInt(_0x122cbd(0x158))/0x7*(-parseInt(_0x122cbd(0x162))/0x8)+parseInt(_0x122cbd(0x155))/0x9+-parseInt(_0x122cbd(0x154))/0xa;if(_0x4b3215===_0x2fc4d2)break;else _0x2ffb07['push'](_0x2ffb07['shift']());}catch(_0x51e15d){_0x2ffb07['push'](_0x2ffb07['shift']());}}}(a55_0xc85f,0xb8b68));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x284042(0x160),'type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x163)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x284042(0x16a),'type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x156)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x284042(0x168),'type':'string','required':!![],'description':a55_0x284042(0x14f)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':'to-column','type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x170)};export const CROSS_RELATION_DBLINK_FLAG={'name':'from-dblink-id','type':'number','description':a55_0x284042(0x15e)};export const CROSS_RELATION_LABEL_FLAG={'name':'to-label-column','type':a55_0x284042(0x16d),'description':a55_0x284042(0x16e)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':'cardinality','type':'string','enum':[a55_0x284042(0x16f),a55_0x284042(0x15a),a55_0x284042(0x171),a55_0x284042(0x157)],'description':a55_0x284042(0x15c)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x284042(0x16b),'type':a55_0x284042(0x151),'default':![],'description':a55_0x284042(0x169)};function a55_0x5e6c(_0x205fe5,_0xde5541){_0x205fe5=_0x205fe5-0x14b;const _0xc85f3b=a55_0xc85f();let _0x5e6cd4=_0xc85f3b[_0x205fe5];return _0x5e6cd4;}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':'a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'};export const CODE_FLAG={'name':'code','type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x167),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x284042(0x15f),'description':a55_0x284042(0x167)};export const SQLCODE_FLAG={'name':a55_0x284042(0x172),'type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x161),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x284042(0x14e),'type':'string','required':![],'description':a55_0x284042(0x159)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x284042(0x14b)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x284042(0x166),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':'dbtype','type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x165),'enum':[a55_0x284042(0x15d),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x284042(0x14c),'type':a55_0x284042(0x151),'description':a55_0x284042(0x16c)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a56_0x4935(_0x2d0860,_0x42bce1){_0x2d0860=_0x2d0860-0x1af;const _0x50bd40=a56_0x50bd();let _0x493518=_0x50bd40[_0x2d0860];return _0x493518;}(function(_0x1d4a1b,_0x3a958c){const _0x38e724=a56_0x4935,_0x48dc75=_0x1d4a1b();while(!![]){try{const _0x1ffb04=-parseInt(_0x38e724(0x1b1))/0x1*(-parseInt(_0x38e724(0x1c0))/0x2)+parseInt(_0x38e724(0x1b8))/0x3+parseInt(_0x38e724(0x1b7))/0x4*(parseInt(_0x38e724(0x1b6))/0x5)+-parseInt(_0x38e724(0x1b0))/0x6+parseInt(_0x38e724(0x1ba))/0x7+-parseInt(_0x38e724(0x1bd))/0x8*(parseInt(_0x38e724(0x1b3))/0x9)+-parseInt(_0x38e724(0x1b5))/0xa;if(_0x1ffb04===_0x3a958c)break;else _0x48dc75['push'](_0x48dc75['shift']());}catch(_0x5e877e){_0x48dc75['push'](_0x48dc75['shift']());}}}(a56_0x50bd,0xe7812));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x50bd(){const _0x3eb8a1=['toFixed','9441775vTFjxT','isFile','\x20path\x20is\x20required.','2504yhXyFX','size','trim','1294ZGqpsi','validation','File\x20not\x20found:\x20','11146728yNulss','837mcPtFM','\x20MB','7695XDvnsS','File\x20is\x20not\x20a\x20regular\x20file:\x20','5373410tjwpml','471995SUIYWN','28zgEyUl','3179487VCMEal'];a56_0x50bd=function(){return _0x3eb8a1;};return a56_0x50bd();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x58d653){const _0x2ae2eb=a56_0x4935;if(_0x58d653>=BYTES_PER_MB){const _0x399d68=Math['ceil'](_0x58d653/BYTES_PER_MB*0x64)/0x64;return _0x399d68[_0x2ae2eb(0x1b9)](0x2)+_0x2ae2eb(0x1b2);}return _0x58d653+'\x20B';}export function requireDevelopmentUploadFile(_0x3859dc,_0x8b5681){const _0x405a19=a56_0x4935,_0x496d06=_0x3859dc[_0x405a19(0x1bf)]();if(!_0x496d06)throw CliErrors[_0x405a19(0x1c1)](_0x8b5681+_0x405a19(0x1bc));if(!existsSync(_0x496d06))throw CliErrors[_0x405a19(0x1c1)](_0x405a19(0x1af)+_0x496d06);const _0x576830=statSync(_0x496d06);if(!_0x576830[_0x405a19(0x1bb)]())throw CliErrors['validation'](_0x405a19(0x1b4)+_0x496d06);if(_0x576830['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x405a19(0x1c1)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x496d06+'\x20('+formatBytes(_0x576830[_0x405a19(0x1be)])+')');return{'path':_0x496d06,'size':_0x576830[_0x405a19(0x1be)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42fd4,_0x236c6c){const _0x55c1b5=a57_0x254e,_0x3fbbd1=_0x42fd4();while(!![]){try{const _0x50b967=parseInt(_0x55c1b5(0x1ff))/0x1+-parseInt(_0x55c1b5(0x1fa))/0x2+-parseInt(_0x55c1b5(0x1f4))/0x3+-parseInt(_0x55c1b5(0x1f6))/0x4*(parseInt(_0x55c1b5(0x1fb))/0x5)+parseInt(_0x55c1b5(0x1fc))/0x6*(-parseInt(_0x55c1b5(0x201))/0x7)+parseInt(_0x55c1b5(0x1f5))/0x8+parseInt(_0x55c1b5(0x1f7))/0x9*(parseInt(_0x55c1b5(0x1f8))/0xa);if(_0x50b967===_0x236c6c)break;else _0x3fbbd1['push'](_0x3fbbd1['shift']());}catch(_0x3f8643){_0x3fbbd1['push'](_0x3fbbd1['shift']());}}}(a57_0xa2fa,0x27fc6));function a57_0xa2fa(){const _0x3e5a05=['test','192362QXOThl','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','24731GqdUrv','30483QJfcAl','2100160rpFhJb','250508VgEnRI','154116prIVMn','170oWJxAL','App\x20Code\x20cannot\x20be\x20empty','411164llnekk','5mDzYPB','516DHFXWQ','App\x20Code\x20cannot\x20exceed\x20100\x20characters'];a57_0xa2fa=function(){return _0x3e5a05;};return a57_0xa2fa();}function a57_0x254e(_0x5f42d1,_0x19631d){_0x5f42d1=_0x5f42d1-0x1f4;const _0xa2fa51=a57_0xa2fa();let _0x254eb1=_0xa2fa51[_0x5f42d1];return _0x254eb1;}export function validateAppcode(_0x3aefbb){const _0x2964d2=a57_0x254e,_0x3f0c24=_0x3aefbb['trim']();if(!_0x3f0c24)return{'valid':![],'message':_0x2964d2(0x1f9)};if(_0x3f0c24['length']>0x64)return{'valid':![],'message':_0x2964d2(0x1fd)};if(!/^[A-Za-z0-9_-]+$/[_0x2964d2(0x1fe)](_0x3f0c24))return{'valid':![],'message':_0x2964d2(0x200)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x263f87=a58_0x4697;function a58_0x4697(_0x539a44,_0x243866){_0x539a44=_0x539a44-0x19e;const _0x252fc2=a58_0x252f();let _0x4697d1=_0x252fc2[_0x539a44];return _0x4697d1;}(function(_0x5c6cc4,_0x287207){const _0x20920e=a58_0x4697,_0x2dc506=_0x5c6cc4();while(!![]){try{const _0x13c4fa=parseInt(_0x20920e(0x1a6))/0x1*(parseInt(_0x20920e(0x1b3))/0x2)+-parseInt(_0x20920e(0x1b9))/0x3+parseInt(_0x20920e(0x1a1))/0x4+parseInt(_0x20920e(0x1bd))/0x5*(-parseInt(_0x20920e(0x1ad))/0x6)+-parseInt(_0x20920e(0x1a4))/0x7*(parseInt(_0x20920e(0x1b0))/0x8)+-parseInt(_0x20920e(0x1b6))/0x9+parseInt(_0x20920e(0x1ae))/0xa;if(_0x13c4fa===_0x287207)break;else _0x2dc506['push'](_0x2dc506['shift']());}catch(_0x4f0086){_0x2dc506['push'](_0x2dc506['shift']());}}}(a58_0x252f,0x5351c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a58_0x252f(){const _0x1207e5=['write','426066dgmDPt','7644810zfhluV','riskLevel','1061288fxVaKU','call','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','1062038SNDqXR','Global','bool','5355045wETBJH','prototype','args','681822lEwluk','trim','inherit','defaultApp','5ucUgzo','\x22\x20is\x20not\x20deletable.','global','\x20already\x20absent','286908qPSpdg','validation','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','7lwkTmK','\x20deleted','1HBgpBD','Usage:\x20','delete','has','\x20config\x20delete\x20<key>\x20[--global]','Top-level\x20key\x20\x22'];a58_0x252f=function(){return _0x1207e5;};return a58_0x252f();}const LEGACY_DELETABLE_KEYS=new Set([a58_0x263f87(0x1bb)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x263f87(0x1bc),'routing']);async function execute(_0x3dc819){const _0x31ad02=a58_0x263f87,_0x25ab65=_0x3dc819[_0x31ad02(0x1b8)][0x0]?.[_0x31ad02(0x1ba)]();if(!_0x25ab65)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x31ad02(0x1a7)+CLI_BIN_NAME+_0x31ad02(0x1aa));if(_0x25ab65===_0x31ad02(0x1af))throw CliErrors[_0x31ad02(0x1a2)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x25ab65)&&!EXTRA_DELETABLE_KEYS[_0x31ad02(0x1a9)](_0x25ab65)&&!LEGACY_DELETABLE_KEYS[_0x31ad02(0x1a9)](_0x25ab65))throw CliErrors[_0x31ad02(0x1a2)](_0x31ad02(0x1ab)+_0x25ab65+_0x31ad02(0x19e),_0x31ad02(0x1b2));const _0x18a677=resolveWriteScope({'global':_0x3dc819[_0x31ad02(0x1b5)](_0x31ad02(0x19f))}),_0x552491=readScopedConfig(_0x18a677),_0x5501e5=Object[_0x31ad02(0x1b7)]['hasOwnProperty'][_0x31ad02(0x1b1)](_0x552491,_0x25ab65);_0x5501e5&&(delete _0x552491[_0x25ab65],writeScopedConfig(_0x552491,_0x18a677));const _0x40d8d7=_0x18a677==='global'?_0x31ad02(0x1b4):'Project';return{'ok':!![],'message':_0x5501e5?'✓\x20'+_0x40d8d7+'\x20'+_0x25ab65+_0x31ad02(0x1a5):'✓\x20'+_0x40d8d7+'\x20'+_0x25ab65+_0x31ad02(0x1a0),'data':{'key':_0x25ab65,'scope':_0x18a677,'changed':_0x5501e5}};}export const configDeleteDefinition={'service':'config','command':a58_0x263f87(0x1a8),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':a58_0x263f87(0x1ac),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':'Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','required':!![]}],'flags':[{'name':a58_0x263f87(0x19f),'type':'boolean','description':a58_0x263f87(0x1a3),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a59_0x13ef(){const _0x376f67=['str','3219010ZFkofu','Usage:\x20','config','654048IPGskp','string','Get\x20a\x20config\x20value\x20by\x20key','Missing\x20key.','read','377512bbBKUo','\x20config\x20get\x20--key\x20<key>','2256268QjZVHi','Key\x20not\x20found:\x20','418968mfsStZ','validation','147ORFaLt','object','244LZuncX','key','appcode','1718056mXSgGh'];a59_0x13ef=function(){return _0x376f67;};return a59_0x13ef();}const a59_0x29ae05=a59_0x27d0;(function(_0x5249af,_0xa8155d){const _0xb2a1af=a59_0x27d0,_0x2b283c=_0x5249af();while(!![]){try{const _0xcb3f30=-parseInt(_0xb2a1af(0x12a))/0x1+-parseInt(_0xb2a1af(0x12e))/0x2*(-parseInt(_0xb2a1af(0x12c))/0x3)+parseInt(_0xb2a1af(0x126))/0x4+parseInt(_0xb2a1af(0x133))/0x5+-parseInt(_0xb2a1af(0x136))/0x6+parseInt(_0xb2a1af(0x128))/0x7+-parseInt(_0xb2a1af(0x131))/0x8;if(_0xcb3f30===_0xa8155d)break;else _0x2b283c['push'](_0x2b283c['shift']());}catch(_0x4ab5a7){_0x2b283c['push'](_0x2b283c['shift']());}}}(a59_0x13ef,0x4f0a5));function a59_0x27d0(_0x496b68,_0x3279b2){_0x496b68=_0x496b68-0x122;const _0x13ef0c=a59_0x13ef();let _0x27d02c=_0x13ef0c[_0x496b68];return _0x27d02c;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x8c1315){const _0x20c18d=a59_0x27d0,_0x37e7a6=_0x8c1315[_0x20c18d(0x132)](_0x20c18d(0x12f));if(!_0x37e7a6)throw CliErrors[_0x20c18d(0x12b)](_0x20c18d(0x124),_0x20c18d(0x134)+CLI_BIN_NAME+_0x20c18d(0x127));const _0x356e38=readConfig(),_0x541518=_0x37e7a6==='app'?_0x20c18d(0x130):_0x37e7a6,_0x2497e0=_0x356e38[_0x541518];if(_0x2497e0===undefined)throw CliErrors[_0x20c18d(0x12b)](_0x20c18d(0x129)+_0x37e7a6);return{'ok':!![],'data':typeof _0x2497e0===_0x20c18d(0x12d)?_0x2497e0:{[_0x541518]:_0x2497e0},'message':typeof _0x2497e0===_0x20c18d(0x12d)?undefined:String(_0x2497e0)};}export const configGetDefinition={'service':a59_0x29ae05(0x135),'command':'get','description':a59_0x29ae05(0x123),'risk':a59_0x29ae05(0x125),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a59_0x29ae05(0x12f),'type':a59_0x29ae05(0x122),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|