@lovrabet/rabetbase-cli 2.5.10-beta.3 → 2.5.10-beta.5
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 +4 -4
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x4e164d=a44_0x5be3;function a44_0x28e8(){const _0x50457e=['profileName','currentApp','/api/management/library/scripts/save','update','get','message','flatMap','2366uPBQaT','values','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','14648WefiGq','\x20uploaded','Runtime\x20script\x20cache\x20cleared.','10397583AWVyXO','190332KeCUuY','review_remote_and_merge','existingHooks','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','477645gnCtmz','datasetId','HOOK','utf8','mergedCli','apiDir','afterScriptId','map','runtime\x20cache\x20clear\x20failed','operationType','functionNode','No\x20local\x20Backend\x20Function\x20scripts\x20found.','requires','2315538DrPizj','Would\x20inspect\x20','name','filePath','cleared','would_push','selectedAppName','remoteId','dataset','2121620iichBX','HOOK_DATASET_NOT_FOUND:','appCode','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','set','BFF_REMOTE_VERSION_MISSING','scriptType','Push\x20complete:\x20','join','\x20skipped','\x20resolution','1908012TmFPWq','runtime\x20cache\x20not\x20needed','EXISTING_HOOK_BINDING_PRESERVED','failures','validation','length','\x20--format\x20compress','2wfqCgf','parse','version','runtime\x20cache\x20cleared','functionName','bool','Lock\x20scope\x20for\x20app\x20\x22','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20bff\x20detail\x20--id\x20','write','type','resolutions','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','conflict','lastSync','push','lockFilePath','datasetCode','COMMON','functions','before','has','force','warnings','defaultApp','lockKey','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','status','some','boolean','filter','Force\x20push\x20ignoring\x20hash\x20protection','size','unchanged','POST','str','scriptsRoot','BFF_REMOTE_VERSION_CHANGED','hash','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','attempted','string','stringify','description','test','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','alias','Push\x20only\x20this\x20script\x20type'];a44_0x28e8=function(){return _0x50457e;};return a44_0x28e8();}(function(_0x35aec1,_0x28c956){const _0x3e6155=a44_0x5be3,_0x117b89=_0x35aec1();while(!![]){try{const _0x1b2631=parseInt(_0x3e6155(0x19c))/0x1+parseInt(_0x3e6155(0x157))/0x2*(-parseInt(_0x3e6155(0x1a9))/0x3)+-parseInt(_0x3e6155(0x198))/0x4+-parseInt(_0x3e6155(0x145))/0x5+-parseInt(_0x3e6155(0x150))/0x6+-parseInt(_0x3e6155(0x191))/0x7*(-parseInt(_0x3e6155(0x194))/0x8)+parseInt(_0x3e6155(0x197))/0x9;if(_0x1b2631===_0x28c956)break;else _0x117b89['push'](_0x117b89['shift']());}catch(_0x2d891b){_0x117b89['push'](_0x117b89['shift']());}}}(a44_0x28e8,0xa8787));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':'bff','command':a44_0x4e164d(0x168),'description':a44_0x4e164d(0x173),'risk':a44_0x4e164d(0x160),'structuredErrors':!![],'flags':[{'name':'type','type':'string','description':a44_0x4e164d(0x189),'enum':[a44_0x4e164d(0x16b),'ENDPOINT','HOOK']},{'name':'name','type':a44_0x4e164d(0x183),'description':a44_0x4e164d(0x165)},{'name':'force','type':a44_0x4e164d(0x177),'description':a44_0x4e164d(0x179)}],async 'dryRun'(_0xc8d8f3){const _0x812735=a44_0x4e164d,_0x4847e8=loadBffProjectConfig(_0xc8d8f3['appCode']),_0x2accfa=await readBffLockFile(_0x4847e8[_0x812735(0x169)]),{appLock:_0x409638}=ensureLockScope(_0x2accfa??createEmptyBffLock(),_0xc8d8f3['appCode'],_0x4847e8[_0x812735(0x17e)],_0x812735(0x168)),_0x231fc5=await getTargetFunctions(_0x4847e8,_0xc8d8f3),_0x136f6e=_0x231fc5[_0x812735(0x176)](_0xbe1b42=>_0xbe1b42[_0x812735(0x161)]===_0x812735(0x19e))?await scanLocalBffFunctions(_0x4847e8,'HOOK'):_0x231fc5,_0x255834=await buildHookMaps(_0xc8d8f3[_0x812735(0x147)],_0xc8d8f3[_0x812735(0x1a1)],_0x136f6e,_0x409638,_0xc8d8f3[_0x812735(0x142)]||_0xc8d8f3[_0x812735(0x1a0)]?.[_0x812735(0x18b)]||_0xc8d8f3[_0x812735(0x1a0)]?.[_0x812735(0x171)]),_0x330537=_0xc8d8f3[_0x812735(0x15c)](_0x812735(0x16f)),_0x3aadd8=[];for(const _0x426611 of _0x231fc5){const _0x5ddaeb=await computeFileHash(_0x426611[_0x812735(0x1ac)]),_0x351706=_0x409638['functions'][_0x426611['lockKey']],_0x13bbeb=!!_0x351706&&_0x351706[_0x812735(0x180)]===_0x5ddaeb,_0xb78f3=_0x255834['resolutions'][_0x812735(0x18e)](_0x426611[_0x812735(0x172)]),_0xc7b1f0=!!_0x351706?.[_0x812735(0x143)]&&_0x351706['version']==null&&(_0x330537||!_0x13bbeb),_0xac734=_0xc7b1f0?missingRemoteVersionConflict(_0x426611,_0x351706):undefined,_0x586c61=_0x255834[_0x812735(0x153)]['has'](_0x426611[_0x812735(0x172)])?'failed':!_0x330537&&_0x13bbeb?'unchanged':_0xac734?_0x812735(0x166):_0x812735(0x141);_0x3aadd8[_0x812735(0x168)]({'lockKey':_0x426611['lockKey'],'filePath':_0x426611[_0x812735(0x1ac)],'remoteId':_0x351706?.[_0x812735(0x143)]??null,'mode':_0x351706?.[_0x812735(0x143)]?_0x812735(0x18d):'create','status':_0x586c61,..._0x255834[_0x812735(0x153)]['has'](_0x426611['lockKey'])?{'error':_0x255834['failures']['get'](_0x426611[_0x812735(0x172)])}:{},..._0xac734?{'conflict':_0xac734}:{},..._0x255834[_0x812735(0x19a)][_0x812735(0x16e)](_0x426611[_0x812735(0x172)])?{'datasetCode':_0x351706?.[_0x812735(0x16a)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x426611[_0x812735(0x172)])]}:{},..._0xb78f3?{'alias':_0xb78f3[_0x812735(0x188)]??null,'datasetCode':_0xb78f3[_0x812735(0x16a)],'operationType':_0x426611['operationType'],'functionNode':_0x426611['functionNode'],'warnings':_0xb78f3[_0x812735(0x170)]}:{}});}return{'method':_0x812735(0x17c),'url':_0x812735(0x18c),'body':{'appCode':_0xc8d8f3[_0x812735(0x147)],'force':_0x330537,'files':_0x3aadd8,'cacheClearAtRuntime':_0x3aadd8[_0x812735(0x176)](_0x4c9beb=>_0x4c9beb[_0x812735(0x175)]===_0x812735(0x141)),'cacheClearAtRuntimeTimes':_0x3aadd8['some'](_0x2addfe=>_0x2addfe[_0x812735(0x175)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x812735(0x1aa)+_0x3aadd8['length']+_0x812735(0x181)};},async 'execute'(_0x7f9b70){const _0x127ad6=a44_0x4e164d,_0xf99d48=loadBffProjectConfig(_0x7f9b70[_0x127ad6(0x147)]),_0x3d33c9=await readBffLockFile(_0xf99d48['lockFilePath']),{lockData:_0x41278b,appLock:_0x3f513a}=ensureLockScope(_0x3d33c9??createEmptyBffLock(),_0x7f9b70[_0x127ad6(0x147)],_0xf99d48['scriptsRoot'],_0x127ad6(0x168)),_0x405f0b=await getTargetFunctions(_0xf99d48,_0x7f9b70);if(_0x405f0b[_0x127ad6(0x155)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x127ad6(0x1a7)};const _0x3384a9=_0x7f9b70[_0x127ad6(0x15c)](_0x127ad6(0x16f)),_0x176feb=JSON[_0x127ad6(0x158)](JSON[_0x127ad6(0x184)](_0x41278b)),_0x4ed7fe=_0x176feb['apps'][_0x7f9b70[_0x127ad6(0x147)]];if(!_0x4ed7fe)throw new Error(_0x127ad6(0x15d)+_0x7f9b70[_0x127ad6(0x147)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x48282c=_0x405f0b['some'](_0x44cbf2=>_0x44cbf2[_0x127ad6(0x161)]===_0x127ad6(0x19e))?await scanLocalBffFunctions(_0xf99d48,_0x127ad6(0x19e)):_0x405f0b,_0x14de56=await buildHookMaps(_0x7f9b70['appCode'],_0x7f9b70[_0x127ad6(0x1a1)],_0x48282c,_0x4ed7fe,_0x7f9b70[_0x127ad6(0x142)]||_0x7f9b70[_0x127ad6(0x1a0)]?.[_0x127ad6(0x18b)]||_0x7f9b70[_0x127ad6(0x1a0)]?.[_0x127ad6(0x171)]),_0x563e77=[],_0x24432a=[],_0x5f3be7=[],_0x34f70f=[];for(const _0x2e6b00 of _0x405f0b){const _0x564452=_0x14de56[_0x127ad6(0x153)]['get'](_0x2e6b00[_0x127ad6(0x172)]);if(_0x564452){_0x34f70f[_0x127ad6(0x168)]({'lockKey':_0x2e6b00['lockKey'],'error':_0x564452});continue;}const _0x2abe95=await computeFileHash(_0x2e6b00[_0x127ad6(0x1ac)]),_0x282523=_0x4ed7fe['functions'][_0x2e6b00[_0x127ad6(0x172)]];if(!_0x3384a9&&_0x282523&&_0x282523['hash']===_0x2abe95){_0x24432a[_0x127ad6(0x168)]({'lockKey':_0x2e6b00['lockKey'],'reason':_0x127ad6(0x17b)});continue;}if(_0x282523?.['remoteId']&&_0x282523[_0x127ad6(0x159)]==null){_0x5f3be7[_0x127ad6(0x168)](missingRemoteVersionConflict(_0x2e6b00,_0x282523));continue;}try{await uploadSingleFunction(_0x7f9b70[_0x127ad6(0x147)],_0x2e6b00,_0x4ed7fe,_0x14de56);const _0x24dbe5=_0x4ed7fe['functions'][_0x2e6b00[_0x127ad6(0x172)]];_0x563e77[_0x127ad6(0x168)]({'lockKey':_0x2e6b00[_0x127ad6(0x172)],'remoteId':_0x24dbe5?.[_0x127ad6(0x143)]??0x0});}catch(_0x15c1a2){const _0x326550=remoteVersionChangedConflict(_0x2e6b00,_0x282523,_0x15c1a2);if(_0x326550){_0x5f3be7[_0x127ad6(0x168)](_0x326550);continue;}_0x34f70f[_0x127ad6(0x168)]({'lockKey':_0x2e6b00[_0x127ad6(0x172)],'error':_0x15c1a2 instanceof Error?_0x15c1a2['message']:String(_0x15c1a2)});}}_0x4ed7fe[_0x127ad6(0x167)]=new Date()['toISOString'](),await writeBffLockFile(_0xf99d48['lockFilePath'],_0x176feb),await waitForUploadedLockEntries(_0xf99d48['lockFilePath'],_0x7f9b70[_0x127ad6(0x147)],_0x563e77[_0x127ad6(0x1a3)](_0x44e195=>_0x44e195[_0x127ad6(0x172)]));let _0x48177a={'attempted':![],'cleared':![]};if(_0x563e77[_0x127ad6(0x155)]>0x0)try{let _0x184e4b='';for(let _0x56b2a5=0x0;_0x56b2a5<CACHE_CLEAR_ATTEMPTS;_0x56b2a5+=0x1){_0x184e4b=await clearBffScriptCache(),_0x56b2a5<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x48177a={'attempted':!![],'cleared':!![],'message':_0x184e4b||_0x127ad6(0x196)};}catch(_0x2ccb3f){_0x48177a={'attempted':!![],'cleared':![],'error':_0x2ccb3f instanceof Error?_0x2ccb3f['message']:String(_0x2ccb3f)};}const _0x56cdf4=_0x34f70f[_0x127ad6(0x155)]===0x0&&(_0x48177a['attempted']?_0x48177a[_0x127ad6(0x1ad)]:!![]),_0x4b0e21=_0x56cdf4,_0xa32004=_0x48177a[_0x127ad6(0x182)]?_0x48177a[_0x127ad6(0x1ad)]?_0x127ad6(0x15a):_0x127ad6(0x1a4):_0x127ad6(0x151);return{'ok':_0x4b0e21,'data':{'uploaded':_0x563e77,'skipped':_0x24432a,'conflicts':_0x5f3be7,'failed':_0x34f70f,'cacheClear':_0x48177a,'warnings':[...[..._0x14de56['resolutions'][_0x127ad6(0x192)]()][_0x127ad6(0x190)](_0x4b908a=>_0x4b908a[_0x127ad6(0x170)]),...[..._0x14de56[_0x127ad6(0x19a)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x563e77[_0x127ad6(0x155)],_0x24432a[_0x127ad6(0x155)],_0x5f3be7[_0x127ad6(0x155)],_0x34f70f[_0x127ad6(0x155)],_0xa32004)};}};function missingRemoteVersionConflict(_0x1dd2a4,_0x2df220){const _0x5bd475=a44_0x4e164d;return remoteVersionConflict(_0x1dd2a4,_0x2df220,_0x5bd475(0x14a),_0x5bd475(0x187));}function remoteVersionChangedConflict(_0x457df9,_0x5eaf7d,_0x49dd64){const _0x326287=a44_0x4e164d;if(!_0x5eaf7d?.['remoteId']||_0x5eaf7d[_0x326287(0x159)]==null||!isRemoteVersionConflict(_0x49dd64))return undefined;return remoteVersionConflict(_0x457df9,_0x5eaf7d,_0x326287(0x17f),_0x326287(0x19b));}function remoteVersionConflict(_0x4d59ef,_0x593a77,_0x60d46e,_0x168c97){const _0x2c7389=a44_0x4e164d;return{'code':_0x60d46e,'lockKey':_0x4d59ef[_0x2c7389(0x172)],'filePath':_0x4d59ef[_0x2c7389(0x1ac)],'remoteId':_0x593a77[_0x2c7389(0x143)],..._0x593a77['version']!=null?{'expectedVersion':_0x593a77[_0x2c7389(0x159)]}:{},'message':_0x168c97,'nextAction':{'action':_0x2c7389(0x199),'command':CLI_BIN_NAME+_0x2c7389(0x15f)+_0x593a77[_0x2c7389(0x143)]+_0x2c7389(0x156),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function a44_0x5be3(_0x1909bf,_0x424565){_0x1909bf=_0x1909bf-0x141;const _0x28e80c=a44_0x28e8();let _0x5be31b=_0x28e80c[_0x1909bf];return _0x5be31b;}function isRemoteVersionConflict(_0x3ee02c){const _0x140747=a44_0x4e164d,_0x514447=_0x3ee02c instanceof Error?_0x3ee02c[_0x140747(0x18f)]:String(_0x3ee02c),_0x3384ce=getPlatformErrorCode(_0x3ee02c)??'';return[_0x514447,_0x3384ce][_0x140747(0x176)](_0x5616c6=>/(?: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[_0x140747(0x186)](_0x5616c6));}function formatPushMessage(_0x3ef5f9,_0x400314,_0x202647,_0x58a653,_0x478736){const _0x104928=a44_0x4e164d,_0x2c92e8=[_0x104928(0x14c)+_0x3ef5f9+_0x104928(0x195),_0x400314+_0x104928(0x14e)];_0x202647>0x0&&_0x2c92e8[_0x104928(0x168)](_0x202647+'\x20conflict'+(_0x202647===0x1?'':'s')+'\x20'+(_0x202647===0x1?_0x104928(0x1a8):'require')+_0x104928(0x14f));if(_0x58a653>0x0)_0x2c92e8[_0x104928(0x168)](_0x58a653+'\x20failed');return _0x2c92e8[_0x104928(0x168)](_0x478736),_0x2c92e8['join'](',\x20');}async function getTargetFunctions(_0x45b58f,_0x47ee68){const _0x37dcc6=a44_0x4e164d,_0x27df61=_0x47ee68['str'](_0x37dcc6(0x161)),_0x55af9c=_0x47ee68[_0x37dcc6(0x17d)](_0x37dcc6(0x1ab)),_0x406d6c=normalizeBffType(_0x27df61)??undefined;if(_0x55af9c&&!_0x406d6c)throw CliErrors[_0x37dcc6(0x154)](_0x37dcc6(0x163));const _0x29000c=await scanLocalBffFunctions(_0x45b58f,_0x406d6c);if(_0x55af9c){const _0x545838=_0x29000c[_0x37dcc6(0x178)](_0x144698=>_0x144698[_0x37dcc6(0x1ab)]===_0x55af9c);if(_0x545838[_0x37dcc6(0x155)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x406d6c+'/'+_0x55af9c);return _0x545838;}return _0x29000c;}function existingHookWarning(_0x178cb7){const _0x8eb1f7=a44_0x4e164d;return{'code':_0x8eb1f7(0x152),'lockKey':_0x178cb7,'message':_0x8eb1f7(0x15e)};}async function buildHookMaps(_0x568c9e,_0x4fcd01,_0x5d3d80,_0x1b08f6,_0x3b4b94){const _0x39c5f0=a44_0x4e164d,_0x99c4cd=_0x5d3d80['some'](_0x5d8f4a=>_0x5d8f4a[_0x39c5f0(0x161)]==='HOOK');if(!_0x99c4cd)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x29807e=resolveApiModelSource(_0x4fcd01,_0x568c9e,_0x3b4b94),_0x11e353=loadAliasMap(_0x4fcd01,undefined,_0x29807e['filePath'],_0x29807e[_0x39c5f0(0x18a)]);assertUnambiguousHookAliases(_0x11e353);const _0xb407c9=[..._0x11e353[_0x39c5f0(0x1a3)](_0x5e28ad=>[_0x5e28ad['alias'],_0x5e28ad[_0x39c5f0(0x16a)]]),...trackedHookDirectoryMappings(_0x1b08f6)['map'](_0x1569c=>[_0x1569c[_0x39c5f0(0x188)],_0x1569c['datasetCode']])],_0x492623=await listDatasets(_0x568c9e);assertUnambiguousHookDirectoryMappings(_0xb407c9[_0x39c5f0(0x1a3)](([_0x3e3027,_0x553415])=>({'alias':_0x3e3027,'datasetCode':_0x553415})));const _0x145e2b=buildHookDirectoryIndexes(_0x492623,_0xb407c9),_0x5f3f97=new Map(),_0x1e199b=preflightPushHookDirectories(_0x5d3d80,_0x1b08f6,_0x145e2b,_0x5f3f97),_0x28915f=new Set(),_0x4a79eb=_0x5d3d80[_0x39c5f0(0x178)](_0x155f18=>_0x5f3f97[_0x39c5f0(0x18e)](_0x155f18[_0x39c5f0(0x172)])?.['startsWith'](_0x39c5f0(0x146))&&_0x1b08f6[_0x39c5f0(0x16c)][_0x155f18[_0x39c5f0(0x172)]]?.[_0x39c5f0(0x143)]&&_0x1b08f6['functions'][_0x155f18['lockKey']]?.[_0x39c5f0(0x16a)]);if(_0x4a79eb[_0x39c5f0(0x155)]>0x0){let _0x378e6d;try{_0x378e6d=await getBffScriptStatistics(_0x568c9e);}catch(_0x2cee9f){for(const _0x468b97 of _0x4a79eb)_0x5f3f97[_0x39c5f0(0x149)](_0x468b97[_0x39c5f0(0x172)],_0x39c5f0(0x148)+(_0x2cee9f instanceof Error?_0x2cee9f[_0x39c5f0(0x18f)]:String(_0x2cee9f)));return{'resolutions':_0x1e199b,'failures':_0x5f3f97,'existingHooks':_0x28915f};}for(const _0x1d1728 of _0x4a79eb){const _0x193d92=_0x1b08f6['functions'][_0x1d1728[_0x39c5f0(0x172)]];try{const _0x5e47f6=new Set(_0x5d3d80[_0x39c5f0(0x178)](_0x1fc933=>_0x1fc933[_0x39c5f0(0x161)]===_0x39c5f0(0x19e)&&_0x1b08f6[_0x39c5f0(0x16c)][_0x1fc933['lockKey']]?.[_0x39c5f0(0x16a)]===_0x193d92['datasetCode'])[_0x39c5f0(0x1a3)](_0x772841=>_0x772841['alias']));if(_0x5e47f6[_0x39c5f0(0x17a)]>0x1)throw CliErrors['validation'](_0x39c5f0(0x174));const _0x11c369=_0x378e6d[_0x39c5f0(0x190)](_0x418b46=>[{'datasetCode':_0x418b46[_0x39c5f0(0x16a)],'operationType':snakeToCamel(_0x418b46[_0x39c5f0(0x1a5)]),'functionNode':_0x39c5f0(0x16d),'id':_0x418b46['beforeScriptId']},{'datasetCode':_0x418b46['datasetCode'],'operationType':snakeToCamel(_0x418b46[_0x39c5f0(0x1a5)]),'functionNode':'after','id':_0x418b46[_0x39c5f0(0x1a2)]}])[_0x39c5f0(0x178)](_0x3cf613=>_0x3cf613['id']===_0x193d92[_0x39c5f0(0x143)]),_0x42d23c=await getBffScriptInfo(_0x193d92[_0x39c5f0(0x143)]);if(_0x42d23c['id']!==_0x193d92[_0x39c5f0(0x143)]||_0x42d23c[_0x39c5f0(0x147)]!==_0x568c9e||_0x42d23c[_0x39c5f0(0x14b)]!=='HOOK'||_0x42d23c[_0x39c5f0(0x15b)]!==_0x1d1728[_0x39c5f0(0x1ab)]||_0x193d92[_0x39c5f0(0x159)]==null||_0x42d23c['version']!==_0x193d92[_0x39c5f0(0x159)]||_0x11c369[_0x39c5f0(0x155)]!==0x1||_0x11c369[0x0]['datasetCode']!==_0x193d92['datasetCode']||_0x11c369[0x0][_0x39c5f0(0x1a5)]!==_0x1d1728[_0x39c5f0(0x1a5)]||_0x11c369[0x0][_0x39c5f0(0x1a6)]!==_0x1d1728[_0x39c5f0(0x1a6)]||_0x193d92[_0x39c5f0(0x1a5)]!==_0x1d1728[_0x39c5f0(0x1a5)]||_0x193d92['functionNode']!==_0x1d1728[_0x39c5f0(0x1a6)])throw CliErrors[_0x39c5f0(0x154)](_0x39c5f0(0x164));_0x28915f['add'](_0x1d1728[_0x39c5f0(0x172)]),_0x5f3f97['delete'](_0x1d1728['lockKey']);}catch(_0x36e23c){_0x5f3f97['set'](_0x1d1728[_0x39c5f0(0x172)],_0x36e23c instanceof Error?_0x36e23c['message']:String(_0x36e23c));}}}return{'resolutions':_0x1e199b,'failures':_0x5f3f97,'existingHooks':_0x28915f};}async function uploadSingleFunction(_0x4ed6e6,_0x57d033,_0x4a6f61,_0x4f1c6b){const _0x562357=a44_0x4e164d,_0x69c51f=await readFile(_0x57d033[_0x562357(0x1ac)],_0x562357(0x19f)),_0x287f3b=await computeFileHash(_0x57d033[_0x562357(0x1ac)]),_0x4c37f2=_0x4a6f61[_0x562357(0x16c)][_0x57d033[_0x562357(0x172)]];if(_0x4c37f2?.['remoteId']&&_0x4c37f2[_0x562357(0x159)]==null)throw CliErrors[_0x562357(0x154)](_0x57d033[_0x562357(0x172)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x52e400=extractScriptDescription(_0x69c51f);if(!_0x52e400&&_0x4c37f2?.[_0x562357(0x143)]){const _0x561020=await getBffScriptInfo(_0x4c37f2[_0x562357(0x143)]);_0x52e400=_0x561020['description']||undefined;}const _0x504bb4={'appCode':_0x4ed6e6,'functionName':_0x57d033[_0x562357(0x1ab)],'scriptType':_0x57d033[_0x562357(0x161)],'scriptContent':_0x69c51f};if(_0x4c37f2?.[_0x562357(0x143)])_0x504bb4['id']=_0x4c37f2[_0x562357(0x143)];if(_0x4c37f2?.['version']!=null)_0x504bb4[_0x562357(0x159)]=_0x4c37f2[_0x562357(0x159)];if(_0x52e400)_0x504bb4[_0x562357(0x185)]=_0x52e400;if(_0x57d033['type']===_0x562357(0x19e)){const _0x33dbb0=_0x4f1c6b[_0x562357(0x162)]['get'](_0x57d033[_0x562357(0x172)]);if(!_0x33dbb0&&!_0x4f1c6b[_0x562357(0x19a)]['has'](_0x57d033[_0x562357(0x172)])||!_0x57d033[_0x562357(0x1a5)]||!_0x57d033[_0x562357(0x1a6)])throw CliErrors[_0x562357(0x154)]('Incomplete\x20HOOK\x20path:\x20'+_0x57d033[_0x562357(0x172)]);_0x33dbb0&&(_0x504bb4[_0x562357(0x19d)]=_0x33dbb0[_0x562357(0x144)]['id'],_0x504bb4['operationType']=_0x57d033[_0x562357(0x1a5)]),_0x504bb4[_0x562357(0x1a6)]=_0x57d033[_0x562357(0x1a6)];}const _0x17ef45=await saveBffScript(_0x504bb4),_0x45f58f=_0x17ef45['id'],_0x17a269=_0x17ef45['script']??await getBffScriptInfo(_0x45f58f),_0x14fd89={'hash':_0x287f3b,'remoteId':_0x45f58f,'version':_0x17a269['version']};if(_0x57d033[_0x562357(0x161)]===_0x562357(0x19e)){const _0x2d8562=_0x4f1c6b[_0x562357(0x162)][_0x562357(0x18e)](_0x57d033['lockKey']);if(!_0x2d8562){_0x4a6f61['functions'][_0x57d033[_0x562357(0x172)]]={..._0x4c37f2,..._0x14fd89};return;}_0x14fd89['alias']=_0x2d8562[_0x562357(0x188)]??_0x4c37f2?.['alias'],_0x14fd89[_0x562357(0x16a)]=_0x2d8562[_0x562357(0x16a)],_0x14fd89[_0x562357(0x1a5)]=_0x57d033[_0x562357(0x1a5)],_0x14fd89['functionNode']=_0x57d033[_0x562357(0x1a6)];}_0x4a6f61[_0x562357(0x16c)][_0x57d033[_0x562357(0x172)]]=_0x14fd89;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xf1acd,_0x42d44a,_0x13f4d7){const _0x1915b7=a44_0x4e164d;if(_0x13f4d7['length']===0x0)return;for(let _0xac45a6=0x0;_0xac45a6<LOCK_SETTLE_RETRY_COUNT;_0xac45a6+=0x1){const _0x2f6592=await readBffLockFile(_0xf1acd),_0x45fbe=_0x2f6592?.['apps']?.[_0x42d44a]?.[_0x1915b7(0x16c)]??{},_0x5e885c=_0x13f4d7['every'](_0x4bff89=>!!_0x45fbe[_0x4bff89]?.[_0x1915b7(0x143)]);if(_0x5e885c)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1915b7(0x193)+_0x13f4d7[_0x1915b7(0x14d)](',\x20')+'.');}
|
|
1
|
+
const a44_0x30e4b5=a44_0x5b57;(function(_0x1adfda,_0x22159f){const _0x121d63=a44_0x5b57,_0x14120d=_0x1adfda();while(!![]){try{const _0x94f01b=-parseInt(_0x121d63(0x250))/0x1*(parseInt(_0x121d63(0x205))/0x2)+parseInt(_0x121d63(0x235))/0x3*(-parseInt(_0x121d63(0x217))/0x4)+parseInt(_0x121d63(0x21e))/0x5*(-parseInt(_0x121d63(0x20d))/0x6)+parseInt(_0x121d63(0x209))/0x7*(parseInt(_0x121d63(0x20b))/0x8)+-parseInt(_0x121d63(0x23f))/0x9*(parseInt(_0x121d63(0x22a))/0xa)+-parseInt(_0x121d63(0x236))/0xb*(-parseInt(_0x121d63(0x1f8))/0xc)+parseInt(_0x121d63(0x23e))/0xd;if(_0x94f01b===_0x22159f)break;else _0x14120d['push'](_0x14120d['shift']());}catch(_0x511257){_0x14120d['push'](_0x14120d['shift']());}}}(a44_0x5ecb,0xc1043));import{readFile}from'node:fs/promises';function a44_0x5ecb(){const _0x39897d=['failures','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','type','utf8','force','No\x20local\x20Backend\x20Function\x20scripts\x20found.','string',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','toISOString','306030iKYAHa','Force\x20push\x20ignoring\x20hash\x20protection','datasetCode','lastSync','6727GJezut','startsWith','1256pELAxu','lockKey','156QWWcZx','scriptType','has','length','selectedAppName','attempted','some','scriptsRoot','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','currentApp','56scqtpx','Push\x20complete:\x20','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20bff\x20detail\x20--id\x20','HOOK','remoteId','bool','233215TfLlGy','/api/management/library/scripts/save','Would\x20inspect\x20','map','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','operationType','apiDir','update','filePath','mergedCli','\x22\x20not\x20found\x20after\x20ensureLockScope.','conflict','4660mOBFoE','join','\x20conflict','functionName','runtime\x20cache\x20not\x20needed','version','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','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.','runtime\x20cache\x20clear\x20failed','validation','cleared','92751sKXIUd','103895IPlDOg','appCode','review_remote_and_merge','BFF_REMOTE_VERSION_MISSING','create','warnings','\x20skipped','defaultApp','54495415EVJZVL','29709URcQUi','get','functionNode','lockFilePath','before','alias','would_push','values','add','push','unchanged','requires','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','POST','message','ENDPOINT','description','10CdgoOK','resolutions','set','require','existingHooks','name','dataset','\x20--format\x20compress','COMMON','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','filter','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','stringify','beforeScriptId','script','flatMap','str','parse','functions','hash','afterScriptId','Runtime\x20script\x20cache\x20cleared.','status','failed','profileName','apps','1476wTpJXW','datasetId','every','delete'];a44_0x5ecb=function(){return _0x39897d;};return a44_0x5ecb();}import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a44_0x5b57(_0x384c69,_0x1a3a2f){_0x384c69=_0x384c69-0x1e0;const _0x5ecb6d=a44_0x5ecb();let _0x5b5764=_0x5ecb6d[_0x384c69];return _0x5b5764;}export const bffPush={'service':'bff','command':a44_0x30e4b5(0x248),'description':a44_0x30e4b5(0x230),'risk':'write','structuredErrors':!![],'flags':[{'name':'type','type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a44_0x30e4b5(0x1e6),a44_0x30e4b5(0x24e),a44_0x30e4b5(0x21b)]},{'name':a44_0x30e4b5(0x1e3),'type':a44_0x30e4b5(0x202),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a44_0x30e4b5(0x200),'type':'boolean','description':a44_0x30e4b5(0x206)}],async 'dryRun'(_0x3078f0){const _0x75c802=a44_0x30e4b5,_0x45de7a=loadBffProjectConfig(_0x3078f0[_0x75c802(0x237)]),_0xf3b087=await readBffLockFile(_0x45de7a[_0x75c802(0x242)]),{appLock:_0x5546a1}=ensureLockScope(_0xf3b087??createEmptyBffLock(),_0x3078f0[_0x75c802(0x237)],_0x45de7a[_0x75c802(0x214)],_0x75c802(0x248)),_0x1b3c51=await getTargetFunctions(_0x45de7a,_0x3078f0),_0x80ff5c=_0x1b3c51['some'](_0x3b259=>_0x3b259['type']==='HOOK')?await scanLocalBffFunctions(_0x45de7a,_0x75c802(0x21b)):_0x1b3c51,_0x518a07=await buildHookMaps(_0x3078f0[_0x75c802(0x237)],_0x3078f0[_0x75c802(0x224)],_0x80ff5c,_0x5546a1,_0x3078f0[_0x75c802(0x211)]||_0x3078f0[_0x75c802(0x227)]?.['currentApp']||_0x3078f0[_0x75c802(0x227)]?.['defaultApp']),_0x2f9aa7=_0x3078f0[_0x75c802(0x21d)](_0x75c802(0x200)),_0x591524=[];for(const _0x54a88f of _0x1b3c51){const _0x20f0e8=await computeFileHash(_0x54a88f[_0x75c802(0x226)]),_0x3eca34=_0x5546a1[_0x75c802(0x1f0)][_0x54a88f[_0x75c802(0x20c)]],_0x3779df=!!_0x3eca34&&_0x3eca34[_0x75c802(0x1f1)]===_0x20f0e8,_0x4e38f6=_0x518a07[_0x75c802(0x251)][_0x75c802(0x240)](_0x54a88f[_0x75c802(0x20c)]),_0x47cd7b=!!_0x3eca34?.['remoteId']&&_0x3eca34[_0x75c802(0x22f)]==null&&(_0x2f9aa7||!_0x3779df),_0x2ec990=_0x47cd7b?missingRemoteVersionConflict(_0x54a88f,_0x3eca34):undefined,_0x210da6=_0x518a07[_0x75c802(0x1fc)][_0x75c802(0x20f)](_0x54a88f['lockKey'])?_0x75c802(0x1f5):!_0x2f9aa7&&_0x3779df?_0x75c802(0x249):_0x2ec990?_0x75c802(0x229):_0x75c802(0x245);_0x591524['push']({'lockKey':_0x54a88f[_0x75c802(0x20c)],'filePath':_0x54a88f[_0x75c802(0x226)],'remoteId':_0x3eca34?.[_0x75c802(0x21c)]??null,'mode':_0x3eca34?.[_0x75c802(0x21c)]?_0x75c802(0x225):_0x75c802(0x23a),'status':_0x210da6,..._0x518a07[_0x75c802(0x1fc)][_0x75c802(0x20f)](_0x54a88f['lockKey'])?{'error':_0x518a07[_0x75c802(0x1fc)][_0x75c802(0x240)](_0x54a88f[_0x75c802(0x20c)])}:{},..._0x2ec990?{'conflict':_0x2ec990}:{},..._0x518a07['existingHooks']['has'](_0x54a88f[_0x75c802(0x20c)])?{'datasetCode':_0x3eca34?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x54a88f['lockKey'])]}:{},..._0x4e38f6?{'alias':_0x4e38f6['alias']??null,'datasetCode':_0x4e38f6[_0x75c802(0x207)],'operationType':_0x54a88f[_0x75c802(0x223)],'functionNode':_0x54a88f['functionNode'],'warnings':_0x4e38f6[_0x75c802(0x23b)]}:{}});}return{'method':_0x75c802(0x24c),'url':_0x75c802(0x21f),'body':{'appCode':_0x3078f0['appCode'],'force':_0x2f9aa7,'files':_0x591524,'cacheClearAtRuntime':_0x591524[_0x75c802(0x213)](_0x4f5d24=>_0x4f5d24[_0x75c802(0x1f4)]===_0x75c802(0x245)),'cacheClearAtRuntimeTimes':_0x591524[_0x75c802(0x213)](_0x268319=>_0x268319[_0x75c802(0x1f4)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x75c802(0x220)+_0x591524[_0x75c802(0x210)]+_0x75c802(0x24b)};},async 'execute'(_0x5543ef){const _0x1456b1=a44_0x30e4b5,_0x448a73=loadBffProjectConfig(_0x5543ef['appCode']),_0x4be19b=await readBffLockFile(_0x448a73[_0x1456b1(0x242)]),{lockData:_0x24fa93,appLock:_0x2e3d9e}=ensureLockScope(_0x4be19b??createEmptyBffLock(),_0x5543ef[_0x1456b1(0x237)],_0x448a73[_0x1456b1(0x214)],_0x1456b1(0x248)),_0x156af2=await getTargetFunctions(_0x448a73,_0x5543ef);if(_0x156af2['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x1456b1(0x201)};const _0x39c36a=_0x5543ef[_0x1456b1(0x21d)]('force'),_0x4d1e1e=JSON[_0x1456b1(0x1ef)](JSON[_0x1456b1(0x1ea)](_0x24fa93)),_0x39a2ea=_0x4d1e1e[_0x1456b1(0x1f7)][_0x5543ef['appCode']];if(!_0x39a2ea)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x5543ef[_0x1456b1(0x237)]+_0x1456b1(0x228));const _0x507fb2=_0x156af2[_0x1456b1(0x213)](_0x1d845a=>_0x1d845a[_0x1456b1(0x1fe)]==='HOOK')?await scanLocalBffFunctions(_0x448a73,_0x1456b1(0x21b)):_0x156af2,_0x2b724c=await buildHookMaps(_0x5543ef[_0x1456b1(0x237)],_0x5543ef[_0x1456b1(0x224)],_0x507fb2,_0x39a2ea,_0x5543ef[_0x1456b1(0x211)]||_0x5543ef[_0x1456b1(0x227)]?.[_0x1456b1(0x216)]||_0x5543ef['mergedCli']?.[_0x1456b1(0x23d)]),_0xbff3cc=[],_0x2ad53b=[],_0xf7ecda=[],_0x50710c=[];for(const _0x4f368e of _0x156af2){const _0x31c8e3=_0x2b724c['failures'][_0x1456b1(0x240)](_0x4f368e[_0x1456b1(0x20c)]);if(_0x31c8e3){_0x50710c[_0x1456b1(0x248)]({'lockKey':_0x4f368e[_0x1456b1(0x20c)],'error':_0x31c8e3});continue;}const _0x3c79e3=await computeFileHash(_0x4f368e[_0x1456b1(0x226)]),_0x4da07e=_0x39a2ea[_0x1456b1(0x1f0)][_0x4f368e['lockKey']];if(!_0x39c36a&&_0x4da07e&&_0x4da07e[_0x1456b1(0x1f1)]===_0x3c79e3){_0x2ad53b[_0x1456b1(0x248)]({'lockKey':_0x4f368e[_0x1456b1(0x20c)],'reason':_0x1456b1(0x249)});continue;}if(_0x4da07e?.['remoteId']&&_0x4da07e[_0x1456b1(0x22f)]==null){_0xf7ecda[_0x1456b1(0x248)](missingRemoteVersionConflict(_0x4f368e,_0x4da07e));continue;}try{await uploadSingleFunction(_0x5543ef[_0x1456b1(0x237)],_0x4f368e,_0x39a2ea,_0x2b724c);const _0x2d16bf=_0x39a2ea[_0x1456b1(0x1f0)][_0x4f368e[_0x1456b1(0x20c)]];_0xbff3cc['push']({'lockKey':_0x4f368e['lockKey'],'remoteId':_0x2d16bf?.[_0x1456b1(0x21c)]??0x0});}catch(_0x4ac585){const _0x29a639=remoteVersionChangedConflict(_0x4f368e,_0x4da07e,_0x4ac585);if(_0x29a639){_0xf7ecda['push'](_0x29a639);continue;}_0x50710c[_0x1456b1(0x248)]({'lockKey':_0x4f368e[_0x1456b1(0x20c)],'error':_0x4ac585 instanceof Error?_0x4ac585[_0x1456b1(0x24d)]:String(_0x4ac585)});}}_0x39a2ea[_0x1456b1(0x208)]=new Date()[_0x1456b1(0x204)](),await writeBffLockFile(_0x448a73[_0x1456b1(0x242)],_0x4d1e1e),await waitForUploadedLockEntries(_0x448a73[_0x1456b1(0x242)],_0x5543ef[_0x1456b1(0x237)],_0xbff3cc[_0x1456b1(0x221)](_0x6100db=>_0x6100db[_0x1456b1(0x20c)]));let _0x53dc9a={'attempted':![],'cleared':![]};if(_0xbff3cc['length']>0x0)try{let _0x509183='';for(let _0x546559=0x0;_0x546559<CACHE_CLEAR_ATTEMPTS;_0x546559+=0x1){_0x509183=await clearBffScriptCache(),_0x546559<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x53dc9a={'attempted':!![],'cleared':!![],'message':_0x509183||_0x1456b1(0x1f3)};}catch(_0x16838a){_0x53dc9a={'attempted':!![],'cleared':![],'error':_0x16838a instanceof Error?_0x16838a[_0x1456b1(0x24d)]:String(_0x16838a)};}const _0x193b80=_0x50710c[_0x1456b1(0x210)]===0x0&&(_0x53dc9a[_0x1456b1(0x212)]?_0x53dc9a[_0x1456b1(0x234)]:!![]),_0x291dcb=_0x193b80,_0x44b2a7=_0x53dc9a['attempted']?_0x53dc9a['cleared']?'runtime\x20cache\x20cleared':_0x1456b1(0x232):_0x1456b1(0x22e);return{'ok':_0x291dcb,'data':{'uploaded':_0xbff3cc,'skipped':_0x2ad53b,'conflicts':_0xf7ecda,'failed':_0x50710c,'cacheClear':_0x53dc9a,'warnings':[...[..._0x2b724c[_0x1456b1(0x251)][_0x1456b1(0x246)]()][_0x1456b1(0x1ed)](_0x18347a=>_0x18347a[_0x1456b1(0x23b)]),...[..._0x2b724c[_0x1456b1(0x1e2)]][_0x1456b1(0x221)](existingHookWarning)]},'message':formatPushMessage(_0xbff3cc[_0x1456b1(0x210)],_0x2ad53b[_0x1456b1(0x210)],_0xf7ecda[_0x1456b1(0x210)],_0x50710c['length'],_0x44b2a7)};}};function missingRemoteVersionConflict(_0x271377,_0x3cccf8){const _0x88659f=a44_0x30e4b5;return remoteVersionConflict(_0x271377,_0x3cccf8,_0x88659f(0x239),_0x88659f(0x1e9));}function remoteVersionChangedConflict(_0x5e002b,_0x22c71a,_0x41e555){const _0x37e000=a44_0x30e4b5;if(!_0x22c71a?.['remoteId']||_0x22c71a[_0x37e000(0x22f)]==null||!isRemoteVersionConflict(_0x41e555))return undefined;return remoteVersionConflict(_0x5e002b,_0x22c71a,'BFF_REMOTE_VERSION_CHANGED',_0x37e000(0x1e7));}function remoteVersionConflict(_0xc36e9f,_0xa0742e,_0x27c0d5,_0x495348){const _0x23cede=a44_0x30e4b5;return{'code':_0x27c0d5,'lockKey':_0xc36e9f[_0x23cede(0x20c)],'filePath':_0xc36e9f[_0x23cede(0x226)],'remoteId':_0xa0742e['remoteId'],..._0xa0742e['version']!=null?{'expectedVersion':_0xa0742e[_0x23cede(0x22f)]}:{},'message':_0x495348,'nextAction':{'action':_0x23cede(0x238),'command':CLI_BIN_NAME+_0x23cede(0x21a)+_0xa0742e[_0x23cede(0x21c)]+_0x23cede(0x1e5),'requiresReview':!![],'message':_0x23cede(0x231)}};}function isRemoteVersionConflict(_0x1084f7){const _0x952f7a=a44_0x30e4b5,_0xdd3ea9=_0x1084f7 instanceof Error?_0x1084f7['message']:String(_0x1084f7),_0x4777fa=getPlatformErrorCode(_0x1084f7)??'';return[_0xdd3ea9,_0x4777fa][_0x952f7a(0x213)](_0x26b515=>/(?: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['test'](_0x26b515));}function formatPushMessage(_0x4b4380,_0x506a4e,_0x5356e7,_0x502bbe,_0x119fe1){const _0x586a29=a44_0x30e4b5,_0x35ed6f=[_0x586a29(0x218)+_0x4b4380+'\x20uploaded',_0x506a4e+_0x586a29(0x23c)];_0x5356e7>0x0&&_0x35ed6f['push'](_0x5356e7+_0x586a29(0x22c)+(_0x5356e7===0x1?'':'s')+'\x20'+(_0x5356e7===0x1?_0x586a29(0x24a):_0x586a29(0x1e1))+'\x20resolution');if(_0x502bbe>0x0)_0x35ed6f[_0x586a29(0x248)](_0x502bbe+'\x20failed');return _0x35ed6f['push'](_0x119fe1),_0x35ed6f['join'](',\x20');}async function getTargetFunctions(_0x11eb05,_0x194277){const _0x2575e7=a44_0x30e4b5,_0x3d1b8f=_0x194277[_0x2575e7(0x1ee)]('type'),_0x2c25ee=_0x194277['str'](_0x2575e7(0x1e3)),_0x24a31d=normalizeBffType(_0x3d1b8f)??undefined;if(_0x2c25ee&&!_0x24a31d)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x319c84=await scanLocalBffFunctions(_0x11eb05,_0x24a31d);if(_0x2c25ee){const _0x2cdc34=_0x319c84[_0x2575e7(0x1e8)](_0x46dfa8=>_0x46dfa8[_0x2575e7(0x1e3)]===_0x2c25ee);if(_0x2cdc34[_0x2575e7(0x210)]===0x0)throw CliErrors[_0x2575e7(0x233)]('Local\x20function\x20not\x20found:\x20'+_0x24a31d+'/'+_0x2c25ee);return _0x2cdc34;}return _0x319c84;}function existingHookWarning(_0x308707){const _0x17dafd=a44_0x30e4b5;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x308707,'message':_0x17dafd(0x219)};}async function buildHookMaps(_0x5506db,_0x12ea97,_0x59e8e3,_0x15cd60,_0x102bc2){const _0x55d501=a44_0x30e4b5,_0x359f4c=_0x59e8e3[_0x55d501(0x213)](_0xa3cb07=>_0xa3cb07[_0x55d501(0x1fe)]===_0x55d501(0x21b));if(!_0x359f4c)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x4a7e07=resolveApiModelSource(_0x12ea97,_0x5506db,_0x102bc2),_0x7d6a7e=loadAliasMap(_0x12ea97,undefined,_0x4a7e07['filePath'],_0x4a7e07[_0x55d501(0x1f6)]);assertUnambiguousHookAliases(_0x7d6a7e);const _0x56a117=[..._0x7d6a7e['map'](_0x4cc268=>[_0x4cc268[_0x55d501(0x244)],_0x4cc268[_0x55d501(0x207)]]),...trackedHookDirectoryMappings(_0x15cd60)[_0x55d501(0x221)](_0x1753d0=>[_0x1753d0['alias'],_0x1753d0['datasetCode']])],_0x2e801a=await listDatasets(_0x5506db);assertUnambiguousHookDirectoryMappings(_0x56a117[_0x55d501(0x221)](([_0x236ac4,_0x24ce39])=>({'alias':_0x236ac4,'datasetCode':_0x24ce39})));const _0x3a12bd=buildHookDirectoryIndexes(_0x2e801a,_0x56a117),_0x182148=new Map(),_0x576bc3=preflightPushHookDirectories(_0x59e8e3,_0x15cd60,_0x3a12bd,_0x182148),_0x3e895c=new Set(),_0x3b14bc=_0x59e8e3[_0x55d501(0x1e8)](_0x3a51bd=>_0x182148[_0x55d501(0x240)](_0x3a51bd[_0x55d501(0x20c)])?.[_0x55d501(0x20a)]('HOOK_DATASET_NOT_FOUND:')&&_0x15cd60[_0x55d501(0x1f0)][_0x3a51bd[_0x55d501(0x20c)]]?.[_0x55d501(0x21c)]&&_0x15cd60[_0x55d501(0x1f0)][_0x3a51bd[_0x55d501(0x20c)]]?.[_0x55d501(0x207)]);if(_0x3b14bc[_0x55d501(0x210)]>0x0){let _0x32962a;try{_0x32962a=await getBffScriptStatistics(_0x5506db);}catch(_0x11b504){for(const _0x525d7f of _0x3b14bc)_0x182148[_0x55d501(0x1e0)](_0x525d7f[_0x55d501(0x20c)],_0x55d501(0x222)+(_0x11b504 instanceof Error?_0x11b504[_0x55d501(0x24d)]:String(_0x11b504)));return{'resolutions':_0x576bc3,'failures':_0x182148,'existingHooks':_0x3e895c};}for(const _0x4eaf5d of _0x3b14bc){const _0x14d057=_0x15cd60['functions'][_0x4eaf5d[_0x55d501(0x20c)]];try{const _0x4f2343=new Set(_0x59e8e3[_0x55d501(0x1e8)](_0x2890c1=>_0x2890c1[_0x55d501(0x1fe)]===_0x55d501(0x21b)&&_0x15cd60[_0x55d501(0x1f0)][_0x2890c1[_0x55d501(0x20c)]]?.[_0x55d501(0x207)]===_0x14d057[_0x55d501(0x207)])[_0x55d501(0x221)](_0x2d31f0=>_0x2d31f0[_0x55d501(0x244)]));if(_0x4f2343['size']>0x1)throw CliErrors['validation'](_0x55d501(0x215));const _0x276b45=_0x32962a['flatMap'](_0x1ab511=>[{'datasetCode':_0x1ab511['datasetCode'],'operationType':snakeToCamel(_0x1ab511['operationType']),'functionNode':_0x55d501(0x243),'id':_0x1ab511[_0x55d501(0x1eb)]},{'datasetCode':_0x1ab511['datasetCode'],'operationType':snakeToCamel(_0x1ab511[_0x55d501(0x223)]),'functionNode':'after','id':_0x1ab511[_0x55d501(0x1f2)]}])['filter'](_0x13ac5d=>_0x13ac5d['id']===_0x14d057[_0x55d501(0x21c)]),_0xee6c02=await getBffScriptInfo(_0x14d057['remoteId']);if(_0xee6c02['id']!==_0x14d057['remoteId']||_0xee6c02[_0x55d501(0x237)]!==_0x5506db||_0xee6c02[_0x55d501(0x20e)]!==_0x55d501(0x21b)||_0xee6c02[_0x55d501(0x22d)]!==_0x4eaf5d[_0x55d501(0x1e3)]||_0x14d057[_0x55d501(0x22f)]==null||_0xee6c02[_0x55d501(0x22f)]!==_0x14d057[_0x55d501(0x22f)]||_0x276b45[_0x55d501(0x210)]!==0x1||_0x276b45[0x0][_0x55d501(0x207)]!==_0x14d057[_0x55d501(0x207)]||_0x276b45[0x0][_0x55d501(0x223)]!==_0x4eaf5d[_0x55d501(0x223)]||_0x276b45[0x0][_0x55d501(0x241)]!==_0x4eaf5d[_0x55d501(0x241)]||_0x14d057[_0x55d501(0x223)]!==_0x4eaf5d['operationType']||_0x14d057[_0x55d501(0x241)]!==_0x4eaf5d[_0x55d501(0x241)])throw CliErrors['validation'](_0x55d501(0x1fd));_0x3e895c[_0x55d501(0x247)](_0x4eaf5d['lockKey']),_0x182148[_0x55d501(0x1fb)](_0x4eaf5d['lockKey']);}catch(_0x19b331){_0x182148['set'](_0x4eaf5d['lockKey'],_0x19b331 instanceof Error?_0x19b331[_0x55d501(0x24d)]:String(_0x19b331));}}}return{'resolutions':_0x576bc3,'failures':_0x182148,'existingHooks':_0x3e895c};}async function uploadSingleFunction(_0x3cb8ab,_0x471e61,_0x1d9491,_0x383ceb){const _0x277314=a44_0x30e4b5,_0x1d4291=await readFile(_0x471e61[_0x277314(0x226)],_0x277314(0x1ff)),_0xe48e0c=await computeFileHash(_0x471e61['filePath']),_0x3a2231=_0x1d9491[_0x277314(0x1f0)][_0x471e61[_0x277314(0x20c)]];if(_0x3a2231?.[_0x277314(0x21c)]&&_0x3a2231['version']==null)throw CliErrors[_0x277314(0x233)](_0x471e61[_0x277314(0x20c)]+_0x277314(0x203));let _0x3043f3=extractScriptDescription(_0x1d4291);if(!_0x3043f3&&_0x3a2231?.[_0x277314(0x21c)]){const _0xc56484=await getBffScriptInfo(_0x3a2231[_0x277314(0x21c)]);_0x3043f3=_0xc56484[_0x277314(0x24f)]||undefined;}const _0x4e849a={'appCode':_0x3cb8ab,'functionName':_0x471e61[_0x277314(0x1e3)],'scriptType':_0x471e61['type'],'scriptContent':_0x1d4291};if(_0x3a2231?.[_0x277314(0x21c)])_0x4e849a['id']=_0x3a2231[_0x277314(0x21c)];if(_0x3a2231?.[_0x277314(0x22f)]!=null)_0x4e849a[_0x277314(0x22f)]=_0x3a2231[_0x277314(0x22f)];if(_0x3043f3)_0x4e849a['description']=_0x3043f3;if(_0x471e61[_0x277314(0x1fe)]===_0x277314(0x21b)){const _0x21ae13=_0x383ceb[_0x277314(0x251)][_0x277314(0x240)](_0x471e61[_0x277314(0x20c)]);if(!_0x21ae13&&!_0x383ceb[_0x277314(0x1e2)][_0x277314(0x20f)](_0x471e61[_0x277314(0x20c)])||!_0x471e61['operationType']||!_0x471e61['functionNode'])throw CliErrors[_0x277314(0x233)]('Incomplete\x20HOOK\x20path:\x20'+_0x471e61[_0x277314(0x20c)]);_0x21ae13&&(_0x4e849a[_0x277314(0x1f9)]=_0x21ae13[_0x277314(0x1e4)]['id'],_0x4e849a[_0x277314(0x223)]=_0x471e61[_0x277314(0x223)]),_0x4e849a['functionNode']=_0x471e61[_0x277314(0x241)];}const _0x2a6248=await saveBffScript(_0x4e849a),_0x4211ce=_0x2a6248['id'],_0x17a3d9=_0x2a6248[_0x277314(0x1ec)]??await getBffScriptInfo(_0x4211ce),_0x3a488e={'hash':_0xe48e0c,'remoteId':_0x4211ce,'version':_0x17a3d9[_0x277314(0x22f)]};if(_0x471e61['type']===_0x277314(0x21b)){const _0x332ffc=_0x383ceb[_0x277314(0x251)][_0x277314(0x240)](_0x471e61[_0x277314(0x20c)]);if(!_0x332ffc){_0x1d9491[_0x277314(0x1f0)][_0x471e61[_0x277314(0x20c)]]={..._0x3a2231,..._0x3a488e};return;}_0x3a488e['alias']=_0x332ffc[_0x277314(0x244)]??_0x3a2231?.[_0x277314(0x244)],_0x3a488e[_0x277314(0x207)]=_0x332ffc[_0x277314(0x207)],_0x3a488e[_0x277314(0x223)]=_0x471e61[_0x277314(0x223)],_0x3a488e[_0x277314(0x241)]=_0x471e61['functionNode'];}_0x1d9491[_0x277314(0x1f0)][_0x471e61[_0x277314(0x20c)]]=_0x3a488e;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5e0b44,_0x3f2404,_0xe13368){const _0x2b3d02=a44_0x30e4b5;if(_0xe13368[_0x2b3d02(0x210)]===0x0)return;for(let _0x17e7eb=0x0;_0x17e7eb<LOCK_SETTLE_RETRY_COUNT;_0x17e7eb+=0x1){const _0xb67b61=await readBffLockFile(_0x5e0b44),_0x19fbc2=_0xb67b61?.['apps']?.[_0x3f2404]?.[_0x2b3d02(0x1f0)]??{},_0x365849=_0xe13368[_0x2b3d02(0x1fa)](_0x2987bc=>!!_0x19fbc2[_0x2987bc]?.[_0x2b3d02(0x21c)]);if(_0x365849)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0xe13368[_0x2b3d02(0x22b)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x5add1f=a45_0x523a;(function(_0x5d2c83,_0x5b1ea9){const _0x4dd7f3=a45_0x523a,_0x524feb=_0x5d2c83();while(!![]){try{const _0x4832e6=-parseInt(_0x4dd7f3(0x17d))/0x1+-parseInt(_0x4dd7f3(0x187))/0x2+-parseInt(_0x4dd7f3(0x17e))/0x3*(parseInt(_0x4dd7f3(0x181))/0x4)+parseInt(_0x4dd7f3(0x183))/0x5*(-parseInt(_0x4dd7f3(0x185))/0x6)+parseInt(_0x4dd7f3(0x194))/0x7*(parseInt(_0x4dd7f3(0x186))/0x8)+-parseInt(_0x4dd7f3(0x179))/0x9+parseInt(_0x4dd7f3(0x180))/0xa*(parseInt(_0x4dd7f3(0x182))/0xb);if(_0x4832e6===_0x5b1ea9)break;else _0x524feb['push'](_0x524feb['shift']());}catch(_0x45f9d5){_0x524feb['push'](_0x524feb['shift']());}}}(a45_0xb280,0x81d03));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';function a45_0xb280(){const _0x38c5f8=['filePath','currentApp','lockKey','profileName','appCode','remote','selectedAppName','210tTKdlG','length','\x20remote-only','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','datasetCode','read','functions','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','boolean','bff','bool','446562RfZKQl','\x20added,\x20','\x20unchanged','status','907720KnLoHm','3ACBqFR','map','38810IwJDGq','1532572sQxKaq','6215TkbXNN','37285PAWwEX','hash','186qRbsSH','166680MXRryb','1428904SsvCWx','push','apiDir','mergedCli','has','lockFilePath'];a45_0xb280=function(){return _0x38c5f8;};return a45_0xb280();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a45_0x523a(_0x348bd8,_0x1d2e1c){_0x348bd8=_0x348bd8-0x171;const _0xb280eb=a45_0xb280();let _0x523a16=_0xb280eb[_0x348bd8];return _0x523a16;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a45_0x5add1f(0x177),'command':'status','description':a45_0x5add1f(0x175),'risk':a45_0x5add1f(0x173),'flags':[{'name':a45_0x5add1f(0x192),'type':a45_0x5add1f(0x176),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x58e301){const _0x16cbf6=a45_0x5add1f,_0x3e1678=loadBffProjectConfig(_0x58e301['appCode']),_0x37d4c9=await readBffLockFile(_0x3e1678[_0x16cbf6(0x18c)]),{appLock:_0x1fa501}=ensureLockScope(_0x37d4c9??createEmptyBffLock(),_0x58e301[_0x16cbf6(0x191)],_0x3e1678['scriptsRoot'],_0x16cbf6(0x17c)),_0x1f89ec=await scanLocalBffFunctions(_0x3e1678),_0x1850a4=[],_0x211618=[],_0x5331c9=[];for(const _0x4c022b of _0x1f89ec){const _0x390d52=await computeFileHash(_0x4c022b[_0x16cbf6(0x18d)]),_0x5a818f=_0x1fa501[_0x16cbf6(0x174)][_0x4c022b['lockKey']];if(!_0x5a818f)_0x1850a4[_0x16cbf6(0x188)](_0x4c022b[_0x16cbf6(0x18f)]);else _0x5a818f[_0x16cbf6(0x184)]!==_0x390d52?_0x211618['push'](_0x4c022b[_0x16cbf6(0x18f)]):_0x5331c9[_0x16cbf6(0x188)](_0x4c022b[_0x16cbf6(0x18f)]);}const _0x34bdeb=[];if(_0x58e301[_0x16cbf6(0x178)](_0x16cbf6(0x192))){const _0x5af93e=resolveApiModelSource(_0x58e301['apiDir'],_0x58e301[_0x16cbf6(0x191)],_0x58e301[_0x16cbf6(0x193)]||_0x58e301[_0x16cbf6(0x18a)]?.[_0x16cbf6(0x18e)]||_0x58e301[_0x16cbf6(0x18a)]?.['defaultApp']),_0x5b229a=loadAliasMap(_0x58e301[_0x16cbf6(0x189)],undefined,_0x5af93e[_0x16cbf6(0x18d)],_0x5af93e[_0x16cbf6(0x190)]),_0xde711=new Map(_0x5b229a[_0x16cbf6(0x17f)](_0x4059b5=>[_0x4059b5[_0x16cbf6(0x172)],_0x4059b5['alias']])),[_0x4cef17,_0x216938]=await Promise['all']([listBffScripts(_0x58e301[_0x16cbf6(0x191)]),getBffScriptStatistics(_0x58e301[_0x16cbf6(0x191)])]),_0x4999cc=createHookLocationMap(_0x216938),_0x29c785=new Set(_0x1f89ec['map'](_0x1b7987=>_0x1b7987[_0x16cbf6(0x18f)]));for(const _0x1debbb of _0x4cef17){const _0x13b2f2=resolveRemoteScriptTarget(_0x3e1678,_0x1debbb,_0x4999cc,_0x1fa501[_0x16cbf6(0x174)],_0xde711);_0x13b2f2&&!_0x29c785[_0x16cbf6(0x18b)](_0x13b2f2[_0x16cbf6(0x18f)])&&_0x34bdeb[_0x16cbf6(0x188)](_0x13b2f2[_0x16cbf6(0x18f)]);}}const _0x45f53d=_0x1850a4['length']===0x0&&_0x211618[_0x16cbf6(0x195)]===0x0&&_0x34bdeb['length']===0x0;return{'ok':!![],'data':{'added':_0x1850a4,'modified':_0x211618,'unchanged':_0x5331c9,'remoteOnly':_0x34bdeb},'message':_0x45f53d?_0x16cbf6(0x171):_0x1850a4[_0x16cbf6(0x195)]+_0x16cbf6(0x17a)+_0x211618['length']+'\x20modified,\x20'+_0x5331c9[_0x16cbf6(0x195)]+_0x16cbf6(0x17b)+(_0x34bdeb[_0x16cbf6(0x195)]>0x0?',\x20'+_0x34bdeb[_0x16cbf6(0x195)]+_0x16cbf6(0x196):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0xa43ad2=a46_0x5c44;function a46_0x5c44(_0x436ad0,_0x3eea00){_0x436ad0=_0x436ad0-0x1d0;const _0x58a7ec=a46_0x58a7();let _0x5c442a=_0x58a7ec[_0x436ad0];return _0x5c442a;}(function(_0x2445a3,_0x31f522){const _0x1a43b4=a46_0x5c44,_0xe60a69=_0x2445a3();while(!![]){try{const _0x2bda46=-parseInt(_0x1a43b4(0x1eb))/0x1*(parseInt(_0x1a43b4(0x1de))/0x2)+-parseInt(_0x1a43b4(0x1d1))/0x3+parseInt(_0x1a43b4(0x1e8))/0x4*(-parseInt(_0x1a43b4(0x1ee))/0x5)+parseInt(_0x1a43b4(0x1e0))/0x6+-parseInt(_0x1a43b4(0x1e3))/0x7*(parseInt(_0x1a43b4(0x1dc))/0x8)+-parseInt(_0x1a43b4(0x1da))/0x9+parseInt(_0x1a43b4(0x1dd))/0xa*(parseInt(_0x1a43b4(0x1e6))/0xb);if(_0x2bda46===_0x31f522)break;else _0xe60a69['push'](_0xe60a69['shift']());}catch(_0x44b9f7){_0xe60a69['push'](_0xe60a69['shift']());}}}(a46_0x58a7,0xe9e5e));function a46_0x58a7(){const _0x2d30f2=['cwd','6925941nuDkEc','skillVersion','470928IrasOd','397490xuUZAl','5914hsMEUr','cli-skill','915210nlJIWK','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','info','133rbVjLf','\x20via\x20skills@latest','inherit','1397OaMgzn','\x20installed','56528IPAMPf','\x20at\x20','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','51duiFVb','install','setLogPath','165XGZPBr','installedPath','5212338WlHXrE','read','repairCommand','Built-in\x20Skill\x20install\x20failed\x20[','code','CLI\x20Built-in\x20Skill\x20','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','nonInteractive'];a46_0x58a7=function(){return _0x2d30f2;};return a46_0x58a7();}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0xa43ad2(0x1df),'command':a46_0xa43ad2(0x1ec),'description':a46_0xa43ad2(0x1ea),'risk':a46_0xa43ad2(0x1d2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x19c506){const _0x8d7e9d=a46_0xa43ad2;logger[_0x8d7e9d(0x1ed)](process[_0x8d7e9d(0x1d9)]()),logger[_0x8d7e9d(0x1e2)]('cli-skill-install',_0x8d7e9d(0x1d7));const _0x32f790=installBuiltinSkill({'stdio':_0x19c506[_0x8d7e9d(0x1d8)]?'pipe':_0x8d7e9d(0x1e5)});if(!_0x32f790['ok'])throw CliErrors['apiError'](_0x8d7e9d(0x1d4)+_0x32f790[_0x8d7e9d(0x1d5)]+']:\x20'+(_0x32f790['error']||'unknown'),_0x8d7e9d(0x1e1)+_0x32f790[_0x8d7e9d(0x1d3)]);return console['log'](_0x32f790['changed']?_0x8d7e9d(0x1d6)+_0x32f790[_0x8d7e9d(0x1db)]+_0x8d7e9d(0x1e7)+(_0x32f790[_0x8d7e9d(0x1d0)]?_0x8d7e9d(0x1e9)+_0x32f790[_0x8d7e9d(0x1d0)]:_0x8d7e9d(0x1e4)):_0x8d7e9d(0x1d6)+_0x32f790[_0x8d7e9d(0x1db)]+'\x20is\x20already\x20current'+(_0x32f790[_0x8d7e9d(0x1d0)]?_0x8d7e9d(0x1e9)+_0x32f790['installedPath']:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x48a90e=a47_0x25e4;(function(_0x4ad3de,_0x579391){const _0x4d3258=a47_0x25e4,_0x1f99f1=_0x4ad3de();while(!![]){try{const _0x5779ea=-parseInt(_0x4d3258(0x1e1))/0x1*(-parseInt(_0x4d3258(0x1d4))/0x2)+parseInt(_0x4d3258(0x215))/0x3*(parseInt(_0x4d3258(0x1ef))/0x4)+-parseInt(_0x4d3258(0x1f0))/0x5*(-parseInt(_0x4d3258(0x218))/0x6)+parseInt(_0x4d3258(0x1e9))/0x7*(parseInt(_0x4d3258(0x1fc))/0x8)+parseInt(_0x4d3258(0x1d7))/0x9*(parseInt(_0x4d3258(0x209))/0xa)+-parseInt(_0x4d3258(0x220))/0xb+-parseInt(_0x4d3258(0x20e))/0xc;if(_0x5779ea===_0x579391)break;else _0x1f99f1['push'](_0x1f99f1['shift']());}catch(_0xec4ccb){_0x1f99f1['push'](_0x1f99f1['shift']());}}}(a47_0x5de0,0xdbabd));function a47_0x25e4(_0x4dd803,_0x467a59){_0x4dd803=_0x4dd803-0x1d3;const _0x5de0c4=a47_0x5de0();let _0x25e4e5=_0x5de0c4[_0x4dd803];return _0x25e4e5;}import a47_0x38aa99 from'chalk';import a47_0x46579e from'ora';import a47_0x2161a9 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x559de9=a47_0x25e4;return GIT_COMMIT!==_0x559de9(0x221)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x139d6c=a47_0x25e4,_0x496b63=process[_0x139d6c(0x1f7)][_0x139d6c(0x1ff)]();if(_0x496b63[_0x139d6c(0x1df)](_0x139d6c(0x1e4)))return'bun';return'npm';}const updateFlags=[{'name':a47_0x48a90e(0x213),'type':a47_0x48a90e(0x1ea),'description':a47_0x48a90e(0x225),'default':![]},{'name':'version','type':a47_0x48a90e(0x1fb),'description':a47_0x48a90e(0x204)}];function getRequestedVersion(_0x3cfec1){const _0x14f678=a47_0x48a90e;return _0x3cfec1['str'](_0x14f678(0x1d9))[_0x14f678(0x1f5)]();}async function validateUpdateFlags(_0x5a8960){const _0x17cf4b=a47_0x48a90e,_0x4c6089=_0x5a8960[_0x17cf4b(0x1eb)](_0x17cf4b(0x213)),_0x3d2c30=getRequestedVersion(_0x5a8960);if(_0x4c6089&&_0x3d2c30)throw CliErrors[_0x17cf4b(0x1fa)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x17cf4b(0x1d6));if(_0x3d2c30&&!a47_0x2161a9[_0x17cf4b(0x210)](_0x3d2c30))throw CliErrors[_0x17cf4b(0x1fa)](_0x17cf4b(0x1f3)+_0x3d2c30,_0x17cf4b(0x1f6));}async function fetchNpmDistTags(){const _0x12fcd5=a47_0x48a90e;try{const _0x27e4b2=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x12fcd5(0x1dc)](0x2710)});if(!_0x27e4b2['ok'])return null;const _0x8e7c95=await _0x27e4b2['json']();if(!_0x8e7c95||typeof _0x8e7c95!=='object')return null;return Object[_0x12fcd5(0x1d5)](Object[_0x12fcd5(0x1d3)](_0x8e7c95)['filter'](([,_0x7aec58])=>typeof _0x7aec58===_0x12fcd5(0x1fb)&&_0x7aec58[_0x12fcd5(0x1f5)]()['length']>0x0)[_0x12fcd5(0x222)](([_0x274281,_0x3e7f2b])=>[_0x274281,String(_0x3e7f2b)[_0x12fcd5(0x1f5)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5169a8){const _0x45dcec=await fetchNpmDistTags();return _0x45dcec?.[_0x5169a8]??null;}async function fetchLatestVersion(){const _0x2a48b0=a47_0x48a90e;return fetchNpmDistTagVersion(_0x2a48b0(0x219));}async function resolveTargetVersion(_0x1a9198){const _0x1dd8e9=a47_0x48a90e,_0xad70f4=getRequestedVersion(_0x1a9198);if(_0xad70f4)return{'version':_0xad70f4,'source':_0x1dd8e9(0x1d9)};if(_0x1a9198['bool']('beta')){const _0x5378bb=await fetchNpmDistTagVersion('beta');if(!_0x5378bb)return null;return{'version':_0x5378bb,'source':_0x1dd8e9(0x213)};}const _0x287bd0=await fetchLatestVersion();if(!_0x287bd0)return null;return{'version':_0x287bd0,'source':_0x1dd8e9(0x219)};}function a47_0x5de0(){const _0x2bb521=['fromEntries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','316656jFmAfe','code','version','\x20→\x20','error','timeout','@latest','\x20install\x20-g\x20','includes','Checking\x20CLI\x20Built-in\x20Skill...','1723421QNFvgN','npm','Current\x20version:\x20','bun','\x20doctor','current','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','start','8213107TXNDdi','boolean','bool','fail','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','install','9368AfzILW','5VRbaIw',']:\x20',',\x20then\x20verify\x20with:\x20','Invalid\x20version:\x20','log','trim','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','execPath','\x20is\x20up\x20to\x20date.','repairCommand','validation','string','8MpXQKE','Updating\x20via\x20','red','toLowerCase','read','run','Checking\x20for\x20updates...',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','Install\x20a\x20specific\x20CLI\x20version','Update\x20available:\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20\x20Try\x20manually:\x20','Update\x20failed','100CoyhDA','Requested\x20version:\x20','message','info','state','36632916zyXsVo','skillVersion','valid','gray','green','beta','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','1122HtETLv',',\x20state\x20','Beta\x20version:\x20','163806cxNusT','latest','\x20\x20CLI\x20Built-in\x20Skill\x20','Already\x20on\x20requested\x20version\x20(v','Version\x20comparison\x20failed','Current\x20version\x20v','yellow','source','2191805VGiQuk','unknown','map','Updated\x20to\x20v','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','expected\x20','succeed','apiError','entries','2lDobSv'];a47_0x5de0=function(){return _0x2bb521;};return a47_0x5de0();}function shouldInstallTarget(_0x3d6fdf,_0x5906dd){const _0xc512de=a47_0x48a90e;if(_0x5906dd[_0xc512de(0x21f)]==='version'||_0x5906dd[_0xc512de(0x21f)]===_0xc512de(0x213))return!a47_0x2161a9['eq'](_0x3d6fdf,_0x5906dd[_0xc512de(0x1d9)]);return a47_0x2161a9['lt'](_0x3d6fdf,_0x5906dd[_0xc512de(0x1d9)]);}function getInstallPlanLabel(_0x1f059a,_0x1b1b7b){const _0x3bcf69=a47_0x48a90e;switch(_0x1b1b7b['source']){case _0x3bcf69(0x213):return _0x3bcf69(0x217)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99[_0x3bcf69(0x212)](_0x1b1b7b[_0x3bcf69(0x1d9)]);case _0x3bcf69(0x1d9):return _0x3bcf69(0x20a)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99[_0x3bcf69(0x212)](_0x1b1b7b[_0x3bcf69(0x1d9)]);case _0x3bcf69(0x219):default:return _0x3bcf69(0x205)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99['green'](_0x1b1b7b['version']);}}function repairCurrentBuiltinSkill(){const _0x4073f4=a47_0x48a90e;console['log'](a47_0x38aa99[_0x4073f4(0x211)](_0x4073f4(0x1e0)));const _0x37bf46=installBuiltinSkill();if(_0x37bf46['ok']){console[_0x4073f4(0x1f4)](a47_0x38aa99['gray'](_0x4073f4(0x21a)+_0x37bf46[_0x4073f4(0x20f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x4073f4(0x228)](_0x4073f4(0x206)+_0x37bf46[_0x4073f4(0x1d8)]+_0x4073f4(0x1f1)+(_0x37bf46['error']||_0x4073f4(0x221)),'Run:\x20'+_0x37bf46[_0x4073f4(0x1f9)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x4073f4(0x1e5));}function verifyUpdatedBuiltinSkill(_0x4723c0){const _0x436189=a47_0x48a90e,_0x1bddb8=inspectInstalledBuiltinSkillVersion(_0x4723c0);if(_0x1bddb8[_0x436189(0x20d)]===_0x436189(0x1e6)){console[_0x436189(0x1f4)](a47_0x38aa99[_0x436189(0x211)](_0x436189(0x21a)+_0x4723c0+_0x436189(0x1f8)));return;}const _0x2f6093=_0x1bddb8[_0x436189(0x20f)]?_0x436189(0x226)+_0x4723c0+',\x20found\x20'+_0x1bddb8[_0x436189(0x20f)]:_0x436189(0x226)+_0x4723c0+_0x436189(0x216)+_0x1bddb8['state'];throw CliErrors[_0x436189(0x228)]('CLI\x20updated\x20to\x20v'+_0x4723c0+_0x436189(0x203)+_0x2f6093,'Run:\x20'+_0x1bddb8[_0x436189(0x1f9)]+_0x436189(0x1f2)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x15dbfb){const _0x40a63b=a47_0x48a90e;await validateUpdateFlags(_0x15dbfb);const _0x4e099c=getCurrentVersion();console[_0x40a63b(0x1f4)](_0x40a63b(0x1e3)+_0x4e099c);const _0x37b317=a47_0x46579e(_0x40a63b(0x202))[_0x40a63b(0x1e8)](),_0x2858ba=await resolveTargetVersion(_0x15dbfb);if(!_0x2858ba){const _0xbd3d40=_0x15dbfb[_0x40a63b(0x1eb)](_0x40a63b(0x213))?_0x40a63b(0x1ed):_0x40a63b(0x1e7);return _0x37b317[_0x40a63b(0x1ec)](_0xbd3d40),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)](_0x40a63b(0x214)+NPM_PACKAGE_NAME+_0x40a63b(0x1dd))),{'ok':![],'message':_0xbd3d40};}const _0x3f05ca=a47_0x2161a9['valid'](VERSION),_0x399b59=a47_0x2161a9[_0x40a63b(0x210)](_0x2858ba[_0x40a63b(0x1d9)]);if(!_0x3f05ca||!_0x399b59)return _0x37b317[_0x40a63b(0x1ec)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x40a63b(0x21c)};if(!shouldInstallTarget(_0x3f05ca,_0x2858ba)){const _0x509a8c=_0x2858ba[_0x40a63b(0x21f)]===_0x40a63b(0x1d9)?_0x40a63b(0x21b)+_0x2858ba[_0x40a63b(0x1d9)]+')':a47_0x2161a9['gt'](_0x3f05ca,_0x399b59)?_0x40a63b(0x21d)+_0x4e099c+_0x40a63b(0x224)+_0x2858ba[_0x40a63b(0x1d9)]:'Already\x20up\x20to\x20date\x20(v'+_0x2858ba[_0x40a63b(0x1d9)]+')';return _0x37b317[_0x40a63b(0x227)](_0x509a8c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x37b317[_0x40a63b(0x20c)](getInstallPlanLabel(_0x4e099c,_0x2858ba));const _0x27a975=detectPackageManager(),_0x13a721=_0x27a975===_0x40a63b(0x1e2)?resolveNpmBin('npm'):_0x27a975,_0x40e02e=a47_0x46579e(_0x40a63b(0x1fd)+_0x27a975+'...')['start']();try{await execa(_0x13a721,[_0x40a63b(0x1ee),'-g',NPM_PACKAGE_NAME+'@'+_0x2858ba[_0x40a63b(0x1d9)]],{'stdio':'pipe'}),_0x40e02e[_0x40a63b(0x227)](_0x40a63b(0x223)+_0x2858ba[_0x40a63b(0x1d9)]),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x15663c){return _0x40e02e[_0x40a63b(0x1ec)](_0x40a63b(0x208)),console[_0x40a63b(0x1db)](a47_0x38aa99[_0x40a63b(0x1fe)]('\x20\x20'+_0x15663c[_0x40a63b(0x20b)])),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)](_0x40a63b(0x207)+_0x27a975+_0x40a63b(0x1de)+NPM_PACKAGE_NAME+'@'+_0x2858ba[_0x40a63b(0x1d9)])),{'ok':![],'message':_0x15663c[_0x40a63b(0x20b)]};}return verifyUpdatedBuiltinSkill(_0x2858ba[_0x40a63b(0x1d9)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a47_0x48a90e(0x201),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a47_0x48a90e(0x200),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x2669c0=a47_0x40f2;(function(_0x101887,_0x20d9db){const _0x467bc8=a47_0x40f2,_0x1cd5c9=_0x101887();while(!![]){try{const _0x19c127=parseInt(_0x467bc8(0x15f))/0x1*(parseInt(_0x467bc8(0x12b))/0x2)+parseInt(_0x467bc8(0x13e))/0x3+-parseInt(_0x467bc8(0x141))/0x4+-parseInt(_0x467bc8(0x16f))/0x5*(parseInt(_0x467bc8(0x127))/0x6)+parseInt(_0x467bc8(0x12d))/0x7*(-parseInt(_0x467bc8(0x147))/0x8)+-parseInt(_0x467bc8(0x11b))/0x9*(-parseInt(_0x467bc8(0x11e))/0xa)+parseInt(_0x467bc8(0x16e))/0xb*(parseInt(_0x467bc8(0x13f))/0xc);if(_0x19c127===_0x20d9db)break;else _0x1cd5c9['push'](_0x1cd5c9['shift']());}catch(_0x2e0ff0){_0x1cd5c9['push'](_0x1cd5c9['shift']());}}}(a47_0x2767,0x5998a));import a47_0xeb8976 from'chalk';function a47_0x40f2(_0x8c3c67,_0x3a4dbd){_0x8c3c67=_0x8c3c67-0x119;const _0x276726=a47_0x2767();let _0x40f2b4=_0x276726[_0x8c3c67];return _0x40f2b4;}import a47_0x485713 from'ora';import a47_0x4be1c4 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';function a47_0x2767(){const _0x3b72f0=['trim',',\x20then\x20verify\x20with:\x20','Checking\x20CLI\x20Built-in\x20Skill...','13fdAjzm','Updated\x20to\x20v','log','\x20is\x20up\x20to\x20date.','Updating\x20via\x20','Install\x20a\x20specific\x20CLI\x20version','Version\x20comparison\x20failed','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','bun','source','Update\x20available:\x20','message','fail','entries',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','132rFcACp','5NXbpMP','code','Requested\x20version:\x20','9ypaiOj','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Run:\x20','625340NuxfoU','\x20→\x20','succeed','...','skillVersion','timeout','str','length','Current\x20version\x20v','1152702kpgDeh','map','beta','toLowerCase','76118zErFnC','error','7XyRnNw','unknown','validation','CLI\x20updated\x20to\x20v','\x20doctor','gray','Checking\x20for\x20updates...','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','pipe','bool','filter','current','includes','version','boolean','slice','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','145311cOEezr','632676gHRWYd','latest','562888LnAybb','Try\x20manually:\x20','run',',\x20found\x20','Invalid\x20version:\x20','npm','4308712HhUoPl','execPath','yellow','expected\x20','valid','repairCommand','/dist-tags','json','https://registry.npmjs.org/-/package/','\x20\x20CLI\x20Built-in\x20Skill\x20','apiError','Update\x20failed:\x20','state','start','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','read','green','string','info','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['];a47_0x2767=function(){return _0x3b72f0;};return a47_0x2767();}import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x78bfe2=a47_0x40f2;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x78bfe2(0x13c)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2a4080=a47_0x40f2,_0x4aa9b9=process[_0x2a4080(0x148)][_0x2a4080(0x12a)]();if(_0x4aa9b9[_0x2a4080(0x139)](_0x2a4080(0x167)))return _0x2a4080(0x167);return _0x2a4080(0x146);}const updateFlags=[{'name':a47_0x2669c0(0x129),'type':a47_0x2669c0(0x13b),'description':a47_0x2669c0(0x166),'default':![]},{'name':'version','type':'string','description':a47_0x2669c0(0x164)}];function getRequestedVersion(_0x1687d7){const _0x43d7ac=a47_0x2669c0;return _0x1687d7[_0x43d7ac(0x124)](_0x43d7ac(0x13a))[_0x43d7ac(0x15c)]();}async function validateUpdateFlags(_0x36048d){const _0x1e6f18=a47_0x2669c0,_0x209dd6=_0x36048d[_0x1e6f18(0x136)](_0x1e6f18(0x129)),_0xe73932=getRequestedVersion(_0x36048d);if(_0x209dd6&&_0xe73932)throw CliErrors[_0x1e6f18(0x12f)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x1e6f18(0x134));if(_0xe73932&&!a47_0x4be1c4['valid'](_0xe73932))throw CliErrors[_0x1e6f18(0x12f)](_0x1e6f18(0x145)+_0xe73932,_0x1e6f18(0x155));}async function fetchNpmDistTags(){const _0xb5b406=a47_0x2669c0;try{const _0xf640=await fetch(_0xb5b406(0x14f)+encodeURIComponent(NPM_PACKAGE_NAME)+_0xb5b406(0x14d),{'signal':AbortSignal[_0xb5b406(0x123)](0x2710)});if(!_0xf640['ok'])return null;const _0x1bee5a=await _0xf640[_0xb5b406(0x14e)]();if(!_0x1bee5a||typeof _0x1bee5a!=='object')return null;return Object['fromEntries'](Object[_0xb5b406(0x16c)](_0x1bee5a)[_0xb5b406(0x137)](([,_0x45b93b])=>typeof _0x45b93b===_0xb5b406(0x158)&&_0x45b93b['trim']()[_0xb5b406(0x125)]>0x0)[_0xb5b406(0x128)](([_0x9064f6,_0x4f65ef])=>[_0x9064f6,String(_0x4f65ef)[_0xb5b406(0x15c)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2efe79){const _0xab39c=await fetchNpmDistTags();return _0xab39c?.[_0x2efe79]??null;}async function fetchLatestVersion(){const _0x449d68=a47_0x2669c0;return fetchNpmDistTagVersion(_0x449d68(0x140));}async function resolveTargetVersion(_0x5d58b1){const _0x7131d6=a47_0x2669c0,_0x29a921=getRequestedVersion(_0x5d58b1);if(_0x29a921)return{'version':_0x29a921,'source':_0x7131d6(0x13a)};if(_0x5d58b1[_0x7131d6(0x136)](_0x7131d6(0x129))){const _0x481cb1=await fetchNpmDistTagVersion('beta');if(!_0x481cb1)return null;return{'version':_0x481cb1,'source':'beta'};}const _0x519816=await fetchLatestVersion();if(!_0x519816)return null;return{'version':_0x519816,'source':_0x7131d6(0x140)};}function shouldInstallTarget(_0x1ae862,_0x104ace){const _0x476e0f=a47_0x2669c0;if(_0x104ace[_0x476e0f(0x168)]===_0x476e0f(0x13a)||_0x104ace[_0x476e0f(0x168)]===_0x476e0f(0x129))return!a47_0x4be1c4['eq'](_0x1ae862,_0x104ace[_0x476e0f(0x13a)]);return a47_0x4be1c4['lt'](_0x1ae862,_0x104ace[_0x476e0f(0x13a)]);}function getInstallPlanLabel(_0x447c01,_0x528146){const _0x4d19d9=a47_0x2669c0;switch(_0x528146[_0x4d19d9(0x168)]){case _0x4d19d9(0x129):return'Beta\x20version:\x20'+a47_0xeb8976['yellow'](_0x447c01)+'\x20→\x20'+a47_0xeb8976[_0x4d19d9(0x157)](_0x528146['version']);case _0x4d19d9(0x13a):return _0x4d19d9(0x11a)+a47_0xeb8976[_0x4d19d9(0x149)](_0x447c01)+'\x20→\x20'+a47_0xeb8976['green'](_0x528146[_0x4d19d9(0x13a)]);case'latest':default:return _0x4d19d9(0x169)+a47_0xeb8976['yellow'](_0x447c01)+_0x4d19d9(0x11f)+a47_0xeb8976[_0x4d19d9(0x157)](_0x528146['version']);}}function repairCurrentBuiltinSkill(){const _0x38f313=a47_0x2669c0;console['log'](a47_0xeb8976[_0x38f313(0x132)](_0x38f313(0x15e)));const _0x384d3b=installBuiltinSkill();if(_0x384d3b['ok']){console[_0x38f313(0x161)](a47_0xeb8976[_0x38f313(0x132)](_0x38f313(0x150)+_0x384d3b[_0x38f313(0x122)]+_0x38f313(0x162)));return;}throw CliErrors[_0x38f313(0x151)](_0x38f313(0x15b)+_0x384d3b[_0x38f313(0x119)]+']:\x20'+(_0x384d3b[_0x38f313(0x12c)]||_0x38f313(0x12e)),_0x38f313(0x11d)+_0x384d3b[_0x38f313(0x14c)]+_0x38f313(0x15d)+CLI_BIN_NAME+_0x38f313(0x131));}function verifyUpdatedBuiltinSkill(_0x4a3893){const _0x585222=a47_0x2669c0,_0x20e786=inspectInstalledBuiltinSkillVersion(_0x4a3893);if(_0x20e786['state']===_0x585222(0x138)){console['log'](a47_0xeb8976[_0x585222(0x132)](_0x585222(0x150)+_0x4a3893+'\x20is\x20up\x20to\x20date.'));return;}const _0x8dd9ec=_0x20e786[_0x585222(0x122)]?_0x585222(0x14a)+_0x4a3893+_0x585222(0x144)+_0x20e786[_0x585222(0x122)]:'expected\x20'+_0x4a3893+',\x20state\x20'+_0x20e786[_0x585222(0x153)];throw CliErrors['apiError'](_0x585222(0x130)+_0x4a3893+_0x585222(0x16d)+_0x8dd9ec,_0x585222(0x11d)+_0x20e786[_0x585222(0x14c)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x369ca5){const _0xa8e2e6=a47_0x2669c0;await validateUpdateFlags(_0x369ca5);const _0x42eedc=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x42eedc);const _0x55c965=a47_0x485713(_0xa8e2e6(0x133))[_0xa8e2e6(0x154)](),_0x4c1a9b=await resolveTargetVersion(_0x369ca5);if(!_0x4c1a9b){const _0x578a8e=_0x369ca5[_0xa8e2e6(0x136)](_0xa8e2e6(0x129))?_0xa8e2e6(0x11c):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';_0x55c965[_0xa8e2e6(0x16b)](_0x578a8e);throw CliErrors[_0xa8e2e6(0x151)](_0x578a8e,'Try\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+(_0x369ca5['bool'](_0xa8e2e6(0x129))?'beta':_0xa8e2e6(0x140)));}const _0x5cf069=a47_0x4be1c4[_0xa8e2e6(0x14b)](VERSION),_0x285ab4=a47_0x4be1c4['valid'](_0x4c1a9b[_0xa8e2e6(0x13a)]);if(!_0x5cf069||!_0x285ab4){_0x55c965[_0xa8e2e6(0x16b)](_0xa8e2e6(0x165));throw CliErrors[_0xa8e2e6(0x151)]('Version\x20comparison\x20failed',_0xa8e2e6(0x15a)+CLI_BIN_NAME+'\x20update\x20--version\x20<version>');}if(!shouldInstallTarget(_0x5cf069,_0x4c1a9b)){const _0x158c03=_0x4c1a9b[_0xa8e2e6(0x168)]===_0xa8e2e6(0x13a)?'Already\x20on\x20requested\x20version\x20(v'+_0x4c1a9b[_0xa8e2e6(0x13a)]+')':a47_0x4be1c4['gt'](_0x5cf069,_0x285ab4)?_0xa8e2e6(0x126)+_0x42eedc+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x4c1a9b[_0xa8e2e6(0x13a)]:'Already\x20up\x20to\x20date\x20(v'+_0x4c1a9b[_0xa8e2e6(0x13a)]+')';return _0x55c965['succeed'](_0x158c03),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x55c965[_0xa8e2e6(0x159)](getInstallPlanLabel(_0x42eedc,_0x4c1a9b));const _0x572c61=detectPackageManager(),_0x1fe076=_0x572c61==='npm'?resolveNpmBin(_0xa8e2e6(0x146)):_0x572c61,_0x419cb2=a47_0x485713(_0xa8e2e6(0x163)+_0x572c61+_0xa8e2e6(0x121))[_0xa8e2e6(0x154)]();try{await execa(_0x1fe076,['install','-g',NPM_PACKAGE_NAME+'@'+_0x4c1a9b[_0xa8e2e6(0x13a)]],{'stdio':_0xa8e2e6(0x135)}),_0x419cb2[_0xa8e2e6(0x120)](_0xa8e2e6(0x160)+_0x4c1a9b[_0xa8e2e6(0x13a)]),console[_0xa8e2e6(0x161)](a47_0xeb8976[_0xa8e2e6(0x132)](_0xa8e2e6(0x13d)));}catch(_0x186932){_0x419cb2[_0xa8e2e6(0x16b)]('Update\x20failed');throw CliErrors['apiError'](_0xa8e2e6(0x152)+(_0x186932 instanceof Error?_0x186932[_0xa8e2e6(0x16a)]:String(_0x186932)),_0xa8e2e6(0x142)+_0x572c61+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x4c1a9b[_0xa8e2e6(0x13a)]);}return verifyUpdatedBuiltinSkill(_0x4c1a9b[_0xa8e2e6(0x13a)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a47_0x2669c0(0x143),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a47_0x2669c0(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x9d78(_0x244ea7,_0x7c8d6c){_0x244ea7=_0x244ea7-0x14f;const _0x4df16f=a48_0x4df1();let _0x9d786d=_0x4df16f[_0x244ea7];return _0x9d786d;}(function(_0x3117f9,_0x270b49){const _0x423498=a48_0x9d78,_0xa2f964=_0x3117f9();while(!![]){try{const _0x4ef860=parseInt(_0x423498(0x153))/0x1+-parseInt(_0x423498(0x154))/0x2*(parseInt(_0x423498(0x157))/0x3)+parseInt(_0x423498(0x159))/0x4*(parseInt(_0x423498(0x156))/0x5)+-parseInt(_0x423498(0x152))/0x6+-parseInt(_0x423498(0x151))/0x7*(parseInt(_0x423498(0x14f))/0x8)+-parseInt(_0x423498(0x158))/0x9+-parseInt(_0x423498(0x150))/0xa*(-parseInt(_0x423498(0x155))/0xb);if(_0x4ef860===_0x270b49)break;else _0xa2f964['push'](_0xa2f964['shift']());}catch(_0x55ffb0){_0xa2f964['push'](_0xa2f964['shift']());}}}(a48_0x4df1,0x98907));function a48_0x4df1(){const _0x395838=['5680116ONqjmT','820640hcsvwu','2QHAIVI','5159LvJZMN','25wkfjcp','1374141liSInK','5915754SEIWfy','593692vbvZJG','8018072nsRkrj','45340svpBPV','7hwzGPI'];a48_0x4df1=function(){return _0x395838;};return a48_0x4df1();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a49_0x52cc(_0x33e6c6,_0x4f0ee9){_0x33e6c6=_0x33e6c6-0x84;const _0x354379=a49_0x3543();let _0x52cc70=_0x354379[_0x33e6c6];return _0x52cc70;}function a49_0x3543(){const _0x152dda=['80GoDwTM','1020272AwyaOs','85736NxCiwf','codegen','boolean','skip-imports','bool','4klStih','sdk','273933BNPqhz','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Omit\x20import\x20statements\x20from\x20generated\x20code','string','str','4676784aibKLb','9brIbUZ','operation','160955uQXRrX','2201862vZWXWb','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','appCode','1131120StRpLx'];a49_0x3543=function(){return _0x152dda;};return a49_0x3543();}const a49_0x3cc688=a49_0x52cc;(function(_0x5ed1c6,_0x4cfea0){const _0x3bfe25=a49_0x52cc,_0x18992e=_0x5ed1c6();while(!![]){try{const _0x534b34=parseInt(_0x3bfe25(0x95))/0x1+parseInt(_0x3bfe25(0x8e))/0x2*(parseInt(_0x3bfe25(0x85))/0x3)+-parseInt(_0x3bfe25(0x93))/0x4*(-parseInt(_0x3bfe25(0x87))/0x5)+parseInt(_0x3bfe25(0x88))/0x6+parseInt(_0x3bfe25(0x84))/0x7+-parseInt(_0x3bfe25(0x8d))/0x8+-parseInt(_0x3bfe25(0x8b))/0x9*(parseInt(_0x3bfe25(0x8c))/0xa);if(_0x534b34===_0x4cfea0)break;else _0x18992e['push'](_0x18992e['shift']());}catch(_0x1ba246){_0x18992e['push'](_0x18992e['shift']());}}}(a49_0x3543,0x523cb));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a49_0x3cc688(0x8f),'command':a49_0x3cc688(0x94),'description':a49_0x3cc688(0x97),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a49_0x3cc688(0x89)},{'name':a49_0x3cc688(0x86),'type':a49_0x3cc688(0x99),'required':!![],'description':a49_0x3cc688(0x96)},{'name':a49_0x3cc688(0x91),'type':a49_0x3cc688(0x90),'description':a49_0x3cc688(0x98)}],async 'execute'(_0x1edec0){const _0xf17160=a49_0x3cc688,{dataset:_0x512780,operation:_0x4917a9}=await getOperationDetail(_0x1edec0[_0xf17160(0x8a)],_0x1edec0[_0xf17160(0x9a)]('code'),_0x1edec0[_0xf17160(0x9a)](_0xf17160(0x86))),_0x2d7e5c=generateSdkCode(_0x512780,_0x4917a9,{'includeImports':!_0x1edec0[_0xf17160(0x92)](_0xf17160(0x91))});return{'ok':!![],'data':{'dataset':{'name':_0x512780['name'],'code':_0x512780['code'],'tableName':_0x512780['tableName']},'operation':_0x1edec0[_0xf17160(0x9a)](_0xf17160(0x86)),'code':_0x2d7e5c}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x5a8283=a50_0x1876;(function(_0x12b487,_0x5c3edb){const _0x369295=a50_0x1876,_0xae8f62=_0x12b487();while(!![]){try{const _0x9d4826=parseInt(_0x369295(0xb4))/0x1+parseInt(_0x369295(0xbc))/0x2*(-parseInt(_0x369295(0xb2))/0x3)+-parseInt(_0x369295(0xc6))/0x4+-parseInt(_0x369295(0xad))/0x5*(-parseInt(_0x369295(0xbf))/0x6)+parseInt(_0x369295(0xaf))/0x7*(parseInt(_0x369295(0xc0))/0x8)+-parseInt(_0x369295(0xbb))/0x9+parseInt(_0x369295(0xb9))/0xa*(parseInt(_0x369295(0xc4))/0xb);if(_0x9d4826===_0x5c3edb)break;else _0xae8f62['push'](_0xae8f62['shift']());}catch(_0x23c080){_0xae8f62['push'](_0xae8f62['shift']());}}}(a50_0x598b,0x56ce4));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a50_0x1876(_0x2f415b,_0x54f2cf){_0x2f415b=_0x2f415b-0xab;const _0x598b30=a50_0x598b();let _0x187631=_0x598b30[_0x2f415b];return _0x187631;}function a50_0x598b(){const _0x4a047f=['string','113820loqGIH','target','3384081wlcbSx','2CGelbP','read','str','6vmAbBG','4248LrBRRL','sql','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','Omit\x20import\x20statements\x20from\x20generated\x20code','374MPUpDb','sqlCode','640784QPjbbf','bff','no-imports','sdk','1725175emcYLW','sqlcode','2793PTenkD','bool','appCode','1336518RJLxbb','sqlName','393375UibVUl','boolean','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','codegen'];a50_0x598b=function(){return _0x4a047f;};return a50_0x598b();}export const codegenSql={'service':a50_0x5a8283(0xb7),'command':a50_0x5a8283(0xc1),'description':a50_0x5a8283(0xc2),'risk':a50_0x5a8283(0xbd),'flags':[SQLCODE_FLAG,{'name':a50_0x5a8283(0xba),'type':a50_0x5a8283(0xb8),'description':a50_0x5a8283(0xb6),'default':a50_0x5a8283(0xac),'enum':['sdk',a50_0x5a8283(0xc7)]},{'name':a50_0x5a8283(0xab),'type':a50_0x5a8283(0xb5),'description':a50_0x5a8283(0xc3)}],async 'execute'(_0x5e8147){const _0x48072f=a50_0x5a8283,_0x34134b=await getSqlQueryInfo(_0x5e8147[_0x48072f(0xb1)],_0x5e8147[_0x48072f(0xbe)](_0x48072f(0xae))),_0x560d82=_0x5e8147['str'](_0x48072f(0xba))||_0x48072f(0xac),_0x393072=generateSqlCodeTemplate(_0x34134b,{'target':_0x560d82,'includeImports':!_0x5e8147[_0x48072f(0xb0)](_0x48072f(0xab))});return{'ok':!![],'data':{'sqlCode':_0x34134b[_0x48072f(0xc5)],'sqlName':_0x34134b[_0x48072f(0xb3)],'target':_0x560d82,'code':_0x393072}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2666ef,_0x3e1a82){const _0xa3809f=a51_0x5215,_0x439e61=_0x2666ef();while(!![]){try{const _0x56b992=parseInt(_0xa3809f(0x6d))/0x1*(-parseInt(_0xa3809f(0x8c))/0x2)+-parseInt(_0xa3809f(0x65))/0x3+parseInt(_0xa3809f(0x89))/0x4*(-parseInt(_0xa3809f(0x76))/0x5)+-parseInt(_0xa3809f(0x77))/0x6+-parseInt(_0xa3809f(0x6b))/0x7*(parseInt(_0xa3809f(0x75))/0x8)+parseInt(_0xa3809f(0x7c))/0x9+parseInt(_0xa3809f(0x64))/0xa;if(_0x56b992===_0x3e1a82)break;else _0x439e61['push'](_0x439e61['shift']());}catch(_0x55b544){_0x439e61['push'](_0x439e61['shift']());}}}(a51_0x4a68,0x95107));function a51_0x5215(_0x211032,_0x4965de){_0x211032=_0x211032-0x64;const _0x4a6877=a51_0x4a68();let _0x5215d0=_0x4a6877[_0x211032];return _0x5215d0;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';function a51_0x4a68(){const _0x377e37=['1030DFWXyV','3438708kWvntG','project','string','Removed\x20app\x20\x22','projectConfig','7413858cuPmzn','bool','apps','both','length','\x20app\x20\x22','str','boolean','\x20Default\x20app\x20changed\x20to\x20\x22','validation','defaultApp','\x20<name>\x20--appcode\x20<code>','object','14104qhJHTk','trim','Missing\x20app\x20name.','840058OpdVtG','args','\x20config.','global','22489410PBYOPL','759192jlkPjF','keys','flagMissing','globalConfig','\x20<name>','appcode','51149hkcmCg','Use\x20global\x20config\x20scope','1RYFjNc','App\x20code','Updated','App\x20\x22','\x22\x20is\x20selected\x20automatically.','\x22\x20not\x20found.','\x20<name>\x20[--global]','Added','536QSguCs'];a51_0x4a68=function(){return _0x377e37;};return a51_0x4a68();}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1c04f6=a51_0x5215;return[{'name':_0x1c04f6(0x6a),'type':_0x1c04f6(0x79),'description':_0x1c04f6(0x6e),'required':!![]},{'name':_0x1c04f6(0x8f),'type':_0x1c04f6(0x83),'description':_0x1c04f6(0x6c),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x26ef9e=a51_0x5215;return[{'name':_0x26ef9e(0x8f),'type':'boolean','description':_0x26ef9e(0x6c),'default':![]}];}export async function validateAppName(_0x375d42,_0x107230){const _0x1c8f3b=a51_0x5215,_0x56da03=_0x375d42[_0x1c8f3b(0x8d)][0x0]?.[_0x1c8f3b(0x8a)]();if(!_0x56da03)throw CliErrors[_0x1c8f3b(0x85)](_0x1c8f3b(0x8b),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x107230+_0x1c8f3b(0x69));}export async function runAppAdd(_0xfb482e,_0x2c4634){const _0x5aa93c=a51_0x5215,_0x2ca5b3=_0xfb482e[_0x5aa93c(0x8d)][0x0]?.['trim']();if(!_0x2ca5b3)throw CliErrors[_0x5aa93c(0x85)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2c4634+_0x5aa93c(0x87));const _0x21357c=_0xfb482e[_0x5aa93c(0x82)](_0x5aa93c(0x6a));if(!_0x21357c)throw CliErrors[_0x5aa93c(0x67)](_0x5aa93c(0x6a),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2c4634+'\x20<name>\x20--appcode\x20<code>');const _0x47785d={'global':_0xfb482e[_0x5aa93c(0x7d)]('global')},_0x3b2ea3=readConfig(_0x47785d);if(!_0x3b2ea3['apps'])_0x3b2ea3['apps']={};const _0x44a104={'appcode':_0x21357c,...collectAppProfileOverrides(_0x500cdf=>_0xfb482e[_0x5aa93c(0x82)](_0x500cdf))},_0xd591b2=_0x3b2ea3[_0x5aa93c(0x7e)],_0x6524ea=Object[_0x5aa93c(0x66)](_0xd591b2),_0x47f03a=typeof _0x3b2ea3['defaultApp']===_0x5aa93c(0x79)&&_0xd591b2[_0x3b2ea3['defaultApp']]?_0x3b2ea3[_0x5aa93c(0x86)]:_0x6524ea[_0x5aa93c(0x80)]===0x1?_0x6524ea[0x0]:undefined,_0xeaf629=!!_0xd591b2[_0x2ca5b3];_0xd591b2[_0x2ca5b3]=_0x44a104;const _0x490350=normalizeStoredDefaultApp(_0x3b2ea3,_0x47f03a);writeConfig(_0x3b2ea3,_0x47785d);const _0x2347f5=!_0xeaf629&&_0x490350?'\x20Default\x20app\x20is\x20\x22'+_0x490350+'\x22.':'',_0x2f8118=(_0xeaf629?_0x5aa93c(0x6f):_0x5aa93c(0x74))+_0x5aa93c(0x81)+_0x2ca5b3+'\x22\x20(appcode:\x20'+_0x21357c+')'+scopeLabel(_0x47785d)+'.'+_0x2347f5;return{'ok':!![],'message':_0x2f8118};}export async function runAppRemove(_0x1fb464,_0x16fd80){const _0x5966b5=a51_0x5215,_0x2f1c65=_0x1fb464[_0x5966b5(0x8d)][0x0]?.[_0x5966b5(0x8a)]();if(!_0x2f1c65)throw CliErrors[_0x5966b5(0x85)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x16fd80+_0x5966b5(0x73));const _0x27354f=_0x1fb464[_0x5966b5(0x7d)](_0x5966b5(0x8f)),{config:_0x46c9c5,layers:_0x3e945d}=readRawConfigWithLayers(),_0x3ecb5c=_0x46c9c5['apps']??{};if(!_0x3ecb5c[_0x2f1c65])throw CliErrors[_0x5966b5(0x85)](_0x5966b5(0x70)+_0x2f1c65+_0x5966b5(0x72));const _0x39dfd8=_0x3e945d[_0x5966b5(0x68)][_0x5966b5(0x7e)]&&typeof _0x3e945d[_0x5966b5(0x68)][_0x5966b5(0x7e)]==='object'?_0x3e945d['globalConfig'][_0x5966b5(0x7e)]:{},_0x359943=_0x3e945d[_0x5966b5(0x7b)]['apps']&&typeof _0x3e945d[_0x5966b5(0x7b)][_0x5966b5(0x7e)]===_0x5966b5(0x88)?_0x3e945d[_0x5966b5(0x7b)][_0x5966b5(0x7e)]:{},_0x213826=appDefinedIn(_0x2f1c65,_0x39dfd8,_0x359943),_0x2934d4=resolveAppScopeForWrite(_0x2f1c65,_0x27354f,_0x3e945d),_0x5115a6={'global':_0x2934d4===_0x5966b5(0x8f)},_0x6a3066=readConfig(_0x5115a6),_0x5d0b92=_0x6a3066[_0x5966b5(0x7e)];if(!_0x5d0b92||!_0x5d0b92[_0x2f1c65])throw CliErrors['validation']('App\x20\x22'+_0x2f1c65+_0x5966b5(0x72));delete _0x5d0b92[_0x2f1c65];let _0x484373='';const _0x33a286=typeof _0x6a3066[_0x5966b5(0x86)]===_0x5966b5(0x79)?_0x6a3066[_0x5966b5(0x86)]:undefined,_0x1516f7=Object[_0x5966b5(0x66)](_0x5d0b92),_0x5c0f82=_0x33a286===_0x2f1c65?_0x1516f7[0x0]:_0x33a286,_0x421088=normalizeStoredDefaultApp(_0x6a3066,_0x5c0f82);if(_0x33a286===_0x2f1c65&&_0x1516f7[_0x5966b5(0x80)]===0x1)_0x484373='\x20Remaining\x20app\x20\x22'+_0x1516f7[0x0]+_0x5966b5(0x71);else _0x33a286===_0x2f1c65&&_0x421088&&(_0x484373=_0x5966b5(0x84)+_0x421088+'\x22.');Object[_0x5966b5(0x66)](_0x5d0b92)[_0x5966b5(0x80)]===0x0&&(delete _0x6a3066[_0x5966b5(0x7e)],delete _0x6a3066['defaultApp']);writeConfig(_0x6a3066,_0x5115a6);const _0x344cc9=_0x213826===_0x5966b5(0x7f)?'\x20Note:\x20app\x20\x22'+_0x2f1c65+'\x22\x20still\x20defined\x20in\x20'+(_0x2934d4===_0x5966b5(0x78)?_0x5966b5(0x8f):'project')+_0x5966b5(0x8e):'';return{'ok':!![],'message':_0x5966b5(0x7a)+_0x2f1c65+'\x22'+scopeLabel(_0x5115a6)+'.'+_0x484373+_0x344cc9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x91eca1,_0x281acb){const _0x1be996=a52_0x46c3,_0x24a9cd=_0x91eca1();while(!![]){try{const _0x43f412=parseInt(_0x1be996(0x19e))/0x1+-parseInt(_0x1be996(0x1ad))/0x2+parseInt(_0x1be996(0x1a1))/0x3+parseInt(_0x1be996(0x1ab))/0x4*(-parseInt(_0x1be996(0x1ba))/0x5)+parseInt(_0x1be996(0x1b6))/0x6+-parseInt(_0x1be996(0x1a2))/0x7*(parseInt(_0x1be996(0x1a4))/0x8)+-parseInt(_0x1be996(0x1bb))/0x9;if(_0x43f412===_0x281acb)break;else _0x24a9cd['push'](_0x24a9cd['shift']());}catch(_0x105a0e){_0x24a9cd['push'](_0x24a9cd['shift']());}}}(a52_0x34d1,0x3dbd5));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x1c6b8c from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a52_0x46c3(_0x377673,_0x318fb4){_0x377673=_0x377673-0x19c;const _0x34d1ee=a52_0x34d1();let _0x46c36d=_0x34d1ee[_0x377673];return _0x46c36d;}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x3d1c0a=a52_0x46c3,_0x327b0d=await input({'message':_0x3d1c0a(0x1b4),'validate':_0x3e2d9c=>{const _0x467600=_0x3d1c0a,_0x567017=validateAppcode(_0x3e2d9c['trim']());return _0x567017['valid']||_0x567017[_0x467600(0x1b9)]||'Invalid\x20App\x20Code';}});return _0x327b0d[_0x3d1c0a(0x1a8)]();}function a52_0x34d1(){const _0x567500=['skip','manual','message','75AAPJkW','7882497UXMsqS','length','\x20\x20(','(Skip;\x20configure\x20later)','374693BUztvO','yellow','gray','1144488CenHIY','4739ecMrec','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','16raEEPd','Fetching\x20available\x20apps...','Select\x20the\x20app\x20to\x20bind:','appCode','trim','Found\x20','✎\x20Enter\x20manually','7052rrFhOM','cyan','138892uMFonZ','appName','✎\x20Enter\x20appcode\x20manually','includes','find','map','custom','App\x20Code:','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','2818644NrddPO'];a52_0x34d1=function(){return _0x567500;};return a52_0x34d1();}export async function promptAppSelection(_0x580c63){const _0x153737=a52_0x46c3,_0x5e0d40=[{'name':a52_0x1c6b8c[_0x153737(0x19f)]('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x580c63[_0x153737(0x1b2)]((_0x31b51e,_0x52b418)=>({'name':_0x31b51e[_0x153737(0x1ae)]+'\x20\x20'+a52_0x1c6b8c[_0x153737(0x1a0)]('('+_0x31b51e[_0x153737(0x1a7)]+')'),'value':_0x52b418}))],_0x1c89b4=await checkbox({'message':_0x153737(0x1a9)+a52_0x1c6b8c[_0x153737(0x1ac)](_0x580c63[_0x153737(0x1bc)])+'\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','choices':_0x5e0d40,'loop':![]});if(_0x1c89b4[_0x153737(0x1b0)](-0x1))return'custom';if(_0x1c89b4['length']===0x0)return _0x153737(0x1b3);return _0x1c89b4[_0x153737(0x1b2)](_0x4e1cc7=>_0x580c63[_0x4e1cc7]);}export async function promptSingleAppSelection(_0x3c9a66){const _0xc96052=a52_0x46c3,_0x413ece=[{'name':a52_0x1c6b8c[_0xc96052(0x1a0)](_0xc96052(0x1b5)),'value':'skip'},{'name':a52_0x1c6b8c[_0xc96052(0x19f)](_0xc96052(0x1af)),'value':_0xc96052(0x1b3)},..._0x3c9a66[_0xc96052(0x1b2)](_0x1752d9=>({'name':_0x1752d9[_0xc96052(0x1ae)]+'\x20\x20'+a52_0x1c6b8c[_0xc96052(0x1a0)]('('+_0x1752d9[_0xc96052(0x1a7)]+')'),'value':_0x1752d9[_0xc96052(0x1a7)]}))],_0xf0ce81=await select({'message':_0xc96052(0x1a6),'choices':_0x413ece});if(_0xf0ce81===_0xc96052(0x1b7))return _0xc96052(0x1b7);if(_0xf0ce81===_0xc96052(0x1b3))return _0xc96052(0x1b3);return _0x3c9a66[_0xc96052(0x1b1)](_0x33ca97=>_0x33ca97[_0xc96052(0x1a7)]===_0xf0ce81);}export async function selectSingleAppcode(_0x42d62e){const _0x2af5bd=a52_0x46c3;if(!_0x42d62e)return writeCliSideChannelLine(a52_0x1c6b8c['gray']('(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)')),_fallbackOrSkip();writeCliSideChannelLine(_0x2af5bd(0x1a5));let _0x438dee;try{_0x438dee=await withActiveCookie(_0x42d62e,()=>listRemoteApps());}catch(_0x3acaf6){writeCliSideChannelLine(a52_0x1c6b8c[_0x2af5bd(0x19f)]('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x3acaf6 instanceof Error)writeCliSideChannelLine(a52_0x1c6b8c[_0x2af5bd(0x1a0)]('\x20\x20('+_0x3acaf6[_0x2af5bd(0x1b9)]+')'));return _fallbackOrSkip();}if(_0x438dee[_0x2af5bd(0x1bc)]===0x0)return writeCliSideChannelLine(a52_0x1c6b8c['yellow']('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x4c7105=await promptSingleAppSelection(_0x438dee);if(_0x4c7105===_0x2af5bd(0x1b7))return'';if(_0x4c7105==='custom')return promptCustomAppcode();return _0x4c7105[_0x2af5bd(0x1a7)];}export async function selectMultipleApps(_0x208ab1){const _0x30f7ba=a52_0x46c3;writeCliSideChannelLine(_0x30f7ba(0x1a5));let _0x309b44;try{_0x309b44=await withActiveCookie(_0x208ab1,()=>listRemoteApps());}catch(_0x3aab30){writeCliSideChannelLine(_0x30f7ba(0x1a3));if(_0x3aab30 instanceof Error)writeCliSideChannelLine(_0x30f7ba(0x19c)+_0x3aab30['message']+')');return'custom';}if(_0x309b44[_0x30f7ba(0x1bc)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x30f7ba(0x1b3);return promptAppSelection(_0x309b44);}async function _fallbackOrSkip(){const _0x28374c=a52_0x46c3,_0x42d4f7=await select({'message':_0x28374c(0x1b4),'choices':[{'name':a52_0x1c6b8c['gray'](_0x28374c(0x19d)),'value':_0x28374c(0x1b7)},{'name':a52_0x1c6b8c['yellow'](_0x28374c(0x1aa)),'value':_0x28374c(0x1b8)}]});if(_0x42d4f7===_0x28374c(0x1b7))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x30e184=a53_0x3078;function a53_0x1217(){const _0x2e978a=['\x20--appcode\x20','128304TTmBQt','\x27\x5c\x27\x27','5fFqbPB','trim','21NRlvcP','107642GPjHsV','23309VlVNIa','\x20failed:\x20','SUCCESS','1450ShYCFv','\x20is\x20processing.','\x20failed.','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','690IiVjbq','status','187528BvpAsY','toUpperCase','string','225144ydCBRu','\x20--format\x20compress','Async\x20task\x20','\x20task\x20status\x20--task-id\x20','3024aPCOHQ','errorMessage','1035675XTkorW','Task\x20','has','PENDING','FAILED','taskId','apiError','\x20returned\x20unknown\x20status\x20'];a53_0x1217=function(){return _0x2e978a;};return a53_0x1217();}(function(_0x346897,_0x4b6867){const _0x4cdfe4=a53_0x3078,_0x4a3d53=_0x346897();while(!![]){try{const _0x3e4ef2=parseInt(_0x4cdfe4(0xfb))/0x1+parseInt(_0x4cdfe4(0x100))/0x2+-parseInt(_0x4cdfe4(0x108))/0x3*(-parseInt(_0x4cdfe4(0x111))/0x4)+parseInt(_0x4cdfe4(0xfd))/0x5*(parseInt(_0x4cdfe4(0x10d))/0x6)+parseInt(_0x4cdfe4(0xff))/0x7*(-parseInt(_0x4cdfe4(0x10a))/0x8)+parseInt(_0x4cdfe4(0x113))/0x9+parseInt(_0x4cdfe4(0x104))/0xa*(-parseInt(_0x4cdfe4(0x101))/0xb);if(_0x3e4ef2===_0x4b6867)break;else _0x4a3d53['push'](_0x4a3d53['shift']());}catch(_0x5c3857){_0x4a3d53['push'](_0x4a3d53['shift']());}}}(a53_0x1217,0x1ffd2));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a53_0x30e184(0xf6)]),NON_TERMINAL_STATUSES=new Set([a53_0x30e184(0x116),'PROCESSING']);export function normalizeAsyncTask(_0xc10139){const _0x5824ad=a53_0x30e184,_0x44c257=typeof _0xc10139?.[_0x5824ad(0xf7)]===_0x5824ad(0x10c)?_0xc10139[_0x5824ad(0xf7)][_0x5824ad(0xfe)]():'';if(!_0x44c257)throw CliErrors[_0x5824ad(0xf8)](_0x5824ad(0x107));const _0x4498c8=typeof _0xc10139[_0x5824ad(0x109)]==='string'?_0xc10139[_0x5824ad(0x109)][_0x5824ad(0xfe)]()[_0x5824ad(0x10b)]():'';if(!_0x4498c8)throw CliErrors['apiError'](_0x5824ad(0x10f)+_0x44c257+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x44c257,'status':_0x4498c8,'errorMessage':typeof _0xc10139[_0x5824ad(0x112)]===_0x5824ad(0x10c)&&_0xc10139[_0x5824ad(0x112)]['trim']()?_0xc10139['errorMessage'][_0x5824ad(0xfe)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x4498c8),'knownStatus':TERMINAL_STATUSES[_0x5824ad(0x115)](_0x4498c8)||NON_TERMINAL_STATUSES['has'](_0x4498c8)};}export function buildAsyncTaskStatusCommand(_0x2a5bdf,_0x2a5584){const _0xb9b760=a53_0x30e184;return CLI_BIN_NAME+_0xb9b760(0x110)+quoteShellArg(_0x2a5bdf)+_0xb9b760(0xfa)+quoteShellArg(_0x2a5584)+_0xb9b760(0x10e);}export function asyncTaskMessage(_0x379045){const _0x289f3c=a53_0x30e184;switch(_0x379045['status']){case _0x289f3c(0x116):return _0x289f3c(0x114)+_0x379045[_0x289f3c(0xf7)]+'\x20is\x20pending.';case'PROCESSING':return _0x289f3c(0x114)+_0x379045[_0x289f3c(0xf7)]+_0x289f3c(0x105);case _0x289f3c(0x103):return _0x289f3c(0x114)+_0x379045[_0x289f3c(0xf7)]+'\x20completed\x20successfully.';case _0x289f3c(0xf6):return _0x379045[_0x289f3c(0x112)]?_0x289f3c(0x114)+_0x379045[_0x289f3c(0xf7)]+_0x289f3c(0x102)+_0x379045[_0x289f3c(0x112)]:_0x289f3c(0x114)+_0x379045['taskId']+_0x289f3c(0x106);default:return'Task\x20'+_0x379045['taskId']+_0x289f3c(0xf9)+_0x379045[_0x289f3c(0x109)]+'.';}}function a53_0x3078(_0x23e2df,_0x4e48c2){_0x23e2df=_0x23e2df-0xf6;const _0x12175c=a53_0x1217();let _0x307841=_0x12175c[_0x23e2df];return _0x307841;}function quoteShellArg(_0x5e0bb4){const _0x3bd11f=a53_0x30e184;return'\x27'+_0x5e0bb4['replace'](/'/g,_0x3bd11f(0xfc))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x352f(_0x28b329,_0x17ead4){_0x28b329=_0x28b329-0x145;var _0x22a1fa=a54_0x22a1();var _0x352f35=_0x22a1fa[_0x28b329];return _0x352f35;}(function(_0x36ad90,_0x4dea45){var _0x3e88b4=a54_0x352f,_0x31543a=_0x36ad90();while(!![]){try{var _0xdd9de6=parseInt(_0x3e88b4(0x145))/0x1*(-parseInt(_0x3e88b4(0x152))/0x2)+-parseInt(_0x3e88b4(0x14f))/0x3*(parseInt(_0x3e88b4(0x150))/0x4)+parseInt(_0x3e88b4(0x147))/0x5*(-parseInt(_0x3e88b4(0x14a))/0x6)+parseInt(_0x3e88b4(0x154))/0x7+-parseInt(_0x3e88b4(0x14c))/0x8*(parseInt(_0x3e88b4(0x148))/0x9)+parseInt(_0x3e88b4(0x149))/0xa*(parseInt(_0x3e88b4(0x14b))/0xb)+parseInt(_0x3e88b4(0x151))/0xc*(parseInt(_0x3e88b4(0x14e))/0xd);if(_0xdd9de6===_0x4dea45)break;else _0x31543a['push'](_0x31543a['shift']());}catch(_0x373718){_0x31543a['push'](_0x31543a['shift']());}}}(a54_0x22a1,0x8fd3d));function a54_0x22a1(){var _0x24dd1c=['3208ICOtVE','description','1664403rDtkdo','2355OGeuTR','5052xblELg','336eMQEwU','2153602FxNnhI','method','2833390zNwzPR','1VoApTR','url','60jUuwIH','18261aSWCKf','448160rGiEwJ','304134fuaerk','22gJWlfM'];a54_0x22a1=function(){return _0x24dd1c;};return a54_0x22a1();}export function asDryRunResult(_0x17508b,_0x3235f3){var _0x5dbe07=a54_0x352f;return Object['defineProperties'](_0x17508b,{'method':{'value':_0x3235f3[_0x5dbe07(0x153)],'enumerable':![]},'url':{'value':_0x3235f3[_0x5dbe07(0x146)],'enumerable':![]},..._0x3235f3[_0x5dbe07(0x14d)]?{'description':{'value':_0x3235f3['description'],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x33e49f=a55_0x2ad8;(function(_0x36cdec,_0x540f17){const _0x163a7c=a55_0x2ad8,_0x51db8f=_0x36cdec();while(!![]){try{const _0x13d1d5=-parseInt(_0x163a7c(0x216))/0x1+parseInt(_0x163a7c(0x21a))/0x2*(-parseInt(_0x163a7c(0x1f7))/0x3)+parseInt(_0x163a7c(0x211))/0x4+parseInt(_0x163a7c(0x20d))/0x5*(parseInt(_0x163a7c(0x1fd))/0x6)+-parseInt(_0x163a7c(0x1ff))/0x7+-parseInt(_0x163a7c(0x209))/0x8+parseInt(_0x163a7c(0x218))/0x9*(parseInt(_0x163a7c(0x1fe))/0xa);if(_0x13d1d5===_0x540f17)break;else _0x51db8f['push'](_0x51db8f['shift']());}catch(_0x36a91f){_0x51db8f['push'](_0x51db8f['shift']());}}}(a55_0x1a2d,0xcc474));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x33e49f(0x20a),'type':a55_0x33e49f(0x1f4),'required':!![],'description':a55_0x33e49f(0x21b)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x33e49f(0x202),'type':'string','required':!![],'description':'Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation'};export const CROSS_RELATION_TO_DATASET_FLAG={'name':'to-datasetcode','type':a55_0x33e49f(0x1f4),'required':!![],'description':a55_0x33e49f(0x219)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x33e49f(0x210),'type':a55_0x33e49f(0x1f4),'required':!![],'description':a55_0x33e49f(0x1fb)};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x33e49f(0x1f6),'type':'number','description':a55_0x33e49f(0x1fc)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x33e49f(0x1f8),'type':a55_0x33e49f(0x1f4),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x33e49f(0x213),'type':'string','enum':['ONE_TO_ONE',a55_0x33e49f(0x1f9),a55_0x33e49f(0x20f),a55_0x33e49f(0x217)],'description':a55_0x33e49f(0x204)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x33e49f(0x214),'type':'boolean','default':![],'description':a55_0x33e49f(0x1fa)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x33e49f(0x200)};export const CODE_FLAG={'name':a55_0x33e49f(0x207),'type':a55_0x33e49f(0x1f4),'required':!![],'description':a55_0x33e49f(0x20b),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x33e49f(0x212),'description':a55_0x33e49f(0x20b)};export const SQLCODE_FLAG={'name':a55_0x33e49f(0x205),'type':'string','required':!![],'description':a55_0x33e49f(0x215),'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':'appcode','type':a55_0x33e49f(0x1f4),'required':![],'description':a55_0x33e49f(0x203)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a55_0x2ad8(_0x5d6ec6,_0x57b1f2){_0x5d6ec6=_0x5d6ec6-0x1f3;const _0x1a2da2=a55_0x1a2d();let _0x2ad856=_0x1a2da2[_0x5d6ec6];return _0x2ad856;}export const DBLINK_ID_FLAG={'name':'id','type':a55_0x33e49f(0x20c),'required':!![],'description':a55_0x33e49f(0x1f5)};function a55_0x1a2d(){const _0x5b5211=['Target\x20field\x20name','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','6dWCpkK','3976730KZOVJR','10186659lvAqRs','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','Database\x20product\x20type','from-column','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','sqlcode','skip-connection-test','code','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','2171032uBBoeV','from-datasetcode','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','number','4075955GmNILB','MYSQL','MANY_TO_ONE','to-column','1638392RLlSce','datasetcode','cardinality','global','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1194364BuzHWi','MANY_TO_MANY','81TrSFGJ','Target\x20DB_TABLE\x20dataset\x20code','6bcRzin','Source\x20DB_TABLE\x20dataset\x20code','dbtype','string','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','from-dblink-id','1046142yDBUuW','to-label-column','ONE_TO_MANY','Write\x20to\x20the\x20global\x20configuration'];a55_0x1a2d=function(){return _0x5b5211;};return a55_0x1a2d();}export const DB_TYPE_FLAG={'name':a55_0x33e49f(0x1f3),'type':'string','required':!![],'description':a55_0x33e49f(0x201),'enum':[a55_0x33e49f(0x20e),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x33e49f(0x206),'type':'boolean','description':a55_0x33e49f(0x208)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28d75f,_0x459781){const _0x51f613=a56_0x5963,_0x5b333e=_0x28d75f();while(!![]){try{const _0x7bfdc8=-parseInt(_0x51f613(0x14d))/0x1*(parseInt(_0x51f613(0x144))/0x2)+-parseInt(_0x51f613(0x14f))/0x3*(parseInt(_0x51f613(0x13f))/0x4)+-parseInt(_0x51f613(0x141))/0x5+-parseInt(_0x51f613(0x146))/0x6*(parseInt(_0x51f613(0x140))/0x7)+parseInt(_0x51f613(0x13d))/0x8*(parseInt(_0x51f613(0x13c))/0x9)+parseInt(_0x51f613(0x143))/0xa+-parseInt(_0x51f613(0x150))/0xb*(-parseInt(_0x51f613(0x14a))/0xc);if(_0x7bfdc8===_0x459781)break;else _0x5b333e['push'](_0x5b333e['shift']());}catch(_0x16972b){_0x5b333e['push'](_0x5b333e['shift']());}}}(a56_0x203a,0x75a7e));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a56_0x5963(_0x43976f,_0x2196c1){_0x43976f=_0x43976f-0x13c;const _0x203a6b=a56_0x203a();let _0x59631e=_0x203a6b[_0x43976f];return _0x59631e;}function a56_0x203a(){const _0x555ab5=['toFixed','24RtkXiO','\x20MB','validation','14369fcWsjj','File\x20is\x20not\x20a\x20regular\x20file:\x20','3CfQivu','8082734gKRUWX','9cfxsSB','1577368XeWDRR','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','759464MYfdXf','7DRfVWL','1827230HEtmhO','trim','3222180yCnYda','98uCKWyK','isFile','1485996lUAlAi','size','\x20path\x20is\x20required.'];a56_0x203a=function(){return _0x555ab5;};return a56_0x203a();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3b08fd){const _0x30f935=a56_0x5963;if(_0x3b08fd>=BYTES_PER_MB){const _0x1a9ba6=Math['ceil'](_0x3b08fd/BYTES_PER_MB*0x64)/0x64;return _0x1a9ba6[_0x30f935(0x149)](0x2)+_0x30f935(0x14b);}return _0x3b08fd+'\x20B';}export function requireDevelopmentUploadFile(_0x271265,_0x3ec06a){const _0x4fc5f1=a56_0x5963,_0x5bc81d=_0x271265[_0x4fc5f1(0x142)]();if(!_0x5bc81d)throw CliErrors['validation'](_0x3ec06a+_0x4fc5f1(0x148));if(!existsSync(_0x5bc81d))throw CliErrors[_0x4fc5f1(0x14c)]('File\x20not\x20found:\x20'+_0x5bc81d);const _0x335384=statSync(_0x5bc81d);if(!_0x335384[_0x4fc5f1(0x145)]())throw CliErrors[_0x4fc5f1(0x14c)](_0x4fc5f1(0x14e)+_0x5bc81d);if(_0x335384['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4fc5f1(0x14c)](_0x4fc5f1(0x13e)+_0x5bc81d+'\x20('+formatBytes(_0x335384[_0x4fc5f1(0x147)])+')');return{'path':_0x5bc81d,'size':_0x335384['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3403e8,_0x1f0461){const _0x5c4ab9=a57_0x5b8c,_0x512a0c=_0x3403e8();while(!![]){try{const _0x2acba2=parseInt(_0x5c4ab9(0x1bb))/0x1+-parseInt(_0x5c4ab9(0x1b8))/0x2*(parseInt(_0x5c4ab9(0x1b2))/0x3)+-parseInt(_0x5c4ab9(0x1b4))/0x4+-parseInt(_0x5c4ab9(0x1b3))/0x5*(-parseInt(_0x5c4ab9(0x1ba))/0x6)+parseInt(_0x5c4ab9(0x1be))/0x7+parseInt(_0x5c4ab9(0x1bd))/0x8+-parseInt(_0x5c4ab9(0x1b6))/0x9*(parseInt(_0x5c4ab9(0x1bc))/0xa);if(_0x2acba2===_0x1f0461)break;else _0x512a0c['push'](_0x512a0c['shift']());}catch(_0x20dc43){_0x512a0c['push'](_0x512a0c['shift']());}}}(a57_0x40e5,0x9b739));export function validateAppcode(_0x3a2273){const _0x4a3410=a57_0x5b8c,_0x151e34=_0x3a2273['trim']();if(!_0x151e34)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x151e34[_0x4a3410(0x1b7)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x4a3410(0x1b5)](_0x151e34))return{'valid':![],'message':_0x4a3410(0x1b9)};return{'valid':!![]};}function a57_0x5b8c(_0x5ead05,_0xc21ceb){_0x5ead05=_0x5ead05-0x1b2;const _0x40e517=a57_0x40e5();let _0x5b8cc=_0x40e517[_0x5ead05];return _0x5b8cc;}function a57_0x40e5(){const _0x2e6282=['982994HjNMtB','370ASLAnV','1425136TBGJXN','2935611EdifTc','153663xfjMYF','5UcybZL','2037680qGBhQS','test','44127IALlDk','length','14jAUGQz','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','633588lOXQgU'];a57_0x40e5=function(){return _0x2e6282;};return a57_0x40e5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x422aae=a58_0x179a;(function(_0x1591a8,_0x95d60e){const _0x4a32e2=a58_0x179a,_0x56f0e7=_0x1591a8();while(!![]){try{const _0x5bf4bc=parseInt(_0x4a32e2(0xc6))/0x1*(-parseInt(_0x4a32e2(0xa6))/0x2)+parseInt(_0x4a32e2(0xb0))/0x3*(-parseInt(_0x4a32e2(0xaa))/0x4)+parseInt(_0x4a32e2(0xc8))/0x5+-parseInt(_0x4a32e2(0xba))/0x6+-parseInt(_0x4a32e2(0xc0))/0x7*(parseInt(_0x4a32e2(0xb7))/0x8)+-parseInt(_0x4a32e2(0xad))/0x9+parseInt(_0x4a32e2(0xbf))/0xa*(parseInt(_0x4a32e2(0xc4))/0xb);if(_0x5bf4bc===_0x95d60e)break;else _0x56f0e7['push'](_0x56f0e7['shift']());}catch(_0x10e44d){_0x56f0e7['push'](_0x56f0e7['shift']());}}}(a58_0x3513,0xc2930));import{CliErrors}from'../../errors.js';function a58_0x179a(_0x186ab5,_0x13e8f7){_0x186ab5=_0x186ab5-0xa6;const _0x351386=a58_0x3513();let _0x179a04=_0x351386[_0x186ab5];return _0x179a04;}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a58_0x422aae(0xa8)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x422aae(0xc2),a58_0x422aae(0xc5)]);async function execute(_0x52fa0b){const _0x2925db=a58_0x422aae,_0x2524ba=_0x52fa0b[_0x2925db(0xa7)][0x0]?.[_0x2925db(0xc1)]();if(!_0x2524ba)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x2925db(0xab)+CLI_BIN_NAME+_0x2925db(0xbd));if(_0x2524ba==='riskLevel')throw CliErrors['validation'](_0x2925db(0xb2));if(!isTopLevelConfigKey(_0x2524ba)&&!EXTRA_DELETABLE_KEYS['has'](_0x2524ba)&&!LEGACY_DELETABLE_KEYS[_0x2925db(0xbe)](_0x2524ba))throw CliErrors[_0x2925db(0xa9)](_0x2925db(0xaf)+_0x2524ba+_0x2925db(0xac),_0x2925db(0xae));const _0x16bfcc=resolveWriteScope({'global':_0x52fa0b[_0x2925db(0xb5)]('global')}),_0xb2a1f6=readScopedConfig(_0x16bfcc),_0x3e09a7=Object['prototype'][_0x2925db(0xb9)][_0x2925db(0xc9)](_0xb2a1f6,_0x2524ba);_0x3e09a7&&(delete _0xb2a1f6[_0x2524ba],writeScopedConfig(_0xb2a1f6,_0x16bfcc));const _0x2c13a0=_0x16bfcc===_0x2925db(0xb1)?_0x2925db(0xc3):'Project';return{'ok':!![],'message':_0x3e09a7?'✓\x20'+_0x2c13a0+'\x20'+_0x2524ba+'\x20deleted':'✓\x20'+_0x2c13a0+'\x20'+_0x2524ba+'\x20already\x20absent','data':{'key':_0x2524ba,'scope':_0x16bfcc,'changed':_0x3e09a7}};}export const configDeleteDefinition={'service':a58_0x422aae(0xb8),'command':'delete','description':a58_0x422aae(0xbb),'risk':a58_0x422aae(0xb3),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x422aae(0xc7),'description':a58_0x422aae(0xb4),'required':!![]}],'flags':[{'name':'global','type':a58_0x422aae(0xb6),'description':a58_0x422aae(0xbc),'default':![]}],'execute':execute};function a58_0x3513(){const _0x1c35e9=['\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','write','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','bool','boolean','8dnKidI','config','hasOwnProperty','4533828Ewuixc','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','\x20config\x20delete\x20<key>\x20[--global]','has','10qwxFDg','10588445gAypNR','trim','defaultApp','Global','68194951JgOqsH','routing','1581292oUImFB','key','3823565kRZWdh','call','2NtKeAv','args','inherit','validation','5884VCVfnh','Usage:\x20','\x22\x20is\x20not\x20deletable.','11883375rkQBRa','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','Top-level\x20key\x20\x22','2034fNjAMv','global'];a58_0x3513=function(){return _0x1c35e9;};return a58_0x3513();}
|